minimum enclosing rectangle of fixed aspect ratio

Posted by Ramya Narasimha on Stack Overflow See other posts from Stack Overflow or by Ramya Narasimha
Published on 2013-10-24T14:49:21Z Indexed on 2013/10/24 15:53 UTC
Read the original article Hit count: 256

I have an Image with many rectangles at different positions in the image and of different sizes (both overlapping and non-overlapping). I also have a non-negative scores associated with each of these rectangles.

My problem now is to find one larger rectangle *of a fixed (given) aspect ratio* that encloses as many of these rectangles as possible.

I am looking for an algorithm to do this, if anyone has a solution, even a partial one it would be helpful.

Please note that the positions of the rectangles in the image is fixed and cannot be moved around and there is no orientation issue as all of them are upright.

© Stack Overflow or respective owner

Related posts about image-processing

Related posts about graphics