基于OPENCV的SIFT特征提取与匹配算法代码


-
基于OPENCV的SIFT特征提取与匹配算法。包含完整的从图像高斯金字塔、DOG、空间极值点提取、关键点描述、KDtree匹配等关键步骤的全部函数实现,对全面深入理解Lowe的SIFT算法有莫大帮助。 程序运行前须安装 (1)OpenCV: http://opencvlibrary.sourceforge.net (2)SIFT: http://web.engr.oregonstate.edu/~hess/index.html,并配置其环境参数。-OPENCV the SIFT-based feature extraction and matching algorithm. Contains a complete Gaussian pyramid from the image, DOG, space extremum point extraction, description of key points, KDtree matching key step in the realization of the full function of the comprehensive and in-depth understanding of Lowe s SIFT algorithm of tremendous help. Program to run before the installation of (1) OpenCV: http://opencvlibrary.sourceforge.net (2) SIFT: http://web.engr.oregonstate.edu/ ~ hess / index.html, and configure the parameters of their environment.
-
2018-06-07
-
2015-08-22
-
2015-06-30
-
2015-06-18
-
2015-06-16
-
2015-04-27
-
2015-04-07
-
2015-01-22
-
2014-11-09
-
2014-11-05
413KB
opencv实现的SIFT特征提取与匹配算法
2015-06-18用opencv+VS2012实现的SIFT特征提取与匹配算法,已编译通过,直接打开就能运行
opencv sift特征匹配后怎么计算两个图像的相似度?_course
2018-01-29opencv sift特征匹配后怎么计算两个图像的相似度?网上都是介绍怎么匹配特征,没有说怎么得到相似度的结论,请大牛指教,本人小白
已经用opencv对2副图片进行了SIFT特征点匹配,这一对一对的特征点存储在哪里呢,网上找的代码_course
2015-03-16已经用opencv对2副图片进行了SIFT特征点匹配,那么这一对一对的特征点存储在哪里呢,怎么提取其中一对特征点的坐标? #include "stdafx.h" #include <stdio.h> #include <iostream> #include "opencv2/core/core.hpp"//因为在属性中已经配置了opencv等目录,所以把其当成了本地目录一样 #include "opencv2/features2d/features2d.hpp" #include "opencv2/highgui/highgui.hpp" using namespace cv; using namespace std; void readme(); int main(int argc,char* argv[]) { Mat img_1=imread("./image/query.png",CV_LOAD_IMAGE_GRAYSCALE);//宏定义时CV_LOAD_IMAGE_GRAYSCALE=0,也就是读取灰度图像 Mat img_2=imread("./image/rs_query.png",CV_LOAD_IMAGE_GRAYSCALE);//一定要记得这里路径的斜线方向,这与Matlab里面是相反的 if(!img_1.data || !img_2.data)//如果数据为空 { cout<<"opencv error"<<endl; return -1; } cout<<"open right"<<endl; //第一步,用SIFT算子检测关键点 SiftFeatureDetector detector;//构造函数采用内部默认的 std::vector<KeyPoint> keypoints_1,keypoints_2;//构造2个专门由点组成的点向量用来存储特征点 detector.detect(img_1,keypoints_1);//将img_1图像中检测到的特征点存储起来放在keypoints_1中 detector.detect(img_2,keypoints_2);//同理 //在图像中画出特征点 Mat img_keypoints_1,img_keypoints_2; drawKeypoints(img_1,keypoints_1,img_keypoints_1,Scalar::all(-1),DrawMatchesFlags::DEFAULT);//在内存中画出特征点 drawKeypoints(img_2,keypoints_2,img_keypoints_2,Scalar::all(-1),DrawMatchesFlags::DEFAULT); imshow("sift_keypoints_1",img_keypoints_1);//显示特征点 imshow("sift_keypoints_2",img_keypoints_2); //计算特征向量 SiftDescriptorExtractor extractor;//定义描述子对象 Mat descriptors_1,descriptors_2;//存放特征向量的矩阵 extractor.compute(img_1,keypoints_1,descriptors_1);//计算特征向量 extractor.compute(img_2,keypoints_2,descriptors_2); //用burte force进行匹配特征向量 BruteForceMatcher<L2<float>>matcher;//定义一个burte force matcher对象 vector<DMatch>matches; matcher.match(descriptors_1,descriptors_2,matches); //绘制匹配线段 Mat img_matches; drawMatches(img_1,keypoints_1,img_2,keypoints_2,matches,img_matches);//将匹配出来的结果放入内存img_matches中 //显示匹配线段 imshow("sift_Matches",img_matches);//显示的标题为Matches waitKey(0); return 0; }
sift特征点匹配筛选问题_course
2016-02-19筛选出了一部分匹配结果,怎么用这些线段把用到的特征点提出来,我想做一个包围盒,谢谢谢谢  int main(int argc,char* argv[]) { Mat img_1=imread("cap.jpg",CV_LOAD_IMAGE_GRAYSCALE);//宏定义时CV_LOAD_IMAGE_GRAYSCALE=0,也就是读取灰度图像 Mat img_2=imread("capman.jpg",CV_LOAD_IMAGE_GRAYSCALE);//一定要记得这里路径的斜线方向,这与Matlab里面是相反的 if(!img_1.data || !img_2.data)//如果数据为空 { cout<<"opencv error"<<endl; return -1; } cout<<"open right"<<endl; // 第一步,用SIFT算子检测关键点 SiftFeatureDetector detector;//构造函数采用内部默认的 std::vector<KeyPoint> keypoints_1,keypoints_2;//构造2个专门由点组成的点向量用来存储特征点 detector.detect(img_1,keypoints_1);//将img_1图像中检测到的特征点存储起来放在keypoints_1中 detector.detect(img_2,keypoints_2);//同理 //在图像中画出特征点 Mat img_keypoints_1,img_keypoints_2; drawKeypoints(img_1,keypoints_1,img_keypoints_1,Scalar::all(-1),DrawMatchesFlags::DEFAULT);//在内存中画出特征点 drawKeypoints(img_2,keypoints_2,img_keypoints_2,Scalar::all(-1),DrawMatchesFlags::DEFAULT); imshow("sift_keypoints_1",img_keypoints_1);//显示特征点 imshow("sift_keypoints_2",img_keypoints_2); //计算特征向量 SiftDescriptorExtractor extractor;//定义描述子对象 Mat descriptors_1,descriptors_2;//存放特征向量的矩阵 extractor.compute(img_1,keypoints_1,descriptors_1);//计算特征向量 extractor.compute(img_2,keypoints_2,descriptors_2); //用burte force进行匹配特征向量 BruteForceMatcher<L2<float>>matcher;//定义一个burte force matcher对象 vector<DMatch>matches; matcher.match(descriptors_1,descriptors_2,matches); //提取出前15个最佳匹配结果 std::nth_element(matches.begin(), //匹配器算子的初始位置 matches.begin()+14, // 排序的数量 matches.end()); // 结束位置 //剔除掉其余的匹配结果 matches.erase(matches.begin()+15, matches.end()); //绘制匹配线段 Mat img_matches; drawMatches(img_1,keypoints_1,img_2,keypoints_2,matches,img_matches);//将匹配出来的结果放入内存img_matches中 //显示匹配线段 imshow("sift_Matches",img_matches);//显示的标题为Matches //保存 IplImage imgTmp = img_matches; IplImage *input = cvCloneImage(&imgTmp); cvSaveImage("E:\\123.jpg",input ); waitKey(0); return 0; }
105KB
opencv实现的sift算法源码,包含了图像的SIFT特征提取,详细讲解SIFT关键点的提取过程,图像间的基于SIFT特征的图像匹配
2018-11-06opencv实现的SIFT算法源码,包含图像的SIFT特征提取算法,以及图像之间的基于SIFT特征的匹配算法
-
下载
天逸.电气设备选型资料大全 (适合刚刚入行的电气工程师对设备进行选型规划)详解
天逸.电气设备选型资料大全 (适合刚刚入行的电气工程师对设备进行选型规划)详解
-
下载
上海环东.rar 电气设备选型资料大全 (适合刚刚入行的电气工程师对设备进行选型规划)详解 报价
上海环东.rar 电气设备选型资料大全 (适合刚刚入行的电气工程师对设备进行选型规划)详解 报价
-
博客
leetcode414:第三大的数
leetcode414:第三大的数
-
学院
Galera 高可用 MySQL 集群(PXC v5.7+Hapro)
Galera 高可用 MySQL 集群(PXC v5.7+Hapro)
-
下载
5个步进电机硬件设计原理图PCB工程文件资料.zip
5个步进电机硬件设计原理图PCB工程文件资料.zip
-
博客
java IO学习笔记
java IO学习笔记
-
学院
投标方法论
投标方法论
-
博客
C语言版上机程序设计
C语言版上机程序设计
-
下载
Python爬虫零基础最全入门课程
Python爬虫零基础最全入门课程
-
学院
基于SSM实现的房屋租赁系统【附源码】(毕设)
基于SSM实现的房屋租赁系统【附源码】(毕设)
-
博客
matplotlib 折线图
matplotlib 折线图
-
下载
杭电《自动控制原理》期末复习资料(含答案).pdf
杭电《自动控制原理》期末复习资料(含答案).pdf
-
下载
南京航天航空大学《数学分析》2002-2013年历年研究生入学考试试卷(含答案).pdf
南京航天航空大学《数学分析》2002-2013年历年研究生入学考试试卷(含答案).pdf
-
博客
day33_学习总结
day33_学习总结
-
博客
第52天学习打卡(JavaScript 流程控制Map和Set iterator 函数 内部对象)
第52天学习打卡(JavaScript 流程控制Map和Set iterator 函数 内部对象)
-
下载
杭电《自控原理》课后习题答案.pdf
杭电《自控原理》课后习题答案.pdf
-
学院
自动化测试Python3+Selenium3+Unittest
自动化测试Python3+Selenium3+Unittest
-
下载
华中师范大学《中国古代文学史》历年期末试卷及参考答案.pdf
华中师范大学《中国古代文学史》历年期末试卷及参考答案.pdf
-
博客
2021-03-01
2021-03-01
-
学院
基于python的dango框架购物商城毕业设计毕设源代码使用教程
基于python的dango框架购物商城毕业设计毕设源代码使用教程
-
下载
sqlserver2008r2卸载工具包
sqlserver2008r2卸载工具包
-
学院
MMM 集群部署实现 MySQL 高可用和读写分离
MMM 集群部署实现 MySQL 高可用和读写分离
-
博客
八种数据类型
八种数据类型
-
学院
华为1+X——网络系统建设与运维(中级)
华为1+X——网络系统建设与运维(中级)
-
下载
西门子 电气设备选型资料大全 (适合刚刚入行的电气工程师对设备进行选型规划)详解 报价
西门子 电气设备选型资料大全 (适合刚刚入行的电气工程师对设备进行选型规划)详解 报价
-
博客
Vue-router中的路由懒加载
Vue-router中的路由懒加载
-
学院
Samba 服务配置与管理
Samba 服务配置与管理
-
下载
大学生《C++》试题库(含答案).pdf
大学生《C++》试题库(含答案).pdf
-
学院
LVS + Keepalived 实现 MySQL 负载均衡与高可用
LVS + Keepalived 实现 MySQL 负载均衡与高可用
-
学院
【硬核】一线Python程序员实战经验分享(1)
【硬核】一线Python程序员实战经验分享(1)