<p><a href="https://de.mathworks.com/help/vision/3-d-point-cloud-processing.html" rel="nofollow noreferrer">Matlab's documentation</a>提供了开始解决此问题所需的所有信息!你知道吗</p>
<p>这里有一个链接,可以让您开始使用Matlab <a href="https://de.mathworks.com/help/vision/display-point-clouds.html" rel="nofollow noreferrer">visualizing point clouds</a>。你知道吗</p>
<p>请注意,Matlab倾向于使用<a href="https://de.mathworks.com/help/vision/index.html" rel="nofollow noreferrer">computer vision toolbox</a>进行点云处理。你知道吗</p>
<p>下面是一个加载茶壶的点云文件的快速示例(<a href="https://de.mathworks.com/help/vision/ug/view-rotating-3-d-point-cloud.html" rel="nofollow noreferrer">original link</a>)。你知道吗</p>
<p><strong>查看旋转的三维点云</strong></p>
<p>加载点云。你知道吗</p>
<pre><code>ptCloud = pcread('teapot.ply');
</code></pre>
<p>定义旋转矩阵和三维变换。你知道吗</p>
<pre><code>x = pi/180;
R = [ cos(x) sin(x) 0 0
-sin(x) cos(x) 0 0
0 0 1 0
0 0 0 1];
tform = affine3d(R);
</code></pre>
<p>计算x-<em>y</em>限制,以确保旋转的茶壶不会被夹住。你知道吗</p>
<pre><code>lower = min([ptCloud.XLimits ptCloud.YLimits]);
upper = max([ptCloud.XLimits ptCloud.YLimits]);
xlimits = [lower upper];
ylimits = [lower upper];
zlimits = ptCloud.ZLimits;
</code></pre>
<p>创建播放器并自定义播放器轴标签。你知道吗</p>
<pre><code>player = pcplayer(xlimits,ylimits,zlimits);
xlabel(player.Axes,'X (m)');
ylabel(player.Axes,'Y (m)');
zlabel(player.Axes,'Z (m)');
</code></pre>
<p>围绕z轴旋转茶壶。你知道吗</p>
<pre><code>for i = 1:360
ptCloud = pctransform(ptCloud,tform);
view(player,ptCloud);
end
</code></pre>