Alex Jiang

CS 194-26: Project 5

Lightfield Camera

Overview

        In this project, we manipulate images according to real lightfield data, in order to recreate some more complex effects such as depth refocusing from some simpler ones, such as shifting and basic averaging. Using the rectified and cropped images from the Stanford Light Field Archive, which takes a collection of images from a 17x17 array of cameras, we start with many images of the same subject from different angles and positions. Then, by adjusting the scale of our matrix operations and focus radius (essentially aperture), we recreate the effects below.

Part 1. - Depth Refocusing

        One of the fundamental phenomena when it comes to moving the camera position is that closer objects move more compared to those farther away. Thus, if we align all of our images by shifting them towards what we designate as “close” (or “in focus”), we can artificially recreate the depth refocusing effect. When creating this shift, we multiply each coordinate by an integer from 0 to 4, thus creating a set of differently-focused products. Here is the result of our algorithm applied to the archive’s chess and eucalyptus flower image sets:

Part 2. - Aperture Adjustment

        The goal of this portion is fairly straightforward in concept: to recreate the effect created by adjusting the aperture of a single, real camera. To simulate this, we designate an aperture radius from 0 to 10 to determine how many images to align to contribute to our final product. The smaller the radius, the fewer images we will include, and thus the smaller aperture we will simulate. Conversely, the larger the radius, the greater images we will include, and thus the larger aperture we will simulate. As aperture size increases, items on the periphery of the images blur, as the light given is being focused elsewhere. Here is the result of our algorithm applied to the archive’s chess and eucalyptus flower image sets:

Summary

        Overall, this project, despite its relatively-short length compared to the other projects, taught me a great deal about light fields and optics in general. As someone who has used cameras for a great portion of their life, I particularly resonated with the aperture portion, as its an effect I’ve seen many times. I also noticed that the blurring effect, which is still created by high-quality lenses, can still be replicated by very basic averaging and filtering techniques. As a whole, being able to take all of these separate, individual images and combine them all to create greater effects, even after all the pictures were already taken, was very interesting to me.