{'fraction_non_alphanumeric': 0.03584338264329759, 'fraction_numerical': 0.01303119589319887, 'mean_word_length': 4.6209663650332935, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An algorithm for glare detection via photometric, colorimetric, and global positioning features

Biological and automated vision systems which use digital video for navigation depend on the video to be of sufficient quality in order to extract reliable information that can inform the guidance and/or other decision-making processes. Although systems are available for detection and mitigation of digital distortions (e.g., compression, packet loss), detection and mitigation of natural distortions such as glare, rain, and fog have received much less attention. In this paper, we address the issue of glare detection in a single captured frame. We propose an algorithm which uses a combination of simple and efficient photometric, colorimetric, and GPS features to detect the location and spatial extent of glare within captured images. Specifically, feature maps using lightness, saturation, contrast, and color distance are computed, combined, and then, refined based on the sun’s predicted location from the GPS information. In addition, we present a new ground-truth database for glare detection, in which the location, extent, and severity of glare was rated by human subjects for a collection of images. Testing on our ground-truth database revealed that the proposed algorithm can reliably detect the locations and spatial extents of glare sources in a variety of images based on subjective ratings and well-known quantitative measures.


INTRODUCTION
A very common occurrence during navigation is the presence of overly intense light that can overwhelm the driver or the visual sensors of an autonomous ground vehicle, and thereby reduce visibility. When dazzled by a light source, typical reactions by the drivers are (1) flipping down the sunshades, which is not always effective, especially when the glare is caused by a low-positioned external light source, e.g., low sun or direct light from the headlights of an oncoming vehicle; [1] (2) using one hand to occlude the strong light source from the eyes of the driver, which is not safe and can block the view of some important obstacles on the road; and (3) wearing sunglasses, which has comfort issues. [2] For autonomous vehicles, which depend on onboard cameras for navigation, none of these reactions is possible, thus resulting in the partial or full loss of environment perception and subsequent failures.
Although the detection of glare is an important problem, there are relatively few publications on glare detection using digital cameras. [3][4][5][6][7][8][9][10] The existing approaches to glare detection generally rely on one or two simplistic image properties, followed by ad-hoc thresholding. The obvious and most commonly used feature is light intensity, [3,4] which can certainly detect the light source(s), but which cannot differen-tiate these sources from other bright regions (e.g., clouds), as demonstrated in Figure 1. Note that these bright regions also saturate the camera CCD array, and thus a hard threshold cannot separate them from the main glare source. To overcome this limitation, other approaches supplement intensity with hue, followed by spatial filtering or transformations. [5,6] However, the color of the sun changes based on its elevation; thus, hue alone often fails to delineate the boundaries of the glare region(s), particularly when the image is subject to compression, as demonstrated in Figure 2. In our previous work, [9] we used saturation instead of hue, taking advantage of the fact that glare regions typically have low saturation; however, many other regions in the scene also have low saturation. Instead of analyzing the scene, another class of approach has focused on analyzing an image of the driver's face. [7,8] Unfortunately, this approach cannot be used in autonomous systems nor in scenarios where the driver's environment is different from the actual to-be-driven location (e.g., in remote navigation). . Previous approaches have used intensity and hue; part of our approach uses intensity and saturation, the latter being more reliable at detecting the spatial extent of each glare region Deep learning has been utilized in the work by Jatzkowski et al. [13] to determine whether overexposure (which is not always as detrimental to the driver's vision as glare) exists in an image. Although this work shows relatively high accuracy, it cannot locate the overexposure source in the image and so, it cannot be used for glare suppression. Furthermore, subjective ratings were not reported to confirm the visual impact of the overexposure as judged by different observers. The authors mentioned that there is no large database on glare images and the number of training images (almost 12,000) they used is not sufficient for training a deep neural network. They also admitted the problem of bias in training a convolution network and the fact that their training set only covers a portion of what can be seen in real-life conditions, which makes it impossible to guarantee this method's accuracy when being tested on different images.
In this paper, we present an algorithm for glare detection that can detect the presence of glare from a single frame, and which can be used in autonomous or remote navigation settings (i.e., which does not rely on the analysis and copresence of a human driver). Our approach employs an adaptive combination of features which remain computational simplistic, but which can reliably detect both the location(s) and extent(s) of the glare region(s). We specifically use a combination of: (1) the intensity, saturation, and local contrast of the input frame; (2) the solar azimuth and elevation computed based on the position and heading information from the GPS (used under daylight conditions); and (3) the difference in color from the expected sun's color given the solar elevation information. These data are used to generate a glare occurrence map that indicates the center location(s) and extent(s) of the glare region(s).
The main contributions of this work are as follows: To the best of our knowledge, our approach is the first to use a combination of photometric, colorimetric, and GPS information to perform glare detection. For the photometric/colorimetric approach, we propose a combination of lightness, color distance, saturation, and local contrast that performs more reliably than previous approaches, and which does not require facial analysis of the assumed co-located driver. In addition, to the best of our knowledge, our approach is the first to make use of the sun's azimuth and elevation to further refine the localization process. Furthermore, we have created a large database of glare images with human subjective markings of the glare center, boundary, and visibility impairment ratio, and we have analyzed the performance of our algorithm on this database. This is the first such database of glare images with subjective ratings, which can be used as a benchmark for evaluation of glare detection algorithms. This paper is organized as follows. In the Algorithm section, we provide details of the algorithm. In the Ground-Truth Glare Database section, we describe the procedures and images used in our glare-rating experiment. In the Results and Analysis section, we evaluate and discuss the performance of the algorithm. General conclusions are provided in the Conclusions section.

METHOD
In this section, we describe the proposed algorithm, which operates by using a combination of image-based and GPSbased features. A block diagram of the algorithm is shown in Figure 3. The input is an RGB digital image (or single video frame), along with GPS information (if available). The output is a map denoting the location and extent of the glare. In the following subsections, we describe the algorithm's two main analysis stages.

Image-based glare occurrence map
Glare regions in an image often have characteristic photometric and colorimetric properties that can be used to detect glare regions given an input image/frame. The most obvious visual feature for glare detection is brightness. Regions in an image, which have the greatest intensity, are good candidates for glare regions. However, high intensity alone can give rise to false positives; thus, in addition to intensity, we also employ saturation and contrast features. Specifically, glare regions not only tend to be of high intensity, but also generally have low color saturation and low luminance contrast. Finally, we observe that the color of the sun can be estimated based on the date, time, and global position; thus, we employ color distance as a fourth feature. In this section, we describe how these features are computed and combined into a predicted glare occurrence map.

Lightness
To estimate the perceived intensity at each location, we use the lightness channel from the CIE 1976 (L * , a * , b * ) color space (CIELAB). Let I R G B ∈ Z W ×H×3 denote the input RGB digital image with pixel values in the range from [0,1], where W and H denote the image's width and height in pixels respectively. We convert the image into the CIELAB color space assuming sRGB as the input color space and D65 (daylight) as the illuminant.
Let R , G , B denote the nonlinear R, G, and B color values at a particular location of the input image. The conversion to CIELAB is implemented by first linearizing the R ,G ,B values to be proportional to light energy, assuming the sRGB color space: The linearized I R , I G , I B values are then converted to the CIE XYZ color space as: Finally, the L * , a * , b * values are given by: where X r = 0.950456, Y r = 1, Z r = 1.088754 are the CIE XY Z tristimulus values of the D65 reference white point; and the function g is given by: Note that equations (1) to (8) and all the coefficients used in them are standard conversion formulas between RGB and CIELAB color spaces.
We compute L * (x, y), a * (x, y), b * (x, y) for each pixel (x, y) of the input image. Our brightness feature map, denoted by V ∈ Z W ×H is given by the lightness values normalized to span the range [0, 1]: (9) for all pixel coordinates x and y in the ranges and x ∈ [0, W − 1] and y ∈ [0, H − 1].
The second column of Figure 4 shows the resulting lightness maps for several example input images (shown in the first column of Figure 4); larger values denote higher lightness.

Saturation
Regions with low color saturation are also good candidates of the central glare sources. We use the a * and b * values to obtain the color saturation of each pixel. Let S ∈ R W ×H denote this saturation feature map, which is computed as follows: (10) where the denominator 110 √ 2 serves to normalize the S(x, y) values to lie in the possible range of [0, 1]. Equation The third column of Figure 4 shows the resulting saturation maps for the example input images; note that reverse satura-tion maps (1 − S) are shown in which larger values denote lower saturation. Figure 4. Four example input images and the resulting lightness, saturation, contrast, and color-distance maps. Note that the leftmost three maps are shown with a reverse intensity scale (i.e., 1 − M, where M = S, C, or D) so that larger map values denote greater predicted glare.

Contrast
Glare regions also tend appear to be of low luminance contrast, due in part to the limited dynamic range and compressive nonlinearity used in most imaging devices (including the human visual system). We measure the root-mean-square contrast [11] locally for each 8 × 8 block of V , collecting the results into a map. Let C ∈ R W ×H denote this contrast feature map, which is computed as follows: (11) where L(x, y) = [0.02874 × 255 × V (x, y)] 2.2 denotes the estimated luminance; where (x , y ) denote the coordinates corresponding to the 8 × 8 block centered at (x, y); andL (x, y) denotes the mean luminance of that block. We use a lower limit of 10 in the denominator to avoid disproportionately large contrasts. We use non-overlapping blocks, and thus Equation (11)  The fourth column of Figure 4 shows the resulting contrast maps for the example input images; note that reverse contrast maps (1 − C) are shown in which larger values denote lower contrast.

Color distance
The color of the sun changes depending on the position of the sun within the sky. At its highest position, the sun appears white, whereas a setting/rising sun appears much more orange. As we discuss later in Section 2.2, it is possible to compute the elevation angle of the sun given the date, time, and GPS information. We use this angle to compute an estimate of sun's average b * value, and then compute a color distance map based on the difference between each pixel's b * and the sun's average b * .
Let e sun denote the solar elevation angle (see Section 2.2). From esun, we use the following the empirically obtained mapping to estimate the sun's average b * , denoted by b * sun , as follows: (12) Then, let D ∈ R W ×H denote a color distance (specifically, a b * difference) feature map, which is computed as follows: (13) followed by two adjustments: (1) normalization of D to span the range [0, 1], and then (2) explicitly setting D(x, y) = 0 for extremely bright locations indicated by V (x, y) > 0.975.
The fifth column of Figure 4 shows the resulting colordistance maps for the example input images; note that reverse color-distance maps (1−D) are shown in which larger values denote smaller distance.

Combination of feature maps
To detect regions that are jointly of high lightness, low saturation, low contrast, and low color distance, we combine the individual feature maps to obtain a single image-based glare occurrence map, which we denote as G img . For this combination, we use a simple pointwise multiplication, as follows: followed by normalization of G img to span the range [0, 1]. Thus, larger values in G img denote regions of high lightness, low color saturation, low luminance contrast, and low color distance, which we estimate to be the most likely candidates of glare regions. Note that the power and multiplication operators in Equation 14 are point-by-point operators.
The second column of Figure 5 shows G img for the same example input images shown previously in Figure 4. The lightness and color-distance maps are generally quite effective at capturing the full extent of the glare, whereas the saturation and contrast maps can serve to refine this prediction. Accordingly, in the product in Equation 14, we use a power of 2 for the lightness and color-distance maps in order to provide these maps extra influence over the final result.

GPS-based glare occurrence map
During the daytime, when GPS information is accessible, the physical position of the sun (i.e., the solar azimuth and elevation) can be computed based on the vehicle's latitude and longitude, and the date, time, and time zone. By using this solar azimuth and elevation, and given the direction in 3D space in which the camera is facing, the position of the sun within the image frame can be computed.
Let a sun and e sun denote the solar azimuth and elevation angles, respectively. Let acam denote the camera's heading angle with respect to North, and let HFOV and VFOV denote the camera's horizontal and vertical fields of view. Let ecam denote the slope of the camera with respect to horizontal (ground), which can be estimated based on the camera's mounting conditions and the vehicle's recent elevation readings.
The image coordinates of the sun's center, denoted by x sun and y sun , can be calculated via: where, again, W and H denote the width and height of the image.
By using (x sun , y sun ), we generate a GPS-based glare occurrence map, denoted by G sun ∈ R W ×H , which is an otherwise blank map containing a single Gaussian function centered at x sun , y sun ). G sun is computed as follows: (17) where σ determines the size of the Gaussian, and thus the size of the sun within the image.
Note that σ cannot be chosen arbitrarily; if σ is too small, G sun could miss a considerable portion of the glare region (leading to false negatives), whereas if σ is too large, G sun might include unwanted non-sun regions (leading to false positives). To estimate an appropriate value for σ, we use G img as follows: (1) First, we binarize G img using a threshold of 0.975 to capture only those regions with high glare probability The third column of Figure 5 shows G sun for the same example input images shown previously in Figure 4. Finally, we combine G img and G sun to generate an overall glare occurrence map, which we denote by G ∈ R W ×H . There are numerous ways in which the maps can be combined, and indeed, the requirements of each particular naviga-tion setting can dictate the proper way to use and/or combine the maps. For example, in an autonomous or remote navigation setting, one reasonable goal would be to mitigate the effects of the glare by obscuring the sun from the camera, or by selectively darkening the glare regions either digitally of physically. In this case, the location, extent, and intensity of each glare region is needed, and thus an overall map from which this information can be extracted would be useful.
We have tested a variety of fast and simple methods of combining G img and G sun . We have found that the following simple product tends to yield the good overall results across a variety of scenes: Note that the multiplication is a pointwise operation performed on individual pixels of the maps. Figure 5 shows G img , G sun , and G for the example images shown previously in Figure 4. Observe that the combination of Gimg and Gsun is generally effective at refining the result to better highlight the single strongest source of glare while reducing erroneous detections.

GROUND-TRUTH GLARE DATABASE
Because glare is a visual sensation, it is necessary to obtain human judgments of glare as perceived when viewing the captured image; this condition is a reasonable representation of the condition faced when using the captured images for navigation or decision-making. To this end, and to serve as a ground-truth dataset for both our current method and for future use by other researchers, we created a database of images containing various amounts of glare along with subjective data. Specifically, for each image, human subjects labeled the center and boundary of the primary glare region, and they provided a rating of the perceived impairment caused by the glare.

Database stimuli
Thirty images were used as stimuli in the rating experiment and are contained in the database. All of the images were captured outdoors, during the daytime, in Shizuoka Prefecture, Japan, by using the rear-facing camera of an iPhone 6 (iSight) at its default exposure settings. The images were of size 3264 × 2448 or 2448 × 3264 pixels, with 24 bits of color resolution per pixel. The images were taken to expressly capture the sun and/or its reflections at various positions, colors, shapes, and extents, across a range of times (early morning until late afternoon). Figure 6 shows the 30 images. Eight male subjects participated in the experiment: KK (the second author), YK, DI, YO, YK2, YZ, KK2, and YM. All subjects had self-reported normal or corrected-to-normal vision. The subjects ranged in age from 22 to 31 years old.

Database procedures
The images were presented to the subjects by using the GNU Image Manipulation Program; [12] zooming and panning were allowed, but other adjustments were prohibited. The subjects were instructed to provide for each image the following data: (1) Center: Subjects specified the center location of the primary source of glare by using the pencil tool to mark a dot on an separate layer in GIMP. (2) Boundary: On a separate layer in GIMP, subjects used the pencil tool to trace the boundary of what they considered to be the primary glare region; subjects were also instructed to close the boundary. The 30 images were divided into two sets of 15 images; each subject viewed and marked one set of 15 images. Although no time limit was imposed for the experiment, most subjects finished each set within 60 minutes.

Database results
The results for the images in the database are provided in Figure 7 and Table 1. Figure 7 shows the average perceived glare occurrence map (computed from the boundary data) for each corresponding original image shown previously in Figure 7. The corresponding average center locations (computed from the center data) and average VIR data are listed in Table 1. Specifically, from the subjective boundary data from all subjects, we computed for each image a so-called average perceived glare occurrence map. This map was generated by first generating a binary map from each subject's closed boundary, in which the center of the boundary was set to a value of 1, and outside of the boundary was set to zero. Next, the per-subject binary maps for each image were averaged to generate the glare occurrence map. A value of 1 indicates that all subjects considered the corresponding location to contain glare, whereas a value of 0 indicates that no subject considered the corresponding location to contain glare. As can be seen from the results, this judgment varied between subjects; in terms of the size of the boundary, the average correlation coefficient between any given subject and the average of all subjects was approximately 0.7. However, for all images there was always a core area in which all subjects agreed (denoted by a value of 1 in the resulting maps). From the center data from all subjects, we computed for each image the average x-coordinate and average y-coordinate, thus yielding a ground-truth center location for each image (see Table 1). Overall, the subjects were in high agreement with each other in regards to the center locations; the correlation coefficient between any given subject and the average of all subjects was consistently greater than 0.9.
From the VIR data, for each image, we computed the average VIR and the standard deviation of this average across subjects (also shown in Table 1). The subjects generally agreed with each other; the largest standard deviation (of approximately 20%) occurred for image #20; the lowest standard deviation (4%) occurred for image #24. The average correlation coefficient between any given subject and the average of all subjects was 0.8.

RESULTS AND ANALYSIS
In this section, we present and discuss the results of the proposed algorithm in terms of its ability to estimate the glare occurrence maps in the database described in the previous section. (We do not test the prediction of the center locations nor the VIR ratings; although it may certainly be possible to predict these latter data, the proposed algorithm was not designed for this purpose.) For the results described here, the original 3264 × 2448-pixel or 2448 × 3264-pixel input images were resized via bicubic resizing with antialiasing to 816 × 612 pixels or 612 × 816 pixels, respectively. Figure 8 shows the input images, the average ground-truth markings, the intermediate maps (G img and G sun ), and the overall glare occurrence map (G) for the images in the database. As demonstrated by these results, the proposed algorithm is generally effective at capturing the center and extent of the glare. Regarding detection of glare region boundaries, predictions by our algorithm match the ground-truth data the best for images #1, #3, #5, #7, #8, #10, #11, #15, #19, #20, #22, #27, #28, #29, and #30. For images #3, #5, #7, #8, #15, #19, #20, #22, #27, #29, and #30, the algorithm can even capture the soft boundary around the primary glare region. However, for images #2, #9, #12, #16, #17, #18, #21, #23, and #24, the algorithm cannot find the entire extent of the glare region. A common property of these latter images is the existence either (1) long sun rays; or (2) large halo regions around the sun with an orange/red color; these features are suppressed in our algorithm due to the use of a Gaussian kernel of limited size for G sun (suppresses long sun rays) and the use of an experimentally-determined color for the sun which is closer to yellow than red (suppresses the halo). Also, note that for images #27 and #28, the algorithm cannot fully capture both the halo regions and the long rays at the same time, although it is able to achieve a reasonable balance.

Qualitative results
It worth mentioning that sun rays do not occupy large areas of the camera field of view and thus will not be as impairing as the center region of the glare. Since the halo regions have smaller light intensities, they are not as dazzling as the center glare region. Our algorithm detects these center regions in most of the images (as the Gaussian kernel intensity also drops as one moves away from the center) but might not detect the entire halo region. Therefore, using a simple Gaussian kernel for G sun might be preferred over more advanced kernels (e.g. fan filters that might also detect rays) due to its smaller computational burden. Table 2 lists the quantitative results of the proposed algorithm on each of the 30 images in the database. We evaluated the ability of the algorithm to predict the ground-truth glare maps in terms of linear correlation coefficient (CC), Kullback Leibler divergence (KLD), and root mean-squared error (RMSE) between the ground-truth map and the predicted map. We also evaluated the ability of the algorithm to act as a binary classifier to determine the presence or absence of glare at each location) by using Precision, Recall, and F α . For the binarization needed in the latter evaluation, we used thresholds of 0.5 and 0.75 (with maps ranging from 0 to 1), corresponding to at least 50% and at least 75% of the subjects agreeing that a particular location contained glare. As shown in Table 2, the algorithm generally demonstrates good predictive performance in terms of CC, KLD, and RMSE. The best correlation coefficients (CC > 0.92) occurred for images #1, #2, #11, #7, #10, and #29. Images #1, #2, #11, #7, and #10 also yielded the best KLDs (KLD < 0.3).

Overall prediction performance
Images #1, #13, #7, #14, and #29, #20, #30 yielded the best (lowest) RMSEs (RMSE < 0.035). The worst result in terms of CC was obtained for image #24, due to the inability of the algorithm to capture the full spatial extent of the glare cast below the sun indicated by one of the subjects. The worst result in terms of KLD was obtained for image #9 due to the algorithm not being able to fully capture the long rays. In terms of RMSE, the worst result was obtained for image #17, due to the inability of algorithm to fully capture the relatively large diameter of the glare indicated by two subjects.
In terms of the ability of the algorithm to determine the presence or absence of glare, the performance is also generally quite good. On average, F α is greater than 0.75 for detecting the presence/absence of glare using a binarization threshold of 0.5; and F α is greater than 0.84 for detecting the presence/absence of glare using a binarization threshold of 0.75. For the T = 0.5 condition, the best results occurred for images #1, #5, #11, #20, and #27. The worst results occurred for images #17 and #28 (the algorithm does not fully capture the extent of the glare surrounding the sun). For the T = 0.75 condition, the results are satisfactory for most of the images with the exception of underestimates of the glare extents in images #13 and #23.

Contributions of the individual features
To examine the contributions of each of the individual feature maps used in the algorithm to the overall prediction performance, we generated predictions by using only one or two of the feature maps at a time. Specifically, we generated predictions by using only (G img , only G sun , only (G sun and V, only (G sun and S, only (G sun and C, and only (G sun and D. Because the final maps predicted by using only selective feature maps generally predicts broader glare areas than the ground-truth maps, values less than 0.25 were set to zero, and the remaining values were rescaled to span the range [0, 1]; this scheme generally allowed the individual predictions to perform much better than by using only the raw predictions. For the performance measure, we used correlation coefficient. Evaluations are shown in Table 3. The first column of Table 3 shows the CC values for the full algorithm (repeated from Table 2). The second and third column show the CC values obtained using only G img (i.e., no G sun ) and only G sun (i.e., no G sun ), respectively. Observe that although there certainly are cases in which only G img or G sun can perform equal or even better than the combination used in the proposed algorithm, always using just G img or always using just G sun does not yield consistent results across the images. For these images, the combination yields a higher CC approximately 60% of the time.
The fourth through seventh columns of Table 3 show the CC values obtained using a product of G sun and only one of the constituent features maps from G img (V or S or C or D). Again, although there certainly are cases in which only Gsun and an individual map can perform equal or even better than the combination used in the proposed algorithm, much more consistent performance across all of the images is obtained by using the full combination. Comparing the average CC values for the individual constituent maps, V and D appear to have a greater contribution to the overall performance as compared to S and C. The proposed combination provides a reasonable balance between leveraging the strengths of the individual maps and compensating for the weaknesses of sometimes-erroneous detections on certain images/regions.

Relative computation times
Finally, we briefly analyzed the relative run-times required for computing the various features used in the algorithm. Although our current implementation of the algorithm consists only of an unoptimized Matlab version, it is still informative to compare the relative amounts of time required for each major computation of the algorithm. This timing analysis was performed on a desktop PC with the following specifica-tions: CPU: Xeon X5670 @ 2.9 GHz; RAM: 12 GB DDR3; Software: Matlab 2016b (Version 9.1). The code was not explicity written to use multiple cores. The timing results are shown in Table 4; these results represent the average runtimes (and the standard deviations) for the first 10 images in the database. As can be seen from the data in Table 4, the two most timeconsuming computations are the color-space conversion from RGB to L * a * b * , and the computation of the contrast map. The exponentiations (power operators) in Equations (1) and (8) account for much of the time required for the color-space conversion; if these can be approximated or possibly implemented differently, significant time-savings could likely be realized. The computation of the contrast map is also relatively time-consuming due both to the exponentiation and the block-based local contrast computation; the latter was implemented via two nested loops in Matlab, which is notoriously inefficient. Although the current total time of this Matlab implementation is approximately 0.5 seconds per image, we believe that significant speedups could be realized by using parallel computations and a different programming language.

CONCLUSIONS
In this paper, we have presented an algorithm for glare detection and a database for its evaluation. The proposed algorithm uses a combination of photometric, colorimetric, and GPS features to detect the location and spatial extent of glare within captured images. Specifically, feature maps using lightness, saturation, contrast, and color distance are computed, combined, and then refined based on the sun's predicted location from the GPS information. Testing on the database revealed that the proposed algorithm can reliably detect the locations and spatial extents of glare sources in a variety of images based on subjective ratings and well-known quantitative measures. Furthermore, our testing revealed that no single feature alone could provide consistent detection performance across all of the images in database; the proposed combination of all of the feature maps, however, was able to achieve a relatively consistent performance.

FUTURE WORK
We have considered the following goals for our future work: The first goal is real-time implementation of our algorithm in driving vehicles in order to effectively darken the windshield and suppress the glare source without entirely occluding the driver's field of view. The second goal is to create a large database for glare images from a variety of real-life situations that can be used by other researchers and to train a deep neural network for locating the glare source in the captured frame and then to compare the accuracy and computational speed of deep leaning vs. our photometric and GPS features.