CS194-26

Project 4: Face Morphing

Samantha Lai | cs194-26-afr

Original: Aperture Diameter of One Camera
Aperture Diameter of 9x9 Grid of Cameras

Overview

In this project, we used lightfield data to simulate effects of depth refocusing and different aperture sizes. The lightfield data was taken by a 17x17 grid of cameras all pointing in parallel directions, each taking a slightly different image. By using simple operations to combine the images taken by these cameras, we can create some very interesting effects.



Part 1: Depth Refocusing

This part of the project is based on the fact that objects that are relatively far away from the camera array appear in approximately the same place in all the of the photos captured by the cameras. In contrast, objects closer to the camera vary their position more as the camera position changes. When we shift the captured images to align the positions of closer objects and then average them, the resulting image is focused on the close objects and unfocused on the faraway objects. By varying the amount by which we shift the images, we can adjust the depth of focus.

We simulate the effect of moving the focus plane back and forth.

Again, we appear to be moving the focus plane back and forth.



Part 2: Aperture Adjustment

Averaging a number of images taken over a grid perpendicular to the optical axis mimics a camera with a larger aperture by creating the apparent effect of capturing multiple different viewpoints of objects that are not in the center of the image.
The smallest aperture that we can simulate is the size of the original aperture, and the largest aperture diameter that I simulated was the distance between 9 adjacent cameras in the camera array. In other words, the aperture diameter was the width of a 9x9 array of cameras.
I centered all the different sized apertures around the camera that was in the middle of the 17x17 array.

GIF of 1x1, 3x3, 5x5, 7x7, and 9x9 apertures respectively.
Aperture Size of Single Camera
3x3 Aperture
5x5 Aperture
7x7 Aperture
9x9 Aperture



Summary

After completing this project, I now understand why a larger aperture creates the effect of "blurring the background" that is often seen in professional photos. I also now know that you don't necessarily need a fancy camera to create that effect! In fact, some smartphone implementations of a "large aperture", aka Portrait Mode, actually just use foreground object recognition and apply blurs to the background objects to mimic the effect in yet a different way from the lightfield data method.