Image Warping and Mosaicking

Perspective Warping and Panoramas


Introduction

The goal of this assignment is to explore different aspects of image warping with a cool application - image mosaicking. I will take two or more photographs and create an image mosaic by registering, projective warping, re-sampling, and compositing them. Along the way, I will demonstrate how to compute homographies, and how to use them to warp images.

Theory

Projection – mapping between any two PPs with the same centre of projection

To recover the homographies between 2 images, we need at least 4 correspondences. This is because homographies can be expressed by the following transformation with 8 unknowns.

Homography transformation

Notice the above equation is not in b = Ax form. For the sake of easier computation, we rearrange the matrix as the following b = Ax form:

Homography transformation

However, one complication is that the 4 points selected might be noisy. So we should select more than 4 points and minimise the matrix rather than solving it directly.

Solution to minimisation1

1 Image Rectification

1.1 Theory

From the homography transformation theory about, to rectify an image, I take a single image of a planar surface. Then I apply the warping to transform 4 points into to a frontal-parallel plane.

Idea behind rectification

1.2 Results

As the following images, I rectified the original into a top-view.

Whovian

Original Rectified

Cropped Result

Scream

Original Rectified

Cropped Result

Pacman

Original Rectified

Cropped Result

2 Blending Images into a Mosaic

2.1 Theory

Warp the images so they're registered and create an image mosaic. I left one image unwrapped and warp the other image into its projection. Then I blended the images together.

I first picked correspondences from both images.

Correspondences

Then I computed homographies and warped the first image into the other projection.

Warped image

After that, I padded both images to prepare for blending.

Padded images

Finally I blended the two images

Padded images

2.2 Results

Harry Potter Studio

Cropped Result

Left Right Blended

Saracá Dock

Cropped Result

Left Right Blended

3 Bells & Whistles

3.1 Theory

For blending the two padded images, I tried different ways of blending them.

3.2 Results

α blending Multi-resolution Gradient Domain Blending Poisson Blending
1http://inst.eecs.berkeley.edu/~cs194-26/fa17/Lectures/mosaic.pdf