Detecting Foggy Images and Estimating the Haze Degree Factor

Limited visibility in haze weather strongly influences the accuracy and the general functions of almost outdoor video surveillance or driver assistance systems. Actual weather condition is valuable information to invoke corresponding approaches. Based on the atmospheric scattering model analysis and the statistics of various outdoor images, for most foggy images, we find that the lowest and highest value in color channels tends to be the same value of atmospheric light. A function for estimating the haze degree is developed for the automatic detection of the foggy image with different haze degrees. Experimental results show that our haze classification method achieves


Introduction
At present, most outdoor video-surveillance, driver-assistance and optical remote sensing systems have been designed to work under good visibility and weather conditions. Poor visibility often occurs in foggy or hazy weather conditions and can strongly influence the accuracy or even the general functionality of such vision systems. Consequently, it is important to import actual weather-condition data to the appropriate processing mode. Recently, significant progress has been made in haze removal from a single image [1,2]. Based on the hazy weather classification, specialized approaches, such as a dehazing process, can be employed to improve recognition. Figure 1 shows a sample processing flow of our dehazing program.
Despite its remarkable value, determining weather information from a single image has not been thoroughly studied. Traditional algorithms are designed for specific applications or require human intervention. Weather-recognition systems for vehicles which depend on vehicle-specific priors have been proposed [3][4][5][6]. Another proposed system [7] can automatically label images with high confidence by assigning weather labels, such as sunny, or cloudy; however, manual input constraints are required.
Against this background, the main aim of the current study is to develop a set of stable algorithms for the detecting foggy images and labeling the haze degree of images by using a factor with universal applications. In this paper, we propose a haze degree estimation function to automatically distinguish foggy images and label images with their corresponding haze degrees. We relied on the atmospheric scattering model analysis and statistics derived from various outdoor images in order to develop the estimation function.

Atmospheric Scattering Model Analysis
By default, we discuss the case of image that uses the RGB color model. A hazy image can be modeled as shown in [1,8] (Figure 2): where x denotes the pixel location, I(x) is the observed haze image, and J(x) is the haze-free image. For n ∈ {r, g, b}, In (x) is one of three color channels of I(x), and Jn(x) is one of three color channels of Jn (x). A is the global atmosphere light and is generally a fixed element A0 in all three color channels, An=A0. t(x) is the medium transmission and it is supposed to be the same in all three color channels at one pixel location. When the atmosphere is homogeneous, t(x)=exp(−β · dep(x)). Here, β is the scattering coefficient of the atmosphere, and dep(x) is the scene depth. To determine the haze degree of an image rapidly and reliably, we define the following:

Dehaze Preprocessing
Processing Image

Haze Degree Estimation
Haze-free Dehazing Dehazed Image Image Processing system ω=0.6753 ω is a haze factor we defined.
then calculate J(x) where d(x) is the minimum value of three channels, and b(x) is the maximum value. d and c, which are the average values of dI (x) and cI (x), are referred to as the dark and contrast values, respectively. Here, we assume that the size of image I is x y S S × . Take the minimum and maximum of the three channels on both sides of Equation 1: By Equation 8-Equation 7, we get the following For most haze-free outdoor images, dJ (x)<A0 even dJ (x) ≪ A0, Equation 9 and Equation 10 show that the smaller t(x), cI(x) and A0 −dI(x) are closer to 0. As above, the values d and c may be correlated with the overall haze degree of an image. In the next section, we use a statistical method to evaluate the relationships.
Note that, for simplicity, we estimate A as follows. Clearly, is established, and then, A0 can be expressed as Here, we set λ=1/3.

Haze Degree Estimation Function
We selected 300 outdoor images that use the RGB color model (component values are stored as integer numbers in the range 0-255) and manually divided them into six groups according to the standards in Table 1. Figure 3 shows the sample images from the six groups. A grade from 0 to 5 representing the haze degree is assigned to each group; the higher the grade, the hazier the image. Figure 4 shows the values of (A0−d) (horizontal axis) and c (vertical axis) of images from six groups and the haze degrees of all selected images. The point colors represent the groups, and the point size indicates the haze degree, i.e., the larger points indicate greater haziness. It is evident that for most images from groups 3 to 5, (A0−d) is less than 75 and c is less than 50. For most haze-free images (group 0, the smallest blue points), (A0−d) is greater than 100 and c is larger than that in other groups.
To limit ω ∈ (0, 1), we introduce the following to estimate the haze factor ω: Obviously, ln (ω) is a linear function of x 1 , x 2 and σ. Each haze-degree was assigned an ω in Table 1. Using multiple linear regression analysis on our data set{   0.7 and 1. Note that photo in the red circle, has haze-factor below 0.1, despite being a thick-haze airport night view obviously, this is because this picture has a monochrome light source, which means that A was not the same in three channels which make our model fail.

Conclusion
We introduced a numerical foggy image detecting method by using the atmospheric scattering model analysis and statistics of various outdoor images, which can estimate the haze-factor from single image by using an adjustable empirical function without manual input constraint. Because its complexity is linear, it can be applied as an initial classification step of dehazing processing and does not exhaust processing resources. Experimental results show that the method can be applied to usual weather conditions in video-surveillance, driverassistance and optical remote sensing system with high accuracy.
Our proposed prior is inspired by the atmospheric scattering mode, and supposes that the air light is equal in all three channels which might not always be true. Moreover, our method can-not be applied to the case of a monochrome light source. Thus we leave these problems for further research.

Experimental Results
We used the Foggy Road Image Database (FRIDA) [9,10] to test the haze factor estimation function Equation 12. FRIDA is comprised of 90 synthetic images of 18 urban road scenes. Each image is 640×480 pixels. (Mean execution time is 230 ms on an Intel Core I7 CPU). Each image without fog (Lima set) is associated with four foggy images. Different types of fog are added to each of the four associated images: uniform fog (U080), heterogeneous fog (K080), cloudy fog (L080), and cloudy heterogeneous fog (M080), as an example Figure 5 shows the No.1 and No.10 images from five sets of FRIDA.
As Figure 6 shows, the lowest haze degree (between 0.4 to 0.6) is found for images of Lima. Note that the sky area of images from the Lima set is different from a real situation. Real fog-free image in our experimental results, have a degree of below 0.3. The four associated foggy images have regularity values (between 0.6 and 1) that correspond to different types of fogs. Images from U080 set always get the highest degree and M080 always get the lowest. For different images in the same set, for instance, No.1 and No. 10, No. 10 gets higher degree than No. 1, which is consistent with the actual situation. The experimental results show that Equation 12 can accurately distinguish haze degree.
In addition, we also randomly collected 48 real images to test our method dividing them by artificially picking three groups: haze-free, haze, and thick-haze. Figure 7 shows the haze factors of three groups and provides some sample images and the factor value. About 94% haze-free images get a haze-factor value below 0.4, 88% haze images get a value between 0.4 and 0.6, and, 85% thick images get a value between