ステレオカメラによる深度測定
Afficher commentaires plus anciens
ステレオカメラによる深度測定を実施しておりますが、
ターゲット画像を読み込んで出力するとピクセル数が下がってしまいます。
これが原因で測定したい範囲が網羅できていないのですが、解決方法を教えてください。
(下記画像のワークスペースを参照ください。)
%ステレオ カメラのパラメーターの読み込み
% Load the stereoParameters object.
load('handshakeStereoParams.mat');
% Visualize camera extrinsics.
showExtrinsics(stereoParams);
%ビデオフレームの読み取りと平行化
frameLeft = imread('I1(left).jpg');
frameRight = imread('I2(right).jpg');
[frameLeftRect, frameRightRect] = ...
rectifyStereoImages(frameLeft, frameRight, stereoParams);
figure;
imshow(stereoAnaglyph(frameLeftRect, frameRightRect));
title('pit_fig');
%視差の計算
frameLeftGray = rgb2gray(frameLeftRect);
frameRightGray = rgb2gray(frameRightRect);
disparityMap = disparity(frameLeftGray, frameRightGray);
figure;
imshow(disparityMap, [0, 100]);
title('Disparity Map');
colormap jet
colorbar
%3次元シーン再構成
points3D = reconstructScene(disparityMap, stereoParams);
% Convert to meters and create a pointCloud object
points3D = points3D ./1000;
ptCloud = pointCloud(points3D, 'Color', frameLeftRect);
% Create a streaming point cloud viewer
player3D = pcplayer([-3, 3], [-3, 3], [0, 8], 'VerticalAxis', 'y', ...
'VerticalAxisDir', 'down');
% Visualize the point cloud
view(player3D, ptCloud);

Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur 単一カメラとステレオ カメラのキャリブレーション dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
