Eilam Levitov - cs194-26-acx
This notebook runs on python 2.7
As this paper by Ng et al. demonstrated, capturing multiple images over a plane orthogonal to the optical axis enables achieving complex effects using very simple operations like shifting and averaging. The goal of this project is to reproduce some of these effects using real lightfield data.
We will demonstrate the power of these simple mathematical operations on images from the Stanford Light Field Archive and display the results below
In this part we shift the grid pictures and average which creates a moving focus
effect.
We control the location of our focus
effect by shifting each image to a centralized reference and multiplying by a scalar, which we will see in the gif. But first, we shall see a simple example of averging:
# Set Parameters
# Construct the image grid
# Set reference images and center point
# Set a starting point and align
# Simple average and display
Now that we saw the effect of averaging, we can demonstrate a slightly more elaborate process by using a reference patch and aligning according, followed by the same process.
# Here we shift, align, average, and display
In this part we use a variable number of images, n
, to creates a corresponding aperature adjustment
effect.
We define the radius
of the aperature by setting n
to a sepcific number, as n
grows so does the radius and vice versa.
# Set radius=2 and display
# Set radius=12 and display
# We tune the radius from 2 to 14 with jumps of 3
This project demonstrated how a simple trick can make a big difference. Ren's idea of microlenses is as straight forward as it is inspring. I throughly enjoyed working on this project.