解释霍夫变换 [英] Explain Hough Transformation

查看:25
本文介绍了解释霍夫变换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是在冒险,迈出了迈向计算机视觉的第一步.我试图自己实现霍夫变换,但我只是不明白整个画面.我阅读了维基百科条目,甚至阅读了理查德杜达和彼得哈特的原始使用霍夫变换检测图片中的线条和曲线",但没有帮助.

I am just being adventurous and taking my first baby step toward computer vision. I tried to implement the Hough Transformation on my own but I just don't get the whole picture. I read the wikipedia entry, and even the original "use of the hough transformation to detect lines and curves in pictures" by richard Duda and Peter Hart, but didn't help.

有人可以用更友好的语言向我解释吗?

Can someone help explaining to me in a more friendly language?

推荐答案

更常见的是在矩形坐标中考虑一条线,即 y = mx + b.正如维基百科文章所述,一条线也可以用极坐标表示.Hough 变换利用了这种表示的变化(无论如何,对于直线.讨论也可以应用于圆、椭圆等).

It's more common to think of a line in rectangle coordinates, i.e. y = mx + b. As the Wikipedia article states, a line can also be expressed in polar form. The Hough transform exploits this change of representation (for lines, anyway. The discussion can also be applied to circles, ellipses, etc.).

霍夫变换的第一步是将图像缩减为一组边缘.Canny 边缘检测器是一种常见的选择.生成的边缘图像用作 Hough 过程的输入.

The first step in the Hough transform is to reduce the image to a set of edges. The Canny edge-detector is a frequent choice. The resulting edge image serves as the input to the Hough process.

总而言之,边缘图像中点亮"的像素被转换为极坐标形式,即它们的位置使用方向 theta 和距离 r 表示 - 而不是xy.(图像的中心通常用作这种坐标变化的参考点.)

To summarize, pixels "lit" in the edge image are converted to polar form, i.e. their position is represented using a direction theta and a distance r - instead of x and y. (The center of the image is commonly used as the reference point for this change of coordinates.)

霍夫变换本质上是一个直方图.假设映射到相同 theta 和 r 的边缘像素定义了图像中的一条线.为了计算出现频率,thetar 被离散化(划分为多个 bin).一旦所有边缘像素都转换为极坐标形式,就会分析这些 bin 以确定原始图像中的线条.

The Hough transform is essentially a histogram. Edge pixels mapping to the same theta and r are assumed to define a line in the image. To compute the frequency of occurrence, theta and r are discretized (partitioned into a number of bins). Once all edge pixels have been converted to polar form, the bins are analyzed to determine the lines in the original image.

通常会寻找 N 个最频繁的参数 - 或阈值参数,使得计数小于某些 n 的参数被忽略.

It is common to look for the N most frequent parameters - or threshold the parameters such that counts smaller than some n are ignored.

我不确定这个答案是否比您最初提供的来源更好 - 您是否有一个特别的问题?

I'm not sure this answer is any better than the sources you originally presented - is there a particular point that you are stuck on?

这篇关于解释霍夫变换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆