Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Fit plane to 3-D point cloud

`model = pcfitplane(ptCloudIn,maxDistance)`

`model = pcfitplane(ptCloudIn,maxDistance,referenceVector)`

`model = pcfitplane(ptCloudIn,maxDistance,referenceVector,maxAngularDistance)`

```
[model,inlierIndices,outlierIndices]
= pcfitplane(ptCloudIn,maxDistance)
```

```
[___,meanError] =
pcfitplane(ptCloudIn,maxDistance)
```

`[___] = pcfitplane(ptCloudIn,maxDistance,Name,Value)`

fits
a plane to a point cloud that has a maximum allowable distance from
an inlier point to the plane. The function returns a geometrical model
that describes the plane.`model`

= pcfitplane(`ptCloudIn`

,`maxDistance`

)

This function uses the M-estimator SAmple Consensus (MSAC) algorithm to find the plane. The MSAC algorithm is a variant of the RANdom SAmple Consensus (RANSAC) algorithm.

fits
a plane to a point cloud that has additional orientation constraints
specified by the 1-by-3 `model`

= pcfitplane(`ptCloudIn`

,`maxDistance`

,`referenceVector`

)`referenceVector`

input.

fits
a plane to a point cloud that has a specified maximum angular distance.`model`

= pcfitplane(`ptCloudIn`

,`maxDistance`

,`referenceVector`

,`maxAngularDistance`

)

`[`

additionally
returns the linear indices to the inlier and outlier points in the
point cloud input.`model`

,`inlierIndices`

,`outlierIndices`

]
= pcfitplane(`ptCloudIn`

,`maxDistance`

)

`[___,`

additionally
returns the mean error of the distance of inlier points to the model,
using any of the preceding syntaxes.`meanError`

] =
pcfitplane(`ptCloudIn`

,`maxDistance`

)

`[___] = pcfitplane(`

uses
additional options specified by one or more `ptCloudIn`

,`maxDistance`

,`Name,Value`

)`Name,Value`

pair
arguments.

[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.

`affine3d`

| `pcdenoise`

| `pcfitcylinder`

| `pcfitsphere`

| `pcmerge`

| `pcplayer`

| `pcread`

| `pcregrigid`

| `pcshow`

| `pctransform`

| `pcwrite`

| `planeModel`

| `pointCloud`