当前位置:网站首页>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 ÿ
边栏推荐
- There is no solution to the decryption error of the remote user 'sa' and the service master password mapped from the remote server 'to the local user' (null) /sa '
- Generally speaking, if the error of inconsistent tab and space occurs frequently
- Using computed in uni app solves the abnormal display of data () value in tab switching
- Contrôleur pour threejs cube Space Basic Controller + Inertial Control + Flight Control
- 【空间&单细胞组学】第1期:单细胞结合空间转录组研究PDAC肿瘤微环境
- Advanced usage of C language -- function pointer: callback function; Conversion table
- ONNX+TensorRT:将预处理操作写入ONNX并完成TRT部署
- MQ教程 | Exchange(交换机)
- OpenCV调用USB摄像头的点滴
- 《可供方案开发》口算训练机/数学宝/儿童口算宝/智能数学宝 LCD液晶显示驱动IC-VK1622(LQFP64封装),原厂技术支持
猜你喜欢

HMS core machine learning service helps zaful users to shop conveniently

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

由粒子加速器产生的反中子形成的白洞

Tencent cloud tstor unified storage passed the evaluation of the first batch of basic file storage capabilities of the ICT Institute

Xilinx Vivado set *.svh as SystemVerilog Header

Development and design of animation surrounding mall sales website based on php+mysql

跨服务器数据访问的创建链接服务器方法

STM32 library function for GPIO initialization

mathML转latex

Onnx+tensorrt: write preprocessing operations to onnx and complete TRT deployment
随机推荐
【apipost】使用教程
OpenCV调用USB摄像头的点滴
1、编辑利器vim
Contrôleur pour threejs cube Space Basic Controller + Inertial Control + Flight Control
Tujia muniao meituan has a discount match in summer. Will it be fragrant if the threshold is low?
Convolutional neural network (Introduction)
Yolov3 & yolov5 output result description
[development environment] 010 editor tool (tool download | binary file analysis template template installation | shortcut key viewing and setting)
Solve the problem that openocd fails to burn STM32 and cannot connect through SWD
Fatal: unsafe repository is owned by someone else
Makefile separates file names and suffixes
String matching problem
Advanced usage of C language -- function pointer: callback function; Conversion table
3、函数指针和指针函数
Use of swagger
Borui data integrated intelligent observable platform was selected into the "Yunyuan production catalogue" of China Academy of communications in 2022
博睿数据一体化智能可观测平台入选中国信通院2022年“云原生产品名录”
NLA自然语言分析实现数据分析零门槛
Tencent cloud tstor unified storage passed the evaluation of the first batch of basic file storage capabilities of the ICT Institute
删除元素(带过渡动画)