# Regional Atmospheric Light Optimisation Algorithm for Heterogeneous Image Dehazing

Authors: Haoqiang Wu; Yiran Fu; Quanxing Zha; Aidong Chen; Hongyuan Jing
Journal: Scientific Programming
 (2021)

---

## Abstract

Under foggy and other severe weather conditions, image acquisition equipment is not effective. It often produces an image with low contrast and low scene brightness, which is difficult to use in other image-based applications. The dark channel prior dehazing algorithm will cause the brightness of the image to decrease and sometimes introduce halos in the sky area. To solve this problem, we proposed a region similarity optimisation algorithm based on a dark channel prior. First, a vector comprising RGB layer dark channel value was obtained as the original atmospheric ambient light, and then, the proposed regional similarity linear function was used to adjust the atmospheric ambient light matrix. Next, the transmittance of different colour channels was derived and the multichannel soft matting algorithm was employed to produce more effective transmittance. Finally, the atmospheric ambient light and transmittance were substituted into the atmospheric scattering model to calculate clean images. Experimental results show that the proposed algorithm outperformed the existing mainstream dehazing algorithms in terms of both visual judgement and quality analysis with nonhomogeneous haze datasets. The algorithm not only improves the image details but also improves the brightness and saturation of the dehazing result; therefore, the proposed algorithm is effective in the restoration of the hazy image.


---

## Body

## 1. Introduction

Fog is a near-surface atmospheric weather phenomenon caused by the desublimation of suspended water droplets in the air. Foggy conditions cause considerable inconvenience to human life and production, especially in imaging. Because of the light scattering caused by various particles in a foggy atmosphere, such as PM2.5, image acquisition equipment tends to produce images with fewer details, low contrast, low scene brightness, and whitish hue, which not only renders a poor intuitive visual experience but also affects the normal operation of the work system in image-related fields, such as image recognition. Thus, research on haze removal technology is valuable and significant.At present, image dehazing technology is mainly divided into three categories [1–3]: image enhancement methods, physical model-based methods, and deep learning-based methods using neural networks. Among them, representative image enhancement algorithms [4–9] include histogram equalisation, homomorphic filtering, wavelet transform, and MSR algorithm based on the Retinex (SSR) theory.The histogram equalisation algorithm nonlinearly stretches and rearranges the dense part of the whole grey histogram to achieve approximately uniform distribution, thus enhancing the local image contrast. The Retinex model proposed by Edwin Land was based on the colour constancy theory [4]. Based on the theory of the single-scale SSR algorithm, Ma and Wen [5] combined edge detection within a Gaussian filtering algorithm to amend the estimated value of the reflection component and mitigate the loss of image edge information. Zheng et al. [6] proposed an adaptive structure decomposition-integrated multiexposure image fusion dehazing method. It linearly adjusts the underexposed images through gamma correction to enhance the visual effect after dehazing, but the calculation complexity is high. Zhu et al. [7] proposed an image fusion-based algorithm that reduces haze effects via gamma correction. This algorithm can enhance the saturation of images and can be applied to geographic remote sensing and underwater images. Shu et al. [8] proposed a hybrid regularised variational framework to improve the scene depth of images along with dehazing. In addition, a two-step correction mechanism is employed to address the problem of colour distortion in the sky area.Physical model-based methods use the traditional atmospheric scattering model [10] as the main research object and then estimate atmospheric ambient light and transmittance via a priori hypothesis to make them similar to the real scene, thus realising image defogging processing [11–24]. Kaiming He et al. [13] proposed a single-image dehazing algorithm using the dark channel prior theory. This method adopts soft matting method to refine the transmittance and has a remarkable effect. Later, He et al. [14] substituted guided filtering for soft matting in transmittance refinement to improve the operating efficiency, but phenomena such as overall bluish and caliginous hue and colour distortion in the sky area still exist. Zhu et al.[15] obtained the mapping relation by training a linear model built from a colour attenuation prior. This algorithm achieves less colour distortion and outperforms most traditional algorithms. Meng et al. [16] employed a regularisation algorithm to effectively constrain the boundary of the sky region to obtain a restored image. This method causes image detail loss and artifacts in the image boundary. Sulami et al.[17] assumed that the scene chrominance was uncorrelated with the transmittance and calculated the transmittance using statistical laws, resulting in a poor effect in images with relatively single colour features. Berman et al. [18] proposed a nonlocal prior within each type of pixel cluster; the pixel points will have a linear relationship according to the difference in fog concentration. They estimated the scene depth based on this prior and accordingly restored the fog-free image. Ju et al. [19] introduced a novel light absorption coefficient parameter to attain an enhanced ASM (EASM). This model increases the visibility of hazy images while dehazing outdoor hazy images. Later, Ju et al. [20] proposed an image dehazing method using blended priors. This algorithm combines multiple modules, including the atmospheric light estimation module to increase brightness and multiple prior constraint modules to create a nonlocal prior, local prior, and global prior, which improve the brightness and saturation of images. Wang et al. [21] proposed an additional channel method based on quad-tree subdivision and refined the transmittance using Gaussian blurring. These measures prevent the phenomena of oversaturation and halo effects from happening and tackling the problem of distortion in the brightest areas.In recent years, machine learning has become an important topic for its wide application and methods based on deep learning and neural networks have also made progress in image defogging [25–34]. Chen et al. [25] proposed a single-image dehazing method based on CNN, obtained the detailed features of foggy images via convolution layer operation and multiscale convolution kernel operation, and then fitted the transmittance map using nonlinear regression. In contrast to CNN, Cai et al. [26] proposed a trainable end-to-end transmission medium estimation model called DehazeNet, which directly learns and estimates the mapping relationship between foggy images and transmittance. However, this algorithm still uses atmospheric light as a global constant, leading to a loss in the precision of the image to a certain degree. Li et al. [27] improved the traditional atmospheric scattering model and used a convolutional neural network to estimate the residual image containing atmospheric light and transmittance. Qin et al. [28] proposed an end-to-end feature fusion dehazing network. This network structure can adaptively learn different weights of different-level feature information. The results show significant dominance in image detail restoration and colour fidelity. Liu et al. [29] designed and enhanced the CNN learning method for ship detection, which incorporated nonmaximum suppression to accurately obtain the results and construct a mixed loss function balance class during the training phase. Like the relative fine dehazing results as those aforementioned networks have, the deep learning-related algorithm relies considerably on big data; this is difficult to implement under sparse samples.Algorithms, such as the dark channel a priori based on the traditional atmospheric scattering model, ignore most of the image detail information when estimating the atmospheric ambient light. To solve this problem, we made the following modifications based on the dark channel a priori theory: (1) The dark channel values were obtained for each of the three RGB colour channels of the hazy image, and the regional mean value of each pixel in each dark channel was considered as the corresponding atmospheric ambient light value, after which the entire atmospheric ambient light was linearly transformed with its top 1% value to obtain the final atmospheric ambient light value. This reduces the influence of image noise to a certain extent. (2) In this study, we proposed to refine the transmittance through guided filtering and selected the V channel in the HSV with the best effect as the guided map for transmittance optimisation through experiments to obtain a transmittance closer to the real scene. In this study, we ran experiments on the O-Haze dataset, NTIRE 2021 dataset, and real images and analysed the results from both subjective and objective aspects. The results show that the proposed algorithm effectively improves the brightness and saturation of the image and the haze-free image after dehazing has high colour contrast and good visual effect and also improves the problem of blue and dark images after the dark channel a priori algorithm processing.


## 2. Background

Under foggy and other severe weather conditions, the light will scatter when it meets suspended small particles in the air during propagation, resulting in degraded images produced by image acquisition devices. Nayer and Narasimhan improved the atmospheric scattering model [10] in 1999, and this model (Figure 1) is widely used in computer vision and computer graphics.Figure 1
Atmospheric scattering model.It can be formulated as(1)IX=JXtX+A1−tX,where IX refers to the hazy image received by imaging equipment, JX is the real-scene radiation, A is the atmospheric ambient light value, and tX is the transmittance, which can be expressed as(2)tX=e−βdX,0<tX≤1,where β is the atmospheric scattering coefficient and dX is the distance between the actual scene and the photographed point, that is, the depth of the field.As per the formula,JX can be obtained via formation simplification after estimating atmospheric ambient light A and transmittance tX of input IX.Kaiming He et al. [13] conducted experiments on large quantities of outdoor haze-free images and found that in the vast majority of nonsky regions in haze-free images, some pixels in a certain region have at least one colour channel with a rather low value. In dark channels, they pointed out that dark channel values tend to zero in nonsky areas. The dark channel value in a local patch ΩX, with the centre pixel x, is denoted by JdarkX as follows:(3)Jdarkx=minc∈r,g,bminy∈ΩxJcy⟶0.In practice, small particles inevitably exist in the atmosphere. The presence of haze is fundamental for observers to perceive scene depth. Therefore, after minimisation on both sides of equation (3), the parameter ω (0 < ω ≤ 1) is introduced to maintain a certain amount of haze, thus enhancing the visual experience of observers, as shown in(4)t˜X=1−ωmincminY∈ΩXIcYAc,where c represents the RGB colour channels, c∈r,g,b, Ic is the hazy image of each colour channel layer, and Ac is the atmospheric ambient light of each colour channel layer.The dark channel prior is subject to limitations in that it does not hold in the sky area and white object area; therefore, results with images containing such areas will display local image distortion and a widespread halo in the sky area.


## 3. Proposed Algorithm

Due to the unrobustness of the dark channel prior, its dehazing results are subject to problems such as bluish hue and colour distortion in the sky area. The proposed algorithm refines the estimation of the atmospheric ambient light and transmittance based on the original dark channel prior algorithm through the region similarity correction, thus obtaining more effective estimate values, which significantly improves the dehazing effect. The flowchart of the proposed algorithm is shown in Figure2.Figure 2
Flowchart of the proposed method.As shown in Figure2, (a) is the input hazy image, we first select the low brightness pixels in a moving windows from (a) as the dark channel image (b). Then, we use the region similarity correction method to estimate the enhanced atmospheric light image (c). By using the dark channel prior, the rough transmittance map can be calculated as (d). In addition, the input image are transferred to HSV domain (e) to get the intensify map (f). The detailed transmittance map (g) is generated by a guide filter which employed the intensity map (f) as the guide map. Finally, the enhanced atmospheric light (e) and detailed transmittance (g) are submitted to the atmospheric scattering model to get the dehazing output (h).


### 3.1. Estimating the Dark Channel Value

For a hazy image with a size ofm×n, we designed a window ΩX centered around it and chose the average value of the lowest grey value for each pixel in the R, G, and B colour channels, respectively. Furthermore, within the range of ΩX, because of the dark channel value of this pixel, we obtain an m×n×3 RGB dark channel matrix Jc,darkX (equation (6)):(5)Jc,darkX=minY∈ΩXJcY,c=R,G,B,(6)JdarkX=Jc,darkX.The size ofΩX has an impact on the dark channel image; the larger its value, the darker the pixel points it contains and the darker the generated image; the experimental effect will not be suitable. The smaller the value, the less the information of the dark channel included, and the difference with the original image is not significant. Therefore, s = 31 was chosen in this study to achieve the best balance.We further compute the atmospheric ambient light using it.


### 3.2. Estimating the Atmospheric Ambient Light

To better realise region selection, for each pixel in the obtainedJc,darkX as the starting point, we determined a square window ΩX from four different directions, including the upper left, upper right, lower left, and lower right of the pixel independently to calculate the mean dark channel value from within as the atmospheric light AcX of this pixel and experiment with their dehazing effect. The results show that the lower right direction achieves the best; therefore, we chose this direction as the final method, as shown in(7)AcX=∑i=xx+s′−1∑j=yy+s′−1Jc,darki,js′2,where Jc,darki,j represents the dark channel value of the pixel with coordinates i,j, c=R,G,B, s′ is the length of the neighbourhood window, and xandy are the abscissa and ordinate, that is, 1≤x≤m1≤y≤n. Provided that the size of the square window size at the image edge is less than ΩX, then we select the window with side length minx,y,m−x+1,n−y+1.Larger atmospheric ambient light values will make the image brighter, while too small values will result in a darker image overall and affect the accuracy of the estimated transmittancetX. This is particularly obvious in the dense haze region. Therefore, in this study, we proposed an improvement scheme, in which the obtained AcX values are first arranged in a descending order and the first 1% of them are considered as the ideal values of the atmospheric ambient light to ensure that the atmospheric ambient light is more consistent with the real scene as shown in(8)N=m×n×0.01,where the positive integer N refers to the corresponding value of the 1% pixel of the whole image (rounded down).Refactoring them×n vector rearranged from AcX as Rech0, then the pixel with coordinates x,y can be formulated as follows:(9)h0=x−1×n+y,Rech0=Acx,y,where h0 is the subscript position of the A value with the original coordinates x,y. Subsequently, we rearrange Rech0 in descending order and denote the new column vector as Dech.Next, we rearrange the entirem×n atmospheric light matrix according to their linear proportion. Then, we mark the minimum atmospheric light value as minAc and the maximum value of the optimised value A′cX as maxAc. The minimum value minA′c of the optimised atmospheric light A′cX is equal to DecN. The equation is(10)maxAc−AcXmaxAc−minAc=maxAc−A′cXmaxA′c−minA′c.By simplifying (11), we can obtain the rearranged value of each pixel A′cX from the original AcX, which leads to(11)A′cX=maxAc−maxAc−AcXmaxA′c−minA′cmaxAc−minAc.The calculation and rearrangement steps of the atmospheric light are shown in Figure3.Figure 3
Schematic diagram of atmospheric ambient light.As shown in Figure3, a dark channel image (a) was input to obtain the refined atmospheric ambient light image. Considering the pixel point at coordinate (1, 1) as an example, Ω(X) is selected down to the right (as shown in the red box in (a)) and the mean value of the region Ω(X) (i.e., (b)) is calculated as the rough atmospheric ambient light value at coordinate (1, 1) (as shown in the red box in the upper left of (c)). Thereafter, we arrange the atmospheric ambient light value of (c) into the right matrix of (d) in descending order and linearly stretch the first 1% of the pixel points into the new atmospheric ambient light values (as shown in the left matrix of (d)), which is later mapped back to the original coordinate positions for subsequent dehazing (as shown in the change process of the red pixel points from (c) to (e)).


### 3.3. Estimating the Transmittance

Based on the principle that visible light of different wavelengths has different transmittances, transmittances of different colour channels are obtained in this study, as shown in(12)t˜cX=1−ωminY∈ΩXIcYA′cX,where t˜cx represents the three-layer colour channel transmittance matrix.Experimental analysis indicates that V channel overperforms other choices as the guiding map to employ guided filtering to transmittancet˜c, and we obtain a more effective transmittance t˜′c, as the following formulas show:(13)t˜′c=akIiv+bk,∀i∈wk,(14)ak=covkIv,t˜cσk2+ε,(15)bk=t˜c¯−akuk,where Iv is the guiding image, that is, the V channel of the hazy image represented in the HSV image system, covk is the covariance of the window wk, and σk2 and uk are the variance and mean value of Iv in window wk, respectively.The parameterω also plays a decisive role in the transmittance; the smaller its value, the less obvious the defogging effect. After extensive experiments, we fixed ω to 0.9 and the minimum transmittance was set as 0.1 to avoid excessive enhancement of the image after fog removal.A comparison of the transmittancet˜′c with and without the guided filter is shown in Figure 4.Figure 4
Comparison of the transmission before and after the guided filter. (a) Red channel. (b) Green channel. (c) Blue channel.
(a)(b)(c)Thereafter, we submit the improved atmospheric ambient lightA′ and transmittance t˜′d into equation (1) to obtain clean images.


## 3.1. Estimating the Dark Channel Value

For a hazy image with a size ofm×n, we designed a window ΩX centered around it and chose the average value of the lowest grey value for each pixel in the R, G, and B colour channels, respectively. Furthermore, within the range of ΩX, because of the dark channel value of this pixel, we obtain an m×n×3 RGB dark channel matrix Jc,darkX (equation (6)):(5)Jc,darkX=minY∈ΩXJcY,c=R,G,B,(6)JdarkX=Jc,darkX.The size ofΩX has an impact on the dark channel image; the larger its value, the darker the pixel points it contains and the darker the generated image; the experimental effect will not be suitable. The smaller the value, the less the information of the dark channel included, and the difference with the original image is not significant. Therefore, s = 31 was chosen in this study to achieve the best balance.We further compute the atmospheric ambient light using it.


## 3.2. Estimating the Atmospheric Ambient Light

To better realise region selection, for each pixel in the obtainedJc,darkX as the starting point, we determined a square window ΩX from four different directions, including the upper left, upper right, lower left, and lower right of the pixel independently to calculate the mean dark channel value from within as the atmospheric light AcX of this pixel and experiment with their dehazing effect. The results show that the lower right direction achieves the best; therefore, we chose this direction as the final method, as shown in(7)AcX=∑i=xx+s′−1∑j=yy+s′−1Jc,darki,js′2,where Jc,darki,j represents the dark channel value of the pixel with coordinates i,j, c=R,G,B, s′ is the length of the neighbourhood window, and xandy are the abscissa and ordinate, that is, 1≤x≤m1≤y≤n. Provided that the size of the square window size at the image edge is less than ΩX, then we select the window with side length minx,y,m−x+1,n−y+1.Larger atmospheric ambient light values will make the image brighter, while too small values will result in a darker image overall and affect the accuracy of the estimated transmittancetX. This is particularly obvious in the dense haze region. Therefore, in this study, we proposed an improvement scheme, in which the obtained AcX values are first arranged in a descending order and the first 1% of them are considered as the ideal values of the atmospheric ambient light to ensure that the atmospheric ambient light is more consistent with the real scene as shown in(8)N=m×n×0.01,where the positive integer N refers to the corresponding value of the 1% pixel of the whole image (rounded down).Refactoring them×n vector rearranged from AcX as Rech0, then the pixel with coordinates x,y can be formulated as follows:(9)h0=x−1×n+y,Rech0=Acx,y,where h0 is the subscript position of the A value with the original coordinates x,y. Subsequently, we rearrange Rech0 in descending order and denote the new column vector as Dech.Next, we rearrange the entirem×n atmospheric light matrix according to their linear proportion. Then, we mark the minimum atmospheric light value as minAc and the maximum value of the optimised value A′cX as maxAc. The minimum value minA′c of the optimised atmospheric light A′cX is equal to DecN. The equation is(10)maxAc−AcXmaxAc−minAc=maxAc−A′cXmaxA′c−minA′c.By simplifying (11), we can obtain the rearranged value of each pixel A′cX from the original AcX, which leads to(11)A′cX=maxAc−maxAc−AcXmaxA′c−minA′cmaxAc−minAc.The calculation and rearrangement steps of the atmospheric light are shown in Figure3.Figure 3
Schematic diagram of atmospheric ambient light.As shown in Figure3, a dark channel image (a) was input to obtain the refined atmospheric ambient light image. Considering the pixel point at coordinate (1, 1) as an example, Ω(X) is selected down to the right (as shown in the red box in (a)) and the mean value of the region Ω(X) (i.e., (b)) is calculated as the rough atmospheric ambient light value at coordinate (1, 1) (as shown in the red box in the upper left of (c)). Thereafter, we arrange the atmospheric ambient light value of (c) into the right matrix of (d) in descending order and linearly stretch the first 1% of the pixel points into the new atmospheric ambient light values (as shown in the left matrix of (d)), which is later mapped back to the original coordinate positions for subsequent dehazing (as shown in the change process of the red pixel points from (c) to (e)).


## 3.3. Estimating the Transmittance

Based on the principle that visible light of different wavelengths has different transmittances, transmittances of different colour channels are obtained in this study, as shown in(12)t˜cX=1−ωminY∈ΩXIcYA′cX,where t˜cx represents the three-layer colour channel transmittance matrix.Experimental analysis indicates that V channel overperforms other choices as the guiding map to employ guided filtering to transmittancet˜c, and we obtain a more effective transmittance t˜′c, as the following formulas show:(13)t˜′c=akIiv+bk,∀i∈wk,(14)ak=covkIv,t˜cσk2+ε,(15)bk=t˜c¯−akuk,where Iv is the guiding image, that is, the V channel of the hazy image represented in the HSV image system, covk is the covariance of the window wk, and σk2 and uk are the variance and mean value of Iv in window wk, respectively.The parameterω also plays a decisive role in the transmittance; the smaller its value, the less obvious the defogging effect. After extensive experiments, we fixed ω to 0.9 and the minimum transmittance was set as 0.1 to avoid excessive enhancement of the image after fog removal.A comparison of the transmittancet˜′c with and without the guided filter is shown in Figure 4.Figure 4
Comparison of the transmission before and after the guided filter. (a) Red channel. (b) Green channel. (c) Blue channel.
(a)(b)(c)Thereafter, we submit the improved atmospheric ambient lightA′ and transmittance t˜′d into equation (1) to obtain clean images.


## 4. Experimental Results

To evaluate the feasibility and effectiveness of our algorithm more intuitively, we performed comprehensive experiments on a large dataset containing the public O-Haze image dataset, NTIRE 2021 dataset, and real-world images. The O-Haze dataset contains 45 outdoor scene images with the same visual content recorded under fog-free and foggy conditions, from which we stochastically selected six images as the testing set for neural network algorithms and used the others as the training set. The real-world image dataset comprises approximately 150 images, including a public dataset that is available online and self-collected images. The NTIRE 2021 dataset includes 35 pairs of real and outdoor nonhomogeneous hazy images. All operations were performed under the Windows 10 operating system, MATLAB R2020a operating environment, and Intel(R) Core (TM) i7-7500U CPU @2.70 GHz 2.90 GHz processor, with 8 GB RAM hardware configuration. We compared our performance to the state-of-the-art algorithms including DCP [13], Meng et al.’s [16], Sulami et al.’s [17], Berman et al.’s [18], IDE [19], DehazeNet [26], and AOD [30] from both subjective and objective aspects. According to the experimental analysis, we set the window size as s′=31 in this study.Image evaluation has extremely important application value in image dehazing, image compression, video compression, and other fields. Image evaluation methods are mainly divided into subjective evaluation and objective evaluation. Among them, subjective evaluation refers to the perceptual judgement based on observers’ subjective feelings and is widely used in neural networks, image recognition, and other fields; however, it is susceptible to many capricious factors, such as personal preference, and is relatively ex parte.To solve the problem of differentiation caused by subjective factors, it is necessary to formulate a standard for image quality evaluation (QA), that is, to use a specific mathematical model to quantify the difference between each image, to objectively evaluate the image quality.We adopted the image visibility evaluation criterion and image structure similarity evaluation criterion using the peak signal-to-noise ratio (PSNR), structural similarity (SSIM), and natural image quality evaluator (NIQE) evaluation indicators to conduct a comprehensive evaluation and analysis of the aforementioned eight main dehazing algorithms. The PSNR uses the mean square error (MSE) to calculate the different values of the image pixels. The larger the value, the better the quality of the restored image. The calculation formula is shown in(16)PSNR=10lg2B−12MSE.Its MSE is calculated using(17)MSE=1mn∑i=0m−1∑j=0n−1Ii,j−Ki,j2,where I and K refer to a hazy image of size m×n and a processed image, respectively. The pixel value is represented by a B-bit binary number. In this study, the image pixel domain is [0, 255]; therefore, B = 8. The MSE represents the comparison result of the pixel-by-pixel difference between two images.The structural similarity formula is implemented via brightness comparison formula (18), contrast comparison formula (19), and structure comparison formula (20):(18)li,j=2μiμj+C1μi2+μj2+C1,(19)ci,j=2σiσj+C2σi2+σj2+C2,(20)si,j=σij+C3σiσj+C3,where μi and μj represent the mean values of iandj and σi2andσj2 are the variances of iandj, respectively. σij is the covariance of iandj; C1=k1L2 and C2=k2L2 are constants with default values k1=0.01andk2=0.03 to avoid the case where the denominator is zero during the calculation. Equation (21) shows how the SSIM operates:(21)SSIMi,j=li,jα⋅ci,jβ⋅si,jγ.Consideringα=β=γ1, the calculation formula of SSIM can be obtained as(22)SSIMi,j=2μiμj+C1μi2+μj2+C1⋅2σij+C2σi2+σj2+C2.SSIM has symmetry, which implies that SSIMi,j is equivalent to SSIMj,i. The domain of SSIM is [0, 1]. The larger the value, the smaller the difference between the dehaze image and the original image. Images with large values show better integrity and a more reasonable structure. The evaluation criterion can also be used as an evaluation standard for the SR technology.The NIQE algorithm evaluates the image quality by calculating the distance between the multivariate Gaussian (MGV) feature parameters extracted from the dehazing images and the pretrained model parameters, as shown in(23)Dv1,v2,Σ1,Σ2=v1−v2TΣ1+Σ22−1v1−v2,where v1 and v2 are the mean vectors of the natural MVG model and Σ1andΣ2 are the covariance matrices of the distorted image’s MVG model.The characteristic of NIQE is that no haze-free image is required as a reference. The smaller the value is, the smaller the gap between the haze-free image and the pretrained model is and the higher the image quality is. Therefore, this paper takes it as the evaluation index of real-world images.


### 4.1. Experiment on the O-Haze Dataset and NTIRE Dataset

Substantial experiments were performed on the entire O-Haze and NTIRE datasets. The O-Haze dataset contains 45 paired hazy and haze-free images, whose hazy conditions are manufactured by a professional haze-making machine. The NTIRE dataset includes 35 pairs of outdoor nonhomogeneous hazy images. Part of the defogging results (with a size of 512 × 512) is shown in Figure5 to facilitate comparison and analysis.Figure 5
Output examples from the O-HAZE dataset and NTIRE dataset in the proposed method to compare with SOTA methods. (a) Original. (b) The fact. (c) DCP. (d) Meng. (e) Fattal. (f) Berman. (g) AOD. (h) DehazeNet. (i) IDE. (j) Ours.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)For the first image in the O-Haze dataset, the results of the DCP, Fattal, and AOD methods present an overall bluish hue; the Berman algorithm has a better foreground effect, but the distant details are fade, while our method, IDE, and the Meng algorithm retain clear distant details and show the best restoration effect; the IDE algorithm significantly increases the brightness. For the 11th image in the O-Haze dataset, all the algorithms achieved an insignificant dehazing effect on distant trees but our method outperformed the others on colour restoration in close-range processing. For the 12th image in the O-Haze dataset, our method achieved the most significant dehazing effect and the result is close to the real scene, whereas the results of the Fattal and AOD methods are overall bluish and DehazeNet has a poor dehazing effect. For the 31st image in the O-Haze dataset, our algorithm has no obvious effect on the processing of the branches in the upper left corner, the overall colour of the Fattal algorithm is yellow, and the image of the Berman algorithm is distorted. For the 33rd image in the O-Haze dataset, all traditional algorithms have bright strips on the left side of the image and the effects of the two neural network algorithms are not obvious. Our algorithm and IDE algorithm achieved the best effect; for the 41st picture in the O-Haze dataset, our algorithm and Berman’s algorithm are better than other algorithms in processing the sky area. For the 2nd image in the NTIRE dataset, our algorithm has the most thorough dehazing effect, the Berman algorithm has severe colour distortion, and the results of all other algorithms are bluish. For the 7th image in the NTIRE dataset, all algorithms have a poor dehazing effect owing to the heavy fog concentration, especially in the middle area above the image, but our algorithm and IDE algorithm have a better dehazing effect than other algorithms in the near field. For the 9th image in the NTIRE dataset, the DehazeNet algorithm does not have a significant dehazing effect. Our algorithm has the best defogging, but the hue is darker, and the other algorithms have different degrees of bluishness. In summary, our algorithm has certain advantages in terms of the subjective dehazing effect.The results of the objective evaluation indexes PSNR and SSIM are listed in Table1. As can be observed from the table, our algorithm has certain advantages over the other seven methods in both evaluation indexes. Most SSIM of our algorithm is optimal in most images in the O-Haze dataset and suboptimal in the NTIRE dataset, indicating that the gap between the defogging image and the original image is small and the structural integrity is strong. The DCP algorithm has a higher value when processing the 33rd image in the O-Haze dataset; however, from the perspective of the subjective defogging effect of the image, the brightness of the defogging image of DCP and the other four algorithms is low, whereas our algorithm significantly improves the overall brightness of the image, solves the problem of the bluish hue of dark channel dehazing, and is more in line with the characteristics of the real fog-free image. Although in the seventh image picture in the NTIRE dataset, the PSNR and SSIM of our algorithm are not the highest, the subjective feeling effect is better than that of other algorithms, which also shows that there is still room for improvement where the haze is particularly thick and efforts are required.Table 1
SSIM/PSNR performance of different methods on the O-HAZE dataset and NTIRE dataset.
IndexMetricsDCPMengFattalBermanAODDehazeNetIDEOurO-Haze-01PSNR17.032220.017417.081617.537811.613113.793518.334223.4737SSIM0.57340.68470.63650.64770.47400.38580.67630.7189O-Haze-11PSNR19.096220.559618.126517.191211.501113.338819.838822.1190SSIM0.51080.62140.52750.57330.36550.62320.71410.6111O-Haze-12PSNR20.586222.581818.433620.655114.537114.325618.286123.8214SSIM0.72500.74410.67320.73960.62860.16600.73360.7423O-Haze-31PSNR20.998520.261821.160321.105915.659219.067522.252628.1259SSIM0.73810.74290.74260.73810.70050.65990.75290.8289O-Haze-33PSNR25.091722.629618.398519.210315.863417.975216.141126.0924SSIM0.75450.65290.68850.59170.67650.58410.60580.7213O-Haze-41PSNR19.104419.296117.168521.148214.886421.39422.064422.4768SSIM0.70540.71960.74900.78830.72570.57180.80630.7990NTIRE-02PSNR17.117417.989017.019114.78129.536610.190519.230819.6378SSIM0.68460.78090.82530.59750.79590.77220.85090.7995NTIRE-07PSNR20.864520.393618.878515.787711.112810.983814.966720.6927SSIM0.77840.80060.73960.60920.71260.65900.71410.7982NTIRE-09PSNR16.464416.011315.613917.04569.05147.113116.681620.3326SSIM0.51380.56210.59690.69410.61970.50170.66080.6637Our proposed method outperforms the others. The bold values represent the best performance of all candidate algorithms.


### 4.2. Experiment on Real-World Images

To further verify the effectiveness of the algorithm in this study, real-scene images were selected for the experiment. The results are shown in Figure6. The size of the foggy image was 512 × 512. As shown in Figure 6, when processing the first and third images, the Meng, Fattal, and Berman algorithms exhibit serious colour distortion problems in the sky area, while the algorithm in this study has an ideal processing effect. For the second image, the detailed processing of the Fattal algorithm in the building part is not obvious, and the sky area shows a dark hue. All the algorithms have no obvious effect on the sky region of the third image, and our algorithm and Fattal algorithm have an ideal effect in close view. For the fourth image, the colour of the Berman algorithm turns green, while AOD’s processing and DehazeNet’s processing of distant buildings lose details. The IDE algorithm can significantly improve brightness when processing real-world images. Compared with the DCP algorithm, the algorithm in this study is more natural in image defogging and has a higher colour contrast, which can realise image defogging technology in a variety of different scenes.Figure 6
Output examples from real-world images in the proposed method to compare with SOTA methods. (a) Original. (b) DCP. (c) Meng. (d) Fattal. (e) Berman. (f) AOD. (g) DehazeNet. (h) IDE. (i) Ours.
(a)(b)(c)(d)(e)(f)(g)(h)(i)The NIQE values are shown in Table2. It can be seen that in the images of road, urban area, and urban rail, IDE algorithm obtains low parameter values due to overexposure of the images, but obviously, it cannot be applied to all the images. As for image parameters of urban area images, IDE obtains the highest parameter values among the 8 algorithms. The proposed algorithm is more consistent with people’s subjective feelings in the road image, and the detail processing of the distant houses in the city rail image are better than the IDE algorithm. The proposed algorithm obtains relatively low values in the processing of urban images and is second only to the DehazeNet algorithm in the housing images. The reason is that there exits colour distortion in the upper left corner of the image. But, the DehazeNet algorithm has a poor haze-removing effect in terms of subjective perception. Comprehensively, we believe that our algorithm preserves more original colour information in the image dehazing process and the effect is better.Table 2
NIQE evaluation of real-world data sets.
DCPMengFattalBermanAODDehazeNetIDEOursRoads2.74863.01432.70382.88702.86082.76272.43982.8246Cities2.58852.61362.65342.62032.92982.84413.17982.4755Castles2.56962.68972.65762.66092.53472.63902.50172.5908Rails3.75643.85703.67733.69893.82853.61122.56023.7711Houses2.38892.32412.42812.77542.71322.22523.32442.3168The bold values represent the best performance of all candidate algorithms.From the above experimental comparison, it can be observed that the proposed algorithm can achieve a finer effect in the processing of image details and the resulting images are more realistic, providing people with a better visual experience. The parameters PSNR and SSIM are higher than those of the other algorithms in most cases. However, the algorithm proposed in this study has a poor effect in thick haze areas. This is because, under the influence of large white areas, the significance of the regional similarity value is lost, which leads to excessive brightness exposure in such regions after dehazing, resulting in regional white blocks.


## 4.1. Experiment on the O-Haze Dataset and NTIRE Dataset

Substantial experiments were performed on the entire O-Haze and NTIRE datasets. The O-Haze dataset contains 45 paired hazy and haze-free images, whose hazy conditions are manufactured by a professional haze-making machine. The NTIRE dataset includes 35 pairs of outdoor nonhomogeneous hazy images. Part of the defogging results (with a size of 512 × 512) is shown in Figure5 to facilitate comparison and analysis.Figure 5
Output examples from the O-HAZE dataset and NTIRE dataset in the proposed method to compare with SOTA methods. (a) Original. (b) The fact. (c) DCP. (d) Meng. (e) Fattal. (f) Berman. (g) AOD. (h) DehazeNet. (i) IDE. (j) Ours.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)For the first image in the O-Haze dataset, the results of the DCP, Fattal, and AOD methods present an overall bluish hue; the Berman algorithm has a better foreground effect, but the distant details are fade, while our method, IDE, and the Meng algorithm retain clear distant details and show the best restoration effect; the IDE algorithm significantly increases the brightness. For the 11th image in the O-Haze dataset, all the algorithms achieved an insignificant dehazing effect on distant trees but our method outperformed the others on colour restoration in close-range processing. For the 12th image in the O-Haze dataset, our method achieved the most significant dehazing effect and the result is close to the real scene, whereas the results of the Fattal and AOD methods are overall bluish and DehazeNet has a poor dehazing effect. For the 31st image in the O-Haze dataset, our algorithm has no obvious effect on the processing of the branches in the upper left corner, the overall colour of the Fattal algorithm is yellow, and the image of the Berman algorithm is distorted. For the 33rd image in the O-Haze dataset, all traditional algorithms have bright strips on the left side of the image and the effects of the two neural network algorithms are not obvious. Our algorithm and IDE algorithm achieved the best effect; for the 41st picture in the O-Haze dataset, our algorithm and Berman’s algorithm are better than other algorithms in processing the sky area. For the 2nd image in the NTIRE dataset, our algorithm has the most thorough dehazing effect, the Berman algorithm has severe colour distortion, and the results of all other algorithms are bluish. For the 7th image in the NTIRE dataset, all algorithms have a poor dehazing effect owing to the heavy fog concentration, especially in the middle area above the image, but our algorithm and IDE algorithm have a better dehazing effect than other algorithms in the near field. For the 9th image in the NTIRE dataset, the DehazeNet algorithm does not have a significant dehazing effect. Our algorithm has the best defogging, but the hue is darker, and the other algorithms have different degrees of bluishness. In summary, our algorithm has certain advantages in terms of the subjective dehazing effect.The results of the objective evaluation indexes PSNR and SSIM are listed in Table1. As can be observed from the table, our algorithm has certain advantages over the other seven methods in both evaluation indexes. Most SSIM of our algorithm is optimal in most images in the O-Haze dataset and suboptimal in the NTIRE dataset, indicating that the gap between the defogging image and the original image is small and the structural integrity is strong. The DCP algorithm has a higher value when processing the 33rd image in the O-Haze dataset; however, from the perspective of the subjective defogging effect of the image, the brightness of the defogging image of DCP and the other four algorithms is low, whereas our algorithm significantly improves the overall brightness of the image, solves the problem of the bluish hue of dark channel dehazing, and is more in line with the characteristics of the real fog-free image. Although in the seventh image picture in the NTIRE dataset, the PSNR and SSIM of our algorithm are not the highest, the subjective feeling effect is better than that of other algorithms, which also shows that there is still room for improvement where the haze is particularly thick and efforts are required.Table 1
SSIM/PSNR performance of different methods on the O-HAZE dataset and NTIRE dataset.
IndexMetricsDCPMengFattalBermanAODDehazeNetIDEOurO-Haze-01PSNR17.032220.017417.081617.537811.613113.793518.334223.4737SSIM0.57340.68470.63650.64770.47400.38580.67630.7189O-Haze-11PSNR19.096220.559618.126517.191211.501113.338819.838822.1190SSIM0.51080.62140.52750.57330.36550.62320.71410.6111O-Haze-12PSNR20.586222.581818.433620.655114.537114.325618.286123.8214SSIM0.72500.74410.67320.73960.62860.16600.73360.7423O-Haze-31PSNR20.998520.261821.160321.105915.659219.067522.252628.1259SSIM0.73810.74290.74260.73810.70050.65990.75290.8289O-Haze-33PSNR25.091722.629618.398519.210315.863417.975216.141126.0924SSIM0.75450.65290.68850.59170.67650.58410.60580.7213O-Haze-41PSNR19.104419.296117.168521.148214.886421.39422.064422.4768SSIM0.70540.71960.74900.78830.72570.57180.80630.7990NTIRE-02PSNR17.117417.989017.019114.78129.536610.190519.230819.6378SSIM0.68460.78090.82530.59750.79590.77220.85090.7995NTIRE-07PSNR20.864520.393618.878515.787711.112810.983814.966720.6927SSIM0.77840.80060.73960.60920.71260.65900.71410.7982NTIRE-09PSNR16.464416.011315.613917.04569.05147.113116.681620.3326SSIM0.51380.56210.59690.69410.61970.50170.66080.6637Our proposed method outperforms the others. The bold values represent the best performance of all candidate algorithms.


## 4.2. Experiment on Real-World Images

To further verify the effectiveness of the algorithm in this study, real-scene images were selected for the experiment. The results are shown in Figure6. The size of the foggy image was 512 × 512. As shown in Figure 6, when processing the first and third images, the Meng, Fattal, and Berman algorithms exhibit serious colour distortion problems in the sky area, while the algorithm in this study has an ideal processing effect. For the second image, the detailed processing of the Fattal algorithm in the building part is not obvious, and the sky area shows a dark hue. All the algorithms have no obvious effect on the sky region of the third image, and our algorithm and Fattal algorithm have an ideal effect in close view. For the fourth image, the colour of the Berman algorithm turns green, while AOD’s processing and DehazeNet’s processing of distant buildings lose details. The IDE algorithm can significantly improve brightness when processing real-world images. Compared with the DCP algorithm, the algorithm in this study is more natural in image defogging and has a higher colour contrast, which can realise image defogging technology in a variety of different scenes.Figure 6
Output examples from real-world images in the proposed method to compare with SOTA methods. (a) Original. (b) DCP. (c) Meng. (d) Fattal. (e) Berman. (f) AOD. (g) DehazeNet. (h) IDE. (i) Ours.
(a)(b)(c)(d)(e)(f)(g)(h)(i)The NIQE values are shown in Table2. It can be seen that in the images of road, urban area, and urban rail, IDE algorithm obtains low parameter values due to overexposure of the images, but obviously, it cannot be applied to all the images. As for image parameters of urban area images, IDE obtains the highest parameter values among the 8 algorithms. The proposed algorithm is more consistent with people’s subjective feelings in the road image, and the detail processing of the distant houses in the city rail image are better than the IDE algorithm. The proposed algorithm obtains relatively low values in the processing of urban images and is second only to the DehazeNet algorithm in the housing images. The reason is that there exits colour distortion in the upper left corner of the image. But, the DehazeNet algorithm has a poor haze-removing effect in terms of subjective perception. Comprehensively, we believe that our algorithm preserves more original colour information in the image dehazing process and the effect is better.Table 2
NIQE evaluation of real-world data sets.
DCPMengFattalBermanAODDehazeNetIDEOursRoads2.74863.01432.70382.88702.86082.76272.43982.8246Cities2.58852.61362.65342.62032.92982.84413.17982.4755Castles2.56962.68972.65762.66092.53472.63902.50172.5908Rails3.75643.85703.67733.69893.82853.61122.56023.7711Houses2.38892.32412.42812.77542.71322.22523.32442.3168The bold values represent the best performance of all candidate algorithms.From the above experimental comparison, it can be observed that the proposed algorithm can achieve a finer effect in the processing of image details and the resulting images are more realistic, providing people with a better visual experience. The parameters PSNR and SSIM are higher than those of the other algorithms in most cases. However, the algorithm proposed in this study has a poor effect in thick haze areas. This is because, under the influence of large white areas, the significance of the regional similarity value is lost, which leads to excessive brightness exposure in such regions after dehazing, resulting in regional white blocks.


## 5. Conclusion

In this paper, a dehazing algorithm for heterogeneous images based on the optimisation of regional atmospheric ambient light was proposed to solve the problem of image colour distortion and the overall bluish and somber hue, which exists in the dark channel prior algorithm. In this method, the regional mean value of the RGB three-layer dark channel in a foggy image was solved and the corresponding regional atmospheric ambient light value was obtained by linear stretch correction. Subsequently, according to the transmittance obtained by the dark channel prior theory, the V channel of the foggy image is considered as the guiding graph for guiding filtering according to different channels to approach the real image transmittance and the atmospheric scattering model is used for defogging processing. The experimental results show that the image dehazing optimised by the proposed algorithm is superior to most classical dehazing algorithms in both subjective vision and objective quantification indexes and the problem of the dark hue is well solved. However, the algorithm in this study should traverse the entire image when calculating the atmospheric ambient light value, leading to a long execution time of the algorithm. To achieve better defogging efficiency, this study will continue to explore a better solution.



---

*Source: 3377905-2021-11-19.xml*