{'fraction_non_alphanumeric': 0.014370245139475908, 'fraction_numerical': 0.0, 'mean_word_length': 4.861386138613861, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Detection of glare in night photography

Glare is a hardware problem that occurs because of the light trapped in the lens elements. It is a common problem faced in photography when trying to capture image of a scene having bright source in it or taken in a very bright environment. Glare can hide useful information in the image, can make foreground objects blurry and deformed. In this paper, we propose a novel method to detect glare, mainly focusing on scenario where users take photo of scene having light source in outdoor environment during night. The method described in the paper takes combination of three different masks of original image to detect the glare. First mask is obtained by image segmentation of original image using our improved Bernsen's local thresholding method. To obtain second mask, we binarize the original image by simple thresholding to get specular hot-spot of light present in the original image and for the third mask, we apply thresholding on each RGB channel of original image. Finally, glare is detected using connected component computation on aforementioned masks. The proposed solution detects the glare affected area with very good accuracy.