当前位置:网站首页>Find the maximum inscribed circle of the contour
Find the maximum inscribed circle of the contour
2022-07-02 14:36:00 【thequitesunshine007】
1 Principle introduction
1.1 The whole principle
For binary images S Some outline of C for . Every pixel in the image Point(col, row),col<S.cols, row<S.rows.
Calculation Every Point(col, row) To contour C Distance of , Then store each distance value in ⼀ And the original image ruler ⼨ same Mat In the object , This Mat Every element of an object is ⼀ Distance value . Calculate all Point(col, row) To contour C After the distance value of , Get the most ⼤ And the corresponding point coordinates , This distance value is the radius of the maximum inscribed circle , Point coordinates (col, row) Is the center of the largest inscribed circle . Then we can pass through the circle ⼼ And the radius will be the most ⼤ The inscribed circle is drawn .
1.2 Point polygon detection pointPolygonTest explain
/** @brief Conduct contour point test .
This function determines that the point is within the contour 、 Outside , Or on the edge ( Or coincide with a vertex ). It returns positive ( Inside ), negative ( Outside ), Or zero ( edge )
When measureDist=false when , The return values are +1,-1 and 0.
otherwise , The return value is the nearest symbolic distance between the point and the nearest contour edge ( Distinguish between positive and negative values ).
@param InputArray Enter the profile .
@param pt spot .
@param measureDist If it is true ÿ
边栏推荐
- 由粒子加速器产生的反中子形成的白洞
- threejs的控制器 立方体空间 基本控制器+惯性控制+飞行控制
- threejs的控制器 立方體空間 基本控制器+慣性控制+飛行控制
- Fabric. JS free draw circle
- PTA题库 ===>复数四则运算,一帮一,考试座位号(7-73)
- [Hongke technology sharing] how to test DNS server: DNS performance and response time test
- ##51单片机实验之简易验证码发生器
- taobao.trade.get( 获取单笔交易的部分信息),淘宝店铺订单接口,淘宝oAuth2.0接口,淘宝R2接口代码对接分享
- Contrôleur pour threejs cube Space Basic Controller + Inertial Control + Flight Control
- docker mysql
猜你喜欢

uniapp自动化测试学习

Yolov6 training: various problems encountered in training your dataset

ONNX+TensorRT:将预处理操作写入ONNX并完成TRT部署

STM32-DAC实验&高频DAC输出测试

富文本编辑器添加矢量公式(MathType for TinyMCE ,可视化添加)

没有从远程服务器‘‘映射到本地用户‘(null)/sa‘的远程用户‘sa‘及服务主密码解密错误的解决办法

Pycharm连接远程服务器

Fabric.js 橡皮擦的用法(包含恢复功能)

Who is better, Qianyuan projection Xiaoming Q1 pro or Jimi new play? Which configuration is higher than haqu K1?

QT new project
随机推荐
Tip: SQL Server blocked the state 'openrowset/opendatasource' of component 'ad hoc distributed queries'
Uniapp automated test learning
Packet capturing tool Fiddler learning
一张图彻底掌握prototype、__proto__、constructor之前的关系(JS原型、原型链)
NLA natural language analysis realizes zero threshold of data analysis
Teamtalk source code analysis win client
检查密码
Essential elements of science fiction 3D scenes - City
Makefile 分隔文件名与后缀
关于Flink框架窗口(window)函数最全解析
Generally speaking, if the error of inconsistent tab and space occurs frequently
Xilinx Vivado set *.svh as SystemVerilog Header
STM32库函数进行GPIO初始化
fatal: unsafe repository is owned by someone else 的解决方法
Actual combat sharing of shutter screen acquisition
Why can't browsers read JSX?
Fabric.js 动态设置字号大小
STM32标准固件库函数名(一)
Go operation redis
Do you know that there is an upper limit on the size of Oracle data files?