CS194-26

Programming Project #5 - Light Fields

Sharabesh Ramesh

Overview

Fundamentally this project sought to take data generated over a series of light fields in order to automatically adjust the focus and "aperture size" of the chosen images. This algorithm relied on
  1. Aligning all of the lightfield images to a given point in the center of the image set
  2. Averaging over the aligned images to produce an averaged image
To adjust aperture size, we simply made a small modification to take various aperture sizes sampling certain cameras from either side.

Depth Refocusing

Here we used the Stanford Light Field Archive data to refocus images at various depths. We first aligned the various images using the shifts described in the image filenames. In order to focus on various depths of the image we introduced an addition parameter alpha. A value of alpha = 0 indicates the focus is on the furthest back of the image while a higher value of alpha brings the focus closer to the front of the image.

Alpha = 0
alpha = 1
alpha = 2
alpha = 3
alpha = 4
A gif stitching everything together. Note how the image focus gets gradually shifted more forwards until everything in the image is entirely out of focus (the focus is in front of all the image elements).

Aperture Adjustment

Because we have a large array of cameras we can treat each camera as an element of the aperture. Thus our smallest aperture would be a single camera (corresponding to the center of the array) and the largest aperture would be the entire camera array. We can take subsets of varying length from the center of the image in order

1x1 Aperture size
3x3 Aperture size
5x5 Aperture size
10x10 aperture size
13x13 aperture size
17x17 aperture size
A gif stitching everything together. Note how as we increase our aperture, elements outside our main focus area become more blurred. In this example we used an alpha of 2 to draw the focus to a region towards the bottom of the flowers.

Summary

This project demonstrated how effective lightfields can be in capturing all of the salient information around an object. Without any physical medium we can create shifts in depth and aperture sizes.