Ask Your Question

Revision history [back]

In the tutorial go to this line of code

Point center(cvRound(circles[i][0]), cvRound(circles[i][1]));

Now add the following line

stringstream ss;
ss << i+1;
putText(src, ss.str(), center, 1, 1, Scalar(255,0,0), 2,0);

In the tutorial go to this line of code

Point center(cvRound(circles[i][0]), cvRound(circles[i][1]));

Now add the following line

stringstream ss;
ss << i+1;
putText(src, ss.str(), center, 1, 1, Scalar(255,0,0), 2,0);

This doest exactly what you want!