CS 194-26 Computational Photography

Depth Refocusing and Aperture Adjustment with Light Field Data

Victor Vong, CS194-26-acq




Section I: Depth Refocusing

When looking out into the world or through the lens of a camera we think we see everything, but actually we have a specific area of focus and the surrounding objects are out of focus. If you focus on something closer to you, objects farther away will be blurry. Similarly, if you choose to focus on something far away, things that are closer to you will be out of focus. When using cameras we specify a specific depth in which objects at that depth are in focus. Luckily, with light field data of any scene, we can easily vary the specific depth, allowing us to focus on virtually anything in the image. We can accomplish this with the following algorithm:

1. We compute the shift for each image of the light field data set by taking the coordinates of the image relative to some predetermined "center" of the grid and multiplying by a constant scale allowing us to determine which part of the image will be in focus (In our case a negative scale lead to far objects to be in focus and a positive scale lead to objects closer being in focus).

2. We shift the image by that computation and we sum all these shifted image to get our final depth refocused image.


Scale = -.5
Scale = 0
Scale = .5
Scale = 1
Scale = 1.5
Scale = 2
Scale = 2.5
Scale = 3

Combination of Scale from -1 to 3 using .1 incremements

Section 2: Aperture Adjustment

Adjusting the aperture of light field data is similar to depth refocusing, with the only difference being that we don't shift any of the photos. We specify a radius in which we only average the images that are within that radius (a subset of the photos). The more photos we average, the wider the aperture, and the more focused the resulting image causing more bluriness.


Radius = 0
Radius = 3
Radius = 6
Radius = 9

Radius from 0 to 9 combined into a GIF

Section 3: What I learned about lightfields from this project!

I learned that light field camera replication (for depth refocusing and aperature adjustment) given the data, is very powerful in order to produce different perspectives for your images. It is very easy to implement and produce amazing results!