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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…