Back to FabImage Library website

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

FitLineToPoints3D


Header: FIL.h
Namespace: fil
Module: Vision3DStandard

Approximates points in 3D with a line using the Least Squares method.

Syntax

C++
C#
 
void fil::FitLineToPoints3D
(
	const ftl::Array<fil::Point3D>& inPoints,
	fil::Line3D& outLine,
	ftl::Optional<float&> outError = ftl::NIL
)

Parameters

Name Type Default Description
Input value inPoints const Array<Point3D>&
Output value outLine Line3D&
Output value outError Optional<float&> NIL

Optional Outputs

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

Read more about Optional Outputs.

Errors

List of possible exceptions:

Error type Description
DomainError Empty point array in FitLineToPoints3D.