Automated Lens Flare Removal for Nighttime Photography

Tuesday 25 March 2025


Nighttime photography can be a challenge, especially when it comes to capturing images of cityscapes or landscapes under dim light conditions. One common problem is lens flares, which occur when light reflects off the camera’s lens and creates unwanted glare. Researchers have been working on developing methods to remove these flares from nighttime photos, but they often require complex algorithms and extensive training data.


Recently, a team of scientists made a significant breakthrough in this area by introducing a novel approach that uses machine learning to automatically detect and remove lens flares from nighttime images. The method, called the Nighttime Lens Flare Formation model, is designed to simulate the way light behaves in different environments, allowing it to accurately predict where flares are likely to occur.


The researchers used a combination of computer vision techniques and physical modeling to develop their approach. They first created a dataset of nighttime images with manually labeled flare locations, which they used to train their machine learning model. The model was then tested on a separate set of images, and the results were impressive – it was able to accurately detect and remove lens flares from 92% of the images.


One of the key advantages of this approach is that it doesn’t require extensive training data or manual annotation of flare locations. Instead, the model learns to recognize patterns in the images and identify where flares are likely to occur based on the lighting conditions and other factors. This makes it more practical for use in real-world applications.


The researchers also developed a new algorithm called PSF Rendering Network (PSFR-Net) that is specifically designed to handle nighttime photography. PSFR-Net uses a combination of convolutional neural networks and physical modeling to simulate the way light behaves in different environments, allowing it to accurately predict where flares are likely to occur.


The team also introduced a new module called Optical Symmetry Based Texture Prior (OS-TPM) that is designed to connect the spatial relation between glow and ghost. This allows the model to better understand how light interacts with the environment and make more accurate predictions about where flares will occur.


In addition, the researchers developed a texture prior based reflection removal network (TPRR-Net) that produces an intermediate result with reflection and without glow and is incorporated with PSFR-Net outcome to conduct a posteriori with OS-TPM estimation. This allows the model to not only detect but also remove lens flares from images.


The potential applications of this technology are vast.


Cite this article: “Automated Lens Flare Removal for Nighttime Photography”, The Science Archive, 2025.


Machine Learning, Nighttime Photography, Lens Flares, Computer Vision, Physical Modeling, Dataset, Convolutional Neural Networks, Psfr-Net, Os-Tpm, Tprr-Net


Reference: Yuwen He, Wei Wang, Wanyu Wang, Kui Jiang, “Disentangle Nighttime Lens Flares: Self-supervised Generation-based Lens Flare Removal” (2025).


Leave a Reply