Back to FabImage Library website
You are here: Start » Function Reference » Geometry 3D » Geometry 3D Fitting » FitPlaneToPoints

FitPlaneToPoints
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | Vision3DStandard |
Approximates points with a plane using the Least Squares method.
Syntax
C++
C#
void fil::FitPlaneToPoints ( const ftl::Array<fil::Point3D>& inPoints, fil::Plane3D& outPlane, ftl::Optional<ftl::Array<float>&> outDistances = ftl::NIL, ftl::Optional<float&> outSignedDistanceSum = ftl::NIL, ftl::Optional<float&> outDistanceSum = ftl::NIL, ftl::Optional<ftl::Array<float>&> outSquaredDistances = ftl::NIL, ftl::Optional<float&> outSquaredDistanceSum = ftl::NIL )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inPoints | const Array<Point3D>& | ||
![]() |
outPlane | Plane3D& | Fitted plane | |
![]() |
outDistances | Optional<Array<float>&> | NIL | Distances of the input points to a resulting plane |
![]() |
outSignedDistanceSum | Optional<float&> | NIL | Sum of signed distances of the input points to a resulting plane |
![]() |
outDistanceSum | Optional<float&> | NIL | Sum of distances of the input points to a resulting plane |
![]() |
outSquaredDistances | Optional<Array<float>&> | NIL | Squared distances of the input points to a resulting plane |
![]() |
outSquaredDistanceSum | Optional<float&> | NIL | Sum of squared distances of the input points to a resulting plane |
Optional Outputs
The computation of following outputs can be switched off by passing value ftl::NIL
to these parameters: outDistances, outSignedDistanceSum, outDistanceSum, outSquaredDistances, outSquaredDistanceSum.
Read more about Optional Outputs.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty point array on input in FitPlaneToPoints. |