Andrew Millman, CS194-26 Project 5

This project involved taking advantage of lightfields to create images of varying foci and apertures.

Depth Refocusing

This part involved refocusing a 17x17 grid of images that take the same photo at slightly different perspectives. A differential of (1, 0) in the coordinates, for example, means the picture was taken at a perspective slightly to the right. By going through each image i and taking the difference between its position and the center position at (8,8), we multiply the difference by some scalar c and add it back into the image i to shift it. This allows a certain realignment of the more shifted, shallow elements when we average all the shifted images, and as a result focusing shallow elements. Averaging elements without shifting results in a focus of the deep elements.
c=0.0
c=1.0
c=2.0
c=3.0
Refocus animation, with step ∆c=0.2

Aperture Adjustment

Aperture Adjustment simply involved averaging a subset of the photos, specifically the photos within a certain radius r of the center image (8,8).
r=0
r=3
r=6
r=8
Aperture adjustment animation, with step ∆r=1