2

I have used the vl_ubcmatch function. I have taken help from How to use SIFT algorithm to compute how similiar two images are?. The steps that I am using were recommended by https://stackoverflow.com/users/71131/jacob?. These are:

[fa, da] = vl_sift (I);
[fb, db] = vl_sift (J);

[matches, score] = vl_ubcmatch (da, db);

subplot (1,2,1);
imshow (uint8(I));
hold on;
plot (fa(1,matches(1,:)), fa(2, matchesf(1,:)), 'b*');

subplot (1,2,2);
imshow (uint8 (J));
hold on;
plot (fb(1, matches(2,:)), fb(2, matches (2,:)), 'r*');

What this does is that it shows the two images alongside with features being marked in blue in one and in red in the other. But, I also want to see the corresponding features being joined by a line.

Community
  • 1
  • 1
shantanumsr
  • 21
  • 1
  • 3
  • [This answer here][1] should have everything you need. [1]: http://stackoverflow.com/a/13308950/144201 – Karl Nov 10 '12 at 01:55

1 Answers1

4

You can find the code for the documentation page here

figure(2) ; clf ;
imagesc(cat(2, Ia, Ib)) ;

xa = fa(1,matches(1,:)) ;
xb = fb(1,matches(2,:)) + size(Ia,2) ;
ya = fa(2,matches(1,:)) ;
yb = fb(2,matches(2,:)) ;

hold on ;
h = line([xa ; xb], [ya ; yb]) ;
set(h,'linewidth', 1, 'color', 'b') ;

vl_plotframe(fa(:,matches(1,:))) ;
fb(1,:) = fb(1,:) + size(Ia,2) ;
vl_plotframe(fb(:,matches(2,:))) ;
axis image off ;
user3693922
  • 308
  • 1
  • 9