Project 5: Light Fields
Joyce Luong

Part 1: Focusing

To focus an image at various places given a (16 x 16) light field:

  1. Determine how the data set is indexed, which is different for every set.
  2. Determine pixel displacement in x, y directions towards the center (8, 8) image.
  3. Multiply displacements by a scalar C; the smaller, the farther the focus.
  4. (Optional) Cry because it shouldn't be so hard.
  5. Shift image the required distance into the center.
  6. Mean images together into a frame.
  7. Compile frames for many C values and make a .gif.
Left to Right: C value of 0, C value of 2, C value of 3

Displayed: Animated .gif of two results

Part 2: Aperture

To modify aperture given a (16 x 16) light field:

  1. Similar steps as above, but only take the aperture value A's worth of images around the center.
  2. For example, for A = 1, we take images from all indices in (8 +/- 1, 8 +/- 1). Then we shift and mean images with C value -1.
Left to Right: A value of 1, A value of 5, A value of 9

What I Learned Be less stubborn when recieving help from friends. Caching is really nice for debugging. IPython is the best. Also, just do enough work and move on. :)