I am trying to refocus images from a microlens array light field using Renier's Fourier Slice photo set, which can be found in his thesis, Chapter 5, Equation 5.7. You can find this at https://stanford.edu/class/ee367/reading/Ren%20Ng -thesis% 20Lytro.pdf

In other words, the Fourier slice photography set means that a photograph is the inverse 2D Fourier transform of an extended 2D layer in the 4D Fourier transform of the light field.

Part of my confusion is the notation and applying in Python to a captured light field image. At first I understand what the Fourier transform is, but when Ng says 4D Fourier transform the light field, I'm not sure how to interpret it. I currently have my light field as a NumPy array, so my values for u = i, v = j index on the different images with subaperture, each pixel in the image with subaperture having an x and y coordinate, which gives me a 4D Light field array.

```
lf_img = cv2.imread(lf_img, -cv2.IMREAD_ANYDEPTH)
row_lens = lf_img.shape(0)/14 #14 is pixels under a microlens in this direction
col_lens = lf_img.shape(1)/14 # 14 is pixels under a microlens in this direction
vp_imgs = np.zeros((14,14,int(row_lens),int(col_lens),3))
for i in range(14):
for j in range(14):
vp_imgs(i, j, :, :, :) = lf_img(i::14, j::14, 0:3) ##U,V,X,Y,(RGB)
```

Then I see pictures like this http://graphics.stanford.edu/papers/fourierphoto/ in Ng's thesis, where it looks to me like he just took the 2D Fourier transform of each lenslet and arranged it in a grid . So I'm not entirely sure how to interpret this 4D Fourier transform and how to cut. Thank you so much!

Example of what type of light field image I work with: