CS 194-26: Image Manipulation and Computational Photography

Project 6: [Auto]Stitching Photo Mosaics

Justin Lu - cs194-26-acb

Project 6A: Image Warping and Mosaicing

In this project, I learned how to compute a homography matrix, warp an image into the perspective of another image, and blend two images taken from different perspectives into a single mosaic. A homography transformation allows us to convert a point in one perspective to a point in another perspective, and by using the inverse of this homography matrix, we can warp an image into another perspective. One of the applications of this is to rectify images, which is essentially to change the perspective such that an object in an image becomes rectilinear. By warping one image to another's perspective, we can blend these images to create a mosaic.

Rectification

Image of book.
Rectified image of book.
Image of hot pad.
Rectified image of hot pad.

Mosaic Stitching

First image of windows.
Second image of windows.
Window images blended into a mosaic.
First image of drawers.
Second image of drawers.
Drawer images blended into a mosaic.
First image of desk.
Second image of desk.
Desk images blended into a mosaic.

Project 6B: Feature Matching for Autostitching

Harris Interest Point Detector

Harris corners of windows (1).
Harris corners of windows (2).
Harris corners of drawers (1).
Harris corners of drawers (2).
Harris corners of desk (1).
Harris corners of desk (2).

Adaptive Non-Maximal Suppression

Windows (1) corners after ANMS.
Windows (2) corners after ANMS.
Drawers (1) corners after ANMS.
Drawers (2) corners after ANMS.
Desk (1) corners after ANMS.
Desk (2) corners after ANMS.

Feature Matching

Windows (1) matches.
Windows (2) matches.
Drawers (1) matches.
Drawers (2) matches.
Desk (1) matches.
Desk (2) matches.

RANSAC

Windows (1) matches after RANSAC.
Windows (2) matches after RANSAC.
Drawers (1) matches after RANSAC.
Drawers (2) matches after RANSAC.
Desk (1) matches after RANSAC.
Desk (2) matches after RANSAC.

Comparisons

Windows mosaic using manual correspondences.
Windows mosaic using auto-stitching.
Drawers mosaic using manual correspondences.
Drawers mosaic using auto-stitching.
Desk mosaic using manual correspondences.
Desk mosaic using auto-stitching.

What I learned

The coolest thing I learned in this project was the RANSAC algorithm - it's so simple, yet provides a lot of robustness against outliers, which is something that is applicable to areas outside of computational photography. It helped eliminate bad correspondence points generated during my auto-stitching.