Depth Estimation from a Single Optical Encoded Image using a Learned Colored-Coded Aperture

Jhon Lopez, Edwin Vargas, Henry Arguello · DOI

Abstract

Monocular depth estimation is a classically ill-posed problem in computer vision due to the loss of the depth dimension during 2D projection. This paper introduces a "Deep Optics" approach that jointly optimizes a camera's hardware and software to recover depth from a single image. By placing a custom, multi-colored coded aperture (CCA) in the lens and training it alongside a neural network, the researchers encode depth information directly into the blur patterns of a 2D capture. A differentiable optical model allows for end-to-end optimization, resulting in a system that decodes these patterns into high-fidelity depth maps. The method achieves state-of-the-art performance using low-cost, easily manufacturable components.

Introduction

Estimating 3D depth from a single 2D image is a fundamental challenge. While standard solutions like LiDAR are effective, they are often expensive and power-hungry. Stereo-vision systems offer an alternative but require bulky dual-camera setups. Monocular techniques frequently rely on "Depth from Defocus" (DfD), where the characteristics of blur provide distance cues. However, standard circular apertures produce ambiguous blur patterns that limit DfD accuracy.

Previous research has explored binary masks or expensive Diffractive Optical Elements (DOEs) to improve depth cues. This paper proposes a middle ground: a high-information, low-cost color-coded aperture (CCA) optimized through deep learning to provide rich spectral information for depth reconstruction.

Methods

The authors employ an End-to-End (E2E) Optimization framework, treating the physical lens and the digital reconstruction algorithm as a single computational unit.

The Optical Layer and Differentiable Simulation

The system models the physics of light passing through a lens equipped with a grid-based CCA. Unlike earlier designs limited to two or three colors, this design utilizes four primary colors (Red, Green, Blue, and Cyan) to create distinct, color-misaligned blur patterns, known as Point Spread Functions (PSFs), for different depths. The entire image formation process is implemented as a differentiable mathematical model, allowing the depth estimation error to be backpropagated to optimize the physical aperture pattern.

The end-to-end optimization pipeline, showing the optical layer, encoded image, and U-Net decoder alongside depth-dependent PSFs.

Reconstruction and Prototyping

A U-Net architecture serves as the decoder, translating the optically encoded RGB image into a pixel-level depth map. To validate the approach, the researchers fabricated the optimized CCA by printing the pattern onto high-resolution photographic transparency film and inserting it into a standard Canon lens.

Datasets

The method was evaluated across three datasets:

  • NYU-S: A synthetic dataset derived from NYU Depth V2, up-sampled to 31-band spectral images.
  • Baek: A public dataset featuring real spectral images and corresponding depth maps.
  • Custom: A laboratory dataset captured using a tunable light source and structured light for high-quality validation.

Key Insights

  • Chromatic Aberration as a Feature: The system intentionally leverages complex color shifts—usually considered an optical defect—as unique "fingerprints" for specific distances.
  • Hardware-Software Co-design: The optimal aperture pattern is non-intuitive to human designers. By allowing the neural network to "choose" the hardware pattern, the system achieves superior accuracy compared to traditional binary or RGB masks.
  • Manufacturing Accessibility: The use of photographic film demonstrates that sophisticated computational photography can be achieved without expensive optical elements.

Key Results

The "Learned-CCA" significantly outperformed "Vanilla" neural networks and previous state-of-the-art coded apertures. On the NYU-S dataset, it achieved an RMS error of 0.147, compared to 0.208 for the Levin binary aperture and 0.224 for the Bando color aperture.

Qualitative results showing the learned CCA patterns and the resulting depth estimations for the NYU-S and Baek datasets.

The system proved robust when transitioning from synthetic simulations to real-world hardware captures, achieving results comparable to much more expensive DOEs.

Limitations and Future Work

Despite its success, the system faces challenges such as calibration sensitivity, requiring fine-tuning on real-world PSF captures to account for manufacturing imperfections. Additionally, like all coded apertures, the CCA causes some light loss, reducing the lens's effective speed. Future work may explore more complex filter materials or apply this E2E approach to tasks like spectral imaging or extended depth-of-field photography.

Summary updated

BibTeX
@article{lopez2024depth,
  author = {Jhon Lopez and Edwin Vargas and Henry Arguello},
  title = {{Depth Estimation from a Single Optical Encoded Image using a Learned Colored-Coded Aperture}},
  journal = {IEEE Trans. Computational Imaging},
  year = {2024},
  doi = {10.1109/tci.2024.3396700},
}
Figure