openCv中的线相交轮廓

编程入门 行业动态 更新时间:2024-10-27 22:30:45
本文介绍了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中的线相交轮廓

本文发布于:2023-05-26 09:47:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/252245.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:轮廓   openCv

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!