Linear intersecting contour in openCv

I have an object outline .. and lines .
The object is moving. but the line is constant.
I want to know the points at which the outline intersects the line.

For example : - Take an example of a car race in which their finish line is.
I have a car outline and a finish line.
I want to know the points on the path that crosses the finish line.

+4
source share
1 answer

Cross the contour of the object with the contour of the line (use numpy.logical_and( object_mask, line_mask ) ), and all points at which the resulting image is non-zero are the intersection points.

+4
source

Source: https://habr.com/ru/post/1388280/


All Articles