我的轮廓是 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中的线相交轮廓
发布评论