CS194-26 Project 5: Depth Refocusing and Aperture Adjustment with Light Field Data

Alexander Ros (aag)

Depth Refocusing

In this part we used sets of images from a lightfield camera to create an effect of focusing a camera using simple methods like shifting and averaging. This set of images of a chessboard contained 289 images representing a grid of images from (0, 0) to (16, 16). We let the image at (8, 8) be the center image for other images to shift towards. When shifting, we shift by c*(y - v), c*(x - u), where y and x belong to the center image, v and u belong to the image being shifted, and c is a weight that controls the strength of the shift. Changing the weight c focuses the image at different areas.

c = -0.1

c = 0

c = 0.5

Refocusing Sequence

This sequence goes from a radius of 0 (only the image at (8, 8)) to a radius of 8 (all the images).

Chess Focus Sequence

Jellybean Focus Sequence

Aperture

We can change the aperture by using less images in the lightfield image set and finding the average of them. We let the image at (8, 8) be our center image and we select more images by introducing a radius. If the radius is 0, then only the image at (8, 8) is averaged. If the radius is 1, then images that are a distance of at least 1 from the center ((7, 7), (8, 8) (9, 9), (7, 8), (8, 7), (9, 8), (8, 9), (9, 7), (7, 9)) are averaged.

Radius 0

Radius 2

Radius 4

Radius 6

Aperture Sequence

We create a morph sequence by doing the above steps, except we slowly increment the weights for creating the mean set of points and finding the average color from 0 to 1, depending on how many frames we want for our sequence. In this sequence we created a sequence of 45 frames, incrementing the weights by 0.022 per frame.

Chess Aperture Sequence

Jellybean Aperture Sequence

Conclusion

This project demonstrated the potential of lightfield cameras, and their ability to refocus and change the aperture of images after they are taken with very simple techniques. It is an exciting development that is even being implemented in newer smartphones. It would certainly be useful for me as someone who always takes photos out of focus!