Camera position in the 3-D Point Cloud Registration and Stitching example
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
0 commentaires
Réponses (1)
Prashant Arora
le 16 Oct 2017
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 commentaire
Behnam Nasirian
le 20 Mai 2018
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].
Voir également
Catégories
En savoir plus sur Point Cloud Processing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!