HoughCircles: Getting the biggest one

asked 2015-07-13 06:03:12 -0500

kovand11 gravatar image

Using the built in circle detection algorithm, I have trouble to find the biggest circle. For example:

HoughCircles(src_gray, circles, CV_HOUGH_GRADIENT, 1, src_gray.rows / 8, 200, 20, 10, 50);

image description image description image description

I only draw the best detection, but it seem to be the average of the actually detected circles.

How can I detect the biggest one?

edit retag flag offensive close merge delete

Comments

If you cannot do it by setting the minRadius and maxRadius parameters, then you shall "ignore the returned radius, use only the center, and find the correct radius using an additional procedure" as the docs says

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-07-13 06:24:05 -0500 )edit