Lightfield Camera Fun!

CS194-26, Project 5

Inan Husain



Overview

Lightfield cameras are a technology that records information of a photographed scene in 4 dimensions, as opposed to the usual 3. This project demonstrates how we can adjust focus and aperture of a picture AFTER taking the picture, which is pretty cool as you have to choose your focus and aperture BEFORE taking the picture.

Depth Refocusing

So the effect of focusing on different depths was done through the use of the shift and add algorithm from Ren Ng's slides. THe shift amount was calculated by finding the distance between each image's (u,v) (found in the filenames) and the center image (u,v) and multiplying that by a constant C. I found through some experimentation that the range of C=0.2 to -0.6 worked well, focusing from back to front. Here are 3 of the images, as well as a GIF composed of 17 steps.

C=0.2
C=-0.2
C=-0.6

Aperture Adjustment

This is similar to the first part. This time we start with the center image (8,8), as that represents the smallest aperture focused on the center. From there I added on the perpendicular images at (7,8), (9,8), (8,7), and (8,9) and found that average as that was the next smallest aperture we could mimic. I continue this stepping process 7 times until we have used all perpendicular images to the center. Note that the images added to the center are still averaged using the shift and add algorithm, with C=-0.4 for the results below. Each individual image is below.

A=1
A=2
A=3
A=4
A=5
A=6
A=7
A=8

You can see how the front stays focused while the back blurs out in the GIF.

Aperture Adjustment

This is similar to the first part. This time we start with the center image (8,8), as that represents the smallest aperture focused on the center. From there I added on the perpendicular images at (7,8), (9,8), (8,7), and (8,9) and found that average as that was the next smallest aperture we could mimic. I continue this stepping process 7 times until we have used all perpendicular images to the center. Note that the images added to the center are still averaged using the shift and add algorithm, with C=-0.4 for the results below. Each individual image is below.

Summary

All in all, its a very cool project. I had taken CS184 with Ren this spring, and he taught us about light field cameras as part of the class, but most of the information went over my head back then, and I definitely didn't know it for that midterm... But after doing this project, I feel like I have a much better feel for the power that light field cameras have, and that's pretty dope.