CS 143 / Project 2 / Local Feature Matching

Implementation

For the most part, I stuck to baseline implementations of everything in the local feature matching algorithm pipeline.

For interest point detection, my get_interest_points.m implements a standard Harris corner detector that does worry about scale invariance or keypoint orientation estimation. To deal with non-maximum suppression, I used BWCONNCOMP to find connected components and would only keep the maximum point in any component.

For local feature description, I used a simple SIFT-like local feature descriptor. I simply create a feature_width sized window around a given interest point, divide it into a 4x4 of cells, calculate the thetas (via dy and dx) for each cell, and bin the thetas into 8 buckets by magnitude.

Last, for feature matching I used nearest neighbor distance ratio for my matching. If the nearest neighbor distance ratio for some descriptor A was below some threshold, I considered descriptor A to match it's closest neighbor B.

Improvements

My original implementation scored about 50% accuracy on the Notre Dame image pair. I managed to bring that drastically up by changing a few things. First, tuning parameters (alpha in getting interest points, the threshold for keeping interest points, the threshold for nearest neighbor distance ratio) drastically improved my matching. Second, My original SIFT-like implementation binned thetas equally and did not take into account magnitude. Taking into magnitude greatly improved performance. Third, I found running a small gaussian blur on my image before getting the image derivatives led to some small improvements in my SIFT-like implementation as well. After making these changes, for the top 100 most confident local feature matches on the Notre Dame pair, I had 92 matches and 8 mismatches.

Results

Following image pairs were created with my algorithm. All of them seem fairly reasonable and correct. Note that whenever I tried to match two images that had some large difference (like scale or rotation), my implementation fell apart as expected. Also note that in order to repeat these image pairs, you would have to change the parameters in proj2.m that specify number of points to output.

Top 100 matches for Notre Dame pair (92 matches, 8 mismatches):

Top 30 matches for Capricho Gaudi pair:

Top 30 matches for Sleeping Beauty Castle pair:

Top 30 matches for Mount Rushmore pair: