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