文章快速检索 高级检索

1. 东南大学 交通学院, 江苏 南京 210096;
2. 江苏科技大学 计算机科学与工程学院, 江苏 镇江 212000

A SIFT matching algorithm based on the distance to reference point
TANG Kun1 , HAN Bin2
1. School of Transportation, Southeast University, Nanjing 210096, China;
2. School of Computer Science and Engineering, Jiangsu University of Science and Technology, Zhenjiang 212000, China
Abstract:To address the high time cost of feature point matching in scale invariant feature transform (SIFT), a new SIFT feature point matching algorithm based on the distance to reference point—DRP algorithm is put forward. Firstly, distances from the reference point to every feature point to be matched is computed using DRP algorithm. Then, these distances computed previously is ordered and saved in a dataset named as distance of ordering. Next, distances from the reference point to the feature point to be queried is also computed. After that, the nearest neighbor of the distance in distance of ordering is retrieved with binary search and returned as index of center. Finally, the nearest neighbor of feature point to be queried is searched one by one in a certain range whose center is index of center. It is proven by experiment tested on ACF (affine covariant features) pictures from VGG(visual geometry group) laboratory that DRP algorithm can effectively decrease the time cost of SIFT feature points matching without loss of matching results compared with the classical SIFT algorithm.
Key words: scale invariant feature transform (SIFT)     distance to reference point (DRP) algorithm     feature point matching     nearest neighbor     reference point
﻿

Lowe提出的尺度不变特征变换(scale invariant feature transform,SIFT)[1]是一种鲁棒性强的图像局部特征提取算法，具有对旋转、光照、尺度变化等保持不变性[2]，广泛应用于三维重建、目标识别、图像融合等领域[3]。SIFT算法由特征点检测及描述与特征点匹配两部分构成，其中，SIFT特征点匹配实质上可以转化为在高维空间中搜索特征点最近邻的问题，并且在很多情况下，只需要得到查询特征点的近似最近邻就足够了[4]。据此近年来提出了一些相关算法，其中，Lowe提出的最优节点优先算法(best bin first,BBF)[5]在K-D树索引的基础上，使用优先队列和限制回溯查询次数来提高搜索最近邻的效率。va+-file算法[6]将数据集转换到KLT域，然后采用均匀量化划分来提高va-file算法[7]的过滤效率。iDistance算法[8]对高维数据空间进行划分，使用B+-tree结果来组织参考点并搜索最近邻。LSH(locality sensitive hashing,LSH)算法[9, 10]通过Hash函数将邻近高维点集映射到Hash表的同一个桶中，从而提高搜索最近邻效率。基于聚类分析的B+-tree算法[11]采用类B+-tree索引结构，通过更加细致的划分数据来加快搜索速度。MRSVQH[12]根据选择子向量的L2范数来量化和散列特征向量，仅考虑具有与查询向量相同Hash值的集合，从而提高了搜索速度。

1 DRP算法 1.1 DRP算法原理

d维欧式空间Rd中2个点P1=(x1,x2,…,xd)，P2=(y1,y2,…,yd)，两点对应的向量分别为V1=[x1 x2xd]，V2=[y1 y2yd]。则P1P2两点之间的欧式距离D(P1,P2)为

d维欧式空间Rd中的一个点集合Fd={Pi|PiRd,i=1,2,…,n}，对于PqueryRd，需要在Fd中搜索Pquery的最近邻。设定一个参考点Pr，则对于每一个需要搜索的PqueryPquery与参考点Pr构成向量PrPquery是确定的(长度和方向)，若Fd中所有点与设定参考点Pr构成的向量PrPiPrPquery之间的夹角都为θ时，则使向量|PrPi|→|PrPquery|cosθ的点Pi就是Pquery的最近邻。

 图 1 不同夹角时的最小距离 Fig. 1 The minimum distance of different angle

 图 2 在一定区域内搜索最近邻 Fig. 2 Search the nearest neighbor in a specified area

1.2 DRP算法描述

d维欧式空间Rd中的2个点集合：

 图 3 DRP算法搜索最近邻 Fig. 3 Search the nearest neighbor with DRP algorithm

1)在d维欧式空间Rd中任意选取一点Pr作为参考点，设定一个阈值th(正整数)。

2)对于任一属于集合Fd中的点Pi(i=1,2,…,m)，计算其与参考点Pr之间的距离，保存于数组Dri中，并建立DriPi的映射。

3)使用快速排序算法对Dri中的距离按升序(或降序)进行排序，得到Driorder

4)从待匹配点集合Fd中任取一待匹配点Pquery，计算Pquery与参考点Pr之间的距离Dqr=|PrPquery|。

5)使用二分查找法从Driorder中快速查找Drq的最近邻Drj，并得到Drj对应的点Pjnearest及其索引index(j)。

6)对Driorder中索引范围在[index(j)－th,index(j)+th]对应的所有点中，利用穷举搜索法查找Pquery的最近邻。

2 SIFT特征点快速匹配算法

SIFT算法提取的图像特征点包括极大值与极小值2种类型，显而易见，只有极值类型相同的特征点才可能正确匹配。因此，本文在特征点匹配之前进行特征点类型的判断，仅当2个特征点具有相同类型时，才进行接下来的匹配运算，否则直接跳出，转而比较下一个特征点。这在一定程度上可以提高匹配的效率。

1)使用SIFT算法分别提取图像Iq(x,y)与图像Is(x,y)的特征点，生成的特征点构成的集合分别为Pq128Ps128

2)对于PiPq128，使用本文介绍的DRP算法在集合Ps128中搜索得到查询点Pi的最近邻特征点Pnearest，对应的最近邻距离为dnearest，次近邻特征点Pnearest2，对应的次近邻距离dnearest2，若比值dnearest/dnearest2小于已知的阈值rth，则认为PiPnearest两点之间正确匹配。

3)采用随机抽样一致性原则(random sample consensus,RANSAC)算法剔除误匹配的特征点。

3 实验结果与分析

 图 4 DRP算法与BBF算法实验对比结果 Fig. 4 The comparison results of DRP algorithm and BBF algorithm

4 结束语

 [1] LOWE D G. Distinctive image features from scale-invariant keypoints[J]. International Journal of Computer Vision, 2004, 60(2): 91-110. [2] 吴伟交, 王敏, 黄心汉, 等. 基于向量夹角的SIFT特征点匹配算法[J]. 模式识别与人工智能, 2013, 26(1): 123-127.WU Weijiao, WANG Min, HUANG Xinhan, et al. SIFT feature matching algorithm based on vector angle. Pattern Recognition and Artificial Intelligence, 2013, 26(1): 123-127. [3] KRYSTIAN M, CORDELIA S. A performance evaluation of local descriptors[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2005, 27(10): 1615-1630. [4] GIONIS A, INDYK P, MOTWANI R. Similarity search in high dimensions via hashing[C]//Proceedings of the 25th International Conference on Very Large Data Bases. San Francisco, USA, 1999: 518-529. [5] BEIS J S, LOWE D G. Shape indexing using approximate nearest-neighbor search in high-dimensional spaces[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. San Juan, Puerto Rico, 1997: 1000-1006. [6] FERHATOSMANOGLU H, TUNCEL E, AGRAWAL D, et al. Vector approximation based indexing for non-uniform high dimensional data sets[C]//Proceedings of the International Conference on Information and Knowledge Management. McLean, USA, 2000: 202-209. [7] WEBER R, SCHEK H J, BLOTT S. A quantitative analysis and performance study for similarity-search methods in high dimensional spaces[C]//Proceedings of the International Conference on Very Large Databases. New York, 1998: 194-205. [8] JAGADISH H V, OOI B C, TAN K L, et al. IDistance: an adaptive B+-tree based indexing method for nearest neighbor search[J]. ACM Transactions on Database Systems, 2005, 30(2): 364-398. [9] AUCLAIR A, COHEN L D, VINCENT N. How to use SIFT vectors to analyze an image with database templates[C]//Proceedings of the 5th International Workshop on Adaptive Multimedia Retrieval. Paris, France, 2008: 224-236. [10] SLANEY M, CASEY M. Locality-sensitive hashing for finding nearest neighbors[J]. IEEE Signal Processing Magazine, 2008, 25(2): 128-131. [11] 张军旗, 周向东, 王梅, 等. 基于聚类分解的高维度量空间索引B+-tree[J]. 软件学报, 2008, 19(6): 1401-1412.ZHANG Junqi, ZHOU Xiangdong, WANG Mei, et al. Cluster splitting based high dimensional metric space index B+-tree[J]. Journal of Software, 2008, 19(6): 1401-1412. [12] 杨恒, 王庆, 何周灿. 面向高维图像特征匹配的多次随机子向量量化哈希算法[J]. 计算机辅助设计与图形学学报, 2010, 22(3): 494-502.YANG Heng, WANG Qing, HE Zhoucan. Mutiple randomized sub-vectors quantization hashing for high-dimensional image feature matching[J]. Journal of Computer-Aided Deasign & Computer Graphics, 2010, 22(3): 494-502. [13] LOWE D. OpenSIFT—An open-source SIFT library.[2013-11-15]. [14] The Visual Geometry Group. Affine covariant features. (2007-07-15)[2013-11-15].
DOI: 10.3969/j.issn.1673-4785.201311020

0

#### 文章信息

TANG Kun, HAN Bin

A SIFT matching algorithm based on the distance to reference point

CAAI Transactions on Intelligent Systems, 2015, 10(03): 376-380.
DOI: 10.3969/j.issn.1673-4785.201311020