1

I am trying to detect circular road signs and I have some issues.

The HoughCircles function detects circles in a gray image, however with the same parameters but the image binarized (the circle is still perfectly visible) it does not detect any circle. I do not why it fails a lot with a binarized image. Any ideas why I have this issue with binary images?

To try to correct that I set the dp parameter to 2 and changed the threshold. In the binary image I now detect circles, but it also gives me a lot of false positives. I do not understand what the dp parameter is, or how to use it.

If there is no way to make it work, I would like to know if there is any other way of detecting circles in an image.

Mick
  • 811
  • 14
  • 31
Kailegh
  • 199
  • 1
  • 13
  • if you can reduce extracted edge information (e.g. to single contours) you can use ransac circle/ellipse detection like in my 2nd answer to this: http://stackoverflow.com/questions/20698613/detect-semi-circle-in-opencv/20706100#20706100 or test a whole contour to be a circle directly/completely – Micka Apr 19 '15 at 16:38
  • can you please show sample images? – Micka Apr 19 '15 at 16:59
  • http://stackoverflow.com/questions/24821280/find-circles-in-image-without-using-hough-transform – Rahul galgali Apr 21 '15 at 07:04
  • https://stackoverflow.com/questions/42658653/circle-detection-with-opencv/ – Graph4Me Consultant Feb 27 '20 at 08:56

1 Answers1

0

Hough generally works well with bad data - partial or obscured circles and noise.

But it is sensitive to the tuning parameters (max, min diameter, number of votes for a result).

Typically you could run hough to find all possible circles and then examine each possible circle by eg checking distance from center to points on the circumference. Or you could look at found circle diameters and then refine your diameter/vote bins, especially if this is a video stream and you expect the circles to be similar in the future.

SSteve
  • 10,550
  • 5
  • 46
  • 72
Martin Beckett
  • 94,801
  • 28
  • 188
  • 263