Light Field Vision
Module: Computer Vision | Difficulty: Advanced
Light Field Parameterization
Two-plane parameterization: where is the lens plane and is the focal plane.
Synthetic Refocusing
Epipolar Plane Image (EPI)
Slice shows disparity as slope:
Depth from Focus
import numpy as np
def refocus_lightfield(LF, alpha):
B, U, V, H, W, C = LF.shape
result = np.zeros((H, W, C))
for u in range(U):
for v in range(V):
shift_x = int((u - U//2) * (1 - 1/alpha))
shift_y = int((v - V//2) * (1 - 1/alpha))
shifted = np.roll(np.roll(LF[0, u, v], shift_x, axis=1), shift_y, axis=0)
result += shifted
return result / (U * V)
Key Takeaways
- Light fields capture both spatial and angular information
- Synthetic refocusing enables post-capture focus adjustment
- EPI analysis reveals depth through disparity patterns