Skip to content Skip to sidebar Skip to footer

How Could I Find The Area Of The Intersection Of Line And Contour

the blue pen is the contour and the red pen is the straight line how could I find the two areas of the intersection of line and contour Now, I can get the contour area by area = c

Solution 1:

A simple but perhaps not the most efficient way would be to use cv.drawContours and cv.line to create two images: one with the contour of the blob and one with the contour of the line. Then cv.bitwise_and them together, and any point that is still positive will be points of intersection.


Post a Comment for "How Could I Find The Area Of The Intersection Of Line And Contour"