pcfitplane
将平面拟合到三维点云
语法
说明
会根据点云数据拟合一个平面,该平面对每个内点到平面的距离均设有最大允许值。该函数返回一个描述该平面的几何模型。model = pcfitplane(ptCloudIn,maxDistance)
该函数使用 M-估计量样本共识 (MSAC) 算法来求解该平面。MSAC 算法是 RANdom SAmple Consensus (RANSAC) 算法的一种变体。
根据点云拟合一个平面,该点云具有由 1×3 格式的 model = pcfitplane(ptCloudIn,maxDistance,referenceVector)referenceVector 输入指定的附加方向约束。
会根据指定的最大角距离,将一个平面拟合到点云上。model = pcfitplane(ptCloudIn,maxDistance,referenceVector,maxAngularDistance)
[ 还会返回输入点云中内点和外点的线性索引。model,inlierIndices,outlierIndices] = pcfitplane(___)
[ 还会返回内点到模型的距离的均方误差,使用上述任何一种语法均可。model,inlierIndices,outlierIndices,meanError] = pcfitplane(___)
[___] = pcfitplane(___, 支持上述语法中的任何参量组合,且可使用一个或多个名称-值参量指定选项。例如,Name=Value)pcfitplane(ptCloud,maxDistance,referenceVector,maxAngularDistance,Confidence=95) 将找到最大内点数时的置信百分比设置为 95。
示例
输入参数
名称-值参数
输出参量
参考
[1] Torr, P. H. S., and A. Zisserman. “MLESAC: A New Robust Estimator with Application to Estimating Image Geometry.” Computer Vision and Image Understanding. 2000.
扩展功能
版本历史记录
在 R2015b 中推出
另请参阅
对象
函数
pcshow|pcwrite|pcread|pcfitsphere|pcfitcylinder|findPointsInROI|pcmerge|pctransform|pcregistericp|pcdenoise



