Image Warping and Mosaicing, Part 1

by Taylor Wong

Overview

Creating an image mosaic involves combining several images of the same scene. The images should be such that all are shot from the same point of view (keeping the camera in place but rotating it about its optical center) and with overlapping fields of view. We can recover the transformations between each pair of images, which are homographies of the form p' = Hp, if the above constraints are followed.

In order to compute the entries in H, we must select the correspondences between each pair of images. Selecting 4 or more correspondences (points common to the two images) allows us to use least-squares to solve for H. Below, we show how p' = Hp can be rewritten in the form Ah = b to be solved be a least-squares solver.

Solving for h, appending 1, and then reshaping it to a 3x3 matrix gives us the homography H from the set of points (xi',yi') to (xi,yi).

Image Rectification

To check that our method of recovering the homographies is correct, we attempt to "rectify" an image. We take an image of a planar surface and warp it so that the plane is frontal-parallel. We define the corresponding set of points (xi,yi) by inferring the frontal-parallel shape of the object.

Playing Card

Street Sign

Image Mosaic

Finally, we can use homographies to create image mosaics. Below, we compare simply overlaying the images vs. using alpha blending to blend the seams of each pair of images.

Laundry Room

No blending Alpha blending

Garage

No blending Alpha blending

Sunset

No blending Alpha blending

Summary

It's interesting to see how the homography between each pair of images in a panorama can be modeled by a linear transformation (H) as long as the transforms are projective.