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.