Project 5: [Auto]Stitching Photo Mosaics

Thomas Low

Overview

This project explores stitching images through homographies and projective warping.

Part 1: Image Warping and Mosaicing

This part generates image mosaics by registering, projective warping, resampling, and compositing photographs.

Recover Homographies

To find the transformation parameters between a pair of images, we can solve a linear system of equations from our correspondence points.

homog
build1 build1 pts
build2 build2 pts
wall1 wall1 pts
wall2 wall2 pts

Image Rectification

street street pts street rect

Mosaic

build
wall

Conclusion

Panoramic pictures depend on homographies to stitch images together. Through this project, I learned that computing a homography can be simply done through a linear system of equations.

Part 2: Feature Matching for Autostitching

Step 1: Detecting Corner Feature in an Image

To identify interesting points to use in a homography, we can use Harris Interest Point Detector on these course provided images.

build1 Harris build2 Harris
city1 Harris city2 Harris
clake0 Harris clake1 Harris

A homography only requires 4 points, so we can use Adaptive Non-Maximal Suppression to select 500 corners with the minimum suppression radius.

build1 ANMS build2 ANMS
city1 ANMS city2 ANMS
clake0 ANMS clake1 ANMS

Step 2: Extracting a Feature Descriptor for each Feature Point

To extract a feature descriptor, we can extract an 8x8 patch sampled from a 40x40 window and flatten the ANMS points into a one dimensional array.

Step 3: Matching these Feature Descriptors between Two Images

To match these feature descriptors, we can identify the most similar points with harris.dst2 and apply Lowe of thresholding obtain the nearest neighbors.

Step 4: Use RANSAC to compute a Homography

To generate a homography, we can use RANSAC to randomly select 4 points and identify the set of points that will create the most inliers.

Step 5: Mosaic

build build
Manual/Auto
city
clake

Conclusion

This project taught me how to automatically identify points to use for a homography and generate incredible mosaic images.