Bradley Qu

CS 194-26: Project 6-1

IMAGE WARPING and MOSAICING

Introduction

         Stitching multiple consecutive images into a panorama with perspective projection. Some basic linear blending included. Relies heavily on opencv libraries for UI and control point selection.

The Photos

         I took three sets of photos to attempt stitching. The first is a generic mid-long range scene of a japanese maple on a lawn.

Left
Middle
Right

         This set is a basic test of the stitching script. High noise along the seams allows for generous blending without artifacts. Long distance subjects also means less error from camera motion. This test also does not really test rectification as there are no clear rectangles to use as reference.

         The next set is a short range set from inside my apartment.

Left
Middle
Right

There are many large details with low noise so this is a perfect test for the adequacy of the blending algorithm. The rectangular shelves are also perfect to test rectification. Back to the images, the short range means that camera and control point error will play a larger role. This set is good for testing the accuracy of the least squares neighborhood search for matching of control points and blending to produce satisfactory results. It is also worth noting that the HDR of the environment means the pano images differ in brightness. Consequently, this set is also good for testing blending with HDR.

         Night-time traffic is the worst traffic. This is a mix between very short range and mid range.

Left
Middle
Right

The camera error is big in this one. Lets see what the results are like when the camera is noticably not in the same place for each image. This test is also great for testing the control point neighborhood search with limited and soft details (lens flares). Also a good rectification as there are visible rectangles like the dashboard or the license plates.

Homographies

One can set up a system of linear equations using the 4 points available. We, however, encounter a problem as H matrix has 9 degrees of freedom but we only have 8 givens. To remedy this, We simply set H[3,3] to 1 to account for our scaling of H. From there it is just the matter of constructing a system of equations and solving.

Warping and Rectification

Once we have the H matrices, we can arbitrarily jump from one image projection space to another by chaining the H matrices in a dot product. Rectification is simply a H matrix onto a rectangle instead of control points in another image. Here are some results:

Source with ctrl-pts
Rectify shelf
Source with ctrl-pts
rectify dashboard

Putting it all Together!

apartment
traffic
tree