I am looking for a strategy to find rectangular blank spaces in an image (in this case a scanned text document).
My initial thought was to base it on some sort of floodfill algorithm modified for growing rectangles. I've played with Hough Transforms a bit but didn't get the right results (quite possibly because I didn't tune it properly for text blocks).
Before I pull out all my hair, does anyone have any suggestions for algorithms or strategies to accomplish something like this? (I've attached a link to a quick example I mocked up)
Thanks!

The simplest thing I would do is; take a white pixel (assume your image is binary), and start to enlarge it with in x and y direction separately. Once an enlargement process hit a black pixel stop enlarging in that direction. But you should keep enlarging the region in other direction until it hits a black pixel too. Otherwise you will get only square pixels.
Then you must save which positions assigned to a region so a pixel should not be assigned to more than one region. Also you must have threshold values for the size in each direction (length and width), therefore you can avoid so many regions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With