Back to Aurora Vision Library website

You are here: Start » Function Reference » Surface » Surface Fitting » FitPlaneToSurface_M

FitPlaneToSurface_M


Header: AVL.h
Namespace: avl
Module: Vision3DStandard

Approximates points of the input surface with a plane using selected M-estimator for outlier suppression.

Applications: Finding a locally optimal plane. Good enough when the number of outliers is small.

Syntax

C++
C#
 
void avl::FitPlaneToSurface_M
(
	const avl::Surface& inSurface,
	atl::Optional<const avl::Region&> inRoi,
	avl::MEstimator::Type inOutlierSuppression,
	float inClippingFactor,
	int inIterationCount,
	atl::Optional<const avl::Plane3D&> inInitialPlane,
	avl::Plane3D& outPlane,
	atl::Optional<atl::Array<avl::Point3D>&> outInliers = atl::NIL,
	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 Range Default Description
Input value inSurface const Surface& Input surface
Input value inRoi Optional<const Region&> NIL Region of interest
Input value inOutlierSuppression MEstimator::Type Selects a method for ignoring points being much different from the rest
Input value inClippingFactor float 0.675 - 6.0 2.5f Multitude of standard deviation within which points are considered inliers
Input value inIterationCount int 0 - 5 Number of iterations of outlier suppressing algorithm
Input value inInitialPlane Optional<const Plane3D&> NIL Initial approximation (if available)
Output value outPlane Plane3D& Fitted plane
Output value outInliers Optional<Array<Point3D>&> NIL Points matching the computed 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: outInliers, 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_M.
DomainError Region of interest exceeds an input surface in FitPlaneToSurface_M.