You are here: Start » AVL.NET » Function Reference » Geometry 2D » Geometry 2D Fitting » AVL.FitSegmentToPoints_RANSAC

AVL.FitSegmentToPoints_RANSAC

Approximates points with a segment using a RANSAC algorithm.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void FitSegmentToPoints_RANSAC
(
	IList<AvlNet.Point2D> inPoints,
	AvlNet.Range? inRange,
	int? inMaxOutlierCount,
	float inMaxInlierDistance,
	int? inIterationCount,
	out AvlNet.Segment2D? outSegment
)

Parameters

Name Type Range Default Description
inPointsSystem.Collections.Generic.IList<AvlNet.Point2D>
inRangeAvlNet.Range?Determines which array points take part in fitting process. Default value: atl::NIL.
inMaxOutlierCountint?<0, INF>0Determines how many outlier points can be present to end the search. Default value: 0.
inMaxInlierDistancefloat<0.0f, INF>3.0fDistance from the output segment for a point to be considered an inlier. Default value: 3.0f.
inIterationCountint?<1, INF>42Number of iterations; Auto means that all point pairs will be used. Default value: 42.
outSegmentAvlNet.Segment2D?

Errors

List of possible exceptions:

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

Function Overrides

See also