Project 2: Local Feature Matching

Example of a local features.

Overview

This project uses Matlab to programmatically match features via a modified SIFT pipeline. The project was fairly straightforward--the greatest challenge was working with Matlab as I still have very minimal experience with it.

Algorithm

The algorithm first detects interest points through a Harris corner detector. It then gathers features using SIFT by analyzing an image cell by cell. Finally, it matches features based on a ratio test. This has provided much better results than the original algorithm of simply cutting out basic image patches and comparing the two.

Harris Corner Detector
The Harris Corner Detector works in the following manner:
  1. Blurring imag
  2. First order derivative in x and y direction
  3. Harris detector: (Ix^2 * Iy^2) - (Ixy^2) - alpha * (Ix^2+Iy^2)^2
  4. Filter out values below threshold
  5. Supress Edges
  6. Find max values
  7. Eliminate non-maxes
Local Feature Detection
The feature detection works in the following manner:
  1. Calculate gradient magnitude and direction of Gaussian filtered image
  2. Separate photo into grids
  3. Calculate magnitude and direction of gradients within grid
  4. Separate grids into cells
  5. For each orientation, add the gradient magnitude sum to appropriate bin
  6. Compile feature vector of results
  7. Raise results to value less than one
  8. Normalize results
Feature Matching
The feature matching works in the following manner:
  1. Calculating the distance between the features
  2. Sort by distance
  3. Take ratio of the distances
  4. Remove results greater than threshold
  5. Return matching results


Results

For each image set, we show the visualization of the interest points dots, the visualization of potential matching features, and then the correctly matched features. Success rates in matches are listed. As discussed before, the success rate increased greatly when assessing for various orientaitons in the SIFT-like manner.

Notre Dame Simple Images

Below is feature matching run on Notre Dame images at a 88% success rate.

Visualization Dots Visualization Arrows Feature Match Compare
Mount Rushmore Medium Images

Below is feature matching run on Mount Rushmore images at a 77% success rate.

Visualization Dots Visualization Arrows Feature Match Compare
Episcopal Gaudi Copmlex Images

Below is feature matching run on Episcopal Gaudi images at a 0.14% success rate.

Visualization Dots Visualization Arrows Feature Match Compare