I know it's possible to intersect two Rects in OpenCV in order to get the area of intersection. Is there a way to intersect a RotatedRect with another Rect or RotatedRect in c++?
Asked
Active
Viewed 4,219 times
4
-
no since intersection of rotatedRects dont result in another rotatedRect. But you can draw the rects in single images and count the pixepixel that are set in both images. – Micka May 15 '15 at 16:00
-
Similar topic: http://stackoverflow.com/questions/8011267/area-of-rectangle-rectangle-intersection – Andrey Smorodov May 15 '15 at 16:42
1 Answers
5
You can use the rotatedRectangleIntersection function:
cv::rotatedRectangleIntersection ( const RotatedRect & rect1,
const RotatedRect & rect2,
OutputArray intersectingRegion
)

Emoke
- 51
- 1
- 4