CS294-26 Project 5

Fuyi Yang

Overview

In this project, several photographs with different perspectives are taken. By registering, projective warping, resampling and compositing, image mosaic can be made.

Part1

1. Homography:

The homography transformation is: p'=Hp, where H is a 3x3 matrix with 8 degree of freedom:

In order to solve the homography matrix with more than four correspondences, we rewrite the above transformation of the form Ah=b and solve the h using least square in matlab:

2. Some examples of image rectification:

Original image (Food court in LA): Rectified image:
 
Original image (Library): Rectified image:
 

3. Images mosaicing:

For all input image for mosaicing, corresponding masks are defined and used for alpha channel blending. Here are three mosaic results.


Left perspective of a house: Center perspective of a house: Right perspective of a house:
 
House mosaic:
 

Left perspective of neighbourhood: Center perspective of neighbourhood: Right perspective of neighbourhood:
 
Neighbourhood mosaic:
 

Left perspective of the fridge: Center perspective of the fridge: Right perspective of the fridge:
 
Fridge mosaic:
 

4. Things learned:

In this project I learned that in order to projectively transform one image to another, the observer position should be fixed. However, if the scene is flat or really faraway, projective transformation is still possible. I also learned the technique of alpha blending which in this case generates smooth transtions between images.


Part2

Step1: Point Detector

Center perspective of a house with corners highed in red: Right perspective of a house with corners highed in red:
 

Step2: Adaptive Non-Maximal Supression

Center perspective of a house with ANMS refined points: Right perspective of a house with ANMS refined points:
 

Step3: Feature Descriptor Extraction and Feature Matching

Center perspective of a house with matched points in blue: Right perspective of a house with matched points ib blue:
 

It can be seen that several points on the edge of the house roof and window are perfect matching points.


Step4: RANSAC homography estimate:

House mosaic using RANSAC: House mosaic by manually selected points:
 

The Homography estimated by RANSAC is better than the one calculated based on manually selected correspondences. It can be see clearly that the tree on the left of mosaic image is sharper in the RANSAC estimated one while it is more blurry in the manually estimated one.

More comparisons:

Neighbor mosaic using RANSAC: Neighbor mosaic by manually selected points:
 

Things learned:

It is cool to see how corresponding points in seperate images are detected automatically using Harris points and ANMS method. RANSAC is also a powerful enough to give the correct homography.