CS 194-26: Image Manipulation and Computational Photography

Project 5: Lightfield Camera

Justin Lu - cs194-26-acb

Overview

In this project, we utilized pictures taken from a grid of light field cameras to refocus on different parts of an image as well as adjust the aperture size, which results in a smaller area of focus for a larger aperture size and a larger area of focus for a smaller aperture size.

Approach

For adjusting the depth of focus, we take the coordinates of the camera in the 8th column of the 8th row to be the origin, and we calculate the shifts of all the cameras relative to this origin. We then perform the shifts (multiplied by a factor a) on the images to focus on a common point. Smaller, more negative alpha result in focusing on the back of the image, and more positive alpha result in focusing on the front of the image. For adjusting the aperture, we calculate the distance of each camera from the origin camera (denoting this distance as r), and we make increasingly large sweeps around the origin to determine what images to use for the average. For example, we start with just the center image, then take those images within some small radius of the origin, and slowly increase the radius until we encompass all the images.

Depth Refocusing

Below we change the depth of focus, starting from the back of the chessboard, gradually changing it to the front.

alpha = -0.1.
alpha = 0.25.
alpha = 0.55.
GIF of depth refocusing.

Aperture Adjustment

Below we focus on the center of the chessboard and increase the aperture size over time.

r = 0.
r = 25.
r = 55.
GIF of aperture adjustment.

Summary

I learned that using light fields, we can change the depth that an image appears to have been taken at, after we take the image, and create effects such as the focus around a point by changing the aperture size, also after taking the image.