IMAGE WARPING and MOSAICING

CS 194-26: Computational Photography, Fall 2018, Project 6a

Nathan Petreaca

cs194-26-afq

This project involved using homographies calculated from correspondence points between images to create panoramas and do image rectification.

1. Shooting the pictures

There are specific constraints to the images taken to make sure that mosaicing onto a common plane works, specifically all the images need to be taken from the same center of projection with different overlapping views.

To achieve this in real life, I simply put a dslr onto a firmly mounted tripod and took images sweeping from left to right with the camera.

Something like this:

2. Recover Homographies

Now that we have a set of images we need to find corresponding points between them that will allow us to prospectively project the images onto a common plane.

For this particular part of the project, we are not using automatic feature detectors, so corresponding points between images needed to be found by hand.

Finding these correspondence points is very tricky, and an error of a couple of pixels can produce huge changes. So, to help me cheat a little bit, before I took the images, I placed physical pieces of papers labelled with crosses and numbers onto the scene. This allowed me to find definite ground truth correspondences between the images.

Placing these correspondence points into a linear system of n equations with 8 unknowns for the elements of the Homography matrix H, we use least squares to then solve for H.

The system looks like this:

3. Warp the Images

Now that we have the homography matrix between the images, we use inverse warping to protectively warp the images.

I basically just did this:

4.Image Rectification

Using the "technique" of homographies, we can use them to effectively rectify images, to warp planar surfaces in images to be frontal-parallel.

Here are some examples:


Initial Images

Rectified images

5. Blend the images into a mosaic

Now that we have the warped images, we need to blend the images together as to reduce artifacts. In this particular case, I used a simple weighted average for the overlap region.

I attempted two-band blending but I was getting artifacts with my particular implementation, so I settled for simple averaging.

Here are a couple mosaics I created:


Initial Images

Mosaic



Initial Images

Mosaic



Initial Images

Mosaic

5. What I learned?

I learned that making panoramas is hard :(

Correspondences are hella important