Project 6: IMAGE WARPING and MOSAICING Marc WuDunn .

Part 1: Homographies In order to apply the image warping, we first need to calculate the transformation from one image to another. This was done by selecting 4 points from both images, and using them to calculate the Homography matrix. This can be done by setting up a system of equations to solve for the 8 different variables. Then, a 1 was appended to form the 3x3 transformation matrix.

Part 2: Image Rectification Following the previous step, I chose a square for my image to warp to, calculate the Homography matrix, and then apply the Homography matrix on the four corners of the original image to calculate the dimensions of the resulting image. Then, I use the inverse Homography matrix to map the coordinates of the rectified image to its corresponding pixel in the original image, and use skimage.transform.warp to interpolate the pixel values. This produces an image warped into frontal view, as shown below.

Part 3: Image Mosaicing For this part, I take two images, warp one of them, and then blend the two images together. I adjust one of the images based on a translation vector that I calculate in the warp step. I then create a mask of the overlapping sections of the image and use scipy's ndimage.morphology package to calculate the distance of each index in the image to the non-overlapping sections, which I use to compute an alpha value of each image at that particular index. This allows me to linearly blend the two images (though some artifacts remain, and in some images there is a clear case of ghosting).

Part 4: Learning This project helped me appreciate that panorama stitching actually isn't as easy as it might seem. I also learned how to properly interpolate the pixel values (since I didn't do it for the last project), and got more familiar with skimage/numpy in general.