CS 194-26: Project 5

Lightfield Camera

Kimberly Zai

Overview

For this project, I used pictures from the Stanford Light Field Archive to simulate depth refocusing and aperture adjustment when taking a picture of a particular scene. The idea is that by capturing multiple images over a plane orthogonal to the optical axis, we are able to sample more of the plenoptic function and capture more information about light ray directions. By using this additional information, we can create these new images.

Part 1: Depth Refocusing

For this part of the project, I simulated images taken with different depths of focus. The basic idea was given our 17x17 grid of images, I utilized the center coordinates of the middle image at (8, 8) in the grid. Then, for each image, I calculated the difference the center's x and y coordinates and the image's x and y coordinates. I shifted each image by this difference multiplied by some scale factor C. By averaging all these shifted images and doing this for multiple scale factors, I was able to create the final images. By decreasing the scale factor (towards smaller/negative values), I had a shallower depth of focus. Thus, the objects in the foreground were more in focus. By increasing the scale factor (towards larger/positive values), I had a bigger depth of focus. Thus, the objects in the background were more in focus.

Legos
C range: [-0.5, 0.5]
Chess Set
C range: [-0.5, 0.5]

Part 2: Aperture Adjustment

This involved similar steps to part 1, which involved shifting and averaging images. However, instead of changing the scale factor and keeping the number averaged images constant like in part 1, I kept the scale factor constant and changed the number of averaged images for part 2. To pick which images to average together, I used only images within a certain radius/offset from the center of the 17x17 grid of images. With a small radius, I simulated a small aperture size. With a large radius, I simulated a large aperture size. As the radius/aperture size increased, the image got blurrier.

Legos
C = -0.2, Radius range: [1, 7]
Chess Set
C = -0.3, Radius range: [1, 7]