matlab對點雲旋轉平移


1.顯示茶壺點雲

ptCloud = pcread('teapot.ply');
figure(1)
pcshow(ptCloud);
title('Teapot');

 

2.Create a transform object with 30 degree rotation along z -axis and translation [5,5,10].

創建一個沿z軸旋轉30度並平移的變換對象[5,5,10].
A = [cos(pi/6) sin(pi/6) 0 0; ...
-sin(pi/6) cos(pi/6) 0 0; ...
0 0 1 0; ...
5 5 10 1];
tform1 = affine3d(A);

3.Transform the point cloud.
ptCloudTformed = pctransform(ptCloud,tform1);

figure(2);
pcshow(ptCloudTformed);
title('Transformed Teapot');

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM