MATLAB 中的霍夫变换
有谁知道如何使用霍夫变换来检测二值图像中最强的线:
A = zeros(7,7);
A([6 10 18 24 36 38 41]) = 1;
使用 (rho; theta) 格式,θ 的步长为 45°,从 -45° 到 90°。以及如何在 MATLAB 中显示累加器数组。
有什么帮助或提示吗?
谢谢你!
Does anyone know how to use the Hough transform to detect the strongest lines in the binary image:
A = zeros(7,7);
A([6 10 18 24 36 38 41]) = 1;
Using the (rho; theta) format with theta in steps of 45° from -45° to 90°. And how do I show the accumulator array in MATLAB as well.
Any help or hints please?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您有权访问图像处理工具箱,则可以使用函数 HOUGH< /a>、HOUGHPEAKS 和 HOUGHLINES:
If you have access to the Image Processing Toolbox, you can use the functions HOUGH, HOUGHPEAKS, and HOUGHLINES:
每个像素 (x,y) 映射到一组穿过它的线 (rho,theta)。
在实践中,正确地描述极坐标参数非常重要。太细的话,没有足够的点会重叠。太粗略,每个 bin 可能对应于多行。
在具有自由的伪代码中:
Each pixel (x,y) maps to a set of lines (rho,theta) that run through it.
In practice, the descritization of the polar parameters is important to get right. Too fine and not enough points will overlap. Too coarse and each bin could correspond to multiple lines.
in pseudo code with liberties: