我的立体声图像对的点云输出似乎非常不准确和奇怪。我相信这可能是由不正确的视差图引起的,因为与立体图像相比,视差图中没有任何东西看起来是可辨别的。我需要使用哪些方法来获得正确的视差图并最终获得正确的点云?
如果需要,我可以提供相机参数。
% load stereo images and camera parameters
load('stereoFrames.mat')
load('stereoParameters.mat')
% read stereo images
frameLeft = stereoFrames{1};
frameRite = stereoFrames{2};
% undistort and rectify stereo images
frameLeftRect = undistortImage(frameLeft, stereoParameters.CameraParameters1);
frameRiteRect = undistortImage(frameRite, stereoParameters.CameraParameters2);
[frameLeftRect, frameRiteRect] = rectifyStereoImages(frameLeftRect, frameRiteRect, stereoParameters, 'OutputView', 'valid');
frameLeftGray = rgb2gray(frameLeftRect);
frameRiteGray = rgb2gray(frameRiteRect);
% obtain disparity map and point cloud
frameDisparity = disparity(frameLeftGray, frameRiteGray);
framePoints = reconstructScene(frameDisparity, stereoParameters);
pointCloud = pointCloud(framePoints);
左立体影像
右立体影像
视差地图
点云