SIFT

Demo Software: SIFT Keypoint Detector

David Lowe


 

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.

SIFT matching example 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.

The demo 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)

This demo software is provided for research purposes only.  A license must be obtained from the University of British Columbia for any commercial applications.  The sofware is protected under a US patent as listed below.  See the LICENSE file provided with the demo software. 

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 Columbia.

 

 

 

http://www.cs.ubc.ca/~lowe/keypoints/

SIFT(Scale-Invariant Feature Transform,尺度不变特征变换)是一种用于图像处理中的特征提取算法,其核心优势在于对尺度、旋转以及部分光照变化具有不变性。SIFT通过在不同尺度空间中检测关键点,并提取其特征描述子,从而实现对图像特征的稳定识别[^3]。 ### SIFT算法原理 SIFT算法主要包括以下几个步骤: 1. **尺度空间极值检测**:通过构建高斯差分金字塔(DoG),在不同尺度下检测图像中的关键点。这些关键点是图像中在尺度和空间位置上稳定的极值点。 2. **关键点定位**:在初步检测到的关键点中,去除低对比度点和边缘响应点,以提高特征的稳定性。 3. **方向分配**:为每个关键点分配一个或多个主方向,基于局部图像梯度方向分布,使特征具有旋转不变性。 4. **特征描述子生成**:在关键点周围区域提取特征描述子。传统SIFT使用128维的梯度方向直方图向量,而改进后的PCA-SIFT则使用主成分分析(PCA)来生成描述子,提高计算效率和区分度[^2]。 ### SIFT在图像处理中的应用 SIFT算法因其良好的不变性和鲁棒性,在多个图像处理领域中得到广泛应用: - **图像匹配**:SIFT特征可用于图像之间的匹配,即使图像存在尺度、旋转变化,也能准确找到对应区域。 - **目标识别**:通过提取目标物体的SIFT特征并进行比对,可以实现目标识别和分类。 - **图像拼接**:SIFT常用于全景图像拼接中,通过匹配不同图像中的特征点,将多张图像无缝拼接成一张全景图。 - **三维重建**:在计算机视觉中,SIFT用于特征点匹配,从而帮助构建三维模型。 ### 示例代码:使用OpenCV提取SIFT特征 以下是一个使用OpenCV库实现SIFT特征提取的Python示例: ```python import cv2 import numpy as np # 读取图像 image = cv2.imread('image.jpg') gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # 创建SIFT对象 sift = cv2.SIFT_create() # 检测关键点并计算描述子 keypoints, descriptors = sift.detectAndCompute(gray, None) # 绘制关键点 image_with_keypoints = cv2.drawKeypoints(image, keypoints, None, flags=cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS) # 显示结果 cv2.imshow('SIFT Keypoints', image_with_keypoints) cv2.waitKey(0) cv2.destroyAllWindows() ``` ###
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值