CS766 Project 2 Report

Shijin Kong (krobin)

 

GOAL

This project aims to recover panoramic mosaic from a bunch of separately taken photos. Knowledge related to inverse cylindrical mapping, feature matching and blending are key points in this project.

 

INSTRUCTIONS TO RUN PROGRAM

  1. Use gil library to read in a set of photos and read in configuration file, including number of photos, focal length and distortion coefficient k1, k2.
  2. Apply inverse warp mapping to get distortion free version photos from the original photo set.
  3. Remap undistorted photos to cylindrical coordinates and crop generated cylindrical photos to remove unused black edges
  4. Use the SIFT program to generated matched feature points for each photo pair.
  5. Use CLAPACK library to solve the homographic matrix photo each photo pair and calculate final translation matrix for each photo.
  6. Stitch all photos together and align the final photo.
  7. Output the final result to a .JPG file.

          >mosaic.exe small2

     The output result is stored as small2/result.jpg

 

DATA SETS

Lijie Heng and I took one photo set, which is stored in directory photo1. The test image set is in directory small2. Besides photos, each directory contains a filename called "config.txt". The first line of shutter.txt is the number of photos in this photo set, indicates how many photos will be used. The first photo is always the same as the last photo (to perform alignment for final result later). The next few lines are focal length, k1 and k2. Let's look at small2/config.txt as an example.

small2/config.txt:

19               // <-- total 19 photos in photo1 directory
595              // <-- focal length
-0.15            // <-- distortion coefficient k1
0                // <-- distortion coefficient k2

Also, each photo directory contains a bunch of matched key points files. The matching points between photo i and photo j are stored in file warped-i-j.txt.

 

 

MOSAIC RESULTS

 

 

FAVORITE ARTIFACT

It's the photo1.jpg I list above, or you can get it from here.