Scale-invariant feature transform
This directory contains compiled binary programs for finding SIFT
invariant features that can run under Linux or Windows. In addition,
there is a Matlab script as well as C source code showing how to load
the features and do simple feature matching.
Running from within Matlab
--------------------------
If you have access to Matlab, scripts are provided for loading SIFT
features and finding matches between images. These were tested under
Matlab Version 7 and do not require the image processing toolbox.
Run Matlab in the current directory and execute the following
commands. The "sift" command calls the appropriate binary to extract
SIFT features (under Linux or Windows) and returns them in matrix
form. Use "showkeys" to display the keypoints superimposed on the
image:
[image, descrips, locs] = sift('scene.pgm');
showkeys(image, locs);
The "match" command is given two image file names. It extracts SIFT
features from each image, matches the features between the two images,
and displays the results.
match('scene.pgm','book.pgm');
The result shows the two input images next to each other, with lines
connecting the matching locations. Most of the matches should be
correct (as can be roughly judged by the fact that they select the
correct object in a cluttered image), but there will be a few false
outliers that could be removed by enforcing viewpoint consistency
constraints.
You can also try matching other images:
match('scene.pgm','box.pgm');
match('scene.pgm','basmati.pgm');
For more details, see the comments in the Matlab scripts: sift.m,
showkeys.m, and match.m.
Acknowledgments: The Matlab script for loading SIFT features is based
on one provided by D. Alvaro and J.J. Guerrero.