Back to FabImage Library website

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

FitSegmentToPoints3D


Header: FIL.h
Namespace: fil
Module: Vision3DStandard

Approximates points in 3D with a segment using selected outliers suppression method.

Syntax

C++
C#
 
void fil::FitSegmentToPoints3D
(
	const ftl::Array<fil::Point3D>& inPoints,
	ftl::Optional<fil::MEstimator::Type> inOutlierSuppression,
	ftl::Conditional<fil::Segment3D>& outSegment,
	ftl::Optional<ftl::Array<fil::Point3D>&> outInliers = ftl::NIL
)

Parameters

Name Type Default Description
Input value inPoints const Array<Point3D>&
Input value inOutlierSuppression Optional<MEstimator::Type> Tukey
Output value outSegment Conditional<Segment3D>& Fitted segment or nothing if method failed to converge
Output value outInliers Optional<Array<Point3D>&> NIL Points matching the computed segment

Optional Outputs

The computation of following outputs can be switched off by passing value ftl::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 FitSegmentToPoints3D.