CS 194-26: Image Manipulation and Computational Photography

Warping and Mosaicing Images

Florin Langer, Fall 2018

Overview

In this project, I register, projection-warp, resample, and composite images to produce image mosaics.


Image Rectification

In order to rectify an image, I first recover its homography (i.e., the matrix with eight degrees of freedom and a scaling parameter that projectively tranforms points in one image to corresponding ones) using a least-squares approximation. I then warp that image using that homography to a plane that is frontally parallel (e.g., the corners of the original image).

Rectifications
Original
Rectification with Custom Corners
Rectification with Canvas Corners
Original
Rectification with Canvas Corners

Blending Images into a Mosaic

Blending images starts with the same logic. I actually select eight correspondences to produce an overdetermined system, and I warp the second image to the first in order to make blending the images easier. I try multiple techniques for blending: weighted averaging, maximim pixel value, and Laplacian blending using two levels.

Mosaics
Image 1
Image 2
Image 1 Padded
Image 2 Rectified
Average Blending
Max Blending
Laplacian Blending
Image 1
Image 2
Image 1 Padded
Image 2 Rectified
Average Blending
Max Blending
Laplacian Blending
Image 1
Image 2
Image 1 Padded
Image 2 Rectified
Average Blending
Max Blending
Laplacian Blending

Summary

Combining concepts of blending and applying transformation matrices from previous projects with those of homographies has proven to be a powerful tool for creating photo mosaics.