当前位置:网站首页>OpenCV 图像拼接
OpenCV 图像拼接
2022-08-03 23:29:00 【我今年十六岁】
目录
一:OpenCV图像特征采集
特征提取:
一幅图中总存在着一些独特的像素点,这些点我们可以认为就是这幅图的特征,成为特征点。
计算机视觉领域特征提取:
获取一幅图中存在着一些独特的像素点。
需要解决问题:
1、提取图片中的特征点
2、解决尺度不变性问题,不同大小的图片获取到的特征是一样的。
3、提取到的特征点要稳定,能被精确定位。
二:OpenCV 特征提取算法
特征提取算法
三:OpenCV特征提取
结果:提取到的特征很粗糙,不是很精确的特征点,导致效果很差。
要求:去粗取精,获取优秀的匹配点。
四:OpenCV特征取精
取一幅图像中的一个SIFT关键点,并找出其与另一幅图像中欧式距离最近的前两个关键点,在这两个关键点中,如果最近的距离除以次近的距离得到的比率ratio少于某个阈值T,则接受这一对匹配点。
五:OpenCV透视转换
透视变换是按照物体成像投影规律进行变换,即将物体重新投影到新的成像平面。透视变换常用于机器人视觉导航研究中,由于相机视场与地面存在倾斜角使得物体成像产生畸变,通常通过透视变换实现对物体图像的校正。
使用cv::warpPerspective()进行透视变换
void cv::warpPerspective(
cv::InputArray src, // 输入图像
cv::OutputArray dst, // 输出图像
cv::InputArray M, // 3x3 变换矩阵
cv::Size dsize, // 目标图像大小
int flags = cv::INTER_LINEAR, // 插值方法
int borderMode = cv::BORDER_CONSTANT, // 外推方法
const cv::Scalar& borderValue = cv::Scalar() //常量边界时使用
);
透视矩阵 :
获取特征矩阵:
a. 根据图像的4个顶点来获取特征矩阵
cv::Mat cv::getPerspectiveTransform( // 返回3x3透视变换矩阵
const cv::Point2f* src, // 源图像四个顶点坐标(点数组)
const cv::Point2f* dst // 目标图像上四个顶点的坐标(点数组)
);
b. 函数来计算透视矩阵H(3*3)
findHomography (
InputArray srcPoints,//源平面中点的坐标矩阵.vector<Point2f>类型
InputArray dstPoints,//目标平面中点的坐标矩阵,vector<Point2f>类型
int method = 0,
double ransacReprojThreshold = 3,
OutputArray mask = noArray(),
const int maxIters = 2000,
const double confidence = 0.995
)
六:OpenCV图像配准融合与图像反投影优化
图片拼接流程思想:
边栏推荐
- 获国际权威认可 | 云扩科技入选《RPA全球市场格局报告,Q3 2022》
- 响应式织梦模板塑身瑜伽类网站
- RPA power business automation super order!
- 2022/8/3 考试总结
- Analysys Analysis: The transaction scale of China's online retail B2C market in Q2 2022 will reach 2,344.47 billion yuan
- leetcode/子串中不能有重复字符的最长子串
- RPA助力商超订单自动化!
- 【LeetCode】最长公共子序列(动态规划)
- 【RYU】rest_router.py源码解析
- Take an example of a web worker
猜你喜欢
Minimized installation of debian11
A simple understanding of TCP, learn how to shake hands, wave hands and various states
数据分析知识点搜集(纯粹的搜集)
Zilliz 2023 Fall Campus Recruitment Officially Launched!
The Chinese Valentine's Day event is romantically launched, don't let the Internet slow down and miss the dark time
电子邮件安全或面临新威胁!
The salary of soft testers at each stage, come to Kangkang, how much can you get?
"Digital Economy Panorama White Paper" Financial Digital User Chapter released!
响应式织梦模板除尘器类网站
Republish the lab report
随机推荐
雅思大作文写作模版
IELTS essay writing template
FinClip,助长智能电视更多想象空间
Creo 9.0创建几何点
用两个栈模拟队列
ts用法大全
internship:编写excel表的上传方法(导入)
Create function report error, prompting DECLARE definition syntax problem
MCS-51单片机,定时1分钟,汇编程序
[RYU] rest_router.py source code analysis
[2022强网杯] polydiv和gamemaster
Analysys Analysis: The transaction scale of China's online retail B2C market in Q2 2022 will reach 2,344.47 billion yuan
Use tf.image.resize() and tf.image.resize_with_pad() to resize images
Software testing is seriously involution, how to improve your competitiveness?
Code Casual Recording Notes_Dynamic Programming_416 Segmentation and Subsetting
[Paper Reading] TRO 2021: Fail-Safe Motion Planning for Online Verification of Autonomous Vehicles Using Conve
689. 三个无重叠子数组的最大和
rsync 基础用法
Why do we need callbacks
用队列模拟实现栈