Itseez/opencv — pull request #1209 by nghiaho12 (2013-07-31 13:49:45+00:00)
Title: New rotated rectangle intersection function

Proposing a new function rotatedRectangleIntersection that performs an intersection test between two rotated rectangles. If an intersection is found it will also return the vertices that make up the intersecting region. I've implemented the C/C++ (Python automatic) interface, plus documentation and unit test code.

I originally implemented this in conjunction with cv::minAreaRect to do some blob analysis. This function is useful for collision testing and calculating percentage of overlap.