Back to Aurora Vision Library website

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

FitLineToPoints3D_M


Header: AVL.h
Namespace: avl
Module: Vision3DStandard

Approximates points in 3D with a line using selected M-estimator for outlier suppression.

Applications: Finding a locally optimal line in 3D. Good enough when the number of outliers is small.

Syntax

C++
C#
 
void avl::FitLineToPoints3D_M
(
	const atl::Array<avl::Point3D>& inPoints,
	avl::MEstimator::Type inOutlierSuppression,
	float inClippingFactor,
	int inIterationCount,
	atl::Optional<const avl::Line3D&> inInitialLine,
	avl::Line3D& outLine,
	atl::Optional<atl::Array<avl::Point3D>&> outInliers = atl::NIL
)

Parameters

Name Type Range Default Description
Input value inPoints const Array<Point3D>&
Input value inOutlierSuppression MEstimator::Type
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 inInitialLine Optional<const Line3D&> NIL Initial approximation (if available)
Output value outLine Line3D&
Output value outInliers Optional<Array<Point3D>&> NIL Points matching the computed line

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outInliers.

Read more about Optional Outputs.

Errors

List of possible exceptions:

Error type Description
DomainError Empty point array on input in FitLineToPoints3D_M.