Home » Android » java – In the Circle Hough Transform, what is the Inverse Ratio of Accumulator Resolution (dp) and how does it affect circle detection?

java – In the Circle Hough Transform, what is the Inverse Ratio of Accumulator Resolution (dp) and how does it affect circle detection?

Posted by: admin June 15, 2020 Leave a comment

Questions:

The OpenCV documentation states:

dp: Inverse ratio of the accumulator resolution to the image resolution. For example, if dp=1 , the accumulator has the same resolution as the input image. If dp=2 , the accumulator has half as big width and height.

But it gives no indication how the size of this value affects circle detection. I thought the accumulator was just a collection of maxima, how does it have a resolution?

How to&Answers:

During hough transformation you transform your input image into so called hough space. It is 3-dimensional while trying to find circles (the three dimensions are the coordinates of the circle center and the radius). During the transformation each edge pixel in your input image votes for all possible circles on which the pixel could lie.

You can think of the voting as increasing multiple values within a 3-dimensional matrix (hough space). After voting you search for the highest value within this matrix and read of the circle center and its radius.

The bigger the matrix (compared to your input image) (the smaller your dp), the higher the resolution of your voting. The higher the resolution, the more accurate the circle detection.

However, the more accurate the detection, the more likely it is to e.g. miss slightly degenerated circles or detect multiple circles instead of one with a big edge.