Project 5: Lightfield Camera, Anusha Syed

Depth Refocusing

When photographing a scene from different camera positions, objects that are closer to the front of the scene vary their position quite a bit image to image while objects that are further away remain relatively static. In order to obtain different areas of each image focused, we can shift the image by varying amounts to obtain these differnt depths of focus. The algorithm to implement this is as follows:

  1. Compute the shift amount for each image by taking the coordinates of the image relative to the center of the grid and multiplying by a constant C that determines which part of the image will be in focus (i.e. negative C focuses further from center, positive C focuses towards the center).
  2. Shift image by amount computed.
  3. Average all shifted images to obtain the refocused image.

Below is an animation of the results of various depths of focus:

Aperture Adjustment

In order to obtain different apertures, we can average different numbers of images over a grid. In order to do this, we se a radius to determine which images we average, in other words we average the images falling in that radius. For a larger radius, we will average more images which corresponds to a larger aperture. Likewise, smaller radius corresponds to smaller aperture. Below are the results: