Say you have a grid of pixels. And there are 20 overlapping red rectangles on a blue background.

I want to find an algorithm to count the minimum number of rectangles that are needed to form the image. And also the maxium extent of these rectangles.

Any good algorithms for doing this? It is easier said then done. Perhaps there is a nice functional or recursive way of doing this?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.