opencv3中surfDetector中使用
https://www.cnblogs.com/anqiang1995/p/7398218.html
opencv2中SurfFeatureDetector、SurfDescriptorExtractor、BruteForceMatcher在opencv3中发生了改变。具体如何完成特征点匹配呢?示例如下:
//寻找关键点
int minHessian = 700;
Ptr<SURF>detector = SURF::create(minHessian);
detector->detect( srcImage1, keyPoint1 );
detector->detect( srcImage2, keyPoints2 );
//绘制特征关键点
Mat img_keypoints_1; Mat img_keypoints_2;
drawKeypoints( srcImage1, keypoints_1, img_keypoints_1, Scalar::all(-1), DrawMatchesFlags::DEFAULT );
drawKeypoints( srcImage2, keypoints_2, img_keypoints_2, Scalar::all(-1), DrawMatchesFlags::DEFAULT );
//显示效果图
imshow("特征点检测效果图1", img_keypoints_1 );
imshow("特征点检测效果图2", img_keypoints_2 );
//计算特征向量
Ptr<SURF>extractor = SURF::create();
Mat descriptors1, descriptors2;
extractor->compute( srcImage1, keyPoint1, descriptors1 );
extractor->compute( srcImage2, keyPoints2, descriptors2 );
//使用BruteForce进行匹配
Ptr<DescriptorMatcher> matcher = DescriptorMatcher::create("BruteForce");
std::vector< DMatch > matches;
matcher->match( descriptors1, descriptors2, matches );
//绘制从两个图像中匹配出的关键点
Mat imgMatches;
drawMatches( srcImage1, keyPoint1, srcImage2, keyPoints2, matches, imgMatches );//进行绘制
//显示
imshow("匹配图", imgMatches );
3.x的特征检测:
- 算法:SURF,SIFT,BRIEF,FREAK
- 类:cv::xfeatures2d::SURF
- cv::xfeatures2d::SIFT
- cv::xfeatures::BriefDescriptorExtractor
- cv::xfeatures2d::FREAK
- cv::xfeatures2d::StarDetector
- 需要进行以下几步
- 加入opencv_contrib
- 包含opencv2/xfeatures2d.hpp
- using namepsace cv::xfeatures2d
- 使用create(),detect(),compute(),detectAndCompute()
opencv3中surfDetector中使用的更多相关文章
- 在OpenCV3.1.0中使用SIFT,SURF算法
写在前边: 1.我使用的是python2.7 + OpenCV3.1.0 2.OpenCV3.0.0+的文档有很大问题,很多文档写的还是OpenCV2.0+, OpenCV3.0+根本用不了,其中有一 ...
- Firebug中调试中的js脚本中中文内容显示为乱码
Firebug中调试中的js脚本中中文内容显示为乱码 设置 页面 UFT-8 编码没用, 解决方法:点击 "Firebug"工具栏 中的"选项"---" ...
- C#中DataTable中的Compute方法使用收集
原文: C#中DataTable中的Compute方法使用收集 Compute函数的参数就两个:Expression,和Filter. Expresstion是计算表达式,关于Expression的详 ...
- js中== 和===中的区别
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...
- win7中VS2010中安装CSS3.0问题解决方法
win7中VS2010中安装CSS3.0问题解决方法 在安装Standards Update for VS2010 SP1后,VS2010中没有CSS3.0问题,以下是我的解决方法 1.首先去官网 ...
- cocos2dx常见的46中+22中动作详解
cocos2dx常见的46中+22中动作详解 分类: iOS2013-10-16 00:44 1429人阅读 评论(0) 收藏 举报 bool HelloWorld::init(){ ///// ...
- Nhibernate中 Many-To-One 中lazy="proxy" 延迟不起作用的原因
2010-07-15 12:10 by 彭白洋, 322 阅读, 0 评论, 收藏, 编辑 NHibernate中 Many-To-One 中lazy="proxy" 延迟不起作用 ...
- IOS获取物理尺寸中7Plus中获取的是7的物理尺寸
IOS获取物理尺寸中7Plus中获取的是7的物理尺寸: 在开发调试过程中我的7Plus手机获取[uiscreen mainscreen].bounds为750 .1334. 解决方案:在手机中的显示 ...
- 【转】Java中字符串中子串的查找共有四种方法(indexof())
原文网址:http://wfly2004.blog.163.com/blog/static/1176427201032692927349/ Java中字符串中子串的查找共有四种方法,如下:1.int ...
随机推荐
- robotframework 时间控件的操作的几种方法总结。
- C/S模式简单socket通信
TCP连接方式 sever.c #include <stdio.h>#include <stdlib.h>#include <sys/socket.h>#inclu ...
- Eclipse lombok get set方法报错
在maven仓库中找到 lombok jar包 如:C:\Program File\.m2\Repository\org\projectlombok\lombok\1.18.2\lombok-1.18 ...
- Gerrit Handbook for Commercial Project
前注:常见‘坑’ 不要使用 2.14 版本 gerrit.conf 中 [sendemail] 部分必须有 from = ... 字段,否则无法添加邮箱 gerrit 以用户组为单位划分权限,先将用户 ...
- 5、cesium点击面高亮事件
cesium点击面高亮事件 主要功能:比如你加载了json.geojson或者topojson的数据.加载出来后,分为很多个面,现在要实现点击一个面,这个面变颜色:再点击另一个面,另一个面高亮,之前的 ...
- java线程池和五种常用线程池的策略使用与解析
java线程池和五种常用线程池策略使用与解析 一.线程池 关于为什么要使用线程池久不赘述了,首先看一下java中作为线程池Executor底层实现类的ThredPoolExecutor的构造函数 pu ...
- spring 声明式事务原理解读
在Spring中,声明式事务是通过事务属性(transaction attribute)来定义的.事务属性描述了事务策略如何应用到方法上.事务属性包含5个方面: 传播行为 隔离级别 是否只 ...
- spring boot jpa 多表关联 @OneToOne @OneToMany @ManyToOne@ManyToMany
1.一对一关联 @OneToOne import lombok.Data; import javax.persistence.*; /** * @Author: GWL * @Description: ...
- windows 远程登录
在我的电脑 属性当中开启远程登录功能 然后制作账号,这里对于账号的命名是有要求的,具体网上查找说是要用户名和全名一样,我没有做测试,不过新创建了一个用户用来登录,总是告知我密码错误,导致登录失败,所 ...
- apache + php 无法访问redis
1.在有扩展的情况下 2.测试连接 <?php $redis=new Redis(); $redis->connect('127.0.0.1',6379); echo "succ ...