In this part of the project, I used the shift and add algorithm. To do this we select one image as the base image. I chose the middle image (8,8). We then calculate the offset between each image and the base image then multiply it by a factor c and shift it. Since the pictures are taken from slightly different positions depending on the scalar we focus on a specific depth.
Chessboard gif: scalar c = -0.1 through 0.7
Chessboard: scalar c = -0.1
Chessboard: scalar c = 0.1
Chessboard: scalar c = 0.3
Chessboard: scalar c = 0.5
Chessboard: scalar c = 0.7
Jelly Beans gif: scalar -0.5 through 0.1
Jelly Beans: scalar c = -0.5
Jelly Beans: scalar c = -0.3
Jelly Beans: scalar c = -0.1
Jelly Beans: scalar c = 0.1
For this part, the idea is to average (without shifting) a large number of images to emulate a picture captured with large aperture setting (blurrier resulting image) and small number of images for small aperture. We can simulate different aperture sizes by combining different amounts of pictures (to combine images we need to grow as a box in all directions i.e. 1x1 -> 2x2 -> 4x4 -> 6x6 -> 8x8). If we combine more pictures in simulates a wider aperture, while if we use fewer images it simulates a narrower aperture. Below are the results at different radius values, along with the final gif capturing the effect of aperture adjustment.
Chessboard Center
Chessboard: Box = 2x2
Chessboard: Box = 4x4
Chessboard: Box = 6x6
Chessboard: Box = 8x8
Chessboard gif
Jelly Beans Center
Jelly Beans: Box = 2x2
Jelly Beans: Box = 4x4
Jelly Beans: Box = 6x6
Jelly Beans: Box = 8x8
Jelly Beans gif
In this project, I learned how we can use light fields to simulate different photograph effects. I saw how using small angle changes in the light fields can be combined to make change when we focussed or when we change the size of the aperture.