Proposed Methodology
The proposed algorithm is explained in the following steps:
- 1. Initially, a hazy image is taken as an input image.
- 2. The white balancing procedure, as given in Algorithm 12.1, is applied to the hazy image so as to adjust the color of the input image with reference to a white color, so as to make the image look more natural.
- 3. To improve the visibility of the hazy image, the CLAHE procedure, as given in Algorithm 12.2, is applied to the white balanced image. In this procedure, initially, the image is divided into non-overlapping blocks, and a histogram of each block is calculated. After that a clip limit is chosen to clip the parts of the histogram which are exceeding the limit.
- 4. Finally, the histogram of every region is combined with bilinear interpolation and image gray-scale values are changed according to the new histograms.
- 5. Due to clipping of the histogram in CLAHE, some of the information of the image may get lost. So, to get back that information, GF is used in this step. For GF. a guidance image (/) is considered, using which the filtering process is done.
- 6. The mean of (/), the mean of the CLAHE output image (p), and the mean of (/ x p) is calculated.
- 7. Co-variance of (I,p) is calculated as:
8. The variance of (/) is obtained to get linear coefficients a and b using:
9. The values of a and b are important to get the final result, which can be obtained by:
where e is the regularizing parameter.
10. And finally, the mean of a and b is calculated and the final output of the image, i.e., q, is obtained as:
Dataset Collection and Analysis
In this chapter, the Haze Realistic Dataset or HazeRD [42] is used for evaluating the proposed algorithm. HazeRD consists of 15 scenes along with their haze-free RGB images of their corresponding depth maps. Five distinct weather conditions are imitated into each of the scenes, which range in ascending order of their visual density,

FIGURE 12.1 Sample of HazeRD having different visual ranges, (a) Ground truth image, (b) image with visual range 50 m, (c) image with visual range 100 m, (d) image with visual range 200 m, (e) image with visual range 500 m, (f) image with visual range 1000 m.
labelled as 50, 100, 200, 500. and 1000. HazeRD is preferred over other dehazing datasets as it provides outdoor scenes, whereas other datasets focus basically on indoor scenes. Another advantage is that this dataset produces haze using real-life parameters, which are more realistic than the prior datasets, using either indoor images or synthetically produced images. In HazeRD, a Matlab function and a demo script is available as well, to create a hazy image with different parameters of haze. It also has the option of noise (by default it is off) for avoiding some unnatural uniformity in the airlight regions. Figure 12.1 shows an example of the dataset image.
Image Quality Assessment Criteria
Peak Signal-to-Noise Ratio and Mean Squared Error
Peak Signal-to-Noise Ratio (PSNR) and Mean Squared Error (MSE) [17, 18, 27,41 ] are the two most used error matrices for comparing the quality of the dehazed image. The cumulative squared error among improved dehazed images and the original image is represented by MSE. which can mathematically be represented as:
Here, /,(ш,и) and I2(m,n) are the hazy image and the improved image respectively, MxN is the size of the image, and m, n signifies the x, у location of the image pixel.
A lower value of MSE indicates low error, that is, the lower the value of MSE. the better is the quality of image.
A measure of the peak error is represented by PSNR, which can be described as the reciprocal of MSE. Mathematically, it can be represented as:
where В denotes the bits per sample ranging between 0 to 255. The unit of PSNR is the decibel (dB). The method is considered good if it generates low MSE and high PSNR values.
Entropy
The entropy of an image identifies its texture and measures the randomness of the image as well. Low entropy specifies that the region is homogeneous, thus a hazy image has lower entropy values compared to a haze free image. Mathematically, it can be estimated as:
where p, indicates the probability of occurrence of one gray level intensity.
Structural Similarity Index
This index helps in measuring image degradation caused by various processing. Its calculation requires a reference image. Mathematically,
Here, px and p, are the mean of x and у respectively, cr; g; are the variance of x and у respectively, and oxy is the co-variance of x, y. c, and c2 are the variables used for stabilizing the division.
Contrast Gain
Contrast gain is the mean difference between the contrast of the enhanced image and the original image (hazy image) [6]. It can be calculated by:
where Cf is the mean contrast of the output enhanced image and C, is the contrast of the original hazy image.
The higher the value of the contrast of the enhanced image, the better is the result for the dehazing algorithm.
Experimental Results and Discussion
Similarly, in Figure 12.3, haze level 100 is considered. In Figure 12.3(c), the output of the white balanced image is given. After applying CLAHE to it, the result obtained seems to be not very appealing, as shown in Figure 12.3(d). To improve the result, GF has been used and its result is shown in Figure 12.3(e). It is observed that the result is quite successful in removing the haze from the background as well.
The experiment has been performed and tested on different hazy images collected from the data set HazeRD. For Figure 12.2, haze level 50 has been considered. Figure 12.2(b) shows that the image is quite hazy. White balancing is performed to adjust the color of the image and the output of the white balanced image is shown in Figure 12.2(c). After applying CLAHE, in Figure 12.2(d), not much visual improvement is observed in the image. So the image is tested by applying GF to it in Figure 12.2(e), where it is observed that, although the visibility of the hazy image has increased, the haze has not been removed totally from the background. Considering haze level 200 for Figure 12.4. it is observed that the result obtained after applying CLAHE. shown in Figure 12.4(d), is not improved much as compared to the resultant image of white balance in Figure 12.4(c). So, to improve the result, GF is applied and the final resultant image is shown in Figure 12.4(e), where haze is seen to be removed and the result obtained is also very appealing. The contrast of the image is also improved as compared to the earlier obtained results.

FIGURE 12.2 Experimental results on hazy Image 50: (a) Ground truth image, (b) Input image, (c) Image after white balancing, (d) Image after applying CLAHE. (e) Image after applying CLAHE+Guided.

FIGURE 12.3 Experimental results on hazy Image 100: (a) Ground truth image, (b) Input image, (c) Image after white balancing, (d) Image after applying CLAHE. (e) Image after applying CLAHE+Guided.

FIGURE 12.4 Experimental results on Hazy Image 200: (a) Ground truth image, (b) Input image, (c) Image after white balancing, (d) Image after applying CLAHE. (e) Image after applying CLAHE+Guided.

FIGURE 12.5 Experimental results on hazy Image 500: (a) Ground truth image, (b) Input image, (c) Image after white balancing, (d) Image after applying CLAHE, (e) Image after applying CLAHE+Guided.
Finally, for Figures 12.5 and 12.6, haze level 500 is considered and the result obtained after applying the proposed algorithm is shown in Figures 12.5(e) and 12.6(e). It can be observed that, the result obtained in both the cases is quite successful in removing haze completely from the image.
So, from the experimental results, it is clear that the proposed algorithm gives a successful result in removing haze from the images having different haze levels.
In Tables 12.1, 12.2, 12.3, and 12.4. the entropy of images, having different haze levels, is calculated individually for each case, that is, for the input hazy image, the WB image, the CLAHE output image, and the proposed algorithm. From the result obtained, it is clearly noticeable that, in every case, the entropy has increased gradually, which further satisfies the definition of entropy as discussed in Section 12.6.
In this chapter, comparison of the contrast gain of the white balanced image, the CLAHE image, and the proposed algorithm is given in Table 12.5, where it can be noticed that the contrast gain is maximum in the case of the proposed algorithm. Similarly, in Table 12.6, a Structural Similarity Index (SSIM) is given and, by comparing the results, it can be observed that the proposed method is better than the individual results obtained from the white balance image and the CLAHE image.
In Tables 12.7,12.8,12.9, and 12.10, PSNR and MSE are calculated for each case, that is, for the white balanced image, the CLAHE output image, and the proposed algorithm. It is observed that the values of PSNR obtained are increasing and the values of MSE are decreasing gradually for all the images having different haze levels. Thus it justifies the definition of PSNR and MSE explained in Section 12.6.
For selecting the value of the clip limit, experiments have been performed by taking different values ranging from 0.001 to 0.02. In Figure 12.7(a), the change in

FIGURE 12.6 Experimental results on hazy Image 500: (a) Ground truth image, (b) Input image, (c) Image after white balancing, (d) Image after applying CLAHE. (e) Image after applying CLAHE+Guided.
TABLE 12.1
Entropy for the Different Images (Haze Level 50)
Images |
lnput_lmg |
WB |
CLAHE |
Proposed_Algo |
8905 50 |
4.5328 |
4.6160 |
4.1229 |
5.5894 |
7033_50 |
4.7523 |
4.7523 |
5.0321 |
6.1805 |
8612 50 |
4.4142 |
5.0283 |
4.9598 |
5.6666 |
8411_50 |
4.7069 |
4.7069 |
4.9769 |
5.7104 |
8602_50 |
1.0156 |
1.0156 |
1.0485 |
1.3057 |
9562 50 |
4.0313 |
4.3796 |
4.4768 |
5.2476 |
8583_50 |
6.4290 |
6.5397 |
6.6828 |
7.4777 |
8895_50 |
3.5613 |
3.5613 |
3.5779 |
4.1139 |
7460 50 |
4.6813 |
5.0491 |
4.9275 |
5.9397 |
8503 50 |
5.6430 |
5.7572 |
5.8784 |
6.6873 |
PSNR values have been plotted against different clip limits, and it is observed that the PSNR values have increased up to 0.004 and, after that, have gradually decreased. It is also observed that from 0.01 the values of PSNR remain almost constant, for all the different haze levels.
Similarly, for Figure 12.7(b), experiments were performed by taking MSE values and different clip limits, and the change in results is plotted in the graph. It can clearly be noted that, considering all the haze levels, MSE values are changing from 0.001 to 0.004 and then increasing; from 0.01 the values are nearly constant. In the
TABLE 12.2
Entropy for the Different Images (Haze Level 100)
Images |
lnput_lmg |
WB |
CLAHE |
Proposed_Algo |
8905 100 |
5.4160 |
5.5104 |
5.5906 |
6.3851 |
7033J00 |
5.0342 |
5.4662 |
5.5616 |
6.3144 |
8612 100 |
4.7288 |
5.0960 |
5.4716 |
5.9133 |
84I1JOO |
5.3070 |
5.4953 |
5.6993 |
6.0931 |
86O2J0O |
1.5804 |
1.5804 |
1.8197 |
2.5705 |
9562 100 |
4.4190 |
4.7700 |
5.2135 |
5.7217 |
8583JOO |
6.8261 |
6.8399 |
7.0181 |
7.5408 |
8895JOO |
3.8872 |
4.3395 |
4.3820 |
4.7204 |
7460 100 |
5.3353 |
5.5628 |
5.8535 |
6.4265 |
8503 100 |
6.0485 |
6.2272 |
6.3889 |
6.7497 |
TABLE 12.3
Entropy for the Different Images (Haze Level 200)
Images |
lnput_lmg |
WB |
CLAHE |
Proposed_Algo |
8905 200 |
5.9866 |
6.1446 |
6.2828 |
6.6998 |
7033_200 |
5.1729 |
5.6113 |
5.7430 |
6.2128 |
8612 200 |
4.9321 |
5.5544 |
5.7897 |
6.0988 |
8411_200 |
5.7225 |
6.0526 |
6.2519 |
6.5294 |
8602 200 |
1.8171 |
1.8171 |
2.2702 |
3.5205 |
9562 200 |
4.7325 |
5.3207 |
5.6718 |
6.0418 |
8583 200 |
7.0706 |
7.0584 |
7.2009 |
7.6185 |
8895 200 |
4.0654 |
4.8206 |
4.6535 |
4.9594 |
7460 200 |
5.5725 |
5.9640 |
6.2490 |
6.7158 |
8503 200 |
6.3318 |
6.4996 |
6.7348 |
6.8685 |
TABLE 12.4
Entropy for the Different Images (Haze Level 500)
Images |
lnput_lmg |
WB |
CLAHE |
Proposed_Algo |
8905 500 |
6.4760 |
6.6434 |
6.8270 |
6.9286 |
7033 500 |
5.3028 |
5.7274 |
5.9648 |
6.3246 |
8612_500 |
5.1043 |
5.4662 |
6.0523 |
6.2022 |
8411_500 |
6.0298 |
6.3569 |
6.7168 |
6.6860 |
8602 500 |
1.9799 |
1.9799 |
2.5831 |
3.9649 |
9562 500 |
5.0703 |
5.6726 |
6.1249 |
6.4400 |
8583_500 |
7.3283 |
7.2990 |
7.4185 |
7.6981 |
8895 500 |
4.1707 |
4.9281 |
5.0623 |
5.1402 |
7460 500 |
5.7061 |
6.0856 |
6.4953 |
6.7344 |
8503 500 |
6.6007 |
6.7825 |
7.0328 |
6.9597 |
TABLE 12.5
Contrast Gain for Different Images
Images |
WB |
CLAHE |
ProposecLAIgo |
8905 50 |
0.0094 |
0.0175 |
0.2147 |
8583_50 |
0.0358 |
0.0746 |
0.5171 |
8612 100 |
0.0098 |
0.0497 |
0.4783 |
8583_100 |
0.6488 |
0.6642 |
0.8107 |
8602 200 |
0.2600 |
0.2619 |
0.4303 |
8503 200 |
0.0238 |
0.0679 |
0.5055 |
7460 500 |
0.0308 |
0.0437 |
0.3854 |
8612 500 |
0.0192 |
0.0471 |
0.4381 |
TABLE 12.6
SSIM for Different Images
Images |
WB |
CLAHE |
ProposecLAIgo |
8905 50 |
0.3977 |
0.4325 |
0.5913 |
8583_50 |
0.5753 |
0.5872 |
0.7712 |
8612 100 |
0.3725 |
0.3807 |
0.4922 |
8583JO0 |
0.6488 |
0.6642 |
0.8107 |
8602_200 |
0.2600 |
0.2619 |
0.3529 |
8503 200 |
0.6596 |
0.6792 |
0.7476 |
7460 500 |
0.5933 |
0.6110 |
0.6772 |
8612 500 |
0.5770 |
0.5960 |
0.5922 |
TABLE 12.7
PSNR and MSE for Different Images (Haze Level 50)
Images |
WB |
CLAHE |
Proposed_Algo |
|||
PSNR |
MSE |
PSNR |
MSE |
PSNR |
MSE |
|
8905 50 |
60.3165 |
0.1817 |
60.3714 |
0.1793 |
65.8521 |
0.0615 |
7033 50 |
61.4570 |
0.1397 |
61.5453 |
0.1369 |
67.2987 |
0.0364 |
8612 50 |
60.6204 |
0.1702 |
60.7435 |
0.1655 |
63.4328 |
0.0910 |
8411 50 |
62.2395 |
0.1142 |
62.4212 |
0.1119 |
67.4410 |
0.0354 |
8602 50 |
62.4931 |
0.1178 |
62.5186 |
0.1172 |
63.1124 |
0.1036 |
9562 50 |
60.8137 |
0.1622 |
60.9017 |
0.1590 |
63.1684 |
0.0954 |
8583 50 |
64.7303 |
0.0661 |
65.3364 |
0.0575 |
68.1197 |
0.0301 |
8895 50 |
61.0609 |
0.1528 |
61.1456 |
0.1501 |
63.5542 |
0.0866 |
7460 50 |
60.0017 |
0.1960 |
60.0638 |
0.1932 |
61.8371 |
0.1284 |
8503 50 |
62.2970 |
0.1156 |
62.5149 |
0.1100 |
71.0371 |
0.0156 |
same way, considering Figure 12.7(c), (d), and (e), the values of SSIM, entropy, and contrast gain are increasing up to 0.004 and then decreasing, which is clearly visible from the given graphs.
So, considering all the results, discussed in the above section, a clip limit 0.004 is assumed to be the ideal limit for the proposed algorithm.
TABLE 12.8
PSNR and MSE for Different Images (Haze Level 100)
Images |
WB |
CLAHE |
Proposed .Algo |
|||
PSNR |
MSE |
PSNR |
MSE |
PSNR |
MSE |
|
8905 100 |
62.4693 |
0.1108 |
62.6827 |
0.1055 |
72.6006 |
0.0108 |
7033 100 |
64.0733 |
0.0766 |
64.2759 |
0.0731 |
72.5439 |
0.0109 |
8612 100 |
62.2252 |
0.1185 |
62.4898 |
0.1117 |
65.1923 |
0.0629 |
8411 100 |
64.7772 |
0.0651 |
65.0512 |
0.0611 |
71.0179 |
0.0155 |
8602 100 |
62.7623 |
0.1116 |
62.8182 |
0.1055 |
63.8557 |
0.0893 |
9562 100 |
62.4542 |
0.1118 |
62.7117 |
0.1055 |
65.8580 |
0.0538 |
8583 100 |
67.0228 |
0.0391 |
67.9396 |
0.0316 |
69.2701 |
0.0231 |
8895 100 |
62.8090 |
0.1026 |
62.9701 |
0.0989 |
66.6015 |
0.0438 |
7460 100 |
61.3515 |
0.1437 |
61.5766 |
0.1365 |
64.8669 |
0.0641 |
8503 100 |
65.1706 |
0.0599 |
65.8429 |
0.0514 |
73.6977 |
0.0084 |
TABLE 12.9
PSNR and MSE for Different Images (Haze Level 200)
Images |
WB |
CLAHE |
Proposed .Algo |
|||
PSNR |
MSE |
PSNR |
MSE |
PSNR |
MSE |
|
8905 200 |
65.4788 |
0.0555 |
66.2153 |
0.0469 |
74.3319 |
0.0072 |
7033 200 |
67.3685 |
0.0359 |
67.8051 |
0.0325 |
74.3695 |
0.0075 |
8612 200 |
63.8295 |
0.0832 |
64.2817 |
0.0755 |
66.0236 |
0.0534 |
8411 200 |
67.8332 |
0.0323 |
68.6579 |
0.0267 |
70.9779 |
0.0156 |
8602 200 |
63.1058 |
0.1043 |
63.1808 |
0.1028 |
65.1617 |
0.0680 |
9562 200 |
64.4249 |
0.0721 |
64.9524 |
0.0643 |
68.2702 |
0.0347 |
8583 200 |
69.6355 |
0.0215 |
69.2761 |
0.0131 |
72.8459 |
0.0016 |
8895 200 |
64.9485 |
0.0632 |
65.2555 |
0.0590 |
69.6534 |
0.0237 |
7460 200 |
63.3218 |
0.0915 |
63.8360 |
0.0814 |
69.4296 |
0.0228 |
8503 200 |
68.6587 |
0.0271 |
70.1902 |
0.0190 |
73.2222 |
0.0189 |
TABLE 12.10
PSNR and MSE for Different Images (Haze Level 500)
Images |
WB |
CLAHE |
Proposed _Algo |
|||
PSNR |
MSE |
PSNR |
MSE |
PSNR |
MSE |
|
8905 500 |
67.3462 |
0.0261 |
69.054 |
0.0108 |
75.7431 |
0.0061 |
7033 500 |
69.4035 |
0.0358 |
70.5552 |
0.0186 |
76.3774 |
0.0045 |
8612 500 |
65.3550 |
0.0603 |
65.7849 |
0.0554 |
68.4110 |
0.0059 |
8411 500 |
70.4891 |
0.0221 |
72.2382 |
0.0175 |
75.2609 |
0.0067 |
8602 500 |
63.4477 |
0.0977 |
63.5267 |
0.0962 |
66.1265 |
0.0558 |
9562 500 |
66.8301 |
0.0438 |
67.5183 |
0.0386 |
67.5795 |
0.0386 |
8583 500 |
70.2149 |
0.0205 |
72.4373 |
0.0117 |
75.3941 |
0.0082 |
8895 500 |
67.6465 |
0.0350 |
68.2060 |
0.0312 |
70.2276 |
0.0205 |
7460 500 |
62.2712 |
0.0468 |
67.2298 |
0.0377 |
69.3260 |
0.0235 |
8503 500 |
71.8090 |
0.0287 |
74.8268 |
0.0178 |
78.5556 |
0.0044 |

FIGURE 12.7 Experiment results at different clip Limits: (a) PSNR vs clip limit, (b) MSE vs clip limit, (c) SSIM vs clip limit, (d) Entropy vs clip limit, (e) Contrast gain vs clip limit.