CS 194-26 Project #6 Part 1: IMAGE WARPING and MOSAICING

Yue Zheng



Overview

In this project, we further explore the usages of image warping and the techinques of image mosaicing. To create an image mosaic, we take multiple pictures, define corresponding points, than warp them with homographies we compute using the corresponding points. Then we stitch and blend the images together to form a image mosaic. We also explore image retification using homographies.


Recover Homographies and Warping Images

For this projects, the transformations used for image retification and image mosaicing are projective, so we need to recover homographies from the corresponding points between images. To recover a 3x3 homography matrix H with 8 degrees of freedom, I wrote a function that uses least squares to solve the matrix system Ah = b, where h is the vector holding the 8 unknown entries of H and A and b are constructed using a set of pairs of corresponding points. Then to warp images, I compute H in the reverse direction from the target points to the source points, and I implemented inverse warping with interpolation.


Image Rectification

To rectify an image with some planar surfaces, I pick a set of points on the image then define another set of corresponding points by hand, then calculate the homography and warp the image so that the plane is frontal-parallel.

Results

Wall Art


Rectified


Display


Rectified



Image Mosaics

To obtain images to create image mosaics, I took a few sets of photos of difference scenes using a tripod and only changing the view direction. For each set of images, I choose the photo in the center and warp the other images onto its projection one by one. Since I use inversed warping with interpolation to warp my images, I pad each image to the estimated size of the mosaic with black. For blending the results, I also created corresponding masks and warped the masks with the same homography, then I blend together each warped image and the previous result to update the mosaic. Because corresponding points are picked by hand and the brightness of each image varies, just pasting the masked images causes noticeble seams. Therefore, I alternatively blended the images using an alpha channel. The alpha channel I create is basically a mask with value 1 at the center region, and at the edges, the values decrease linearly to 0.

Results

View of Bay

In the mosaic of the bay, because the exposure of the two photos were slightly different, we can see that the color of the sky is not completely uniform.

Source 1


Source 2


Naive blending


Alpha Feathering


Cropped


Laundry Room

The mosaic of the laundry room turned out very nicely, the brightness in the images were similar enough and the images were warped precisely enough that we don't see obvious stitching seams when using alpha feathering.

Source 1


Source 2


Source 2


Naive blending


Alpha Feathering


Cropped


Hilgard Hall

The mosaic of Hilgard Hall is crooked because in the photo I chose to warp other photos to, Hilgard Hall was not forward-facing.

Source 1


Source 2


Source 3


Source 4


Naive blending


Alpha Feathering


Cropped



Bells and Whistles

For bells and whistles, I decided to do blending and compositions inspired by the lecture slides. I exchanged the content ofbillboards found in New York and Osaka, Japan.

New York Street View (from web)


Osaka Shinsaibashi View


New York Street with Glico Sign!


Osaka Shinsaibashi with Broadway Poster!