Project 5: Lightfield Camera

CS 194-26: Image Manipulation and Computational Photography, Fall 2018

Jacky Lu, CS194-26-AFX

In this project, we use a lightfield camera data set to reconstruct photos of the same scene with varying apertures and depth of field. The data is taken from the Stanford Light Field Archive and consists of images taken of the same scene using cameras positioned in a 17x17 grid. We can then simulate control of various light rays in the scene using these various images and do some neat things like shifting the focus in the scene or adjusting the depth of field.

Depth Refocusing

In this part, we see that averaging all 289 photos yields a photo with the back of the scene in focus. However, shifting each of the photos based on their distance from a reference point allows us to shift the focus forward/ backward. I chose the position of the central photo (8,8) as my reference, and shifted each photo by the difference in position between it and the central photo, scaled by some alpha value. Adding these up and averaging them led to these results:

alpha = 0.1
alpha = 0.3
alpha = 0.5
Render of results from alpha = -0.1 to 0.6

Aperture Adjustment

Because we were using so many photos from different angles (capturing a wider set of light rays), we ended up with blurrier photos, as if they were photos taken with a wider aperture. Following this logic, we can reduce the number of images in our image composite to simulate a smaller aperture. In this part, I set camera position (8,8) to by my reference and only choose images within a certain radius in position of (8,8) to use in the final composite. Here are my results with different radii:

radius = 1
radius = 4
radius = 7
Render of results from radius = 1 to 7

Summary

As a terrible photographer, I really like the flexibility that lightfield cameras offer to change the photo after the fact! It's really interesting thinking about photos in terms of light rays, and the flexibility that this kind of conceptualization of light offers us in practical uses.