Project 5 - Lightfield Camera



Amit Talreja - cs194-26-agt



Main Idea

In this project we used lightfield data from the Stanford Light Field Archive to simulate refocusing an image on different areas. To do this we combined images taken by different cameras at slightly different positions and varied the amount that each was shifted before being averaged. We also used this same data to simulate the same picture being taken with different aperture settings by only average data from some of the cameras to simulate a smaller aperture.


Depth Refocusing

For the first part of the project we used images from all of the cameras and averaged them together with different shifts to focus the image in different areas. Using the formula a*(u - u_center) to find the shift in the u direction and a*(v-v_center) to find the shift in the v direction we can vary the area of the focus by varying the value of a. Setting a=0.6 for example, will focus the image near the bottom, while a=0.2 will focus near the center. Below are still frames for a=0.2 and a=0.6 respectively, along with a gif showing a smooth transition from a=-0.2 (near the back), to a=0.6 (near the front)


Aperture

For the next part we simulated different aperture settings by using a subset of the cameras for each "setting". Using data from more cameras approximates a larger aperture because it includes more "light data", or data from more light rays. Below are still frames using data from one camera, 81 cameras, and 289 cameras, as well as a gif showing the transitions from using 1 camera to all 289 cameras