Back to Adaptive Vision Library website
You are here: Start » Function Reference » Geometry 3D Fitting » FitPlaneToPoints
FitPlaneToPoints
Approximates points with a plane using the Least Squares method.
Syntax
C++
C#
void avl::FitPlaneToPoints ( const atl::Array<avl::Point3D>& inPoints, avl::Plane3D& outPlane, atl::Optional<atl::Array<atl::real>&> outDistances = atl::NIL, atl::Optional<atl::real&> outSignedDistanceSum = atl::NIL, atl::Optional<atl::real&> outDistanceSum = atl::NIL, atl::Optional<atl::Array<atl::real>&> outSquaredDistances = atl::NIL, atl::Optional<atl::real&> outSquaredDistanceSum = atl::NIL )
Parameters
| Name | Type | Default | Description | |
|---|---|---|---|---|
![]() |
inPoints | const Array<Point3D>& | ||
![]() |
outPlane | Plane3D& | Fitted plane | |
![]() |
outDistances | Optional<Array<real>&> | NIL | Distances of the input points to a resulting plane |
![]() |
outSignedDistanceSum | Optional<real&> | NIL | Sum of signed distances of the input points to a resulting plane |
![]() |
outDistanceSum | Optional<real&> | NIL | Sum of distances of the input points to a resulting plane |
![]() |
outSquaredDistances | Optional<Array<real>&> | NIL | Squared distances of the input points to a resulting plane |
![]() |
outSquaredDistanceSum | Optional<real&> | NIL | Sum of squared distances of the input points to a resulting plane |
Errors
| Error type | Description |
|---|---|
| DomainError | Empty point array on input in FitPlaneToPoints. |


