Lightfield Camera

CS194-26 Fall 2018

Bernie Wang




Overview

In this project, we explore the concepts of depth refocusing and aperture adjustment using light field data. The goal is to digitally change the focus and aperture of an image after it has been taken by using multiple images taken over a regularly spaced grid. In this project, we use data from the Stanford Light Field Archive.




Depth Refocusing

In order to refocus an image, we translate each image by c x (u, v), where u,v are the relative differences in x,y positions of its respective camera and a reference camera and then take the average. Since the cameras in the Stanford dataset were arranged in a 17 by 17 array, I chose the camera at position (8, 8) as the reference camera. The translation factor c stays constant for all images, and changing c changes the depth of focus.

Chess, c=0

Chess, c=1

Chess, c=2

Chess, c=3

Chess, c=0 to c=3, 31 frames



Amethyst, c=-2

Amethyst, c=-1

Amethyst, c=1

Amethyst, c=2

Amethyst, c=-2 to c=2, 41 frames




Aperture Adjustment

To change the aperture, we take the average of some images in a grid that is centered by an image with radius r. Using a smaller r will mimic having a smaller aperture, while using a larger r will mimic having a larger aperture. In this project, I used a rectangular grid with length and with of r, using the camera at index (8, 8) as the center of the grid.

Crystal Ball, r=0

Crystal Ball, r=8

Crystal Ball, r=0 to r=8, 9 frames



Lego Knights, r=0

Lego Knights, r=8

Lego Knights, r=0 to r=8, 9 frames




Summary

I am suprised that refocusing and adjusting aperture after taking a photo is that simple to compute. It goes to show that with enough data, you can easily do tasks that seem algorithmically difficult.