How to recognize rectangles in this image?

后端 未结 9 1160
北恋
北恋 2020-11-29 00:36

I have a image with horizontal and vertical lines. In fact, this image is the BBC website converted to horizontal and vertical lines. My problem is that I want to be able to

9条回答
  •  遥遥无期
    2020-11-29 01:28

    Opencv (image processing and computer vision library written in c) has implementation for hough transform (the simple hough transform find lines in an image, while the generalized one finds more complex objects) so that could be a good start. For the rectangles which do have closed corners there are also corner detectors such as cornerHarris which can help.

    I ran the houghlines demo provided with opencv and here's the result on the image you gave (detected lines marked in red):
    (source: splintec.com)

提交回复
热议问题