FitLineToPoints_LTE
Approximates points with a line using Least Trimmed Error algorithm.
Applications:Brute-force finding of a line that best matches a subset of the input points. Very efficient against outliers, but possibly slow for bigger subsets.
Syntax
C++
C#
Python
def FitLineToPoints_LTE( inPoints: list[Point2D], /, *, inRange: Range | None = None, inSeedSubsetSize: int = 3, inEvalSubsetSize: int | None = None ) -> ( outLine: Line2D, outLTInliers: list[Point2D], outLTError: float, diagIterationCount: int )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inPoints | list[Point2D] | Input points | ||
![]() |
inRange | Range | None | None | Determines which array points take part in fitting process | |
![]() |
inSeedSubsetSize | int | 2 - 10 | 3 | Number of points in one combination for getting a sample line |
![]() |
inEvalSubsetSize | int | None | 3 - ![]() |
None | Number of closest points used for evaluation of a sample line, or Auto if seed points are to be used |
![]() |
outLine | Line2D | Fitted line | ||
![]() |
outLTInliers | list[Point2D] | Inlying points of the best LTE line | ||
![]() |
outLTError | float | The Least Trimmed Error | ||
![]() |
diagIterationCount | int | Number of combinations considered |




