I have two rectangles, each identified by a set of four coordinates. I’ve read up on how to see whether they intersect, but how can I calculate the area of the intersection? The rectangles are not axis-aligned.
Is there an OpenCV function for this? I was told there was, but I fail to find it.
Treat your rectangles as general polygons, and decompose the problem into two steps:
There’s plenty of literature on the Web for both problems.
I don’t know anything about OpenCV so can’t give any advice there.