SIFT特徵提取代碼

SIFT特徵具有縮放、旋轉特徵不變性,下載了大牛的matlab版SIFT特徵提取代碼,解釋如下:

1.調用方法:

將文件加入matlab目錄後,在主程序中有兩種操作:

op1:尋找圖像中的Sift特徵:

[csharp] view plaincopy
  1. [image, descrips, locs] = sift('scene.pgm');   
  2. showkeys(image, locs);  

op2:對兩幅圖中的SIFT特徵進行匹配:

[csharp] view plaincopy
  1. match('scene.pgm','book.pgm');  


由於scene和book兩圖中有相同的一本書,但orientation和size都不同,可以發現所得結果中Sift特徵檢測結果非常好。


2.代碼下載地址:

http://www.cs.ubc.ca/~lowe/keypoints/
3.想用自己的圖片進行調用:
  1. i1=imread('D:\Images\New\Cars\image_0001.jpg');  
  2. i2=imread('D:\Images\New\Cars\image_0076.jpg');  
  3. i11=rgb2gray(i1);  
  4. i22=rgb2gray(i2);  
  5. imwrite(i11,'v1.jpg','quality',80);  
  6. imwrite(i22,'v2.jpg','quality',80);  
  7. match('v1.jpg','v2.jpg');  
experiment results:
scene

book

compare_result

compare result

EXP2:

未找到匹配特徵的兩幅圖






關於sift的其他講解:

http://blog.csdn.net/abcjennifer/article/details/7639681

http://blog.csdn.net/abcjennifer/article/details/7372880

http://blog.csdn.net/abcjennifer/article/details/7365882


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章