Dual Photography Lab
Published:
An interactive application implementing the dual photography technique — a computational imaging method that reconstructs how a scene looks from a projector’s point of view, even though no camera exists there. Based on the foundational work by Sen et al. (SIGGRAPH 2005).
The idea
When a projector illuminates a scene and a camera captures the result, the relationship between projected patterns and captured images is encoded in a light transport matrix T. Helmholtz reciprocity tells us that light paths are reversible: transposing T yields the “dual image” — what the projector would see if it were a camera.
What makes this interesting
This is not just a matrix transpose. The transport matrix T (of size N_camera x N_projector) encodes how every projector pixel contributes to every camera pixel through the scene’s geometry and materials, with each entry T_ij determined by the Lambertian BRDF and geometric visibility between projector pixel j and camera pixel i. The SVD decomposition T = U * Sigma * V^T reveals the scene’s optical complexity: the singular value spectrum shows effective rank (how many independent light paths exist), the condition number sigma_max/sigma_min quantifies numerical stability for inversion, and the rate of spectral decay indicates how much information can be recovered from compressed (sub-Nyquist) measurements using Bernoulli or Hadamard measurement matrices.
Features
- Ray-cast simulation: 3D scenes with occlusion and Lambertian BRDF — no physical hardware needed
- 6 scene types: From simple planes to multi-object arrangements with varying optical complexity
- SVD analysis: Interactive exploration of singular value spectra, effective rank, and condition numbers
- 10 illumination patterns: Canonical, Hadamard, Bernoulli (compressed sensing), Gray code, and more
- Physical capture mode: Optional webcam + screen-as-projector for real-world experiments
- 70 automated tests covering simulation, SVD computation, and UI interactions
Technical stack
- Backend: Python with NumPy/SciPy for ray-casting, BRDF simulation, and linear algebra
- Frontend: Dash (Plotly + Bootstrap) for interactive visualization
- BRDF models: Lambertian reflectance with configurable material properties for realistic light transport
- Patterns: Compressed sensing connections through Bernoulli measurement matrices
Live application

