Nicole Rasquinha

Computational Photography

Project 5: Light Fields

Project Overview:

In this project, we use a dataset of images taken by a light-field camera, each slightly translated along a plane from one another. We can manipulate the placement of the images to average them to create an effect of different depths. For example, if we average the chess images without applying any shifts, we end up with the following image:


Notice that the focus is towards the back of the chessboard. This is because originally, all images are shifted slightly in space along a grid. This shift is negligible for objects far away compared to the distance from the camera. It impacts the objects closer to the camera. This results in blurring the closer objects. If we shift all images with a C value of 0.4, however, we end up with the image below. This is because we shift the images to compensate for their original separation in space. Therefore, the objects closer in the image become more and more aligned, while objects in the back shift away from alignment. This results in the focus towards the front of the chessboard.


For the second part of the project, I had to simulate changing the aperature of the photos. To acheive this, I focus on the center of the grid and "draw circles" of varying radii around the center. I only include images on the grid that fall inside that circle. A smaller aperature means fewer images, which results in no sense of focus vs blurry -- the whole image appears focused. For example, here is the image with an aperature radius of 2 points. This includes only 9 images.


As I increase the aperature, however, more images are included and we experience the blurring/focusing effect. For example, here is the image with an aperature radius of 8 points. This includes 193 images.


Changing Depth:

In this part, I step through different C values, i.e. values to shift my images by. I start with a negative C value, which results in focusing deeper in the image, and transition to a very positive C value, which results in focusing closer. Below you can see my results on the chessboard as well as the bracelet.


Changing Aperature:

In this part, I simulate changing the aperature by only including images within a circle around the center image. A smaller circle gives a smaller aperature and results in a pan-focused image (i.e. no blurry vs focus effect). A larger circle gives a larger aperature and results in the focused effect. Note: on the left, I change the aperature using a C value of 0, thus focusing on the back of the image. On the right, I use a C value of 0.3, which focuses on the center of the chessboard.


Bells and Whistles:

I took my own photos of a pencil pouch in order to use this new technique I implemented and change the focus of my images. However, since I do not have any sort of elaborate equipment and had to rely on my human, error-prone estimations, my alignment of the images was quite poor. Therefore, the resulting images are blurry, regardless of the shift I apply. Furthermore, I had to estimate the values for u and v, and since I did a three by three grid, I simply estimated the values to choose from -1, 0, 1. Another reason this may not have worked even if my alignment was better is that there is only one possible "subject" in the image: the pouch. In the dataset images I used, there were many different places that one could focus on: the different pieces on the board, the different chunks of the bracelet. In my pouch images, if the pouch is out of focus, there really isn't anything else to focus on. Additionally, the pouch itself was quite noisy, with details such as the seams, a small unicycle and grainy vertical lines of the fabric. Therefore, when the images are not perfectly aligned, these details really give it away. Here is my result: