Project 2: Panoramic Mosaic Stitching

  Project 2: Panoramic Mosaic Stitching

                                                                          Shengnan Wang

                               Date: 10/9/2007

Introduction:

People always like to view from a wider and wider range. Using the image stitching technique to create panoramas is then attractive and promising. In this project, we use a feature-based method [1] to generate panoramic images.

Approach:

1.      Warping each image into cylindrical coordinates.

For each pixels in every one of the 20 480 * 640 images I took, use the equations:

     theta = atan (x/f) ;

     h = y/sqrt( x * x + f * f);

to warp each pixels into the cylindrical coordinates

2.     Compute the alignment of the images in pairs

 

Use the SIFT[2] program to do feature detection for every picture in the set of source. After this step, we have N( i, j) features for every image pair I and J. For these features, we used the Random Sampling Consensus to compute the translation (ty, tx), then we can go on to compute pairwise alignments.

 

3.     Fix up the end-to-end alignment and blending

 

Figure out that the width of the final image is 2*PI*focal-length, the height stays the same. Use inverse warping (given the focal_length, k1, k2): and bilinear interpolation to resample each image to its final location and blend it with its neighbors using the 1-D version of the distance map covered in lecture.

 

4.     Cropping

 

Then a linear warp y’ = y + ax is applied to remove the vertical “drift”. Crop at last to make the left and the right edges seam perfectly.

How to Run:

 

To run the program, the user would type the following in the command line:

*.exe panoramic_file image_prefix image_suffix feature_prefix feature_suffix nr_

image focal_length k1 k2

panoramic_file is the file name of the output panoramic images

image_prefix is the prefix of the file name of the input images

image_suffix is the suffix of the file name of the input images

image file name is defined like this: image00000.ppm

feature_prefix is the prefix of the file name of the input feature file

feature_suffix is the suffix of the file name of the input feature file

feature file name is defined like this: feature00000.txt

nr_image is the number of the input images

focal_length is the value of the focal length

k1, k2 is used for undo distortion.

All the files included in "basic" are auxiliary functions and files.

 

Data captured:

I have taken two sets of pictures. Both are taken outside. They can be used as the input images to create a panoramic image.

My favorite data set is Sheboygan Avenue. It can be found HERE.

Results:

Figure 1 shows the result of my project using the test images

Figure 2. Origianl Images taken with Canon PowerShot A640 digital camera (Click to see full resolution).

sheboygan\carolina\image00000.JPG

sheboygan\carolina\image00001.JPG

………….

sheboygan\carolina\image00019.JPG

Figure 3 provides the generated panoramic image of the original image set.

Figure 3.  Created Panoramic Image.

Favorite Artifact:

My favorite artifact generated by the program is the tone mapping result provided in Figure 3.

What I learned:

This project did take me a long time. It is difficult to figure out the distance and the orientation of the translational motion and I spent much time on designing the data structure of the matching method implemented in my program.

I did learn a lot from this project, including the non-linear warping, the SIFT algorithm and the blending process. Besides these, I also have a better understanding of cylindrical coordinates and how to remove radial distortion.

The last and but may be the most significant thing is that creating a panoramic mosaic is very fun.

Conclusion:

Need more accurate translational motion estimation by adding constraints such as the bundle adjustment implemented in [1].

Apply better blending technique such as pyramid blending and poisson imaging blending..

References

[1] M. Brown, D. G. Lowe, Recognising Panoramas, ICCV 2003.

[2] SIFT: Scale Invariant Feature Transform