CS 194-26 Project 5 - Ryan Albert 25545558

Part 1 - Depth Refocusing

I was able to implement depth refocusing by shifting each image in my image set towards a chosen center image, which was 08_08. After shifting all the images, one can average all images in the image set to get a singluar image that represents the refocused image for that magnitude. To get the amount to shift by you take the U and V value of each image and subtract it from the U and V value of the center image to get the proper shift values. You then multiply these values by differing magnitudes to get differing depth refocused images. In my project I worked with a range of magnitudes going from 0 to 0.8 incremented by 0.1. The best results were produced from 0 to 0.5.


Depth Refocusing

mag = 0
mag = 0.2
mag = 0.4
mag = 0.55
Depth Refocusing gif

Part 2 - Aperture Adjustment

To create images mirroring different aperature settings I averaged a subset of shifted images that we got from including all images within a given radius of our center image, which was 08_08. For example a radius of 1 would have a subset including the center image and the four images that are directly horizontally or vertically connected to that image (08_07, 08_09, 07_08, 09_08). These images are than shifted relative to the center image using a magnitude of 0.4, which I found produced the best results. After these images are averaged to a singular image, which produces our aperature adjustment for radius 1. I ran aperature adjustments on a radius range from 0 to 7.


Aperature Adjustment

r = 0
r = 2
r = 4
r = 6
Aperture Adjustment gif

Summary

I thought it was very intersting to learn that you can effectively simulate how differeing aperature setting pictures will look by using different portions of light field images.