Learning Latent Transmission and Glare Maps for Lens Veiling Glare Removal

Xiaolong Qian, Qi Jiang, Lei Sun, Zongxi Yu, Kailun Yang, Peixuan Wu, Jiacheng Zhou, Yao Gao, Yaoguang Ma, Ming-Hsuan Yang, Kaiwei WangarXiv 2025 · DOI · arXiv

Introduction

The trend toward ultra-compact imaging systems in smartphones and AR/VR headsets has led to the adoption of simplified optics, such as single-lens designs or flat metalenses. While these designs offer significant space savings, they introduce severe image degradation in the form of optical aberrations and veiling glare. Unlike localized lens flares, veiling glare manifests as a global, hazy loss of contrast caused by light scattering within the lens assembly. Traditional restoration methods often struggle with this phenomenon because it does not follow standard atmospheric dehazing models and is difficult to simulate accurately for training.

The Physics of Glare Formation

Veiling glare is a complex degradation that combines design-induced blurs (aberrations) with a diffuse "veil" of stray light. This stray light is typically caused by imperfections in lens surfaces, coatings, or internal reflections. Modeling this accurately is challenging because obtaining paired "clean" and "glare-filled" images in real-world settings is nearly impossible.

Formation of glare and comparison of restoration performance.

Methodology: The DeVeiler Framework

To address these challenges, researchers developed DeVeiler, a three-stage framework that integrates generative AI with physical modeling to remove glare effectively.

1. Physics-Informed Data Synthesis (VeilGen)

Since real-world paired data is scarce, the authors created VeilGen, a generative model based on Stable Diffusion. It incorporates a Latent Optical Transmission and Glare Map Predictor (LOTGMP). This module learns to estimate how light is attenuated and where glare is added, allowing the system to synthesize realistic, glare-degraded training pairs from clean images.

2. Knowledge Distillation

To make the system practical for training, the complex behavior of the diffusion-based VeilGen is distilled into a lightweight Distilled Degradation Net (DDN). This smaller network mimics the glare formation process at a fraction of the computational cost.

3. Restoration with Reversibility (DeVeiler)

The final restoration network, DeVeiler, utilizes a Veiling Glare Compensation Module (VGCM). Its key innovation is a reversibility constraint: the network must be able to both remove glare and, using the DDN as a reference, re-apply the same degradation consistently. This ensures the model learns the underlying physics of light transmission rather than simply hallucinating pixels.

Experimental Results

The framework was evaluated on datasets captured with Single Lens (SL) and Metasurface-Refractive Hybrid Lens (MRL) systems. DeVeiler demonstrated significant improvements over existing state-of-the-art methods:

  • Quantitative Performance: On the Screen-Compound dataset, DeVeiler achieved a PSNR of 22.38 dB, significantly outperforming standard aberration correction (18.18 dB) and cascaded dehazing methods (19.31 dB).
  • Qualitative Quality: As shown in the comparison figures, DeVeiler restores crisp details and natural contrast without the color shifts or residual haze common in other approaches.
  • Efficiency: The restoration network operates with a latency of approximately 0.387 seconds on an NVIDIA A100, making it feasible for high-resolution image processing.

Conclusion and Future Work

DeVeiler represents a significant step forward in computational photography for simplified optics. By using latent maps to bridge generative modeling and physical restoration, it effectively clears the "fog" of veiling glare. Future research may focus on addressing saturation issues in extremely bright regions and incorporating 3D scene information to handle depth-dependent aberrations.

Summary updated

Abstract

Beyond the commonly recognized optical aberrations, the imaging performance of simplified optical systems--including single-lens and metalens designs--is often further degraded by veiling glare caused by stray-light scattering from non-ideal optical surfaces and coatings, particularly in complex real-world environments. This compound degradation undermines traditional lens aberration correction yet remains underexplored. A major challenge is that conventional scattering models (e.g., for dehazing) fail to fit veiling glare due to its spatial-varying and depth-independent nature. Consequently, paired high-quality data are difficult to prepare via simulation, hindering application of data-driven veiling glare removal models. To this end, we propose VeilGen, a generative model that learns to simulate veiling glare by estimating its underlying optical transmission and glare maps in an unsupervised manner from target images, regularized by Stable Diffusion (SD)-based priors. VeilGen enables paired dataset generation with realistic compound degradation of optical aberrations and veiling glare, while also providing the estimated latent optical transmission and glare maps to guide the veiling glare removal process. We further introduce DeVeiler, a restoration network trained with a reversibility constraint, which utilizes the predicted latent maps to guide an inverse process of the learned scattering model. Extensive experiments on challenging simplified optical systems demonstrate that our approach delivers superior restoration quality and physical fidelity compared with existing methods. These suggest that VeilGen reliably synthesizes realistic veiling glare, and its learned latent maps effectively guide the restoration process in DeVeiler. All code and datasets will be publicly released at https://github.com/XiaolongQian/DeVeiler.
BibTeX
@misc{qian2025learning,
  author = {Xiaolong Qian and Qi Jiang and Lei Sun and Zongxi Yu and Kailun Yang and Peixuan Wu and Jiacheng Zhou and Yao Gao and Yaoguang Ma and Ming-Hsuan Yang and Kaiwei Wang},
  title = {{Learning Latent Transmission and Glare Maps for Lens Veiling Glare Removal}},
  year = {2025},
  eprint = {2511.17353},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.17353},
}
Figure