三维点云形成像棱镜

3视图(30天)
Pooshpanja罗伊
Pooshpanja罗伊 2016年6月18日
编辑: Munin2022年3月28日
亲爱的我想在2016年Matlab画一个点云。点云是形成这样的东西,而不是常规的点云。谁能帮助我,为什么这样?
谢谢你!
我的代码
清晰的所有
关闭所有
% %负载立体相机的参数
%加载| stereoParameters |对象,它是校准的结果
%相机使用| stereoCameraCalibrator |应用或
% | estimateCameraParameters |函数。
%加载stereoParameters对象。
负载(“webcam.mat”);
%可视化相机外在。
showExtrinsics (stereoParams);
% % %读者创建视频文件和视频播放器
% %创建系统对象用于读取和显示视频
% videoFileLeft =“second_1.mp4”;
% videoFileRight =“first_1.mp4”;
%
% readerLeft =愿景。VideoFileReader (videoFileLeft ' VideoOutputDataType ', ' uint8 ');
% readerRight =愿景。VideoFileReader (videoFileRight ' VideoOutputDataType ', ' uint8 ');
% =球员愿景。DeployableVideoPlayer(“位置”,[400]);
% %阅读和纠正视频帧
%来自左派和右派的帧相机必须纠正
%计算差异和重建三维场景。纠正图像
%有横向纵向线条,row-aligned。这简化了
%的计算差异减少匹配的搜索空间
%指向一维。纠正图像也可以合并成一个
%浮雕,它可以使用立体red-cyan眼镜
% 3 d效果。
frameLeft = imread (“first.jpg”);
frameRight = imread (“second.jpg”);
[frameLeftRect, frameRightRect] =
rectifyStereoImages (frameLeft frameRight stereoParams);
图;
imshow (stereoAnaglyph (frameLeftRect frameRightRect));
标题(纠正视频帧的);
% %计算差异
%在纠正任何一对立体图像对应点
%在同一像素行。左边图像的每个像素计算
%距离对应的像素的图像。这个距离是
%的差异,它的距离成正比
%相应世界点相机。
frameLeftGray = rgb2gray (frameLeftRect);
frameRightGray = rgb2gray (frameRightRect);
disparityMap =差距(frameLeftGray frameRightGray);
图;
,64年imshow (disparityMap [0]);
标题(“差距地图”);
colormap飞机
colorbar
% %重建三维场景
%重构相应的三维世界坐标点
%的像素差异映射。
points3D = reconstructScene (disparityMap stereoParams);
%转换为米和创建一个pointCloud对象
points3D = points3D。/ 1000;
ptCloud = pointCloud (points3D,“颜色”,frameLeftRect);
%
% %创建一个流点云查看器
% player3D = pcplayer (3, 3, 3, 3, [0,8],‘VerticalAxis’,‘y’,……
%’VerticalAxisDir”、“下”);
%
% %可视化点云
% %视图(player3D ptCloud);
% pcshow (ptCloud.Location ptCloud.Color);
pcshow (ptCloud“VerticalAxis”,“y”,“VerticalAxisDir”,“下来”,
“MarkerSize”,45岁);
%文件名=“xxx.ply”;
% pcwrite (ptCloud文件名,“PLYFormat”、“二进制”);

答案(2)

Qiuheng周
Qiuheng周 2019年2月8日
编辑:沃尔特·罗伯森 2020年3月14日
嗨,我想,我和你有同样的问题。你已经解决了你的问题吗?
我想这个问题应该是在这里。
ptCloud = pointCloud (points3D,“颜色”,frameLeftRect);
然而,应该改变的算法。我不确定。

Munin
Munin 2022年3月28日
编辑:Munin 2022年3月28日
我联系了MATLAB支持团队对这个问题,告诉他金宝app们我写几十行代码来约束世界巨头棱镜点云的z-apex幕:
https://github.com/SNDST00M/stereo2stl/blob/v1.5.0/script.m L216-L380
他们不接受代码并提出一个简单的过滤器> 3 m = 0。即它永远不会被修补。世界舞台的一百万点云表面接近原点

标签

下载188bet金宝搏

社区寻宝

找到宝藏在MATLAB中央,发现社区如何帮助你!

开始狩猎!

翻译的