Click or drag to resize
CvInvokeFitLine Method (IInputArray, IOutputArray, DistType, Double, Double, Double)
http://www.emgu.com
Fits line to 2D or 3D point set

Namespace: Emgu.CV
Assembly: Emgu.CV.World (in Emgu.CV.World.dll) Version: 3.1.0.2282 (3.1.0.2282)
Syntax
public static void FitLine(
	IInputArray points,
	IOutputArray line,
	DistType distType,
	double param,
	double reps,
	double aeps
)

Parameters

points
Type: Emgu.CVIInputArray
Input vector of 2D or 3D points, stored in std::vector or Mat.
line
Type: Emgu.CVIOutputArray
Output line parameters. In case of 2D ?tting, it should be a vector of 4 elements (like Vec4f) - (vx, vy, x0, y0), where (vx, vy) is a normalized vector collinear to the line and (x0, y0) is a point on the line. In case of 3D ?tting, it should be a vector of 6 elements (like Vec6f) - (vx, vy, vz, x0, y0, z0), where (vx, vy, vz) is a normalized vector collinear to the line and (x0, y0, z0) is a point on the line.
distType
Type: Emgu.CV.CvEnumDistType
The distance used for fitting
param
Type: SystemDouble
Numerical parameter (C) for some types of distances, if 0 then some optimal value is chosen
reps
Type: SystemDouble
Sufficient accuracy for radius (distance between the coordinate origin and the line), 0.01 would be a good default
aeps
Type: SystemDouble
Sufficient accuracy for angle, 0.01 would be a good default
See Also