CS 194-26 Project 5: Lightfield Camera

Emily Chang cs194-26-aeu



Overview

In this project, we used a lightfield of an object, which were images taken of an object over a consistently spaced grid to produce the lightfield, as demonstrated below.

With the lightfield, we implemented depth refocusing and aperature adjustment by shifting and averaging the images.



Depth Refocusing

In depth refocusing, we use a light field which gives us images of an object from slightly different camera positions. To refocus, we calculate the distance from the center of each image's u, v coordinate. Then, we shift the image by c * (distance u) and c * (distance v) for some c between [-1, 1]. Finally, we take the average of these shifted images to get a refocused image. Here are our results at varying values of c.

c = 0.1

c = 0.3

c = 0.6

gif with c in [-0.1, 0.7]



Aperture Adjustment

For aperature adjustment, we follow a similar logic that we used in depth refocusing. However, to adjust the aperature, we take a selection of images that are within some distance from the center image. Here are our results at varying radii. For example, radius = 4 means that all images we have selected are at most 4 away from the center. Here are our results at varying radius levels.

radius = 1

radius = 4

radius = 7

radius = 10

gif with radius in [1, 15]



Summary

I found this project to be really interesting! It was cool being able to essentially simulate focusing on an object or adjusting aperature size with just a set of images that were taken at various camera positions.