Back to Adaptive Vision Library website
You are here: Start » Function Reference » Geometry 2D Fitting » FitLineToPoints
FitLineToPoints
Approximates points with a line using the Least Squares method.
Syntax
C++
C#
void avl::FitLineToPoints ( const atl::Array<avl::Point2D>& inPoints, avl::Line2D& outLine, atl::Optional<float&> outError = atl::NIL )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
inPoints | const Array<Point2D>& | |||
outLine | Line2D& | |||
outError | Optional<float&> | NIL |
Examples
Errors
Error type | Description |
---|---|
DomainError | Empty point array in FitLineToPoints. |