Ask Your Question

Revision history [back]

how to know the area of the overlapping rectangles?

As a start i have the coordinates x1,y1 and x2,y2 of a rectangle, on the other hand i have a list of other coordinates for other rectangles.

What i want to do is compare the value of the one i already have over an image to the other ones and see if any overlap with it, and in case any do i want to check if the overlap area is equal to 50% of the original rectangle, this is all just part of the work that came before and shall come after but it's been difficult for me to work on even tho i checked numerous resources like https://codereview.stackexchange.com/questions/151309/check-if-two-rectangles-overlap https://codereview.stackexchange.com/questions/31352/overlapping-rectangles, any guidance do fulfill the described issue would be helpful.