什么是最简单的*正确*方法检测图像中的矩形? [英] What is the simplest *correct* method to detect rectangles in an image?

查看:303
本文介绍了什么是最简单的*正确*方法检测图像中的矩形?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我最初的想法是使用粗略变换线,并选择线的组合,其中您有两条线在下部和上部由相同的两条线交叉,但这不是足够。



将使用角度检测器以及霍夫变换工作?

解决方案

在OpenCV发行版中检出/samples/c/squares.c。这个例子提供了一个方形检测器,它应该是一个很好的开始。



我的回答此处也适用。


I am trying to think of the best method to detect rectangles in an image.

My initial thought is to use the Hough transform for lines, and to select combinations of lines where you have two lines intersected at both the lower portion and upper portion by the same two lines, but this is not sufficient.

Would using a corner detector along with the Hough transform work?

解决方案

Check out /samples/c/squares.c in your OpenCV distribution. This example provides a square detector, and it should be a pretty good start.

My answer here also applies.

这篇关于什么是最简单的*正确*方法检测图像中的矩形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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