Jeffrey Shen Project 4

This is my submission for CS 194-26 Project 4: Image Warping and Mosaicing. We will take some pictures and warp them into different perspectives using projective warping. We will create image rectifications to show the image from different perspectives and also create mosaics using multiple images.

Part 1

Recover Homographies

In order to change the projection of the image, we will first find the Homography Matrix. We will do this by finding corresponding points between the two images, we will need at least 4 points with x, y coordinates to find the points in the homography matrix which will be [[a, b, c], [d, e, f], [g, h, 1]]. This will give at least a matrix to solve for the values and we can use Least Squares to solve for the values when we have an overdetermined matrix. For example, in this image, we mark the points on one of the white square tiles on the floor and project it onto a square with coordinates of [0,0], [0, 50], [50, 50], [50, 0].

This ends up giving us the Homography matrix of [[-7.13772107e-01, -1.59386004e-01, 2.05490744e+02] [-9.47764326e-03, -1.27000420e+00, 6.45965513e+02] [-1.43481394e-04, -3.59221424e-03, 1]].

Warp the Images

We then use our knowledge of interpolation and warping in order to show the image as projected onto this plane. We will do this by using inverse warping. I will first project all the corners of the points into the new plane and then using polygon, get the interpolation of all the points into the new plane and get the corresponding values on the original image. We are then able to show the image after converting all points on the original image to this plane.

Image Rectification

We are able to complete image rectifications on many different images, and get the viewpoint of the image from a different angle. Here is the previously shown image as well as the rectification.



Blend the Images into a Mosaic

We can create a Mosaic by performing a projection on multiple images so that we can have a panorama image all in terms of one plane. We can do this by selecting corresponding points between the two images, find the Homography matrix between then, then use inverse warping to get the interpolated points to the original image. We use the corners to first find where the image will be on the final image and interpolate from there. We can also blend the images together using gaussian blur








\

Bells and Whistles

Own Idea
I wanted to try a rectification on the seal on campus from the top down and see how wel it could recreate it the image as if you were looking at it straight on. Here's the original image well well as a rectificaition

Now, we will do a close up of the seal through cropping and adjusting resolution and see how it turns out.

It turned out very clear, and I'm extrememly suprised and how detailed it was able to get from a slanted image.

Tell us what you've learned

I learned alot about persepctive warps this project! It still blows my mind that you can get so much information from a rectification and that the seal is so clear by looking down. It is also really cool to get to make your own persepctive warps to create a panorama image and see how it is created. I would have loved to get to create a cylindrical or spherical mapping of the image but unfortunely did not have enough time with the short deadline.