CS194 Project #5 Part I: Image Warping and Mosaicing

By: Scott Shao

Recover Homographies

H is a 3x3 matrix with eight degree of freedoms. I solved this problem with at least four corresponding points between two images and model the problem as solving a linear system of equations using linear algebra. For the image warping, I used inverse warping with value interpolation.

In this example, I defined ten pairs of corresponding points.

Source image with corresponding points
Target image with corresponding points

There are more corresponding points than required to solve this linear equation because the linear system was solved using least square with overdetermined matrix.



Warp the Image

The image was warped using inverse warpping function similar to that in project three. However, prior to warping, the exact corresponding was automatically tuned to give the best alignment result using SSD.

Source image warped into
target image homography based on the matrix H
Target image


Image Ractification

These are some of the image ractification resluts. Notice that the results might not be ideal since the perfect corresponding points are hard to get and I am still in the process of trying to solve this issue.

Source image
Image ractification reslut one
Image ractification reslut two
Source image
Image ractification reslut

Although the target was a ractangle with correct aspect ratio for the Mona Lisa example, the reslut was still not perfect as the top and bottom edge of the painting were not parallel. Upon checking with the buil in cv2 function reveals that there might be some bugs in the warping function.

Blend Images into a Mosaic

After the image ractification, it is possible to blend multiple images together to create a mosaic. The part of the project is still actively deveoping and the reslut here are just some of the progerss so far.

Below are the source images for the final mosaic.

Image ractification reslut one
Image ractification reslut two
Image ractification reslut one
Image ractification reslut two
Second image
ractification target
First iamge
ractification source

There is still a lot of work left to do in this first checkpoint of the larger project five. So far I am already amazed by how good a simple projective matrix will do to produce the mosaic.