cv::fitLine用法
定义
在opencv官方文档定义如下:
void cv::fitLine(InputArray points,
OutputArray line,
int distType,
double param,
double reps,
double aeps
)
#include <opencv2/imgproc.hpp>
Fits a line to a 2D or 3D point set.
Parameters
points Input vector of 2D or 3D points, stored in std::vector<> or Mat.
line Output line parameters. In case of 2D fitting, 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 fitting, it should be a vector of 6 elements (like Vec6f) - (vx, vy, vz, x0, y0, z0),