CS 194-26

Project 2:Fun with Frequencies and Gradients!

Rosa Choe

Overview

In this project, we use various methods of combining images in the frequency domain and the gradient domain to create interesting pictures.

Part 1: Shoot and Digitize Pictures

I took pictures of my room as well as my friends.

Part 2: Recover Homographies

In order to warp our images, we need to find the correct transformation to apply to the points. The transformation is a homography, meaning the relationship between the original points p and the target points p' is represented by p' = Hp, where H is a 3x3 matrix of the form:

We solve for the H matrix by finding the least-squares solution to the following overdetermined linear system:

Part 3: Rectify Images

Now that we know how to find the correct transformation to warp our images, we can use this method to rectify our images – or warp the image so some flat surface in the image can be made frontal-parallel. We do this by defining a set of 4 points in the source image; defining the corners of some rectangular shape whose perspective makes it non-rectangular in the image. Then we can define a rectangular shape to warp that section of the image to, in order to find H. Once we have the correct matrix, we can use inverse warping and bilinear interpolation to map the pixels from the source image to the correct, straightened output image.

Original Rectified