Click or drag to resize

MatFitLine2D Method

Fits line to the set of 2D points using M-estimator algorithm. The input is vector of 2D points.

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public Line2D FitLine2D(
	DistanceTypes distType,
	double param,
	double reps,
	double aeps
)

Parameters

distType
Type: OpenCvSharpDistanceTypes
Distance used by the M-estimator
param
Type: SystemDouble
Numerical parameter ( C ) for some types of distances. If it is 0, an optimal value is chosen.
reps
Type: SystemDouble
Sufficient accuracy for the radius (distance between the coordinate origin and the line).
aeps
Type: SystemDouble
Sufficient accuracy for the angle. 0.01 would be a good default value for reps and aeps.

Return Value

Type: Line2D
Output line parameters.
See Also