CS194-26 Proj 6A

Image Warping and Mosaicing

Steve Shi

In this project, we warp image with proejctive transforms using homographies between image point correspondences, and blend the warped images.

Recover Homographies

To recover the homographies, we first captured two images with overlapping fields of view, and for each image, select 4 point correspondences. We then calculate the homography H, defined as p' = Hp for points p and p', by using least squares on the following matrix Ah = b


Warp Images

To warp the images, we then multiply an input image A with the calculated homography that takes image A to another image B, and the corresponding point correspondences.

Image Rectification

Using this technique, we can rectify images by warping an image to a rectange such that the plane is frontal-parallel, by defining the second corresponding points on the same image, in the desired rectangle.

Trash Can, Original
Trash Can, Rectified
Table, Original
Table, Rectified


Again using this technique, we can merge two images of the same object together into a mosaic by defining the point correspondences on the same object. We define image B as the "goal image", and find the homography from image A to image B. We can then blend the two images together to create a single image that encompasses the view of both iamges.

City, Merged
Yard, Merged
Porch, Merged
City, Left
City, Right
Yard, Left
Yard, Right
Porch, Left
Porch, Right


Unfortunately, I spilled boba on my laptop and nuked all my progress right before the deadline, and didn't a laptop for several days, so that sucked. Either way, I've always wondered how panoramas worked and now I know. Wow!