Back to FabImage Library website
You are here: Start » Function Reference » Geometry 2D Fitting » FitLineToPoints_TheilSen

FitLineToPoints_TheilSen
Header: | FIL.h |
---|---|
Namespace: | fil |
Approximates points with a line using TheilSen algorithm, optionally with Siegel's improvement.
Syntax
C++
C#
void fil::FitLineToPoints_TheilSen ( const ftl::Array<fil::Point2D>& inPoints, fil::TheilSenVariant::Type inVariant, fil::Line2D& outLine )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inPoints | const Array<Point2D>& | Input points | |
![]() |
inVariant | TheilSenVariant::Type | Switches between Theil-Sen and Siegel methods | |
![]() |
outLine | Line2D& | Fitted line |
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty set of points in FitLineToPoints_TheilSen. |