Back to Aurora Vision Studio website

You are here: Start » Filter Reference » Geometry 2D » Geometry 2D Fitting » FitLineToPoints

FitLineToPoints


Module: FoundationBasic

Approximates points with a line using the Least Squares method.

Name Type Description
Input value inPoints Point2DArray
Input value inRange Range* Determines which array points take part in fitting process
Output value outLine Line2D
Output value outError Real Sum of the point distances from the output line

Examples

The resulting outLine drawn with the input points.

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Empty array of points in FitLineToPoints.
DomainError Range exceeds the input point array in FitLineToPoints.

Complexity Level

This filter is available on Advanced Complexity Level.

Filter Group

This filter is member of FitLineToPoints filter group.