Cv2FitLine Method (IEnumerablePoint3i, DistanceType, Double, Double, Double) OpenCvSharp Class Library
Fits line to the set of 3D points using M-estimator algorithm

Namespace:  OpenCvSharp.CPlusPlus
Assembly:  OpenCvSharp.CPlusPlus (in OpenCvSharp.CPlusPlus.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public static CvLine3D FitLine(
	IEnumerable<Point3i> points,
	DistanceType distType,
	double param,
	double reps,
	double aeps
)

Parameters

points
Type: System.Collections.GenericIEnumerablePoint3i
Input vector of 2D or 3D points
distType
Type: OpenCvSharpDistanceType
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: CvLine3D
Output line parameters.
See Also

Reference