# Revision history [back]

### Finding largest rectangles in matrix

Hello :)
I'm new to opencv. Having 2d occupancy matrix (box status is occupied, free or unknown) is there an algorithm covering whole matrix with possibly largest status rectangles?

### Finding largest rectangles in matrix

Hello :)
I'm new to opencv. Having 2d occupancy matrix (box status is occupied, free or unknown) is there an algorithm covering whole matrix with possibly largest status rectangles?

Example:

• white box = free
• red box = occupied
• green boxes are expected answers (green boxes should touch, but I draw it this way for clarity)

### Finding largest rectangles in matrix

Hello :)
I'm new to opencv. Having 2d occupancy matrix (box status is occupied, free or unknown) is there an algorithm covering whole matrix with possibly largest status rectangles?

Example:

• white box = free
• red box = occupied
• green boxes are expected answers (green boxes should touch, but I draw it this way for clarity) clarity) i.e. coordinates of down left and top right corner

### Finding largest rectangles in matrix

Hello :)
I'm new to opencv. Having 2d occupancy matrix (box status is occupied, free or unknown) is there an algorithm covering whole matrix with possibly largest status rectangles?