Project 5: Image Stitching

 

For the first part of the project, I implemented a transformation that transforms one image to look like from the perspective of another.

To find the homography, I solve an H matrix with 4 pairs of labeled points. I also use the algorithm to produce rectification of paintings.

For the second part of this project, I implemented algorithm to automatically produce labeled points for calculating transformation matrix.

 

Mosaic:

The following pictures are taken in my kitchen. The algorithm transforms the first into one that can be stitched with the second.

Image 1 and 2

  

 

Automatically Selecting Points: Harris Detector -> ANMS -> Matching

Here I select min_distance in finding local peaks to be 5, and take only the top 2000 results.

For ANMS, a threshold of 0.2 turns out to be most accurate.

Harris Corners  ANMS Matched

    

  

 

Below are mosaic from manually-labeled point on the left and automatically labeled ones on the right.

 

 

  

 

Rectification

For this part, I used the transformation function to transform the painting on the right of the original picture to a frontal parallel one.

Original

 

Transformed

 

Part1:From this part, I was surprised by how well this simple transformation works without any complicated technique. Thats what I learned most from, that to tackle a seemingly hard problem sometimes we dont need that many complicated techniques.

Part2: Similar to part1, I realize how simple automation in image processing can be in some problems. However, such automation is still outperformed by manually labeled data.