- 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
조회 수: 8 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Venkat Siddarth Reddy
2023년 12월 12일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Point Cloud Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!