SURF matlab 检测函数使用
1.这篇介绍SURF检测blob的函数。
函数/Functions
函数名称:detectSURFFeatures
功能:利用The Speeded-Up Robust Features(SURF)算法检测blob特征
语法:points = detectSURFFeatures(I);
points = detectSURFFeatures(I,Name,Value);
其中,其中,I为2-D灰度图像,points为返回的SURF检测算法检测到的blob,Name必须为用单引号对包含的如下字符串名称,Vaule为对应Name的值
Name | Value |
---|---|
'MetricThreshold' | 默认值为1000.0,取值较小时,返回更多检测到的blob |
'NumOctaves' | 默认值为3,范围为>=1的整数,表示所使用高斯滤波器的序列,越小时,所使用的高斯滤波器的序列的窗口大小越小,能够检测到的Blob的尺度越小,典型值为1-4 |
'NumScaleLevels' | 默认值为4,范围为>= 3的整数,表示对应NumOctaves取值的高斯滤波器的个数,典型值为3-6 |
'ROI' | 默认为[1,1,size(I,1),size(1)],表示进行角点检测的图像区域 |
Octave | FilterSize |
---|---|
1 | 9x9,15x15,21x21,27x27,...(相差为6) |
2 | 15x15,27x27,39x39,51x51,...(相差为12) |
3 | 27x27,51x51,75x75,99x99,...(相差为24) |
4 | ...(相差为48) |
~~ surf的matlab程序如下
clc
%读取图像
I1= imread('info_surf01.jpg');
I1=imresize(I1,0.6); %imresize 将原来的图像缩小原来的一般
I1=rgb2gray(I1); %把RGB图像变成灰度图像
%figure
%imshow(I1)
I2= imread('info_surf03.jpg');
I2=imresize(I2,0.6);
I2=rgb2gray(I2);
%figure
%imshow(I2)
%寻找特征点
points1 = detectSURFFeatures(I1,'MetricThreshold',100); %读取特征点
points2 = detectSURFFeatures(I2,'MetricThreshold',100);
%Extract the features.计算描述向量
[f1, vpts1] = extractFeatures(I1, points1);
[f2, vpts2] = extractFeatures(I2, points2);
%Retrieve the locations of matched points. The SURF feature vectors are already normalized.
%进行匹配
indexPairs = matchFeatures(f1, f2, 'Prenormalized', true) ;
matched_pts1 = vpts1(indexPairs(:, 1)); %这个地方应该是对他进行取值吧 这个应该是啊吧他们做成一个数组
matched_pts2 = vpts2(indexPairs(:, 2));
%显示匹配
figure('name','匹配后的图像'); showMatchedFeatures(I1,I2,matched_pts1,matched_pts2,'montage'); %总共找了39个特征点
legend('matched points 1','matched points 2');
最新文章
- 分享录制的正则表达式入门、高阶以及使用 .NET 实现网络爬虫视频教程
- RadioButtonList的使用
- clang format 自定义样式常用参数说明
- 用etckeeper来解救运维工程师
- XML数据源快速开发框架——XmlFramwork
- c语言学习感想
- Express创建并运行node项目(Jade和EJS模版引擎)
- 精确覆盖DLX算法模板另一种写法
- ANDROID对文件的操作
- 「C」 数组、字符串、指针
- ThinkPHP连接数据库出现的错误:Undefined class constant 'MYSQL_ATTR_INIT_COMMAND'
- MongoDB - Indexing, Replication, and Security
- java keytool
- 学习笔记—XML
- Python入门基础之函数、切片
- openfire课程
- ZooKeeper和Curator相关经验总结
- selenium+python谷歌驱动配置
- 关于JAVA架构师
- MSMQ研究
热门文章
- CMake安装或CMake Error at CMakeLists
- Day 16 购物车
- C#学习笔记---区分StringWriter(Reader)和StreamWriter(Reader),TextWriter(Reader),BinaryWriter(Reader)
- ZOJ 2619: Generator
- Error: spawn xxxx ENOENT原因与解决
- JS快速上手-基础Javascript
- 备份MySQL数据库的方法
- Codeforces 798D Mike and distribution(贪心或随机化)
- Django开发微信公众平台
- error MSB8011: 未能注冊输出。请尝试启用“逐用户重定向”