Bradley Qu

CS 194-26: Project 5

Light Fields

Introduction

         Playing with light field data! Refocus images and change aperture!

Changing Depth of Field

         I wrote a script to do change the focal length of light field data by extracting camera positions from the files and conducting an affine transform to the images. The primary challenge in this part was making the code run quickly. I initially used a scipy shift, but after brooding over the horrendously poor performance, I switched to directly running the affine transform. Since I do not know the sensor size of the camera, I could not manipulate the true focal length of the images. Instead, I worked with a factor of the default focal length. Here are the results:

Original
≈1.04f
≈1.03f
≈1.02f
≈1.01f
≈0.99f
≈0.98f
≈0.97f
≈0.96f

Original
≈1.12f
≈1.10f
≈1.08f
≈1.06f
≈1.04f
≈1.02f
≈0.98f
≈0.96f
≈0.94f
≈0.92f
≈0.90f
≈0.88f

Playing of Aperture

Aperture can be manipulated through averaging more or less of the lightfield data. Since there are only 17x17 images, the resolution of the aperture is low. Thus, to simplify the problem, I take square apertures. The gantry setup is not perfect, so the true radius is ambiguous. Here are the results:

r≈0mm
r≈5mm
r≈10mm
r≈15mm
r≈20mm
r≈25mm
r≈30mm
r≈35mm
r≈0mm
r≈8mm
r≈16mm
r≈24mm
r≈32mm
r≈40mm
r≈48mm
r≈56mm