Static Filtered Sky Color Constancy

In Computer Vision, the sky color is used for lighting correction, image color enhancement, horizon alignment, image indexing, and outdoor image classification and in many other applications. In this article, for robust color based sky segmentation and detection, usage of lighting correction for sky color detection is investigated. As such, the impact of color constancy on sky color detection algorithms is evaluated and investigated. The color correction (constancy) algorithms used includes Gray-Edge (GE), Gray-World (GW), Max-RGB (MRGB) and Shades-of-Gray (SG). The algorithms GE, GW, MRGB, and SG, are tested on the static filtered sky modeling. The static filter is developed in the LAB color space. This evaluation and analysis is essential for detection scenarios, especially, color based object detection in outdoor scenes. From the results, it is concluded that the color constancy before sky color detection using LAB static filters has the potential of improving sky color detection performance. However, the application of the color constancy can impart adverse effects on the detection results. For images, the color constancy algorithms depict a compact and stable representative of the sky chroma loci, however, the sky color locus might have a shifting and deviation in a particular color representation. Since the sky static filters are using the static chromatic values, different results can be obtained by applying color constancy algorithms on various datasets. Keywords—Static Filter; Color Constancy; LAB color space; Sky Color Detection; Horizon detection


INTRODUCTION
In Computer Vision, the color based horizon/sky detection is used for lighting enhancement, image color enhancement, horizon alignment, image indexing, outdoor image classification and in countless many other applications [1].From applications perspectives, the sky color is the most important feature that can be visualized in the outdoor scenes and image [2].In a chromatic image, a set of pixels or region depicts a sky color if it corresponds to a set of color tones (blue to white) in the particular scene.In general, a pixel or region depicts sky region, if it corresponds to an image of the horizon [2].The successful detection of sky region in an image facilitates a variety of imaging tasks, especially, the image based visual quality enhancement and object based manipulation tasks.
From the color perspective, the sky color falls in the area of ranging from blue tone to half white.However, this is the ideal scenario.Due to the atmospheric conditions, somewhere, other components are also present in sky patch.This naturally unbounded domain of the sky color ranges makes it a difficult proposition for the algorithms to optimally and correctly detect sky color in unconstrained environments.The challenges for optimally detecting the color ranges of the sky include mostly the clouds color, planes, sun alignment in the sky, forests, water and seas and other confused sky-like backgrounds in outdoor images.
The color of the sky in any digital image is possible to be detected from the image pixel values alone.This unique property benefits the processing speed of the algorithm.The algorithm thus based on color pixel alone can be executed extremely fast compare to the region based and complex features extraction based detection techniques.This also helps in the creation of a real-time sky color based detection and image enhancement algorithm.Moreover, regarding the color based sky detection; the detection is thus independent of image dimensions and pixels or scene orientation [3].From the inherent nature of the pixel based sky detection, it is significantly dependent on the lightning variations in the image.Therefore, the strength of the algorithms is limited in uncontrolled (natural scenes and different lighting conditions) environments.This research work thus tackles the problem of lighting corrections for sky detection.Zafarifar et al. [4] describe horizon detection approach using two features.There method takes benefit of the adapting positioning and color based analysis for sky segmentation and the extraction of the horizon part in an image/video.Authors advocate that the proposed algorithm produces superior performance compared to the state-of-the-art approaches especially, in natural outdoor image and scenes.Schmitt et al. in [5] use color, shape and position vector as an input feature for the position of the sky detection in an image.The performance their method is measured and tested on a number of out-door images and in different weather and lighting conditions.The authors in their work describe the superior performance of their algorithm compared to the other similar algorithms in separating sky regions from non-sky regions under different weather conditions.The authors in [6] develop sky color based solar exposure system using the image processing techniques, segmenting the outdoor images recorded under different lighting conditions.Authors in [7] explain through physics phenomenon that due to the properties of light scattered by small particles in the atmosphere, the clear color of the sky often appears deep, saturated blue shade at the top of the image and slowly unsaturates to typically white toward an infinite horizon line in an image.Since the detection is based on robust representation, the detector developed in [7] is unlikely to be fooled by similar colored materials and objects, for example, bodies of water, frontal walls, trees, and clothes.The classification is based on an acceptable gradient signal.The method achieves an excellent performance; however, it fails to correctly identify minor sky regions, for www.ijacsa.thesai.orgexample, a small sky patch/region visible between buildings or trees.A random forest [8], Artificial neural networks [9], Bayesian networks [10], Radial Basis Function (RBF) [11,12] are most of the time used for feature based object detection in images.
In this article, for robust color based sky (horizon) segmentation and detection, usage of lighting correction for sky color detection is investigated.As such, the impact of color constancy on sky color detection algorithms is evaluated and investigated.The color constancy algorithms used includes G E , G W , M RGB and S G .The algorithms G E , G W , M RGB and S G , are tested on the static filtered sky modeling.The static filter is developed in the LAB color space.This evaluation and analysis are essential for detection scenarios, especially, color based object detection in outdoor scenes.From the results, it is concluded that the color constancy before sky color detection using LAB static filters has the potential of improving sky color detection performance.However, the application of the color constancy can impart negative effects on the detection results.For digital images, the color correction methods represent a stable representative of the horizon in chromaticity space loci.Also, the sky color representation can have a shifting in the corresponding space.Since the sky static filters are using the fixed color space values, different results are obtained by applying color constancy algorithms on different datasets.

II. COLOR CONSTANCY
Color constancy is the inherent ability of the vision for resolving an object color in a particular scene that is basically independent of the illuminant source.In general, the color constancy is also defined as the ability to estimating the undefined/unknown light source of an active scene from a given image.From mathematical perspectives, assume that an image f is composed of [14]: The equation shows that the light source of a color spectrum is ( ) the apparent surface reflectance is s(x, ) and the image capturing source sensitivity is c( ).In the color constancy, the visible spectrum is represented by w and spatial coordinates of the image are represented by x.From implementation point of view, the color constancy is an estimation of the light source ( ) from given image.We use four color correction algorithms.Color correction approaches provide an estimation of e depending on the paradigm they are using.In the following, we discuss Gray Edge (G E ), Gray World (G W ), Max RGB (M RGB ), and Shades of Gray (S G ).

A. Gray Edge (G E )
The G E is presented in [14].It proposes the G E hypothesis as: "the mean of the difference of the reflectance in a particular scene is achromatic."Mathematically, [14]: In [15], Buchsbaum proposes the G W hypothesis. Contrary to the G E Algorithm, the G w assumes that the average reflectance in the particular scene is achromatic.The G E , however, accounts for the differences of the reflectance in a scene.In [15], the author derives: That the average reflectance for the short, middle and longer oscillations are identical [16].

C. Max RGB (M RGB )
M RGB relies on the assumption that the reflectance value of each of the three Red, Green and Blue channels (from image perspectives) is equal [14].

D. Shades of Gray (SG)
The G W and the M RGB algorithms are the bi instances of the color constancy paradigm based on the Minkowski norm [14].The authors in [17] analyzed the performance of the lighting source e as a function of the Minkowski norm.It was deduced www.ijacsa.thesai.org that the optimal performance is obtained with a Minkowski while setting p to 6 is termed as Shades of Gray [17].

III. METHODOLOGY
In this section, the method to filtering and color constancy application is explained.The LAB static filter is created in the LAB color space on a set of training sky pixels.We choose the LAB as the color space and its static filter because of its nonlinear transformation, proper separation of lighting and color components and its generally good performance for sky color detection.
Given an image, I, static filter created in Equations 1-3 are used to process and obtain the sky blobs from the image.

I _sky_blobs =F sf (I)------(4) [R e G e B e ]=CC(I _sky_blobs )------(5)
I _e =I/[R e G e B e ]------( 6) Where I _sky_blobs is the detection from the static filter.From an Equation 5, the R e , G e , B e are the lighting parameters from the color constancy algorithm (CC).The final image (I _e ) is obtained by applying parameters from the color constancy on the original image.

IV. EXPERIMENTAL EVALUATION
The algorithms G E , G W, M RGB and S G are used with the static filtered sky modeling.The static filter is developed in the LAB color space, represented as S LAB .For experimental analysis, the Sky Data Set (S DS ) is used which is extracted from [13].

A. Sky Data Set (S DS )
The S DS used for evaluation is extracted from [13].The S DS contains natural scenes images and the manually annotated pixel-level ground truth of the original images.The original images are shown in Figure 1.The S DS has 1000 images.The images used for testing (annotated) images are called the mask images of original images as show in Figure 2. The mask images are used for performance evaluation of the static filtered color constancy algorithms.

B. Evaluation
We show the effect of color constancy algorithms on LAB static sky filter using G E , G W, M RGB and S G .
Figure 3 shows the output of the color constancy algorithms used.Fig. 4 is showing two examples of the results of sky color detection after applying G E color constancy.Figure 4 (Column 1) shows actual images, Figure 4 (Column 2) depicts sky detection using the fixed filter in the Lab color space and Figure 4 (Column 3) shows improvement in sky space detection by using the same fixed static filter (after applying the G E algorithm).This result shows that some of the pixels that were not blocked by static filter are now blocked by static filter after applying the G E .Figure 4 is also showing that color correction can benefit the sky detection.
Color constancy may not improve results in all lighting conditions and all images across dataset.Also, the application of color constancy can negatively affect the results.As shown in Figure 5, applying G e (first row, third column) has the same result as the static filter alone (first row, second column).In Figure 5, (second row and third column), applying color constancy has blocked sky pixels and thus increasing the false positives.Figure 6 shows the evaluation of the static filter using color constancy algorithms.From the evaluation perspectives, we use the Accuracy as an evaluation measure.For S DS , we find that the Accuracy of 0.528 achieved by not using color correction is reduced to 0.51 when using the static sky filter with the G E .The color constancy algorithm G w reports an increased performance with Accuracy of 0.531.In the case of M RGB , the sky color performance is slightly enhanced to 0.529.S G reports increased performance of 0.546.
From the results, it is concluded that the color constancy before sky color detection using LAB static filters has the potential of improving sky color detection performance.However, the application of the color constancy can impart negative effects on the detection results.This negative behavior can be explained as follows: For digital images, the color correction methods are depicting a stable and compact structure of the sky chromaticity space; however, the sky color part in color space can have a shifting and deviation in the color space.As, the sky static filters are using the static chromatic parameters, therefore, varying results might be obtained when applying color constancy algorithms on different datasets.

V. CONCLUSION
In this article, for robust color based sky (horizon) segmentation and detection, usage of lighting correction for sky color detection is investigated.As such, the impact of color constancy on sky color detection algorithms is evaluated and investigated.The color constancy algorithms used includes: Gray Edge (G E ), Gray World (G W ), Max RGB (M RGB ) and Shades of Gray (S G ). , it is concluded that the color constancy before sky color detection using LAB static filters has the potential of improving sky color detection performance.However, the application of the color constancy can impart negative effects on the detection results.This negative behavior can be explained as follows: For digital images, the color correction methods are depicting a stable and compact structure of the sky chromaticity space; however, the sky color part in color space can have a shifting and deviation in the color space.As, the sky static filters are using the static chromatic parameters, therefore, varying results might be obtained when applying color constancy algorithms on different datasets.

Fig. 2 .
Fig. 2. Mask images of original images used in the experiments

Fig. 3 .
Fig. 3. Color constancy algorithms and the resultant images

Fig. 4 .Fig. 5 .
Fig. 4. Horizon detection can be improved by applying color correction algorithm.Column 1 depicts actual sky images.Column 2 shows the result of the filter without applying color correction.Column 3 shows the output of the static filter after applying color constancy.As can be seen in Column 3, improved results are obtained