Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Detect spaces and fill with rectangle

Hello, I have this image: originalimage

And I need to fill the white spaces between lines with a rectangle, Close look to a white space

or somehow create something like this: ( cleaner, I did this on paint and it dont' look great :)

As it should be

for each "space" in the image.

The main problem is the orientation. Probably I'll need to use moments and erosion, but I'm not sure how. Thank you very much for your help and support

Detect spaces and fill with rectangle

Hello, I have this image: originalimage

And I need to fill the white spaces between lines with a rectangle, Close look to a white space

or somehow create something like this: ( cleaner, I did this on paint and it dont' look great :)

As it should be

for each "space" in the image.

The main problem is the orientation. Probably I'll need to use moments and erosion, but I'm not sure how. Thank you very much for your help and support

Detect spaces and fill with rectangle

Hello, I have this image: originalimage

And I need to fill the white spaces between lines with a rectangle, Close look to a white space

or somehow create something like this: ( cleaner, I did this on paint and it dont' look great :)

As it should be

for each "space" in the image.

The main problem is the orientation. Probably I'll need to use moments and erosion, but I'm not sure how. Thank you very much for your help and support