Project 5: Depth Refocusing and Aperture Adjustment with Lightfield data

Utkarsh Singhal

Introduction

The goal of this project is to use lightfield data to do cool maniplations like refocusing the depth on an image, and synthetically changing the aperture size. As demonstrated, the rich data represented by light fields is quite easy to work with, and simple techniques like shifting and averaging can produce amazing effects.


Depth refocusing

For depth refocusing, I shifted the images by a linear scaling of their (u,v) values, and then averaged them. This seemingly simple method is sufficient to refocus a light-field image


Chess, far focus to near focus


Jelly Beans, near focus to far focus


Chess refocusing animated


Jellybeans refocusing animated


For some reason, my gif writing code quantizes the images too much for the Jellybean image. This is strange since the image saving code works perfectly.

Aperture size

To computationally change the aperture size, we can change the number of images used in the averaging operation. A large number of images when averaged simulate a large aperture, while a single image is equivalent to a


Chess, small aperture to big


Jelly Beans, small aperture to big


Chess refocusing animated


Chess refocusing animated





What I learned

Lightfields are an extremely rich and interesting representation of image data, and the simplicity of these methods is elegant. This project has been an eye-opening experience, and I feel curious to learn much more about lightfield methods.