NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

CodedStereo: Learned Phase Masks for Large Depth-of-Field Stereo

Shiyu Tan, Yicheng Wu, Shoou-I Yu, Ashok Veeraraghavan

Introduction

Stereo vision is a cornerstone of 3D reconstruction, yet it faces a fundamental physical constraint: the trade-off between light throughput and depth of field (DOF). To achieve high signal-to-noise ratios (SNR) in low-light conditions, a large aperture is required. However, large apertures result in a shallow DOF, causing objects outside the focal plane to blur and breaking the feature correspondence necessary for accurate stereo matching. Conversely, small apertures provide a large DOF but require long exposure times or high gain, leading to noisy images.

CodedStereo, presented at CVPR 2021, introduces a hardware-software co-design to overcome this limitation. By placing a learned physical phase mask in the camera's aperture, the system encodes depth information into the image blur, allowing for a 6x increase in the effective imaging volume compared to conventional lenses.

Methodology: End-to-End Co-Design

The core of CodedStereo is the joint optimization of physical optics and digital reconstruction. Instead of treating deblurring and stereo matching as separate post-processing steps, the authors optimize them alongside the physical properties of the camera lens.

The Phase Mask

A custom-designed phase mask—a transparent plate with a microscopic, undulating surface—is placed at the aperture plane. Unlike amplitude masks that block light, this phase mask shifts the phase of light waves to create a depth-dependent Point Spread Function (PSF). This PSF is specifically designed to be numerically invertible, ensuring that a neural network can effectively recover sharp details from the "coded" blur.

The CodedStereo end-to-end pipeline, featuring joint optimization of the phase mask and reconstruction networks.

Learning Framework

The system utilizes a differentiable RGB-Disp Simulator to model light transport through the mask. The training process simultaneously optimizes three components:

  1. Mask Height Map: The physical geometry of the phase mask.
  2. DispSharpNet: A specialized network designed to estimate disparity (depth) directly from the coded, blurry stereo pairs.
  3. RGB Reconstruction (U-Net): A network dedicated to recovering sharp, all-in-focus (EDOF) color images from the coded input.

By training the disparity network on coded images, the system learns to identify features that are robust to the specific blur patterns generated by the mask, treating blur as a depth cue rather than a source of error.

Experimental Results

The researchers validated their approach using both synthetic data (Scene Flow dataset) and a physical prototype fabricated via two-photon lithography.

Performance Gains

CodedStereo demonstrated a 600% increase in the effective imaging volume compared to a conventional lens while maintaining a high SNR (50dB). In real-world testing, the prototype operating at F/8 achieved 3D reconstruction quality comparable to a standard lens at F/32.

Comparison of depth-of-field and exposure time between CodedStereo and conventional lenses.

Low-Light Efficiency

The light efficiency of the phase mask is a significant advantage. To match the depth-of-field performance of CodedStereo, a conventional F/32 lens required a 10-second exposure. In contrast, the CodedStereo system achieved the same result in just 600 milliseconds, making it highly suitable for dynamic environments and robotics. Quantitatively, the system achieved a PSNR of 31.90 dB for image reconstruction, significantly outperforming baselines in out-of-focus regions.

Conclusion and Future Work

CodedStereo represents a significant step forward in computational photography for stereo vision. By "shaping" blur rather than attempting to eliminate it, the system turns a physical limitation into a beneficial feature. While the current implementation requires custom hardware fabrication and is calibrated to specific lens settings, it paves the way for more robust 3D sensing in challenging lighting conditions.

Summary updated

BibTeX
@inproceedings{tan2021codedstereo,
  author = {Shiyu Tan and Yicheng Wu and Shoou-I Yu and Ashok Veeraraghavan},
  title = {{CodedStereo: Learned Phase Masks for Large Depth-of-Field Stereo}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.00709},
}
Figure