Part 1. Depth Refocusing
1. Naive Averaging
If I average all the images in the grid without any shifting, the resulting image is sharp around the far-away objects but blurry around the nearby ones, This is because the far-away objects' positions don't vary much across images, while the nearby pictures' positions do vary significantly across images.
2. Shift and Average
To enable depth refocusing, I first set the center image to the one taken by the camera at (8, 8), then shifted all images in the dataset by some amount before averaging them. If an image is take by a camera at position (u, v), I shift that image by some constant c times the offset between (u, v) and (8, 8).
Stone Example
Part 2. Aperture Adjustment
To digitally adjust the aperture of an image, I summed up only the grid images whose offset from the center, (8, 8), is less than a specific radius. The resulting image from a big radius is blurrier than that from a small radius.
Bells & Whistles: Reproduce a new light field
I attempted to create my own light field by taking a video of my computer and then splitting the video into frames.
From this project, I learned that a lot of information is captured by a lightfield, such that it is simple to digitally create images with different depth and aperture by adjusting the focus point of the images.