I was wondering if there is a function, preferably in openCV, to find the largest circle fitting into a pointset. Maybe some kind of circle growing algorithm.
What I have:
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);
But this works more or less like a shrinking circle (red). I need a growing one(green).
What I want:
Original: