CS 194 Project 5: Lightfields - Evan Sheng

Introduction

The goal of this project was leverage lightfields, a series of images taken in a grid-like form, to perform cool operations! Two that I have implemented for this project are image refocusing, and apeture adjustment.

The results are shown below

Depth Refocusing

Images with different focal points have differing centers of focus, causing some parts of images to be clear where in others they may be blurry. Since the light-field has a bunch of images that are moved slightly along one axis, we can average the images to get a far away focus (as the objects far away are less affected by the slight movement, compared with the close objects).

We can change the focal point by aligning different regions of the image. We simulate this refocusing by shifting images in our grid. We were provided a collection of 17 x 17 images - I took the midpoint, or the 8x8 image as the central point. Then, each image in the grid was shifted a certain distance from the central point (scaled by a scalar between -4, 1). Averaging the resultant images provides us with a resultant different focus image.

Refocusing Gif

Apeture Adjustment

To simulate apeture adjustment, we use the following trick. Averaging a large number of images mimics a camera with a large aperature, whereas averaging a small number of images mimics a small apeture. For our 17 by 17 grid, we use apetures in the range 0 to 8. We choose to use the middle n x n images for a radius of size n.

Apeture Change Gif