Back to FabImage Library website

You are here: Start » Function Reference » Point3DGrid » Point3DGrid Fitting » FitPlaneToPoint3DGrid

FitPlaneToPoint3DGrid


Header: FIL.h
Namespace: fil
Module: Vision3DStandard

Approximates points of the input grid with a plane using the Least Squares method.

Syntax

C++
C#
 
void fil::FitPlaneToPoint3DGrid
(
	const fil::Point3DGrid& inPointGrid,
	ftl::Optional<const fil::Region&> inRoi,
	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
Input value inPointGrid const Point3DGrid& Input point grid
Input value inRoi Optional<const Region&> NIL Region of interest
Output value outPlane Plane3D& Fitted plane
Output value outDistances Optional<Array<float>&> NIL Distances of the input grid points to a resulting plane
Output value outSignedDistanceSum Optional<float&> NIL Sum of signed distances of the input grid points to a resulting plane
Output value outDistanceSum Optional<float&> NIL Sum of distances of the input grid points to a resulting plane
Output value outSquaredDistances Optional<Array<float>&> NIL Squared distances of the input grid points to a resulting plane
Output value outSquaredDistanceSum Optional<float&> NIL Sum of squared distances of the input grid 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 No points to fit the plane to in FitPlaneToPoint3DGrid.