在上述理解的基础上,尺度 就是受delta这个参数控制的表示
。
而不同的L(x,y,delta)就构成了尺度空间( Space
,我理解,由于描述图像的时候,一般用连续函数比较好描述公式,所以,采用空间集合 ,空间的概念正规一些)
,实际上,具体计算的时候,即使连续的高斯函数,都要被离散为(一般为奇数大小)(2*k+1)
*(2*k+1)矩阵,来和数字图像进行卷积运算。
1、 SIFT 算法提出及其改进
SIFT算法由D.G.Lowe 1999年提出,2004年完善总结。代表性文献
[1]David G. Lowe, "Object recognition from local
scale-invariant features," International Conference on
Computer Vision, Corfu, Greece (September 1999),
pp.1150-1157.
[2] David G. Lowe, "Distinctive image features from
scale-invariant keypoints," International Journal of
Computer Vision, 60, 2 (2004), pp. 91-110.
具体的MATLAB代码在
http://www.cs./~lowe/keypoints/
可以下载。
Rob Hess 基于GSL和Opencv编写了C语言程序。具体的代码可以在
http://web.engr./~hess/index.html
中下载,可以在VC++.net环境中运行,在调试时要注意对GSL和Opencv的正确配置。
后来Y.Ke将其描述子部分用PCA代替直方图的方式,对其进行改进。
[3] Y. Ke and R. Sukthankar. PCA-SIFT: A More
Distinctive Representation for Local Image
Descriptors.Computer Vision and Pattern Recognition, 2004
Yanke’s homepage:
http://www.andrew./user/yke/
2、 SIFT
算法主要思想
SIFT算法是一种提取局部特征的算法,在尺度空间寻找极值点,提取位置,尺度,旋转不变量。
3、 SIFT算法的主要特点:
a)
SIFT特征是图像的局部特征,其对旋转、尺度缩放、亮度变化保持不变性,对视角变化、仿射变换、噪声也保持一定程度的稳定性。
b)
独特性(Distinctiveness)好,信息量丰富,适用于在海量特征数据库中进行快速、准确的匹配[23]。
c) 多量性,即使少数的几个物体也可以产生大量SIFT特征向量。
d) 高速性,经优化的SIFT匹配算法甚至可以达到实时的要求。
e) 可扩展性,可以很方便的与其他形式的特征向量进行联合。
4、SIFT算法步骤:
1)检测尺度空间极值点
2)精确定位极值点
3)为每个关键点指定方向参数
4)关键点描述子的生成
SIFT算法的介绍参见:SIFT
算法学习小记
前面有朋友问到Sift特征点的提取方法,这里简单做个介绍。
作为一种匹配能力较强的局部描述算子,SIFT算法的实现相当复杂,但从软件开发的角度来说,只要会使用其中几个比较重要的函数就行了。这里要感谢
David
Lowe这个大牛,不但提供了一种强悍的特征匹配算法,还给出了C++的实现代码,后来有人用C#实现了这个算法,需要的朋友可到网上自行下载。
关键函数一:
int sift_features(
IplImage* img, struct feature** feat )
这个函数就是用来提取图像中的特征向量。参数img为一个指向IplImage数据类型的指针,用来表示需要进行特征提取的图像。IplImage是
opencv库定义的图像基本类型(关于opencv是一个著名的图像处理类库,详细的介绍可以参见
http://www.)。参数feat
是一个数组指针,用来存储图像的特征向量。函数调用成功将返回特征向量的数目,否则返回-1.
关键函数二:
int _sift_features(
IplImage* img, struct feature** feat, int intvls,double sigma,
double contr_thr, int curv_thr, int img_dbl, int descr_width, int
descr_hist_bins )
这个函数是函数一的重载,作用是一样的,实际上函数一只不过是使用默认参数调用了函数二,核心的代码都是在函数二中实现的。下面将详细介绍一下其他的几个
参数。
intvls:
每个尺度空间的采样间隔数,默认值为3.
sigma: 高斯平滑的数量,默认值1.6.
contr_thr:判定特征点是否稳定,取值(0,1),默认为0.04,这个值越大,被剔除的特征点就越多。
curv_thr:判定特征点是否边缘点,默认为6.
img_dbl:在建立尺度空间前如果图像被放大了1倍则取值为1,否则为0.
descr_width:计算特征描述符时邻域子块的宽度,默认为4.
descr_hist_bins:计算特征描述符时将特征点邻域进行投影的方向数,默认为8,分别是
0,45,90,135,180,215,270,315共8个方向。
如果只是做特征提取,上面这个函数就足够了,不同图像之间的匹配都是建立在这个基础上的,如果你有足够强的编程能力即使不懂这个算法也能够编写出像样的程
序来,因为下面的比较说白了都是数据结构的比较,跟算法已经没有太多关系了。如果想要深入了解算法,还是认真的看论文和代码吧。
、ubc:DAVID LOWE---SIFT算法的创始人,两篇巨经典经典的文章
http://www.cs./~lowe/
2、cmu:YanKe---PCASIFT,总结的SIFT方面的文章SO全,巨经典
http://www.andrew./user/yke/
3、ubc:MBROWN---SIFT算法用于图像拼接的经典应用autopano-sift,包括一个SIFTLIB库
http://www.cs./~mbrown/autostitch/autostitch.html
http://www.cs./~mbrown/panorama/panorama.html
4、toronto:Jepson---Matlab SIFT tutorial, 超级超级超级经典~
http://www.cs./~jepson
5、ucla:Vedaldi---加州大学一个博士生编的SIFT,Matlab、C的都有,但没用过
http://www.cs./~vedaldi/
6、一个小的拼接软件ptasmblr
http://www./ptasmblr.htm
几个关于sift的算法链接网址,以后要养成这种随时保存资料的好习惯!否则后面不知道又要花多少时间去找,最重要的是影响心情。
SIFT 关键点检测和匹配算法,这个算法在图像匹配方面具有很好的性能。
比原有的harris点匹配方式具有各高的佩准准确度,只是算法速度较慢
SIFT Keypoint Detector
This page provides access to a demo version of David Lowe's SIFT keypoint detector in the form of compiled binaries that can run under Linux or Windows. The demo software uses PGM format for image input. It can output keypoints and all information needed for matching them to a file in a simple ASCII format. A Matlab program and sample C code are provided that can read the keypoints and match them between images.
The image on the right shows an example of matching produced by the demo software. Features are extracted from each of the two images, and lines are drawn between features that have close matches. In this example, many matches are found and only a small fraction are incorrect.
This software is provided for research purposes only, and a license must be obtained from the University of British Columbia for commercial applications. See the LICENSE file provided with the software.
The program can be accessed from the following link in the form of a zip file containing the compiled binaries and demo code. To unpack, use "unzip siftDemoV4.zip" from Linux or an unzip utility in Windows. The code comes with a file README giving full details.
SIFT demo program (Version 4, July 2005)
Release history
-
Version 4 (July 2005)
-
There is now a Windows binary as well as one for Linux. The Matlab scripts have been improved and include code for matching keypoints between images.
-
Version 3 (August 2004)
-
This fixes a bug in the displayed orientation of arrows drawn for each keypoint when using the "-display" option. This affects only arrow display and not the keypoint features themselves (thanks to Yannik Fournier, Tom Stepleton, and Rob Sim for identifying the bug). In addition, a Matlab program is now provided for running the binary and loading the keypoints into Matlab when running under Linux (thanks to D. Alvaro and J.J. Guerrero for the Matlab program).
-
Version 2 (September 2003)
-
Fixes a bug in Version 1 of the sample code for doing matching (not the keypoints themselves) that incorrectly declared "unsigned char" as "char" (thanks to Yongqin Xiao and Suresh Lodha for their assistance in reporting this bug). This new version now finds more correct matches. The new version also contains more test data and raises the matching threshold.
-
Version 1 (June 2003)
-
Initial demo release.
Related papers
The most complete and up-to-date reference for the SIFT feature detector is given in the following journal paper:
-
David G. Lowe, "Distinctive image features from scale-invariant keypoints," International Journal of Computer Vision, 60, 2 (2004), pp. 91-110. [PDF]
The SIFT approach to invariant keypoint detection was first described in the following ICCV 1999 conference paper, which also gives some more information on the applications to object recognition:
-
David G. Lowe, "Object recognition from local scale-invariant features," International Conference on Computer Vision, Corfu, Greece (September 1999), pp. 1150-1157. [PDF];
The following paper gives methods for performing 3D object recognition by interpolating between 2D views. It also provides a probabilistic model for verification of recognition.
-
David G. Lowe, "Local feature view clustering for 3D object recognition," IEEE Conference on Computer Vision and Pattern Recognition, Kauai, Hawaii (December 2001), pp. 682-688. [PDF];
Patents
-
Method and apparatus for identifying scale invariant features in an image and use of same for locating an object in an image
-
David G. Lowe, US Patent 6,711,293 (March 23, 2004). Provisional application filed March 8, 1999. Asignee: The University of British