Fits line to 2D or 3D point set
Namespace: OpenCvSharp
Assembly: OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public void FitLine( DistanceType distType, double param, double reps, double aeps, float[] line )
Parameters
- distType
- Type: OpenCvSharpDistanceType
The distance used for fitting (see the discussion). - 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) and angle, respectively, 0.01 would be a good defaults for both. - aeps
- Type: SystemDouble
Sufficient accuracy for radius (distance between the coordinate origin and the line) and angle, respectively, 0.01 would be a good defaults for both. - line
- Type: SystemSingle
The output line parameters. In case of 2d fitting it is array of 4 floats (vx, vy, x0, y0) where (vx, vy) is a normalized vector collinear to the line and (x0, y0) is some point on the line. In case of 3D fitting it is array of 6 floats (vx, vy, vz, x0, y0, z0) where (vx, vy, vz) is a normalized vector collinear to the line and (x0, y0, z0) is some point on the line.
See Also