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

Project 5: Depth Refocusing and Aperture Adjustment with Light Field Data

Riku Miyao, CS194-26-acq

Part 1: Introduction

The goal of this project was to utilize the light field images from the Stanford Light Field Archive to generate images with a different focus and/or aperture. The light field data contains multiple subimages of the same object taken from a 17x17 grid. Each image represents an image taken from a point on the aperture, and taking the averages of these images in various ways can create interesting effects, such as refocusing the depth and adjusting the aperture

Part 2: Depth Refocusing

To implement depth refocusing, I had to shift each subimage by a given amount to generate the refocusing effect. Using the camera coordinates u and v of each image, I calculated the offset of each camera from the central camera, and shifted each image an amount proportional to the shift. I then averaged all of the shifted subimages to produce the final image. By adjusting the factor of the offset, I can adjust the depth at which the camera is focused on.

Chess depth refocusing
Bracelet depth refocusing

Part 3 Aperture Adjustment

The previous set of images used all of the subimages to generate the resulting image, which simulates a full aperture. By instead using a smaller sample of subimages, we can simulate a smaller aperature. In this example we use the subimages within a certain distance from the central camera, which simulates a small circular aperture. By adjusting this radius, we can adjust the radius of the aperture.

Aperture adjustment of chess
Aperture adjustment of the bracelet

Part 4 Conclusion

Lightfields are an interesting way to think about how cameras capture light. By taking multiple images of the same scene from a grid of cameras, we have enough information to say the direction at which light rays pass through the camera. This project made me think about how to manipulate those light rays to generate cool effects.