CS 194 Project 5:IMAGE WARPING and MOSAICING

Kenny Huang

Part A

Overview

The goal of this assignment is to get my hands dirty in different aspects of image warping with a “cool” application -- image mosaicing. I will take two or more photographs and create an image mosaic by registering, projective warping, resampling, and compositing them. Along the way, I will learn how to compute homographies, and how to use them to warp images.

Shoot the Pictures

The first part of this project is to choose two or more images for homography. The images I used are below.

Recover Homographies

In order to compute the parameters of transformation, H, I adopted the following formula and used least square algorithm to find the parameters. Note that here we strictly assign h9 to be 1. Credits to this stackoverflow post: https://math.stackexchange.com/questions/494238/how-to-compute-homography-matrix-h-from-corresponding-points-2d-2d-planar-homog

Warp the Images

Next I need to implement a function that takes in an image and the transformation parameters, H, and returns the warped images. Specifically, I used cv2.remap to finish the implementation.

Image Rectification

To prove the correctness of my code, I chose two images from "Visual Geometry Group at Oxford" and perform warping on them. The results are presented below.