Project 6b - Feature Matching for Autostitching

Brandon Lee, cs194-26-aeo

This is the second part of a two part autostiching project. In part one we implemented functionality to stitch two images together into a mosaic if correspondence points were preselected. In this part, we implement an algorithm to automatically select and match points from two images, thus allowing our mosaic to be automatically generated from two given images.

Harris Corners and Adaptive Non-Maximal Suppression

To begin, I first used the Harris Corner algorithm to detect critical points in both images. Then, I implemented Adaptive Non-Maximal Suppression, as described in the paper, in order to cut down the number of critical points evenly across the image. Having this even spread produced much better results than simply taking the most prominent N points.

Here you can see all the points my algorithm output.

Feature Matching

After obtaining each photos’ points, we need to match points from one image to their corresponding points in the other image. We accomplish this by running nearest neighbors over all other points, and keeping any point that passes the Lowe threshold. We do an additional filter by running RANSAC, which verifies that the homography computed from the points is accurate for the majority of the points.

Here are all the points that were matched from RANSAC

Finally, we simply run this part in conjunction with part 1’s homography code, and we can automatically form mosaics!




Reflection

The coolest thing I got from this project was how good/accurate the whole algorithm really is. At a high level, I understood the Harris Corners + RANSAC to want to prioritize “corner” points, but some of the points the algorithm was able to match (e.g. on white walls) was pretty amazing. It was amazing to see how effective RANSAC and the Lowe’s threshold were at filtering out bad matches, and creating mosaics better than when I picked the poitns by hand.