当前位置:网站首页>求轮廓最大内接圆
求轮廓最大内接圆
2022-07-02 11:21:00 【thequitesunshine007】
1 原理介绍
1.1 整体原理
对于二值图像S的某轮廓C而言。图像中每个像素点Point(col, row),col<S.cols, row<S.rows。
计算 每个Point(col, row)到轮廓C的距离,再把每个距离值存放在⼀个和原图像尺⼨相同的Mat对象中,这个Mat对象的每个元素都是⼀个距离值。计算完所有Point(col, row)到轮廓C的距离值后,获取其中最⼤的距离值以及对应的点坐标,这个距离值就是最大内接圆的半径,点坐标(col, row)就是最大内接圆的圆心。然后我们就可以通过圆⼼和半径将轮廓的最⼤内接圆绘制出来了。
1.2 点多边形检测pointPolygonTest解释
/** @brief进行轮廓点测试。
该函数确定点是在轮廓线内、外,还是位于边缘(或与一个顶点重合)。它返回正(内),负(外),或零(边)
当measureDist=false时,返回值分别是+1,-1和0。
否则,返回值是点和最近的轮廓边缘之间的最近符号距离(区分正负值)。
@param InputArray 输入轮廓。
@param pt 点。
@param measureDist 如果为真ÿ
边栏推荐
- Yyds dry goods inventory software encryption lock function
- Custom events, global event bus, message subscription and publishing, $nexttick
- Method of creating linked server for cross server data access
- Certik released the defi security report in 2021, disclosing key data of industry development (PDF download link attached)
- 线性dp求解 最长子序列 —— 小题三则
- Multi rotor aircraft control using PID and LQR controllers
- C语言高级用法--函数指针:回调函数;转换表
- Talk about idempotent design
- docker mysql
- 你知道Oracle的数据文件大小有上限么?
猜你喜欢
Penetrate the remote connection database through the Intranet
uniapp自动化测试学习
MySQL 45 lecture - learning the actual battle of MySQL in Geek time 45 Lecture Notes - 05 | easy to understand index (Part 2)
A white hole formed by antineutrons produced by particle accelerators
Fabric.js 自由绘制圆形
[to be continued] [UE4 notes] l5ue4 model import
[development environment] StarUML tool (download software | StarUML installation | StarUML creation project)
In 2021, the global styrene butadiene styrene (SBS) revenue was about $3722.7 million, and it is expected to reach $5679.6 million in 2028
The global special paper revenue in 2021 was about $27 million, and it is expected to reach $35 million in 2028. From 2022 to 2028, the CAGR was 3.8%
千元投影小明Q1 Pro和极米NEW Play谁更好?和哈趣K1比哪款配置更高?
随机推荐
Certik released the defi security report in 2021, disclosing key data of industry development (PDF download link attached)
How kaggle uses utility script
String matching problem
A white hole formed by antineutrons produced by particle accelerators
线性dp求解 最长子序列 —— 小题三则
[development environment] StarUML tool (download software | StarUML installation | StarUML creation project)
Federated Search: all requirements in search
没有从远程服务器‘‘映射到本地用户‘(null)/sa‘的远程用户‘sa‘及服务主密码解密错误的解决办法
Chapter 9: xshell free version installation
篇9:XShell免费版安装
C语言高级用法--函数指针:回调函数;转换表
NLA natural language analysis realizes zero threshold of data analysis
MySQL 45 lecture - learning from the actual battle of geek time MySQL 45 Lecture Notes - 04 | easy to understand index (Part 1)
Available solution development oral arithmetic training machine / math treasure / children's oral arithmetic treasure / intelligent math treasure LCD LCD driver ic-vk1622 (lqfp64 package), original te
测试框架TestNG的使用(二):testNG xml的使用
PTA题库 ===>复数四则运算,一帮一,考试座位号(7-73)
Solving the longest subsequence with linear DP -- three questions
Quick analysis: easy to share the Internet
Use of swagger
什么是 eRDMA?丨科普漫画图解