Intersection area of 2 polygons in openCV

c++, geometry, opencv, polygons

Solution

Draw the shapes with `CV_FILLED` in two images and AND them. Area is: `CountNonZero(bitwise_and(ShapeAImage,ShapeBImage))`.

Problem

I have the contours of 2 polygons (as vector of cv::Point2d). I would like to calculate the area of intersection between them What is the easiest way to get it? Thank you very much! Ron

Original source