- https://www.mathworks.com/help/images/ref/rigidtform3d.html?s_tid=doc_ta#prop_rigidtform3d_R
- https://www.mathworks.com/help/releases/R2023a/nav/ref/rotm2eul.html
- https://www.mathworks.com/help/releases/R2023a/vision/ref/pcregistericp.html?s_tid=doc_ta#mw_956bb30c-4581-4d5c-a592-44c15f3dc2e0
force to estimate with pcregistericp only the rotation
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I have the use case that I would like to us the G-ICP with plane to plane (as provided in pcregistericp) to estimate just the rotation. I know that the translation cannot change.
However I don't find a way to force just the rotation been estimated. Any ideas?
providing an initial translation didn't help.
0 Kommentare
Antworten (1)
Venkat Siddarth Reddy
am 12 Dez. 2023
I understand that you are trying to estimate just the rotation of the point cloud, using G-ICP with plane to plane algorithm.
To achieve this, you can use the object returned by "pcregistericp" function, which is a rigidtform3d object.
Please refer to the following documentation to learn more about pcregistericp function:
This object has a property called "R" which can be used to extract only the rotation matrix of the rigid transformation
Here is an example code for your reference on how to use "R" property of the rigidtform3d object .
ld = load("livingRoom.mat");
moving = ld.livingRoomData{1};
fixed = ld.livingRoomData{2};
Visualize the point cloud and set the direction to display the y-axis.
figure
pcshowpair(moving,fixed,VerticalAxis="Y",VerticalAxisDir="Down")
Downsample the point clouds using nonuniformGridSample method to improve the efficiency and accuracy of registration.
maxNumPoints = 12;
fixedDownsampled = pcdownsample(fixed,"nonuniformGridSample",maxNumPoints);
movingDownsampled = pcdownsample(moving,"nonuniformGridSample",maxNumPoints);
Align the point clouds using plane-to-plane (Generalized-ICP) registration.
tform = pcregistericp(movingDownsampled,fixedDownsampled,Metric="planeToPlane");
rotmatrix=tform.R %Rotation Matrix of the transformation
%Conversion of rotation matrix to euler angles
rotm2eul(rotmatrix)
Refer to the following documentation to learn more about rigidtform3d,rot2mul functions and the example code used here:
I hope this resolves your query.
Regards
Venkat Siddarth V
Siehe auch
Kategorien
Mehr zu Point Cloud Processing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!