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');
顯然,它工作正常
但怎麼可能呢? MSERRegions
只包含橢圓。他們如何配對?這顯然是不夠的信息!
UPDATE
我發現extractFeatures
功能從MSER點返回SURF特徵向量。所以它比較了64維SURF向量。
此外,對於MSER「關鍵點」使用SURF描述符沒有任何意義。實際上,可以認爲SURF所針對的descritiveness在這些點上非常糟糕,因爲它們位於相當均勻的區域。 – DrPepperJo
我不同意。 MSER區域不一定是沒有紋理的緊湊斑點。你可以有一個形狀奇怪的MSER區域,如一個字母或數字,如果你計算一個以其中心爲中心的SURF描述符,它可能會是獨特的。 – Dima
我猜「可能」是這裏的關鍵字。我沒有看到使用MSER位置進行點描述符提取的重點。 – DrPepperJo