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