在圆霍夫变换中,累加器分辨率的反比 (dp) 是多

时间:2023-01-15
本文介绍了在圆霍夫变换中,累加器分辨率的反比 (dp) 是多少,它如何影响圆检测?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OpenCV 文档指出:

The OpenCV documentation states:

dp:累加器分辨率与图像分辨率的反比.例如,如果 dp=1 ,则累加器具有与输入图像相同的分辨率.如果 dp=2 ,累加器的宽度和高度只有一半.

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?

推荐答案

在霍夫变换期间,您将输入图像转换为所谓的霍夫空间.试图找到圆时它是 3 维的(三个维度是圆心和半径的坐标).在转换过程中,输入图像中的每个边缘像素都会为该像素所在的所有可能的圆圈投票.

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.

您可以将投票视为在 3 维矩阵(霍夫空间)中增加多个值.投票后,您搜索此矩阵中的最大值并读取圆心及其半径.

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.

矩阵越大(与您的输入图像相比)(您的 dp 越小),您的投票分辨率就越高.分辨率越高,圆检测越准确.

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.

这篇关于在圆霍夫变换中,累加器分辨率的反比 (dp) 是多少,它如何影响圆检测?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

上一篇:使用 OpenCV 进行椭圆检测 下一篇:如何估计具有 3d 到 2d 点对应的相机姿势(使用

相关文章

最新文章