当前位置:网站首页>Opencv daily function structure analysis and shape descriptor (7) finding polygon (contour) / rotating rectangle intersection
Opencv daily function structure analysis and shape descriptor (7) finding polygon (contour) / rotating rectangle intersection
2022-06-24 08:52:00 【Sit and watch the clouds rise】
One 、intersectConvexConvex function
1、 The function prototype
Find the intersection of two convex polygons . Returns the absolute value of the area of an intersecting polygon .intersectConvexConvex Do not confirm that both polygons are convex , If not , Invalid results will be returned .
float cv::intersectConvexConvex (InputArray p1, InputArray p2, OutputArray p12, bool handleNested=true)2、 Parameters,
| p1 | The first outline |
| p2 | Second profile |
| p12 | The output polygon that describes the intersection area |
| handleNested | When it's true , If one polygon is completely contained in another , Then find an intersection . If false, The intersection cannot be found . If a polygon shares an edge or the vertex of one polygon is on the edge of another polygon , Then they are not considered nested , No matter what handleNested What's the value of , Will find the intersection . |
Two 、rotatedRectangleIntersection function
1、 The function prototype
This function finds out if there is any intersection between two rotating rectangles . If there is , The vertices of the intersecting region are also returned .
int cv::rotatedRectangleIntersection (const RotatedRect &rect1, const RotatedRect &rect2, OutputArray intersectingRegion)2、 Parameters,
| rect1 | The first rectangle |
| rect2 | The second rectangle |
| intersectingRegion | The output array of the vertices of the intersecting region . It returns... At most 8 vertices . Stored as std::vector<cv::Point2f> or cv::Mat As CV_32FC2 Type of Mx1. |
3、 Schematic image
Here are some examples of possible intersections . The shaded pattern represents the intersection area , The red vertex is returned by the function .

边栏推荐
- K8S部署高可用postgresql集群 —— 筑梦之路
- [pytoch basic tutorial 31] youtubednn model analysis
- [10 day SQL introduction] Day2
- ZUCC_ Principles of compiling language and compilation_ Experiment 0607 grammar analysis ll analysis
- RuntimeError: Missing dependencies:XXX
- What is SRE? A detailed explanation of SRE operation and maintenance system
- 数据中台:数据中台全栈技术架构解析,附带行业解决方案
- 数据中台:数据中台技术架构详解
- Solution: Nan occurs in loss during model training
- Scheduled database backup script
猜你喜欢

Database migration from PostgreSQL to MySQL

用VNC Viewer的方式远程连接无需显示屏的树莓派

OpenCV每日函数 结构分析和形状描述符(7) 寻找多边形(轮廓)/旋转矩形交集

【Pytorch基础教程31】YoutubeDNN模型解析

À propos de ETL il suffit de lire cet article, trois minutes pour vous faire comprendre ce qu'est ETL

Telnet port login method with user name for liunx server

A tip to read on Medium for free

2022-06-23:给定一个非负数组,任意选择数字,使累加和最大且为7的倍数,返回最大累加和。 n比较大,10的5次方。 来自美团。3.26笔试。

数据中台:数据采集和抽取的技术栈详解

Become an IEEE student member
随机推荐
等保备案是什么意思?应该去哪里办理备案?
MyCAT读写分离与MySQL主从同步
One article explains in detail | those things about growth
Increase insert speed
[MySQL from introduction to mastery] [advanced part] (I) character set modification and underlying principle
1528. 重新排列字符串
Prompt code when MySQL inserts Chinese data due to character set problems: 1366
基于QingCloud的 “房地一体” 云解决方案
工具类
À propos de ETL il suffit de lire cet article, trois minutes pour vous faire comprendre ce qu'est ETL
基于单片机开发的酒精浓度测试仪方案
Earthly 容器镜像构建工具 —— 筑梦之路
Database migration from PostgreSQL to MySQL
从华为WeAutomate数字机器人论坛,看政企领域的“政务新智理”
数据中台:数据中台全栈技术架构解析,附带行业解决方案
input的聚焦后的边框问题
Picture tools
IDEA另起一行快捷键
4275. Dijkstra序列
[pytoch basic tutorial 31] youtubednn model analysis