1 Introduction

In the past decades, the restoration of images taken in foggy weather conditions has caught much attention due to the increasing outdoor applications, such as smart camera, video surveillance, remote sensing, intelligent vehicles and object recognition and so on. In foggy weather conditions, the reflected light from these objects is attenuated in the air and further blended with the atmospheric light scattered by some aerosols (e.g., dust and water-droplets) before it reaches the camera, and for this reason, the colors of these objects get faded and become similar to the fog, which severely degrades the visibility of the captured scene.

Generally speaking, the haze is highly related to the scene depth which is hardly estimated from a single image; early methods usually rely on the additional depth information or multiple images of the same scene for the haze removal. Schechner et al. [1] discovered that the airlight scattered by atmospheric particles was partially polarized. Based on this observation, they developed a quick method to reduce the haze using two images taken through a polarizer at different angles. Narasimhan et al. [2, 3] proposed a physics-based scattering model; by this model, the scene structure can be recovered from two or more weather images. Kopf et al. [4] adopted the scene depth information directly accessible in the georeferenced digital terrain or the city models to remove the fog. However, additional depth information or multiple images are not available in many situations.

Recently, single image dehazing algorithms, which adopt strong assumptions or constraints, have been developed to overcome the limitation of the above-mentioned methods. For example, Fattal [5] proposed a refined image formation model that the two functions are locally statistically uncorrelated, to account for the surface shading and the scene transmission, and then estimated the scene transmission and scene radiance via independent component analysis (ICA); this method can remove haze locally but cannot restore the dense hazy images. Tan [6] assumed that a haze-free image had a higher contrast ratio than the hazy image and maximized the local contrast of the restored image to remove haze from the input image. This method can generate the satisfying results, especially in the regions with the dense haze. However, it often suffers from distorted colors and halos artifacts since it is not a physics-based method. Xiao and Gan [7] firstly adopted the median filtering to obtain an initial atmosphere scattering light, and then refined it to generate a new atmosphere veil. Finally, the scene radiance was solved using the atmosphere attenuation model.

He et al. [8] discovered an interesting dark channel prior that at least one color channel of each pixel should have a small intensity value in a haze-free image. Take into account this prior, the transmission can be simply estimated to remove the haze. Due to the simple implementation and satisfactory performance of the dark channel prior, many improved methods based on dark channel prior have been proposed for different application [913]. For example, Zhang et al. [13] estimated an initial depth for each frame of a video sequence using the dark channel prior, and then refined the initial depth by exploiting spatial and temporal similarities for the video dehazing. Tripathi and Mukhopadhyay [14] applied anisotropic diffusion to refine the airlight map estimated by dark channel prior for the restoration of the scene contrast. However, dark channel prior is often unavailable in some saturation regions of the images, such as the sky or heavy foggy patches; as a result, these methods based on dark channel priors may suffer from the following problems: Firstly, the halo artifacts will be introduced or image noise will be amplified in these areas where the estimated transmission value is very small, which will severely degraded the quality of the defogged image. Secondly, because dark channel prior assumes that at least one color channel has a small pixel value in a haze-free image, the defogged image often has the dark looking, which results in that some details cannot be discriminated.

To resolve the two aforementioned problems, this paper proposes an efficient single image dehazing method via transmission compensation based on human visual system (HVS), which firstly decides the saturated areas in the input images via HVS. To suppress the halo artifacts and noise amplification, the just-noticeable distortion (JND) of HVS is introduced to decide the adaptive transmission compensation. Meanwhile, the boundary constraint on transmission is determined to avoid the dark defogged images. The experimental results show that this proposed image dehazing algorithm can efficiently both remove the haze and simultaneously suppress the halo artifacts and noise in the saturation patches.

2 Related works

Due to the absorption and scattering, the radiance from the objects through the atmosphere is attenuated and dispersed. In the hazed weather, dust, smoke, water droplets and other dry particles in the atmosphere greatly scatter, absorb the radiance from the objects and blend with the airlight, and only a percentage of the reflected light reaches the observer, which yields low contrast, obscure the clarity of the sky [15] and causes poor visibility in such degraded scenes. According to the Koschmieder’s law [16], the radiance that reaches the observer is composed of two main additive components: direct attenuation and veiling light [2, 17]:

$$\begin{aligned} \mathbf{I}(\mathbf{x})=\mathbf{L}(\mathbf{x})\hbox {e}^{-\beta d(\mathbf{x})}+\mathbf{A}\left( 1-\hbox {e}^{-\beta d(\mathbf{x})}\right) \end{aligned}$$
(1)

where \(\mathbf{L}\) is the scene radiance, \(\mathbf{I}\) is the observed radiance, \(\mathbf{x}\) is the pixel position in the observed image, and \(\mathbf{A}\) is the global airlight constant. The first component, direct attenuation \(\mathbf{D}=\mathbf{L}(\mathbf{x})t(\mathbf{x})\), represents how the scene radiance is attenuated due to medium properties. The veiling light component is the main cause of the color shifting and can be expressed as:

$$\begin{aligned} \mathbf{V}=\mathbf{A}\left( 1-\hbox {e}^{-\beta d(\mathbf{x})}\right) =\mathbf{A}(1-t(\mathbf{x})) \end{aligned}$$
(2)

where \(t(\mathbf{x})=\hbox {e}^{-\beta d(\mathbf{x})}\le 1\) is the transmission along the cone of vision and \(\beta \) is the homogeneous medium attenuation coefficient due to the scattering, while \(d\) represents the distance between the observer and the considered scene. The value of \(t(\mathbf{x})\) depicts the amount of light which has been transmitted between the observer and the scene surface. Image hazing aims to recover \(t, \mathbf{L}\) and \(\mathbf{A}\) for each pixel \(\mathbf{x}\) in the input image. Practically, while no additional information about depth and airlight is given, haze removal is an ill-posed problem.

He et al. [8] discovered an interesting dark channel prior that at least one color channel of some pixels in most of the non-sky patches of the haze-free image has very low intensity at some pixels and defined the dark channel \(\mathbf{L}^{\mathrm{dark}}\) of image \(\mathbf{L}\) as follows:

$$\begin{aligned} \mathbf{L}^{\mathrm{dark}}=\mathop {\min }\limits _{\mathbf{y}\in \Omega (\mathbf{x})} \left( {\mathop {\min }\limits _{c\in \{ {r,g,b}\}} (\mathbf{L}_c (\mathbf{y}))} \right) \end{aligned}$$
(3)

where \(\mathbf{L}_c \) is a color channel of \(\mathbf{L}\) and \(\Omega (\mathbf{x})\) is a local patch centered at x. The dark channel operation is taken to the degraded model described in Eq. (1).

$$\begin{aligned}&\mathop {\min }\limits _{\mathbf{y}\in \Omega (\mathbf{x})} \left( {\mathop {\min }\limits _{c\in \{ {r,g,b}\}} \left( \frac{\mathbf{I}_c (\mathbf{y})}{\mathbf{A}_\mathbf{c} }\right) } \right) \nonumber \\&\quad =\mathop {\min }\limits _{\mathbf{y}\in \Omega (\mathbf{x})} \left( {\mathop {\min }\limits _{c\in \{ {r,g,b}\}} \left( \frac{\mathbf{L}_c (\mathbf{y})}{\mathbf{A}_c }\right) } \right) t(\mathbf{x}) +\left( {1-t(\mathbf{x})} \right) \end{aligned}$$
(4)

Then, the real transmission \(t(\mathbf{x})\) can be described as follows:

$$\begin{aligned} t(\mathbf{x})=\frac{1-\mathop {\min }\limits _{\mathbf{y}\in \Omega (\mathbf{x})} \left( {\mathop {\min }\limits _{c\in \{ {r,g,b}\}} \left( \frac{\mathbf{I}_c (\mathbf{y})}{\mathbf{A}_\mathbf{c} }\right) } \right) }{1-\mathop {\min }\limits _{\mathbf{y}\in \Omega (\mathbf{x})} \left( {\mathop {\min }\limits _{c\in \{ {r,g,b}\}} \left( \frac{\mathbf{L}_c (\mathbf{y})}{\mathbf{A}_\mathbf{c} }\right) } \right) } \end{aligned}$$
(5)

According to dark channel prior, for an outdoor haze-free image \(\mathbf{L}\), its dark channel tends to be zero and \(\mathbf{A}_c\) is positive constant, thus the estimated transmission can be simply determined by

$$\begin{aligned} t_0 (\mathbf{x})=1-\mathop {\min }\limits _{\mathbf{y}\in \Omega (\mathbf{x})} \left( {\mathop {\min }\limits _{c\in \{ {r,g,b} \}} \left( \frac{\mathbf{I}_c (\mathbf{y})}{\mathbf{A}_\mathbf{c} }\right) } \right) \end{aligned}$$
(6)

Lastly, He et al. [8] used the soft matting to refine the estimated transmission and recover the clean image. However, this method cannot effectively suppress image noise and halo artifacts. Based on the degraded model, the gradient magnitude of the hazy image and the restored image has the following relationship [5, 18]:

$$\begin{aligned} \nabla \mathbf{I}_c (\mathbf{x})=\nabla \mathbf{L}_c (\mathbf{x})t(\mathbf{x})+\nabla \mathbf{A}_c (1-t(\mathbf{x}))=\nabla \mathbf{L}_c (\mathbf{x})t(\mathbf{x})\nonumber \\ \end{aligned}$$
(7)

where \(\nabla \) denotes the gradient magnitude operator. Eq. (7) illustrates that the gradient magnitude in the defogged image is related to the transmission.

Due to the refraction or reflection of the water droplets in the atmosphere, the captured images often more or less suffer from the halo artifacts or noise, especially in the sky regions. In the foggy weather, these halo artifacts or noises in the foggy images almost cannot be perceived by human eyes because of the absorption and reflection of the particles. However, after the fog removal, these imperceptible gray differences in the hazy image will be greatly boosted while the transmission is close to zero, and then the halo artifacts are introduced into the restored images. As shown in Fig. 1b, some halo artifacts and image noise are introduced in the sky regions, which severely degrade the restored images. Moreover, dark channel prior assumes that at least one color channel of the haze-free image \(\mathbf{L}\) should tend to be zero, which will darken the restored images. Although Yan et al. [19] presented the non-local structure-aware regularization to properly estimate the transmission and suppress the halo artifacts, they increased the high computation burden. Moreover, it hardly suppresses the halo artifacts in the images containing large sky patches. To deal with the aforementioned problems, we propose an efficient single image dehazing method via adaptive transmission compensation in this paper. Figure 1 illustrates an example of our dehazing result.

Fig. 1
figure 1

Comparison with the method of He’s work [8], a input image Street, b the result of He’s work, c the transmission estimated by He’s work, d the result of our method, e the transmission estimated by our method

3 The proposed method

3.1 Boundary constraint on transmission

Geometrically, according to Eq. (1), a pixel \(\mathbf{I}(\mathbf{x})\) contaminated by the haze will be “pushed” towards the global atmospheric light \(\mathbf{A}\) [20]. As a result, the clean pixel \(\mathbf{L}(\mathbf{x})\) can be recovered by a linear extrapolation from \(\mathbf{A}\) to \(\mathbf{I}(\mathbf{x})\). Consider that the scene radiance of a given image is always bounded, i.e.,

$$\begin{aligned} \mathbf{L}(\mathbf{x})\ge \mathbf{L}^{0} (\mathbf{x}) \end{aligned}$$
(8)

where \(\mathbf{L}^{0}\) is the lower bound vector that is relevant to a given image. Consequently, for any pixel \(\mathbf{x}\), a natural requirement is that the extrapolation of \(\mathbf{L}(\mathbf{x})\) must be larger than the lowest intensity bounded by \(\mathbf{L}^{0}\). In turn, given the global atmospheric light \(\mathbf{A}\) and the lower bound vector \(\mathbf{L}^{0}(\mathbf{x})\), a boundary constraint on the transmission \(t(\mathbf{x})\) can be determined by the lowest intensity as follows:

$$\begin{aligned} t(\mathbf{x})\ge & {} t_b (\mathbf{x})=\frac{1-\mathop {\min }\limits _{\mathbf{y}\in \Omega (\mathbf{x})} \left( {\mathop {\min }\limits _{c\in \{ {r,g,b}\}} \left( \frac{\mathbf{I}_c (\mathbf{y})}{\mathbf{A}_\mathbf{c} }\right) } \right) }{1-\mathop {\min }\limits _{\mathbf{y}\in \Omega (\mathbf{x})} \left( {\mathop {\min }\limits _{c\in \{ {r,g,b}\}} \left( \frac{\mathbf{L}_{c}^{0} (\mathbf{y})}{\mathbf{A}_\mathbf{c} }\right) } \right) }\nonumber \\\ge & {} t_0 (\mathbf{x}) \end{aligned}$$
(9)

where \(t_b (\mathbf{x})\) is the lower bound of \(t(\mathbf{x})\).

According to Eq. (7), halo artifacts in the sky patches come from the enlarged gray difference between the neighboring pixels in the hazy image. Therefore, another constraint for the halo artifacts and image noise suppression should be imposed on the transmission so that the amplified luminance variation also cannot be perceived in the restored image if it cannot be perceived in the hazy image. In this paper, the just-noticeable difference or distortion (JND) model of the HVS is introduced to adaptively decide the boundary constraint on transmission. JND model is a quantitative measure for distinguishing the luminance change perceived by the HVS [21, 22]. In other words, JND gives the maximum luminance variation values which cannot be perceived by human eyes, and the perceptual function for evaluating the visibility threshold of the JND model can be described as follows:

$$\begin{aligned} \hbox {JND}(k)=\left\{ {{\begin{array}{l@{\quad }l} {T_0 \left[ {1-(k/127)^{0.5}} \right] +3}&{} {k<127} \\ {\gamma (k-127)+3}&{} {\hbox {otherwise}} \\ \end{array} }} \right. \end{aligned}$$
(10)

where \(k\) is the background luminance within \([0, 255]\). \(T_0 \) denotes the visibility threshold when the background gray level is 0, and \(\gamma \) denotes the slope of the line that models the JND visibility threshold function at higher background luminance; they depend on the viewing distance between the objects and the observer. In this paper, \(T_0 \) and \(\gamma \) are set to be 17 and 3/128 based on the subjective experiments conducted by Chou and Li [21]. It is easy to verify that the HVS perceives the luminance variation best in the situation where the background luminance is 127. In other words, if the HVS cannot perceive the luminance variation where the background luminance is 127, it cannot perceive the luminance variation in the other situations either.

Moreover, the background luminance is approximately linear to the luminance variation since the pixel luminance is linear to the background luminance. Let \(I_b \) be the ideal background luminance of the defogged image (Each channel has the same ideal background luminance). To suppress the halo artifacts or noise, the luminance variation \(\Delta \mathbf{L}_c (\mathbf{x})\) and the corresponding background intensity of the defogged image \(\mathbf{L}_c (x)\) often meet the following condition:

$$\begin{aligned} \frac{\Delta \mathbf{L}_c (\mathbf{x})}{\mathbf{L}_c (\mathbf{x})}= & {} \frac{\Delta \mathbf{I}_c (\mathbf{x})/t(\mathbf{x})}{(\mathbf{I}_c (\mathbf{x})-\mathbf{A}_c )/t(\mathbf{x})+\mathbf{A}_c }\nonumber \\= & {} \frac{\Delta \mathbf{I}_c (\mathbf{x})}{\mathbf{I}_c (\mathbf{x})-\mathbf{A}+\mathbf{A}_c t(\mathbf{x})}\le \frac{\hbox {JND}(I_b )}{I_b } \end{aligned}$$
(11)

where \(\Delta \mathbf{L}_c (\mathbf{x})\) is the difference between the itself and the low-pass filtered value of the pixel luminance \(\mathbf{L}_c (x)\), and JND() is the visibility threshold defined in Eq. (10). In turn, integrating each channel and local region information of a color image with Eq. (11), the transmission \(t(\mathbf{x})\) for a color image should meet the following constraint:

$$\begin{aligned} t(\mathbf{x})\ge & {} 1-\mathop {\min }\limits _{\mathbf{y}\in \Omega (\mathbf{x})} \mathop {\min }\limits _{c\in \left\{ {r,g,b} \right\} } \left( {\frac{\mathbf{I}_c (y)}{\mathbf{A}_c }} \right) \nonumber \\&+\frac{I_b }{\hbox {JND}(I_b )}\mathop {\max }\limits _{\mathbf{y}\in \Omega (\mathbf{x})} \mathop {\max }\limits _{c\in \left\{ {r,g,b} \right\} } \left( {\frac{\Delta \mathbf{I}_c (\mathbf{y})}{\mathbf{A}_c }} \right) \nonumber \\\ge & {} 1-\mathop {\min }\limits _{\mathbf{y}\in \Omega (\mathbf{x})} \mathop {\min }\limits _{c\in \left\{ {r,g,b} \right\} } \left( {\frac{\mathbf{I}_c (y)}{\mathbf{A}_c }-\frac{I_b \times \Delta \mathbf{I}_c (y)}{\hbox {JND}(I_b )\times \mathbf{A}_c }} \right) \nonumber \\ \end{aligned}$$
(12)

Thus, as for the sky regions, the compensation value to the estimated transmission \(t_0 (\mathbf{x})\) for the halo artifacts or noise suppression should be given by

$$\begin{aligned} \Delta t(\mathbf{x})= & {} \frac{I_b }{\hbox {JND}(I_b )}\mathop {\max }\limits _{\mathbf{y}\in \Omega (\mathbf{x})} \mathop {\max }\limits _{c\in \{ {r,g,b}\}} \left( {\frac{\Delta \mathbf{I}_c (\mathbf{y})}{\mathbf{A}_c }}\right) \nonumber \\= & {} \frac{I_b }{\hbox {JND}(I_b )}\mathbf{G}^{\mathrm{bright}}(\mathbf{x}) \end{aligned}$$
(13)

where \(\mathbf{G}^{\mathrm{bright}}(\mathbf{x})\) is the bright channel of the normalized variation and expressed as follows:

$$\begin{aligned} \mathbf{G}^{\mathrm{bright}}(\mathbf{x})=\mathop {\max }\limits _{\mathbf{y}\in \Omega (\mathbf{x})} \mathop {\max }\limits _{c\in \{ {r,g,b}\}} \left( {\frac{\Delta \mathbf{I}_c (\mathbf{y})}{\mathbf{A}_c }} \right) \end{aligned}$$
(14)

Obviously, while the ideal background luminance \(I_b \) and threshold \(\hbox {JND}(I_b )\) are given, the larger the luminance variation, the more compensation is needed to suppress halo artifacts or noises in the distant sky region. According to JND model, HVS perceives the maximum luminance variation when the background luminance is 127. Moreover, the variable \(I_b /\hbox {JND}(I_b )\) keeps the similar value while the ideal background luminance \(I_b \) is larger than or equal to 127, as shown in the Fig. 2. Therefore, the ideal background luminance \(I_b \) is set as 127 in this paper.

Fig. 2
figure 2

The mapping function map for the variable \(I_b /\hbox {JND}(I_b )\) based on JND model

On the contrary, as for the non-sky regions, image dehazing method aims to remove haze as clean as possible so that the defogged image has high contrast and the details can be clearly discriminated, thus, no transmission compensation is needed. Because different transmission compensation strategies are implemented in different regions to suppress halo artifacts and remove haze, the problem left is to segment the saturation and non-saturation regions. In Sect. 3.2, this paper will introduce a saturation regions detection method based on the HVS.

3.2 Saturation regions detection based on HVS

In fact, fog or haze has the similar qualities with human visual areas including Devries-Rose, Weber, saturation and low contrast areas [23]. Specifically, the heavy hazy image has high brightness, the concentrated gray distribution in the saturation regions, and these pixels with the thin haze tend to be concentrated in the Devries-Rose regions and these pixels with the moderate haze are concentrated in the Weber regions. In a word, three areas of the HVS, Devries-Rose, Weber and saturation areas, correspond to different thickness of haze: thin, moderate and heavy haze, respectively. Based on this property, we introduce the HVS to divide the hazy image into the saturation and non-saturation regions.

According to Ref. [23], image enhancement based on HVS performs the image region segmentation using the background intensity and the rate of change information. The background intensity is calculated as a weighted local mean, and the rate of change is calculated as a gradient measurement. The background intensity at each pixel \(\mathbf{x}\) is derived by the following formula:

$$\begin{aligned}&\mathbf{B}(\mathbf{x})=m\otimes \left[ {m\otimes \left( {\frac{m}{2}\otimes \sum _{\mathbf{y}\in \mathbf{Q}(\mathbf{x})} {\mathbf{I}(\mathbf{y})\oplus \frac{n}{2}\sum _{\mathbf{y}\in \mathbf{Q}^{D}(\mathbf{x})} {\mathbf{I}(\mathbf{y})} } } \right) \oplus \mathbf{I}(\mathbf{x})} \right] \nonumber \\ \end{aligned}$$
(15)

where \(\mathbf{B}(\mathbf{x})\) is the background intensity of the luminance component for a pixel \(\mathbf{x}\) in the input image, \(\mathbf{I}(\mathbf{x})\) is the luminance component of input image, \(\mathbf{Q}(\mathbf{x})\) is the set of the pixels which are directly up, down, left, and right from the pixel \(\mathbf{x}\), \(\mathbf{Q}^{\mathbf{D}}(\mathbf{x})\) is all of the pixels diagonally one pixel away, and \(m\) and \(n\) are some constant. \(\oplus \) and \(\otimes \) is the PLIP model operator and can be summarized as follows:

$$\begin{aligned} a\oplus b= & {} a+b-\frac{ab}{M}\end{aligned}$$
(16)
$$\begin{aligned} c\otimes a= & {} M-M\times \left( 1-\frac{a}{M}\right) ^{c} \end{aligned}$$
(17)

where \(M\) is the maximum value of the range. Finally, these thresholds for the different regions segmentation by HVS are given as follows:

$$\begin{aligned} B_1 =\alpha _1 B_T \quad B_2 =\alpha _2 B_T \quad B_3 =\alpha _3 B_T \end{aligned}$$
(18)

where \(\alpha _1 ,\alpha _2 \) is the lower contrast level, Devries-Rose and Weber level, respectively. \(\alpha _3 \) is the saturation level and \(B_T \) is the maximum difference value and is denoted as \(B_T =255(\max (\mathbf{B})-\min (\mathbf{B}))/(255-\min (\mathbf{B}))\).

Given a pixel \(\mathbf{x}\) in the saturation regions of the hazy image, its intensity \(\mathbf{B}(\mathbf{x})\) is close to the airlight and also is larger than the threshold \(B_3 \) as defined in Ref. [23], and its corresponding transmission tends to be close to zero. Moreover, no halo artifacts and image noise can be perceived in the original images, which means that the corresponding luminance variation is smaller than the visibility threshold defined in Eq. (12). Therefore, unlike to Ref. [23], this paper defines the condition of the saturation areas or sky patches as follows:

$$\begin{aligned} \mathbf{x}\in \left\{ {{\begin{array}{ll} \mathbf{S}&{} \hbox {if}: ( {t_0 (\mathbf{x})\le T_h } )\cap \left( {\mathbf{B}(\mathbf{x})\ge B_3 } \right) \\ &{} \cap \left( {\Delta \mathbf{I}(\mathbf{x})<J_{\mathrm{nd}} } \right) \\ {\hbox {Other}}&{} {\hbox {otherwise}} \\ \end{array} }} \right. \end{aligned}$$
(19)

where \(\mathbf{S}\) denotes the saturation regions, \(T_h \) and \(J_{nd} \) are the transmission and the visibility threshold, respectively. Based on Eq. (19), the hazy image is firstly divided into the saturation and non-saturation regions. Some segmentation results are shown in Fig. 3, which indicates that the improved method can efficiently segment the saturation regions.

Fig. 3
figure 3

Image segmentation results by our method for the haze images Canon, New York, Sam and Traffic (the original images are shown in Figs. 4, 5 and 6)

3.3 Adaptive compensation strategy for transmission

Equation (13) gives the transmission compensation constrain to suppress the halo artifacts or noise for these pixels in the saturation regions, but, as for these pixels in the non-saturation patches, no transmission compensation is needed so that the haze can be removed as cleanly as possible. To maintain the continuity of the transmission compensation, we rewrite the transmission compensation defined in Eq. (13) for each pixel \(\mathbf{x}\) as follows:

$$\begin{aligned} \Delta t_1 (\mathbf{x})=\frac{I_b }{V_h +\left[ {\hbox {JND}(I_b )-V_h } \right] \left[ {\mathbf{I}^{\mathrm{dark}}(\mathbf{x})/\mathbf{I}_{\max }^{\mathrm{dark}} } \right] }\mathbf{G}_0^{{\mathrm{bright}}} (\mathbf{x})\nonumber \\ \end{aligned}$$
(20)

where \(V_h \) is the high visibility threshold, \(\mathbf{I}_{\max }^{\mathrm{dark}} \) is the maximum value of dark channel image \(\mathbf{I}^{\mathrm{dark}}\). Thus, Eq. (20) has the same meaning with the Eq.(13) while \(\mathbf{I}^{\mathrm{dark}}\) is equal to \(\mathbf{I}_{\max }^{\mathrm{dark}} \). \(\mathbf{G}_0^{{\mathrm{bright}}} (\mathbf{x})\) is the modified bright channel of the normalized variation \(\mathbf{G}^{\mathrm{bright}}(\mathbf{x})\), and described as follows.

$$\begin{aligned} \mathbf{G}_0^{{\mathrm{bright}}} (\mathbf{x})\!=\!\left\{ {{\begin{array}{ll} {\frac{J_{\max }}{\mathbf{A}^{\mathrm{dark}}}}&{} {\mathbf{G}^{{\mathrm{bright}}} (\mathbf{x})\!>\!\frac{J_{\max } }{\mathbf{A}^{\mathrm{dark}}}\!\cap \!\mathbf{x}\in \mathbf{S}} \\ {\frac{J_{\min } }{\mathbf{A}^{\mathrm{dark}}}}&{} {\left( {\mathbf{G}^{{\mathrm{bright}}} (\mathbf{x})\!<\!\frac{J_{\min } }{\mathbf{A}^{\mathrm{dark}}}\!\cap \! \mathbf{x}\!\in \!\mathbf{S}} \right) \!\cup \!\left( {\mathbf{x}\notin \mathbf{S}} \right) } \\ \end{array} }} \right. \nonumber \\ \end{aligned}$$
(21)

where \(J_{\max }\) and \(J_{\min } \) are the maximum and minimum perceptual threshold, respectively, because all pixels in the input image have different intensity variation. For example, due to the influence of the image noise, some pixels in the sky patches have the large intensity variation, but some have very small values. Hence, \(J_{\max } \) and \(J_{\min } \) are used to confine the intensity variation of the pixels so that little transmission compensation is exerted to the pixels in the non-saturation regions and much transmission compensation is applied to these pixels in the saturation regions for halo artifacts or noise suppression.

Moreover, the brighter the dark channel, the more compensation is needed and vice versa. Thus, we define another transmission compensation for each pixel in other areas as the follows:

$$\begin{aligned} \Delta t_2 (\mathbf{x})=w(\mathbf{x})\Delta T=\exp \left( {\frac{I^{\mathrm{dark}}(\mathbf{x})-I_{\max } }{\sigma _2 }} \right) \Delta T \end{aligned}$$
(22)

where \(I_{\max } \) is the upper bound of the gray value and is set to 255 in this paper and \(\Delta T\) is the maximum transmission compensation value and given by \(\Delta T=I_b J_{\max } /(\hbox {JND}(I_b )\mathbf{A}^{\mathrm{dark}}), \sigma _2 \) is suggested be \(0.2I_{\max } \). Thus, the transmission compensation can be made by the following function:

$$\begin{aligned} \Delta t(\mathbf{x})=\max (\Delta t_1 (\mathbf{x}),\Delta t_2 (\mathbf{x})) \end{aligned}$$
(23)

At the same time, in order to avoid the transmission value which is larger than one, the compensated transmission is redefined as follows:

$$\begin{aligned} t_1 (\mathbf{x})=t_0 (\mathbf{x})+\min (\Delta t(\mathbf{x}),1-t_0 (\mathbf{x})) \end{aligned}$$
(24)

Furthermore, the transmission also should meet this condition given by Eq. (11) to avoid the dark-looking images. Therefore, the last estimated transmission is given by

$$\begin{aligned} t(\mathbf{x})=\max (t_b (\mathbf{x}),t_1 (\mathbf{x})) \end{aligned}$$
(25)

Lastly, this paper adopts the guided filter [24] to refine the last estimated transmission map and restore the clear images.

4 Experimental results

To comprehensively demonstrate the effectiveness of this proposed algorithm, firstly, this paper qualitatively evaluates the algorithm on a group of typical images with different size of sky patches or saturation regions. Secondly, this paper quantitatively compares the proposed algorithm with several state-of-the-art methods. In saturation regions detection algorithm, \(m,\, n,\, M,\, \alpha _3 \) and \(\beta \) are set as 0.9, 1.4, 255, 0.9 and 0.2, respectively. The visibility threshold \(J_{\mathrm{nd}} \) is set to 3 and the boundary constraint \(t_b (\mathbf{x})\) is computed by setting the radiance bounds \(\mathbf{L}^{0}=(30, 30, 30)\). The threshold \(V_h\) is set as 80, and the threshold \(J_{\max } \) and \(J_{\min } \) are set as 3 and 1, respectively. The airlight \(\mathbf{A}\) is estimated via He’s work [8].

4.1 Qualitative evaluation

Figure 4 shows some examples of our dehazing results and the recovered transmission maps. Obviously, the results show that our proposed algorithm restores foggy images very well with acceptable visual quality: the haze in image Canon is almost completely removed, and no halo artifacts or image noises are introduced into the recovered image for the image New York, Sam and Traffic. This good performance benefits from the reason that the proposed method adaptively compensates the transmission in the sky patches and saturation regions, which can effectively suppress halo artifacts and image noises.

Fig. 4
figure 4

Image dehazing results by our method. Top row input haze imagesCanon, New York, Sam and Traffic. Middle row the dehazing results. Bottom row the recovered transmission maps

We also compare our method with several state-of-the-art methods. Figures 5 and 6 illustrate the comparisons of our method with He’s [8], Tarel’s [25], Fattal’s, Tripathi’s [14], Meng’s [20] and Yan’s [19] methods. As for a hazy image shown in Fig. 5a, Tarel’s method can augment the image details and enhance the image visual distance, but some significant artifacts appear around the sharp edges (e.g., trees). Fattal’s method darkens some regions of the images (e.g., trees regions). Meng’s method produces the excessive saturated color images. The proposed method produces the similar results with He’s method because it makes a little compensation to the transmission. Figure 6a depicts a forest region against a background of bright sky. Tarel’s and Tripathi’s method not only introduces white artifacts around the sharp edges but also generates some halo artifacts in the sky patches, and Fattal’s method overenhances the sky. He’s and Meng’s produce the saturated color and low-lighting images, meanwhile they introduce the significant halo artifacts in the sky. Although Yan’s [19] method recovers the clear details in the non-saturation regions, it still produces the halo artifacts in some sky patches because it only introduces non-local structure-aware regularization to smooth the transmission and the defogged image, and it hardly suppresses halo artifacts while the transmission is close to zero. In comparison, our method not only removes the haze in the hazy image, but also suppresses the halo artifacts in the sky patches, which improves the visual quality of the image while restoring the faithful colors and preserves the structure information and appropriate brightness of the original image.

Fig. 5
figure 5

Comparison with image dehazing results of state-of-the-art algorithms on image house, a input image, b He’s result, c Tarel’s result, d Fattal’s result, e Meng’s result [20], f Yan’s [19] result and g our result

Fig. 6
figure 6

Comparison with image dehazing results of state-of-the-art algorithms on image Canberra, a input image, b He’s result, c Tarel’s result, d Fattal’s result, e Tripathi’s result [14], f Meng’s result [20], g Yan’s[19] result and h our result

4.2 Quantitative evaluation

Because it is difficult to acquire the corresponding ground truth data for the input foggy images, this paper uses four quantitative evaluation metrics to quantitatively assess this proposed algorithm and compare it with these state-of-the-art algorithms [12, 17]. These four evaluation metrics are named as the new visible edges ratio \((e)\), the percentage of number of saturated pixels \((\Sigma )\), structure similarity (Ss) and the luminance similarity (Ls). The first two metrics are proposed by Hautiere et al. [26] for the objective blind assessment of dehazing effect. The metric \(\Sigma \) represents the percentage of pixels which become completely black or completely white after the restoration, and the metric \(e\) evaluates the ability of the dehazing method to restore the edges which are not visible in the original image but are visible in the defogged image; the higher value of \(e\) indicates the better performance of the image dehazing algorithm because the clean images have more contrast and clear details than the hazy images. The structure similarity function (Ss) and luminance similarity function (Ls) presented by Wang et al. [27] are used to assess the structure and brightness perseveration of the image dehazing method because the dehazed images should generally maintain the similar structure information to the original images, and the low structure similarity often means over-enhancement and introduction of halo artifacts or noise and vice versa. Similarly, the higher luminance similarity shows that the dehazing algorithm has the better performance in the brightness preservation.

A comparison between our proposed method and other methods on several typical foggy images is made and shown in Tables 1 and 2. Tripathi’s method has the highest metric \(e\) because it adopts the anisotropic diffusion to refine the airlight map which can efficiently remove the haze. Tarel’s method introduces the white artifacts around the sharp edges and some halo artifacts in the sky patches, which will also increase the metric \(e\). On the contrary, our proposed algorithm employs the transmission compensation to suppress halo artifacts or noise, which may reduce image contrast and the metric \(e\). However, compared with other existing algorithms, our method has the highest structure similarity Ss, which shows that it has better performance of halo artifacts or noise suppression, and it also has the good ability of brightness preservation. Moreover, the proposed method and He’s method give the smallest \(\Sigma \).

Table 1 Quantitative comparisons in \(e\) and \(\Sigma \)
Table 2 Quantitative comparisons in Ls and Ss

5 Conclusion

This paper develops an efficient single-image dehazing algorithm using adaptive transmission compensation via HVS, which can remove the haze and simultaneously suppress the halo artifacts or noise in the sky patches. This paper firstly employs an improve segmentation method based on HVS to decompose the hazy image into the saturation and non-saturation regions. Then, an adaptive transmission compensation method via just-noticeable distortion (JND) of HVS is presented to suppress the halo artifacts and noise. Meanwhile, the brightness boundary constraint on transmission is employed to avoid producing too dark restored images. Experimental results on a variety of haze images demonstrate that the proposed method can efficiently produce the high-quality images in various realistic scenes. Note that the performance of the proposed method is influenced by the saturation regions detection. Better saturation region detection methods based on fuzzy theory, Bayesian framework might improve performance of the proposed method.