Ask Your Question

Revision history [back]

Once you have a series of contours, you can convert them to according circles by using

vector< vector<Point> > contours;
vector< Point2f > centers;
vector< float > radiuses;
for(size_t i =0; i<contours.size(); i++){
   Point2f center;
   float radius;
   minEnclosingCircle(contours[i], center, radius);
// Now you can draw each one of them by using the circle command

You are welcome!