Soham Kale CS194 Project 5A

I used a picture I took of the British parliament a little while ago. I wanted to make the side of the building be front-parallel so it looked like I was right in front of it.

Parliament
An image of the British parliament

I created my homography matrix H by solving the following overdetermined system of linear equations using the correspondances (x, y) to (x', y'). I solved the system using linear least squares.

H matrix
Homography Matrix
Solve for H matrix
System of linear equations to solve

I then warped my image by creating an inverse warp function H^-1, and then creating a polygonal coordinate mask that covered the entire image. I applied H^-1 to the mask, and applied to my rectified image the pixel values of where each coordinates of the transformed mask lay.

I got the following results:

H matrix
Rectified British Parliament