How to recognize rectangles in this image?

后端 未结 9 1186
北恋
北恋 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条回答
  •  萌比男神i
    2020-11-29 01:32

    Assuming it's a reasonably noise free image (not a video of a screen) then one of the simple floodfill algorithms should work. You might need to run a dilate/erode on the image to close up the gaps.

    The normal way to find lines is a Hough transform ( then find lines at right angles) Opencv is the easiest way.

    Take a look at this question OpenCV Object Detection - Center Point

提交回复
热议问题