Transform 3D point cloud

조회 수: 16 (최근 30일)
Ernest Porqueras
Ernest Porqueras 2021년 3월 17일
편집: Matt J 2021년 3월 17일
I have a point cloud and a rotation matrix like this:
rot=[ -0.48664090 0.36675647 0.79288739;
-0.67601788 -0.73296887 -0.075871207;
-0.55333579 0.57292831 -0.60462612 ]
How can I transform the point cloud using this rotation matrix? I cannot use this matrix with pctrasform and rigid3d.
  댓글 수: 3
Ernest Porqueras
Ernest Porqueras 2021년 3월 17일
Error using rigid3d (line 139)
The rigid transformation matrix must only contain a rotation and a translation.
The final column must consist of zeros, except for a one in the last row.
Ernest Porqueras
Ernest Porqueras 2021년 3월 17일
I think this function only allows rotating along 1 axis.

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2021년 3월 17일
편집: Matt J 2021년 3월 17일
Funny. Well, you can always use affine3d,
rot=[ -0.48664090 0.36675647 0.79288739;
-0.67601788 -0.73296887 -0.075871207;
-0.55333579 0.57292831 -0.60462612 ];
T=eye(4);
T(1:3,1:3)=rot;
tform=affine3d(T)
tform =
affine3d with properties: T: [4×4 double] Dimensionality: 3
As a side note, your matrix is not a proper rotation, since its determinant is -1.
det(rot)
ans = -1.0000

추가 답변 (1개)

Bjorn Gustavsson
Bjorn Gustavsson 2021년 3월 17일
If you have a 3-x-n array of point-coordinates you can rotate them in 2 ways, either rotate the points or the coordinate system.
For example like this:
r_rotated = rot*r_points;
HTH

카테고리

Help CenterFile Exchange에서 Point Cloud Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by