CS 194-26 Project 5A

cs194-26-aga

Image Warping and Mosaicing



Recovering Homographies

Our first objective was to recover the homography matrix, which defines the transformation between a pair of images. In our case, we want to find the transformation between our original input and our desired rectified output shape. To recover the matrix, we choose multiple correspondence points and solve using least squares.



Rectifying Images


The next step is to rectify the images. The trick here is to find sample images with planar surfaces that can be warped so that the plane is frontal-parallel. The next step is to define the correspondences for our desired output in rectangular coordinates, compute the homography, and warp our image. Below are some results of rectified artwork. I chose some famous paintings captured at unfortunate angles in an attempt to restore them. In the spirit of self-isolating, I rectified some lonely Edward Hopper paintings which are less lonely but also notably less pretty :P


Original Image Rectified Image
starry night
frida kahlo
office in a small city
western motel

Reflection

Although I've been stuck inside, I was able to have fun with the images I tried rectifying. It was interesting to test out different artwork with varying results.