You are here: Start » AVL.NET » AVL.FitLineToPoints_RANSAC Method

AVL.FitLineToPoints_RANSAC Method

Approximates points with a line using a RANSAC algorithm.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

public static void FitLineToPoints_RANSAC(
	AvlNet.Point2D[] inPoints,
	int? inMaxOutlierCount,
	float inMaxInlierDistance,
	int? inIterationCount,
	out AvlNet.Line2D? outLine
)

Parameters

Name Type Range Default Description
inPointsAvlNet.Point2D
inMaxOutlierCountint?<0, INF>0Determines how many outlier points can be present to end the search. Default value: 0, or null.
inMaxInlierDistancefloat<0.0f, INF>3.0fDistance from the output line 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, or null.
outLineAvlNet.Line2D?

Errors

Error type Description
DomainError Empty point array on input in FitLineToPoints_RANSAC.

See also