Fall 2018
CS194-26: Image Manipulation and Computational Photography

Jack Wang
SID: 26862566
cs194-26-agk

Project 5: Lightfield Camera


Part1: Depth Refocusing


To do this, first I processed the data. For each image, I noted their relative positions as well as the u, v floating point values associated with the image. I also keep track of the average u and the average v.

Then to calculate the shift of each image, the y shift is simply the c*(u_i - u_avg) and the x shift accordingly is c*(v_i - v_avg). The c constant takes values of 0.1, 0, -0.1, -0.2, -0.3, -0.4, and -0.5. With the 0.1 value giving it the furthest focus and the -0.5 value giving it the closest focus.

Each image was shifted accordingly and then averaged for each of the values of c.


Here are the pictures

Figure 1: c = 0.1

Figure 2: c = 0.0

Figure 3: c = -0.1

Figure 4: c = -0.2

Figure 5: c = -0.3

Figure 6: c = -0.4

Figure 7: c = -0.5


Here is a gif of the transformation

Part2: Aperture Adjustment

For this one I averaged nxn squares where n is an odd number and these squares are centered around the middle (8, 8). The greater the n, the smaller the depth of field. So for example, the largest depth of field is simply just the image at (8, 8). The next one is the square defined by (7,7) and (9,9). The next one,(6, 6) and (10, 10), etc.

Here are some examples of these simulated varying depth of field.

Figure 1: largest depth of field (1x1 square)

Figure 2: medium depth of field (9x9 square)

Figure 2: tiny depth of field (17x17 square)

Here is a gif of this varying aperture

Take Aways
I learned of the Lytro camera a while ago and I always thought that it was very interesting. While it did not perform very well in the consumer camera industry, I know that it is making breakthroughs in industry video cameras as the feature of adjusting focal points and aperture sizes after the shoot are very good things to have in video post processing. This project was interesting as I basically learned how light field cameras work to achieve these effects and I appreciate technology like the Lytro camera even more.