Ask Your Question

Revision history [back]

For more robust circle/ellipse finding, I like to use the line iterator.
Set up radial lines either from the center of the image out or from the outside of the image to the center. Use OpenCV's lineIterator to step along these lines to find transitions (light to dark or dark to light). Use the transition points to define a contour or fit an ellipse. Also recommend use a better camera without jpg compression artifacts and better lighting (notice the shadow).

image description