A strong light source in the field of view of a camera can cause small circular artifacts, known as lens flares or ghost dots, to appear at the mirror location of the light source with respect to the image center. Lens flares occur due to internal reflections within the lenses of the camera. While lens flares can be reduced with lens coatings, it is difficult to entirely eliminate lens flares. This disclosure describes software techniques to automatically detect and remove lens flare artifacts in images. Per the techniques, the presence and position of a strong light source in the field of view is detected in the captured image. Based on the detection, the flare ghosting dot is identified at the mirror location. The flare ghosting dot is masked using inpainting techniques and the result is evaluated. The described techniques can reliably remove lens flares of a wide variety of flare shapes. The techniques can be implemented in any camera device, including smartphone cameras.

Creative Commons License

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.