3

How can the following work?

I am seeking for MSER feature points and then pairing them with matchFeatures function.

% 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');

Apparently it works fine

enter image description here

But how it can be? MSERRegions contains only ellipses. How can they paired? It is apparently not enough information!

UPDATE

I found that extractFeatures function returns SURF feature vectors from MSER points. So it compares 64-dimensional SURF vectors.

zx81
  • 41,100
  • 9
  • 89
  • 105
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385

1 Answers1

3

In this case the centroids of the MSER regions are simply used as interest points for extracting SURF descriptors. By default if you pass MSERRegions into extractFeatures you will get SURF descriptors back. However, MSER regions can be used for other things, such as detecting text in images.

Dima
  • 38,860
  • 14
  • 75
  • 115
  • 1
    Also, it doesn't make any sense to use SURF descriptors for MSER "key points". Acctually, it can be assumed that the descritiveness that SURF is aiming at is pretty bad at those points, since they are located in a fairly homgeneous region. – DrPepperJo Aug 03 '14 at 22:11
  • 1
    I would disagree. MSER regions are not necessarily compact blobs with no texture. You can have an oddly shaped MSER region like a letter or a number, and if you compute a SURF descriptor centered at its center it will probably be distinctive. – Dima Aug 04 '14 at 12:37
  • 1
    I guess "probably" is the keyword here. I don't see the point of using MSER loccations for point descriptor extraction. – DrPepperJo Aug 04 '14 at 12:41
  • don't agree on using SURF as those at lower scale local descriptors which won't work for matching. Myself I'm looking at using HOG descriptors (using the bbox or polygon of MSER as input) and matching with that instead – InKodeWeTrust Oct 14 '21 at 10:02