OPENCV 最小外接圆不准确
函数名:
//! computes the minimal enclosing circle for a set of points
CV_EXPORTS_W void minEnclosingCircle( InputArray points,
CV_OUT Point2f& center, CV_OUT float& radius );
在使用OPENCV2.4.10时,对轮廓点集进行取最小外接圆操作,半径总是较实际值大。如下图:
(红色为点集,紫色为最小外接圆结果)
后来用OPENCV3.3.1时,想起来这个BUG,重新试了一下,对轮廓点集进行取最小外接圆操作,半径正确。如下图
(红色为点集,紫色为最小外接圆结果)