2013-07-29 53 views
2

以下是如何工作的?MSER特徵的匹配算法?

我在尋找MSER特徵點,然後將它們與matchFeatures函數配對。

% file1 = 'roofs1.jpg'; 
% file2 = 'roofs2.jpg'; 

file1 = 'cameraman.tif'; 


I1 = imread(file1); 

%I2 = imread(file2); 
I2 = imrotate(I1, 45); 

% I1 = rgb2gray(I1); 
% I2 = rgb2gray(I2); 

% %Find the SURF features. 
% points1 = detectSURFFeatures(I1); 
% points2 = detectSURFFeatures(I2); 

points1 = detectMSERFeatures(I1); 
points2 = detectMSERFeatures(I2); 

%Extract the features. 
[f1, vpts1] = extractFeatures(I1, points1); 
[f2, vpts2] = extractFeatures(I2, points2); 

%Retrieve the locations of matched points. The SURF featurevectors are already normalized. 
indexPairs = matchFeatures(f1, f2, 'Prenormalized', true) ; 
matched_pts1 = vpts1(indexPairs(:, 1)); 
matched_pts2 = vpts2(indexPairs(:, 2)); 


figure; showMatchedFeatures(I1,I2,matched_pts1,matched_pts2,'montage'); 
legend('matched points 1','matched points 2'); 

顯然,它工作正常

enter image description here

但怎麼可能呢? MSERRegions只包含橢圓。他們如何配對?這顯然是不夠的信息!

UPDATE

我發現extractFeatures功能從MSER點返回SURF特徵向量。所以它比較了64維SURF向量。

回答

2

在這種情況下,MSER區域的質心被簡單地用作提取SURF描述符的興趣點。默認情況下,如果您通過MSERRegionsextractFeatures,您將獲得SURF描述符。但是,MSER區域可用於其他事情,例如檢測圖像中的文本。

+0

此外,對於MSER「關鍵點」使用SURF描述符沒有任何意義。實際上,可以認爲SURF所針對的descritiveness在這些點上非常糟糕,因爲它們位於相當均勻的區域。 – DrPepperJo

+1

我不同意。 MSER區域不一定是沒有紋理的緊湊斑點。你可以有一個形狀奇怪的MSER區域,如一個字母或數字,如果你計算一個以其中心爲中心的SURF描述符,它可能會是獨特的。 – Dima

+0

我猜「可能」是這裏的關鍵字。我沒有看到使用MSER位置進行點描述符提取的重點。 – DrPepperJo