CSC 370

SIFT Features

 

Code Package

SIFT feature processing is not provided with Matlab, but there is a well-developed set of SIFT functions provided in a free package called VL_Feat. This package is available on the course N drive. (To find this on Windows, choose Map Network Drive in a file viewer window, with N: as the drive letter and \\rescent\PC\COURSES\CSC as the target address. On a Mac, choose Connect to Server under the Go menu in the Finder. In the server address field, enter rescent.smith.edu and then after authenticating, browse to PC > Courses > CSC > CSC370.

Within Matlab, change the working directory to the vl_feat directory within CSC370. Then execute run('toolbox/vl_setup'); to prepare.

Exploring SIFT

There is an overview of VL_Feat's SIFT package on their web site. Work through it up to and including the Detector Parameters section, noticing the size and orientation of the green grid used for descriptor computation relative to the yellow circle.

The remainder of the tutorial shows how to compute SIFT features for arbitrary frames (a frame is a complete specification for point/scale/orientation, from which a descriptor can be computed.) You can work through it if you like, but this is a less common application.

Image Stitching

The apps folder contains a demo showing how SIFT features can be used to compute the overlap of two photos, allowing them to be combined into a panoramic image. There are two image pairs included with the package; try it with both of them. Note that you get slightly different results dependig on which image is mapped to the other.

addpath apps
Ia = vl_impattern('roofs1') ;
Ib = vl_impattern('roffs2') ;
sift_mosaic(Ia,Ib)  % pause here and look at result
sift_mosaic(Ib,Ia)  % pause here and look at result
Ia = vl_impattern('river1') ;
Ib = vl_impattern('river2') ;
sift_mosaic(Ia,Ib)  % pause here and look at result
sift_mosaic(Ib,Ia)  % pause here and look at result

The demo images were chosen because they work well. Does the same approach work as well with two images of Ford Hall? Which ones can you get to match? Does the threshold influence your chances of success? Any theories about what works best?