You are here: Start » AVL.NET » Function Reference » Geometry 2D » Geometry 2D Fitting » AVL.FitLineToPoints_RANSAC
Approximates points with a line using a RANSAC algorithm.
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
C++
C#
public static void FitLineToPoints_RANSAC ( IList<AvlNet.Point2D> inPoints, float inMaxInlierDistance, out AvlNet.Line2D? outLine )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() | inPoints | System.Collections.Generic.IList<AvlNet.Point2D> | |||
![]() | inMaxInlierDistance | float | <0.0f, INF> | 3.0f | Distance from the output line for a point to be considered an inlier. Default value: 3.0f. |
![]() | outLine | AvlNet.Line2D? |
Errors
List of possible exceptions:
| Error type | Description |
|---|---|
| DomainError | Empty array of points in FitLineToPoints_RANSAC. |
| DomainError | Range exceeds the input point array in FitLineToPoints_RANSAC. |


