Project description

In this project, we are going to perform automatic stitching to turn images into a mosaic by doing the following:

1. Detecting corner features in an image;

2. Extracting a Feature Descriptor for each feature point;

3. Matching these feature descriptors between two images;

4. Use a robust method (RANSAC) to compute a homography

1. Extracting features

First we detect corners using Harris Corner Detector with a threshold of 1, and we end up with many interesting points. Then we perform Adaptive Non-Maximal Suppression to suppress and distribute interest points. We get a radius to represent the distance to nearest neighbor with a larger Harris intensity. Then, we sort the minimum radius for each point, and pick the largest 200 of them.

2. Feature Descriptor Extraction, Feature Matching and RANSAC

We extract axis-aligned 8x8 patches and sample these patches from the larger 40x40 window (spacing = 5 pixels) to get feature descriptors. To perform matching, we find pairs of features that look similar and are thus likely to be good matches. Then, we run RANSAC with 1000 iterations and 4 random choices. In each iteration, we sample 4 pair of matched correspondences to calculate the projective transformation. Then we transform image 1 accordingly. In the end, we pick the set of points with most inliers, and use its homography and blend with picture 2 to get the mosaic. Here we also compare the results obtained from manual selections and auto selections

3. What I learned

The coolest thing I learned is how simple algorithms can complete seemingly very difficult and smart tasks, and sometimes they outperform humans.