CS194-26 Project 6: IMAGE WARPING and MOSAICING part A

Ian Lee

Overview

In this project, we warp an image and stich it with another to create an image mosaic

Homographies

We can recover the parameters of the transformation via a set of (p’,p) pairs of corresponding points taken from the two images. where im1_pts and im2_pts are n-by-2 matrices holding the (x,y) locations of n point correspondences from the two images and H is the recovered 3x3 homography matrix. In order to compute the entries in the matrix H, we can set up a linear system of n equations. Since n =4, we can use four equations to solve for matrix H, however, we will use more points and least squares for a more stable homography recovery. (formula taken from previous year's submissions)

Image Rectification

With our image warping H, we can rectify an image. If we know something in the photo is a square, we can compute the transformation from the four corners to a manually set of four points that define a square. Then we can warp the entire image using the transformation for a rectified image

Chess @ Seattle DT Florence
Rectified Chess Rectified Florence

Image blending

with our image warping technique, we can warp images. However the edges of the two images could be obvious if we do a simple weighted average blending. Instead we could use the linear blending technique with an alpha that falls of until it hits 0 at the edges of the unwarped image.

Olympics Park
Average Blending
Feathering Averaging
Berkeley1 Berkeley2
Feathering Averaging

What I learned

The project is really cool as I learned how panoramas are made. With the techniques that I learned, there are so many ideas that I could think of, unfortunately, I don't have time to implement some B&W this time.