Back to Aurora Vision Library website
You are here: Start » Function Reference » Surface » Surface Fitting » FitPlaneToSurface
FitPlaneToSurface
Header: | AVL.h |
---|---|
Namespace: | avl |
Module: | Vision3DStandard |
Approximates points of the input surface with a plane using the Least Squares method.
Syntax
C++
C#
void avl::FitPlaneToSurface ( const avl::Surface& inSurface, atl::Optional<const avl::Region&> inRoi, avl::Plane3D& outPlane, atl::Optional<atl::Array<float>&> outDistances = atl::NIL, atl::Optional<float&> outSignedDistanceSum = atl::NIL, atl::Optional<float&> outDistanceSum = atl::NIL, atl::Optional<atl::Array<float>&> outSquaredDistances = atl::NIL, atl::Optional<float&> outSquaredDistanceSum = atl::NIL )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
inSurface | const Surface& | Input surface | ||
inRoi | Optional<const Region&> | NIL | Region of interest | |
outPlane | Plane3D& | Fitted plane | ||
outDistances | Optional<Array<float>&> | NIL | Distances of the input surface points to a resulting plane | |
outSignedDistanceSum | Optional<float&> | NIL | Sum of signed distances of the input surface points to a resulting plane | |
outDistanceSum | Optional<float&> | NIL | Sum of distances of the input surface points to a resulting plane | |
outSquaredDistances | Optional<Array<float>&> | NIL | Squared distances of the input surface points to a resulting plane | |
outSquaredDistanceSum | Optional<float&> | NIL | Sum of squared distances of the input surface points to a resulting plane |
Optional Outputs
The computation of following outputs can be switched off by passing value atl::NIL
to these parameters: outDistances, outSignedDistanceSum, outDistanceSum, outSquaredDistances, outSquaredDistanceSum.
Read more about Optional Outputs.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | No points to fit the plane to in FitPlaneToSurface. |
DomainError | Region of interest exceeds an input surface in FitPlaneToSurface. |