openCv中的线相交轮廓 [英] Line intersecting contour in openCv
问题描述
我的轮廓是 object ..和 line ..
对象正在移动..但行是恒定的..
我想知道轮廓与直线相交的点.
例如:-以赛车作为终点的例子为例.
我有一个汽车轮廓线和终点线.
我想知道轮廓上与终点线相交的点.
将对象轮廓与线轮廓相交(使用numpy.logical_and( object_mask, line_mask )
),结果图像非零的所有点都是相交点.>
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.
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.
这篇关于openCv中的线相交轮廓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!