<style>body {overflow: auto !important;}#main {opacity: 1.0 !important;-moz-transform: none !important;-webkit-transform: none !important;-ms-transform: none !important;transform: none !important;-moz-transition: none !important;-webkit-transition: none !important;-ms-transition: none !important;transition: none !important;-moz-filter: none !important;-webkit-filter: none !important;-ms-filter: none !important;filter: none !important;}</style>

Project 5: Light Field Camera

by Anaga Rajan


Part 1: Depth Refocusing

In order to do this task, I set the center to be (7,7) . I then iterated through all the other images and computed their distance from the center.

Δ(x, y) = α(u, v)

I experimentally tried different α values until I found the best ones. Typically, lower α values sharpened items far away while higher values sharpened items closer to the camera.

The order of alpha values are -0.3, 1.3 and 3. The smallest alpha value (closest to 0) sharpens the background, while the higher alpha values sharpen the items towards the foreground. This makes sense because as the camera moves around, the images in the front move around more drastically, so their positions don't change much across images.

Here we can see the change in focus as we move α from -0.3 to 3 in increments of 0.1

For this example, the following samples are created with α values -2, 0.5, and 3. The focus shifts from the back wall, to the globe, to the cards in the foreground.

Here we transition the focus from α=-2 to α=3 in increments of 0.16


Part 2: Aperture Adjustment

In order to do this task, I first chose a focus point for my image and experimentally found the best α value to achieve it. Then, based on the aperture, n, I averaged out the images similar to how I did in the previous section, but filtered out any perspectives that were outside the n x n grid around my center (7,7).

These images display n=0 and n=6 respectively. The left image displays the entire image clearly while the right shows some blurring around the edges. I chose the focus of the image to be the 3 pawns in the center of the board.

Here I do the aperture adjustment with n=0, n=6 respectively for the image with the cards. Here you can also see blurring around the globe (my focus) when the aperture size is increased.


Bells and Whistles:

Interactive Focusing

In order to interactively focus an image, I wrote a simple align tool that tries to find the shifts that computes the Δ(x, y) so that I can then solve for α and create the correct refocus for the image.

Instead of doing this on every image, I solved for α at position (6,6) and then used it for all remaining pictures when computing the refocused image.

Using Real Data

I also attempted to make my own dataset (with stuff I had lying around). I took 20 photos (10 in 2 rows). I think due to the lack of precision and smaller quantity of photos, the results weren't as good as the previous ones above.

Depth Refocusing

Aperture Adjustment


Summary

This project was very cool. Making the gifs produced really beautiful results and taught us how aperture and perspective play a strong role in photography. It was also a good experience to learn about light and focusing, and how we can combine so many images, that are so similar to each other, to gain new perspectives smoothly.

( Made with Carrd )