在圆霍夫变换中,累加器分辨率 (dp) 的反比是多少?它如何影响圆检测?
In the Circle Hough Transform, what is the Inverse Ratio of Accumulator Resolution (dp) and how does it affect circle detection?
OpenCV 文档指出:
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.
但它没有说明该值的大小如何影响圆检测。我以为累加器只是最大值的集合,它怎么有分辨率?
在 hough 变换期间,您将输入图像转换为所谓的 hough space。求圆是3维的(3维是圆心和半径的坐标)。在转换过程中,输入图像中的每个边缘像素都会为该像素可能位于的所有可能圆圈投票。
您可以将投票视为增加 3 维矩阵中的多个值(尽管 space)。投票后,您在该矩阵中搜索最高值并读取圆心及其半径。
矩阵越大(与您的输入图像相比)(您的 dp
越小),您的投票分辨率就越高。分辨率越高,圆检测越准确。
然而,检测越准确,就越有可能例如遗漏轻微退化的圆圈或检测到多个圆圈而不是一个具有大边缘的圆圈。
OpenCV 文档指出:
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.
但它没有说明该值的大小如何影响圆检测。我以为累加器只是最大值的集合,它怎么有分辨率?
在 hough 变换期间,您将输入图像转换为所谓的 hough space。求圆是3维的(3维是圆心和半径的坐标)。在转换过程中,输入图像中的每个边缘像素都会为该像素可能位于的所有可能圆圈投票。
您可以将投票视为增加 3 维矩阵中的多个值(尽管 space)。投票后,您在该矩阵中搜索最高值并读取圆心及其半径。
矩阵越大(与您的输入图像相比)(您的 dp
越小),您的投票分辨率就越高。分辨率越高,圆检测越准确。
然而,检测越准确,就越有可能例如遗漏轻微退化的圆圈或检测到多个圆圈而不是一个具有大边缘的圆圈。