Line intersecting contour in openCv

戏子无情 提交于 2019-12-06 03:47:18

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!