CS 194-26: Image Manipulation and Computational Photography

Project 5: Lightfield Camera

Daniel Shi - abl

Depth Refocusing

If we just average all the images generated by the lightfield camera, we will get an average image that focuses on parts that are displaced less than others. In general, this will result in the faraway objects being in focus while the closer objects will be out of focus. Therefore, to adjust the focus of the average image, we can shift all the images around a designated center image. Doing this will make the average image focus on the designated center image (as it isn't displaced at all).

By scaling the shifts by a factor alpha, we can adjust how much, and which parts, of the image are in focus or out of focus.

left: alpha = -0.5, middle: alpha = -0.3, right: alpha = -0.1


left: alpha = 0, right: alpha = 1.0


Aperture Adjustment

To similate different aperture sizes, we can use the same displacement shift algorithm described in part 1 but limit the number of images we use. To accomplish this, I set an arbitrary R value and only used the images that were displaced within R away from the center image.

left: R = 1, middle: R = 35, right: R = 65