CS 194-26 Computational Photography

IMAGE WARPING and MOSAICING

Victor Vong, CS194-26-acq




Section I: Overview

In this project, we warped images in order to stitch and blend them together to create mosaics. We also tested the accuracy of our warping by rectifing images, which is changing the perspective of an object in an image.

Section II: Homographies

In order to warp from points of set p_a from Image A to points of set p_b in Image B, we solve for a homography (transformation) which will allow use to transform any points in A to the appropriate location in B. We model our homographies as projective transformations with eight degrees of freedom (eight unknowns). Selecting 4 or more correspondences (points common to the two images) allows us to use least-squares to solve for H (homography).


System of Equations to solve for Homography
Representation of the Homography in use

Section 2: Rectified Images

In order to show our calculation of the homography between two images is correct, we take an image of a planar surface and warp it so that the plane is frontal-parallel.


Section III: Image Blending and Mosaics

Now that we can accurately find our homography between two images and warp the image accordingly, we create our mosaic. In order to create our mosaics, we warp imA to a left side. We then warp imB to warped imA using a set of similar correspondences. We then overlap the warped images and blend them together. In this case we used multiresolution blending.


Selected 4 corners of imA
Selected correspondences in blank canvas
Selected correspondences for imB to also be used for warped imA
Selected same correspondences for warped imA

The final step was to select alignment points (using project 3 alignment and multiresoluton code) and multiresolution blend the images.


Section IV: What I learned

I learned that stitching together mosaics is actually remarkably simple and easy. The hardest part is picking a blending algorithm that works and taking pictures that behave well. I also learned how well inverse transform (compared to forward transform) and homographies work. I was sadly sick for project 4 and didnt get a chance to fully understand it until now.