Camera position in the 3-D Point Cloud Registration and Stitching example

2 次查看(过去 30 天)
Hello,
I am going through the example '3-D Point Cloud Registration and Stitching'
(https://de.mathworks.com/help/vision/examples/3-d-point-cloud-registration-and-stitching.html)
and I am trying to determine the camera position in the first and second input image to then display it in the 'Initial world scene' image. But I'm having difficulties with this and would really appreciate some help on this one.
Best, Christian

回答(1 个)

Prashant Arora
Prashant Arora 2017-10-16
Hi Christopher,
I believe with respect to each point cloud, the camera is located at the origin. Hence, to show the camera position in the "Initial World Scene", you can show the first camera as:
plotCamera('Location',[0 0 0],'Orientation',eye(3),'Size',0.1);
The second camera can be shown as:
camPosRel = [0 0 0 1];
camPosTransformed = camPosRel*(tform.T)';
plotCamera('Location',camPosTransformed(1:3),'Orientation',tform.T(1:3,1:3),'Size',0.1);
Moving on, you can use the "accumTform" variable instead of "tform" to transform the camera from any point cloud frame ( [0 0 0 1] is the relative position) to the "world" or "initial scene"
Prashant
  1 个评论
Behnam Nasirian
Behnam Nasirian 2018-5-20
This answer seems to be wrong. If camPosRel = [0 0 0 1]; camPosTransformed = camPosRel*(tform.T)'; Then camPosTransformed always will equal to [0 0 0 1].

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Camera Views 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by