当前位置:网站首页>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 .
边栏推荐
- prometheus安装
- 爬虫(6) - 网页数据解析(2) | BeautifulSoup4在爬虫中的使用
- YOLOv5s-ShuffleNetV2
- Detailed explanation of issues related to SSL certificate renewal
- QT realizes interface sliding switching effect
- . Net ORM framework hisql practice - Chapter 2 - using hisql to realize menu management (add, delete, modify and check)
- 1011 World Cup Betting (20 分)(PAT甲级)
- .NET ORM框架HiSql实战-第二章-使用Hisql实现菜单管理(增删改查)
- 函数式接口
- The CDC of sqlserver can read the data for the first time, but it can't read the data after adding, deleting and modifying. What's the reason
猜你喜欢

LeetCode第300场周赛(20220703)

“只跑一趟”,小区装维任务主动推荐探索

Online text line fixed length fill tool

与二值化阈值处理相关的OpenCV函数、方法汇总,便于对比和拿来使用

更安全、更智能、更精致,长安Lumin完虐宏光MINI EV?

如何使用Async-Awati异步任務處理代替BackgroundWorker?

Hough Transform 霍夫变换原理

FPGA时序约束分享01_四大步骤简述

Pointnet/Pointnet++点云数据集处理并训练
![[uniapp] uniapp development app online Preview PDF file](/img/11/d640338c626249057f7ad616b55c4f.png)
[uniapp] uniapp development app online Preview PDF file
随机推荐
Is it safe to open an account at Great Wall Securities? How to open an account when buying stocks
请教一下 flinksql中 除了数据统计结果是状态被保存 数据本身也是状态吗
Jetpack Compose 教程
2014 Hefei 31st youth informatics Olympic Games (primary school group) test questions
《工作、消费主义和新穷人》的微信读书笔记
Leetcode ransom letter C # answer
The kth largest element in the array
1008 Elevator(20 分)(PAT甲级)
1672. Total assets of the richest customers
Technologie de base de la programmation Shell IV
Leetcode fizzbuzz C # answer
Unity给自己的脚本添加类似编辑器扩展的功能案例ContextMenu的使用
Pointnet/Pointnet++点云数据集处理并训练
The 15th youth informatics competition in Shushan District in 2019
2021 合肥市信息学竞赛小学组
2021 Hefei informatics competition primary school group
Detailed explanation of issues related to SSL certificate renewal
Introduction to polyfit software
牛客小白月赛7 I 新建 Microsoft Office Word 文档
Shell 编程核心技术《二》