I have an image which contains many same sized rectangular panels separated by whitespace. I want to separate each rectangular panel into its own image. Any suggestions on how to go about it?
I thought of using cv2.floodfill to fill in the whitespace between panels and then invert the mask. However, that creates just a single mask and not an array of masks which I could use to identify coordinates and then split the panels into images.
Any pointers on how to do this smartly would be much appreciated.
