MSER功能的匹配算法?

时间:2013-07-29 17:13:56

标签: matlab computer-vision feature-detection matlab-cvst 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仅包含省略号。他们怎么配对?显然信息不足!

更新

我发现extractFeatures函数从MSER点返回SURF特征向量。因此它比较了64维SURF向量。

1 个答案:

答案 0 :(得分:2)

在这种情况下,MSER区域的质心仅用作提取SURF描述符的兴趣点。默认情况下,如果您将MSERRegions传递给extractFeatures,您将获得SURF描述符。但是,MSER区域可用于其他事物,例如检测图像中的文本。