主要内容

planeModel

对象存储参数平面模型

描述

基于参数的构造和存储参数平面模型描述一个平面。

创建

描述

例子

模型= planeModel (参数)构造一个参数从1-by-4飞机模型参数输入向量描述一个平面。

输入参数

全部展开

平面参数,指定为一个1-by-4向量。这个输入指定参数财产。四个参数(一个,b,c,d描述一个平面的方程:

一个 x + b y + c z + d = 0

属性

全部展开

这些属性是只读的。

飞机模型参数,存储为1-by-4向量。这些参数是指定的参数输入参数。

平面的法向量,存储为1×3向量。(一个,b,c)向量指定非规范平面的法向量。

对象的功能

情节 情节参数模型
normalRotation 计算转换为正常旋转平面

例子

全部折叠

加载点云。

负载(“object3d.mat”)

显示图的点云和标签。

图pcshow (ptCloud)包含(“X”(m))ylabel (“Y (m)”)zlabel (“Z”(m))标题(“原始点云”)

设置最大point-to-plane距离(2厘米)飞机配件。

maxDistance = 0.02;

平面的法向量。

referenceVector = [0, 0, 1];

设置最大角距为5度。

maxAngularDistance = 5;

检测第一架飞机,表,从点云提取它。

[model1, inlierIndices outlierIndices] = pcfitplane (ptCloud,maxDistance、referenceVector maxAngularDistance);plane1 =选择(ptCloud inlierIndices);remainPtCloud =选择(ptCloud outlierIndices);

把感兴趣的区域限制搜索第二架飞机,离开墙。

roi =[正无穷,0.4,正,负,正);sampleIndices = findPointsInROI (remainPtCloud roi);

检测左墙和提取从剩下的点云。

[model2, inlierIndices outlierIndices] = pcfitplane (remainPtCloud,maxDistance SampleIndices = SampleIndices);plane2 =选择(remainPtCloud inlierIndices);remainPtCloud =选择(remainPtCloud outlierIndices);

画出两架飞机和剩下的点。

图pcshow (plane1)标题(“第一架飞机”)

图pcshow (plane2)标题(“第二架飞机”)

图pcshow (remainPtCloud)标题(“剩下的点云”)

版本历史

介绍了R2015b