Lightfield Camera:

Zhen Qin


Overview

The light field is a vector function that describes the amount of light flowing in every direction through every point in space. This project apply light field to mimic camera’s Depth Refocusing and Aperture Adjustment functionality. The light field is created by capturing multiple images over a plane orthogonal to the optical axis. The Stanford Light Field Archive provided a grid of 17x17 images (289 images total) of various objects, each taken at a slightly different x and y position through either a bank of cameras, or a single adjustable camera. The filenames of each image states which position the picture was taken in, which allows us to compute the offsets and shifts needed for the image manipulations.


Depth Refocusing

In the first step I read in all the images and their accurate (x, y) positions in the light field. The accurate (x, y) positions in the light field is the last two numbers in the file name. Then, since this light field has 16*16 directions, the center image is (8, 8) image and I pick this as my center image. For every other images, I calculate both its x and y position difference from the center image, multiply both differences by a constant c, and shift the image the scaled differences. In the end, I average averaged all the shifted pictures and get us a picture focused on objects at different depths. Here is the result with different scaler c:

Here is the result with different shifting scaler c:

Card image cap

C = -1

Card image cap

C = -0.5

Card image cap

C = -0.1

Card image cap

C = 0

Card image cap

C = 0.1

Card image cap

C = 0.3

Card image cap

C = 0.5

Card image cap

C = 0.7



C from -0.3 to 0.9 with step size 0.05:




Aperture Adjustment

Averaging a large number of images sampled over the grid perpendicular to the optical axis mimics a camera with a much larger aperture. Using fewer images results in an image that mimics a smaller aperture.

To implement this, first, I fix the focus depth and shift all the images similar to previous part. I choose C = 0.4 and center image (8, 8). Instead of averaging all the images together, I choose only the a square range of (2a+1)x(2a+1) images centered at (8, 8) and average them. The parameter a here is the aperture size. Larger “a" gives larger range to average and represents larger aperture size. Smaller “a” represents smaller aperture size. Here is the result with different aperture size:

Card image cap

a = 1, aperture size = 1*1

Card image cap

a = 2, aperture size = 5*5

Card image cap

a = 8, aperture size = 17*17



a from 0 to 8 with step size 1:





Reference

HTML/CSS for this page was taken from https://v4-alpha.getbootstrap.com/components/card/