当前位置:网站首页>Some thoughts on whether the judgment point is located in the contour
Some thoughts on whether the judgment point is located in the contour
2022-07-04 19:33:00 【Haohong image algorithm】
stay CSDN We found a method to judge whether the point is inside the polygon , Links are as follows :
https://blog.csdn.net/u011722133/article/details/52813374
https://blog.csdn.net/hjk61314/article/details/82587196
Then can we use the above method to judge whether the point is within the contour ?
The answer is : have to (děi) Sub situation .
When the width of our outline is 1 when , Sure , But when the outline width is not 1 Time is not allowed .
For example, the following outline is ok :
But the following outline is not allowed :
Why not? , Why you can , According to the methods provided in the above two blog posts, it is easy to think .
In fact, when the width is 1 when , You can use functions drawContours() Draw the outline point set in a solid way ( Parameters thickness The value of the set FILLED). Then judge whether a point is inside the contour .
When the outline is drawn in a solid way , For example, the following is drawn as a solid outline :
I just need to judge whether the pixel gray value at a certain point is greater than a certain threshold , For example, judge whether the gray value of the pixel is greater than 200. Greater than 200 It is thought to be on or inside the contour , Less than 200 It is thought to be outside the contour .
边栏推荐
- Unity editor extends C to traverse all pictures in folders and subdirectories
- Oracle with as ORA-00903: invalid table name 多表报错
- [uniapp] uniapp development app online Preview PDF file
- PointNeXt:通过改进的模型训练和缩放策略审视PointNet++
- Pointnet/Pointnet++点云数据集处理并训练
- "Only one trip", active recommendation and exploration of community installation and maintenance tasks
- .NET ORM框架HiSql实战-第二章-使用Hisql实现菜单管理(增删改查)
- Shell 编程核心技术《二》
- Caché WebSocket
- OpenCV的二值化处理函数threshold()详解
猜你喜欢
LeetCode第300场周赛(20220703)
There are multiple divs in the large div, which are displayed on the same line. After overflow, scroll bars are generated without line breaks
Hough transform Hough transform principle
性能优化之关键渲染路径
联想首次详解绿色智城数字孪生平台 破解城市双碳升级难点
Opencv functions and methods related to binary threshold processing are summarized for comparison and use
【问题】druid报异常sql injection violation, part alway true condition not allow 解决方案
如何使用Async-Awati异步任务处理代替BackgroundWorker?
[发布] 一个测试 WebService 和数据库连接的工具 - DBTest v1.0
神经网络物联网平台搭建(物联网平台搭建实战教程)
随机推荐
Shell programming core technology "four"
指定输出的字符集
2014 Hefei 31st youth informatics Olympic Games (primary school group) test questions
1008 Elevator(20 分)(PAT甲级)
The 300th weekly match of leetcode (20220703)
26. Delete the duplicate item C solution in the ordered array
Technologie de base de la programmation Shell IV
整理混乱的头文件,我用include what you use
LeetCode FizzBuzz C#解答
"Only one trip", active recommendation and exploration of community installation and maintenance tasks
SSL证书续费相关问题详解
一文掌握数仓中auto analyze的使用
Hough Transform 霍夫变换原理
问下各位大佬有用过cdc直接mysql to clickhouse的么
Master the use of auto analyze in data warehouse
项目中遇到的线上数据迁移方案1---总体思路整理和技术梳理
神经网络物联网平台搭建(物联网平台搭建实战教程)
更安全、更智能、更精致,长安Lumin完虐宏光MINI EV?
函数式接口
1011 World Cup Betting (20 分)(PAT甲级)