The objective of this mini-project is to apply what we learned about light field photography with two brief assignments. The idea is to capture an evenly space grid of images over a scene and to perform simple shift/averaging operations in order to synthetically simulate cool effects like depth refocusing and aperture adjustments.
To simulate depth refocusing, we shift and average the given grid images in order to generate an image that is focused at a particular depth. Each image is read, then shifted by the translation information found within its filename. For the case of the chessboard, averaging the images without the shifting returns a final image that focuses on objects further away from the camera, while average images with the shifting returns a final image that focuses on the objects in the middle. Extrapolating this information, we can then collectively scale the image shifting with a constant in order to return images that are focused at different depths. I empirically chose the ranges used for scaling the shifts (0-3 for the chessboard). Here are the results:
In order to simulate aperture adjustment where the center of the image is the common point (has an infinite depth of focus), we average a subset of the given images whose translation information lies within some radius value r. As the value of r increases, the larger the simulated aperture. Here are some results:
What I Learned
What was super awesome about this light field project was when I realized that simple operations with the right intuition can produce some very amazing image processing results! Generating different depths of focus was definitely very fun!