[OpenCV] Comparison between fitting straight line and Hough straight line, comparison between fitLine() and HoughLinesP()

Fitting lines and circles is to fit the corresponding equations through known points. Fitting methods such as least squares method, RANSAC algorithm, etc. If the discreteness of the fitting points is high, the correct selection of the fitting method is a major key point in improving the recognition accuracy.

1 fitLine and HoughLinesP function prototypes

void fitLine(
	InputArray points,    // 待输入点集(一般为二维数组或vector点集)
	OutputArray line,     // 输出点集(一个是方向向量,另一个是拟合直线上的点)(Vec4f(2d)或Vec6f(3d)的vector)
	int distType

Guess you like

Origin blog.csdn.net/m0_51233386/article/details/134289300