In this project, I worked with data from The Stanford Light Field Archive which has sample datasets comprising of multiple images taken over a regularly spaced grid. The Light Archive and Lytro camera project were lead by professor Ren Ng. By moving a camera over a plain orthogonal to the optical axis and capturing multiple images, a grid of images is generated. With this grid, we are now able to digitally change the focus of an image or simulate the adjustment of aperture. The results of my algorithm are demonstrated below.
We can create digital depth refocusing using the fact that different positions of the camera result in slightly different pictures, like these:
As we vary the position of the camera relative to the object an interesting phenomena occurs. The objects which are far away from the camera do not vary their position significantly when the camera moves around while keeping the optical axis direction unchanged. The nearby objects, on the other hand, vary their position significantly across images. We can use this observation to focus different parts of the image. If we average all the images without any shifting, we will achieve an image that is sharp for far away objects and blurry for nearby ones. In the similar manner, if we shift the images and then average, we can direct to focus to different areas.
I first implemented this idea on the images of the chess board by varying the values of c from -1.0 to 3.5.
Averaging a large number of images sampled over the grid perpendicular to the optical axis mimics a camera with a larger aperture. On the flip side, using fewer images results in an image that mimics a smaller aperture. In this part of the project, I generated images which correspond to different apertures while focusing on the same point.
I set an aperture variable around the center of the grid and tried values of 1, 2, 4 and 8 images from the center. Below are the results from this experiment:
I wanted to try setting up my own grid of images. I borrowed a camera and a tripod with a friend and decided to give it a shot.
For my image, I set up two objects, a globe and a diamond. I set up the diamond in the front and the globe in the back.
This project was fun and I enjoyed experimenting with different images and focusing them in different ways.
I wish I had the opportunity to work with a more accurate equipment to generate my own grid images.