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
You can find intersection polygon wth Clipper library
//create clipper polygons from your points
c.AddPolygons(subj, ptSubject);
c.AddPolygons(clip, ptClip);
c.Execute(ctIntersection, solution, pftNonZero, pftNonZero);
then calc area of this polygon
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With