使用opencv确定一个点是在形状内部还是外部 [英] Determine if a point is inside or outside of a shape with opencv

查看:24
本文介绍了使用opencv确定一个点是在形状内部还是外部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有白色背景和简单形状的图像(每张图像都有一个形状).我想确定某个点 (x,y) 是否在形状内.如何使用 opencv 做到这一点?

I have images with white background and simple shapes in them (each image has one shape). I want to determine if a certain point (x,y) is inside the shape or not. How can I do that with opencv?

推荐答案

使用 pointPolygonTest 函数.这里是教程.

这篇关于使用opencv确定一个点是在形状内部还是外部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆