问题
I have a contour of object..and a line..
Object is moving..but line is constant..
I want to know the points at which contour intersects the line..
For example:- Take example of Car Race in which their is finish line..
I have a contour of Car and finish line.
I want to know the points on contour which intersects the finish line.
回答1:
Intersect the object contour with the line contour (use numpy.logical_and( object_mask, line_mask )
) and all points where the resulting image is non-zero are the points of intersection.
来源:https://stackoverflow.com/questions/8655277/line-intersecting-contour-in-opencv