CS 194-26 Project 5

Lightfield Camera

Depth Refocusing and Aperture Adjustment with Light Field Data

Regina Xu (aat)


Depth Refocusing

If I average all images without shifting, the resulting image focuses on the top part of the image with everything else blurred (see below). This is because the parts closer to the camera move more than the parts farther away so that averaging them results in a blurrier image.

Changing the depth of field requires realigning each image before averaging them. The idea is to change the focal point by shifting images toward the center (the coordinates of the image at (8, 8) since we have a 17 x 17 grid) so that the middle of the image is in focus. I scale the shifts by a scalar between [-1, 0.25] with a step of 0.25 to get the effect of focusing at different depths; the resulting images are combined in a gif to simulate the effects of refocusing.

Scalar: 0.25

Scalar: 0.0

Scalar: -0.25

Scalar: -0.50

Scalar: -0.75

Animation

Aperture Adjustment

For this part, the idea is to average (without shifting) a large number of images to emulate a picture captured with large aperture setting (blurrier resulting image) and small number of images for small aperture. I sample images based on their distance from center image or radius of [0, 8]. Below are the results at different radius values, along with the final gif capturing the effect of aperture adjustment.

Single image

Radius: 2

Radius: 4

Radius: 6

Radius: 8

Animation

Takeaways

From this project, I learned how different dimensions of lights captured in lightfield data allow us to make simple image manipulations to recreate effects like refocusing and aperture changes.