CS194 Project 5 by Salil Vanvari

Overview

The general gist of this project is to replicate some of the very interesting properties of a light field camera such as Lytro using a grid of images. The interesting thing about this approach is to see how we are forced to deal with so much more data than is needed by a lytro camera to create and change the focus of these images.

Depth Changes

In order to create a depth change, it is first important to understand how the data is given. The data is provided as 287 images all of which are taken from a different point of a 17x17 grid. The way to recreate the depth changes from these full aperture images is to take all the images and shift them to an anchor point. The key to the focus is how much you change the shift in terms of a scaling factor. The reason this works is that whatever point aligns within the images averaged over the entire set of images will remain unchanged and whatever points are slightly off will become ever so slightly blurry. By changing the scaling factor, you can align different points and achieve different focus depths. Here are some different results below.

scalingFactor = .8:

scalingFactor = -1:

scalingFactor = -4:

animation:

via GIPHY

Aperture Change

The second part of this project was to change the aperture of the images pretending like there are different aperture sizes. To do this, merely average a whole bunch of shifted images again, but this time, only do ones that are closer to or further from the the chosen image. By manipulating how close an image has to be to be averaged, you can change the percieved aperture. Here are a few results from doing this.\

apertureSize = 1:

apertureSize = 6:

apertureSize = 10:

animation:

via GIPHY