Hello, I have this image:
And I need to fill the white spaces between lines with a rectangle,
or somehow create something like this: ( cleaner, I did this on paint and it dont' look great :)
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