【发布时间】:2021-05-17 14:11:27
【问题描述】:
我想知道是否有一个函数,最好是在 openCV 中,找到适合点集的最大圆。也许是某种圈增长算法。
我有什么:
std::vector<std::vector<Point> > contours;
cv::findContours(binary,contours, RETR_EXTERNAL, CHAIN_APPROX_NONE);
cv::minEnclosingCircle(cnts[0],res_center,res_radius);
Mat backtorgb;
cv::cvtColor(binary,backtorgb,cv::COLOR_GRAY2RGB);
cv::circle(backtorgb,res_center,res_radius,Scalar(0,0,255),2);
但这或多或少像一个缩小的圆圈(红色)。我需要一个正在成长的(绿色)。
我想要什么:
原文:
【问题讨论】:
-
绿色和红色的圆圈是同心的吗?