码迷,mamicode.com
首页 > 其他好文 > 详细

opencv直线拟合cv::fitLine()

时间:2018-12-04 11:24:24      阅读:1180      评论:0      收藏:0      [点我收藏+]

标签:between   style   red   points   near   strong   nts   zed   void   

通过2D或者2D点集拟合直线

void fitLine( InputArray points, OutputArray line, int distType,double param, double reps, double aeps );

@param points Input vector of 2D or 3D points, stored in std::vector\<\> or Mat.
@param 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), where (vx, vy, vz) is a normalized vector collinear to the line
and (x0, y0, z0) is a point on the line.
@param distType Distance used by the M-estimator, see cv::DistanceTypes
@param param Numerical parameter ( C ) for some types of distances. If it is 0, an optimal value
is chosen.
@param reps Sufficient accuracy for the radius (distance between the coordinate origin and the line).
@param aeps Sufficient accuracy for the angle. 0.01 would be a good default value for reps and aeps.

 

opencv直线拟合cv::fitLine()

标签:between   style   red   points   near   strong   nts   zed   void   

原文地址:https://www.cnblogs.com/larry-xia/p/10062533.html

(1)
(1)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!