Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Structural Analysis and Shape Descriptors » cvFitLine

cvFitLine


Fits a line to a 2D or 3D point set.

Name Type Description
inPoints Point2DArray Input Point2D array.
inDistType CvDistanceType Distance used by the M-estimator.
inParam Real Numerical parameter [ C ] for some types of distances. If it is 0, an optimal value is chosen.
inReps Real Sufficient accuracy for the radius [distance between the coordinate origin and the line].
inAeps Real Sufficient accuracy for the angle. 0.01 would be a good default value for reps and aeps.
outLine Line2D

Errors

This filter can throw an exception to report error. Read how to deal with errors here: Error Handling

Error type Description
DomainError Input array must not be empty in cvFitLine.
DomainError Distance type can be DIST_* except DIST_C and DIST_USER in cvFitLine.

Complexity Level

This filter is available on Basic Complexity Level.