Overview

This project allows us to see how useful these lightfield cameras are! Lightfield cameras have multiple individual photosensors placed at evenly spaced offsets that are merely photosensors - no aperture, focus, etc. adjusting. The resulting pictures are pictures of the same object with the same lighting, just taken at slightly different angles. Using these pictures, we can conduct editing and yield photos that would normally only be possible by changing the camera settings during the taking of the photo. We can refocus the images to focus on different depths, as well as fake a changing aperture of the camera.

Part 1 Approach: Refocusing

Refocusing all the images to be focused on a specific depth can be achieved by shifting each image towards the center image everytime and adding a shift constant that depends on which depth the focus should be at. For every image at (u, v) with the target at (8, 8) (the center in this case of a 17x17 grid), we perform the shift [alpha * (u - 8), alpha * (v - 8)] for the u and v directions respectively. This shifting and averaging depending on a constant will align the images at the target depth. This will make the image sharper at the target depth (since they are aligned at that depth) and blurrier elsewhere (blurriness will increase as it gets farther from target depth).

alpha = 0.01

alpha = 0.025

alpha = 0.05

alpha = 0.1

via GIPHY



Part 2 Approach: Aperture

The effect of different apertures can be obtained through the same algorithm as before, but this time only shifting and averaging the images that fall within the certain radius given.

radius = 0

radius = 3

radius = 6

radius = 9

via GIPHY