CS194-26 Fall 2017 Programming Project #4
Betty Chang



Lightfield Camera:
Depth Refocusing and Aperture Adjustment with Light Field Data

Objective

The goal of this project is to simulate depth refocusing and aperture adjustment using light fields. A light field is how much light goes through each point in space, and by capturing all light fields in a scene, we can simulate the operations we need. I used 289 images of jelly beans over a 17x17 regularly spaced grid.

Depth Refocusing

By averaging the images in the dataset, we get an image that is focused in the front of the image. By shifting the images appropriately before we average them, we can refocus the resulting image at different depths. I used a constant from 0 to 0.5 to adjust the depth to focus at.

Depth Refocusing

Aperture Adjustment

A small aperture corresponds to a high depth of field, while a large aperture produces images with a smaller depth of field. By varying how many images we average, we can simulate changing the aperture size of a camera. Averaging many images simulate a large aperture, and averaging fewer images simulate a smaller aperture. We use the images in the center of the grid, from 1 image to all 17 images.

Aperture Adjustment

Summary

I learned how by utilizing the properties of light fields, just a few lines of code can reproduce complex effects of an expensive camera. Given how simple the calculations for this project was, it amazes me to think about how many more effects we can simulate by using more complex calculations.