CS 194-26 Project 5 (Lightfield Camera) - Yunfan song

Overview

In this project, we performed shifting/averaging operations on a set of images over a plane orthogonal to the optical axis to achieve camera effects such as depth refocusing and aperture adjustments. The image set was taken from the Stanford Light Field Archive.

Depth Refocusing

We are able to replicate depth refocusing on the set of rectified images by shifting images towards a center image and averaging those images. If dx,dy is the shift from a camera to the center camera, one only has to shift the image by c*dx,c*dy, because if a camera is shifted, say, up and to the right, the imaged features move down and to the left, and we want to undo this shift. C is a constant that is chosen manually. For the chess images, after some trial and error, I found C value of 0.4 to work best.

Depth refocusing gif


Aperture Adjustment

To simulate different aperture settings, we averaged together a subset of images. We first define a radius for our base image, and we only average images whose shift amount was within that radius. Using fewer images in the average reduces this blur because it is like we are only allowing more collimated rays in our image, which focus more closely. Here C is 0.224.

Aperture Adjustment gif

Summary

This will help me to learn photography.