Back to Aurora Vision Library website

You are here: Start » Function Reference » Geometry 3D » Geometry 3D Fitting » FitPlaneToPoints

FitPlaneToPoints


Header: AVL.h
Namespace: avl
Module: Vision3DStandard

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<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
Input value inPoints const Array<Point3D>&
Output value outPlane Plane3D& Fitted plane
Output value outDistances Optional<Array<float>&> NIL Distances of the input points to a resulting plane
Output value outSignedDistanceSum Optional<float&> NIL Sum of signed distances of the input points to a resulting plane
Output value outDistanceSum Optional<float&> NIL Sum of distances of the input points to a resulting plane
Output value outSquaredDistances Optional<Array<float>&> NIL Squared distances of the input points to a resulting plane
Output value 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 atl::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.