Recognition of circular objects with OpenCV

1.2k views Asked by At

I want to find circular objects in an image like enter image description here

In this image there are six different dishes that I want to recognize.

To do this, first I detect the edges with:

edges = cv2.Canny(img2, 150, 130)

enter image description here

Then I find circular patterns in this new image with the HoughCircles function of OpenCV:

circles = cv2.HoughCircles(edges, cv2.cv.CV_HOUGH_GRADIENT, 1, minDist,
          param1=80,
          param2=30,
          minRadius=minR,
          maxRadius=maxR)

where the parameters are set according to the image's size (473x355pixels). In particular I set minRadius = 50, maxRadius = 120 and minDist = 90.

However the result is:

enter image description here

How can I recognize correctly the dishes in this image? Why doesn't HoughCircles find evident circular patterns?

0

There are 0 answers