Single Image Dehazing based on Dark Channel Prior with Different
Atmospheric Light
Sheng Zhang and Wencang Bai
Graduate School at Shenzhen, Tsinghua University, Nanshan District, Shenzhen, China
zhangsh@sz.tsinghua.edu.cn, bwc15@mails.tsinghua.edu.cn
Keywords: Single Image Dehazing, Dark Channel Prior, Different Atmospheric Light.
Abstract: Single image dehazing based on dark channel prior could recover a high-quality haze-free image from non-
sky image. However, it does not perform well in bright region such as sky region. This paper proposes a
novel method for single image dehazing, which jointly considers the atmospheric lights of sky regions and
land surface. In this proposal, we divide the image with sky regions into bright image (such as sky region
and artificial light) and dark image (such as natural outdoor scenery and buildings) according to the image
saturation, the intensity of pixels and Rayleigh scattering theory. In the recovery processing, bright image
and dark image can be recovered separately with different parameters of atmospheric light. The
experimental results show that the proposed scheme can obtain a high-quality haze-free image in the images
which cover the sky.
1 INTRODUCTION
Computer vision system has been widely used into
outdoor scene such as the urban traffic, video
surveillance, remote sensing, navigation, target
identification, etc. But cameras do not perform well
in bad weather, especially in haze, fog, smoke. The
turbid medium (e.g., particles, aerosol and water
droplets) in the atmosphere can lead to atmospheric
absorption and scattering. The irradiance received by
the camera from the scene is attenuated, and then the
output of camera is degraded seriously. Haze and
fog restrict the function of outdoor system. Thus,
single image dehazing is a channelling issue for
image processing.
In the range of visible light, atmospheric
scattering plays an important role in image
degrading. The longer the distance from scene point
to camera is, the greater the effect of atmospheric
scattering is. The reasons of image degrading are
listed as following: 1) Because of atmospheric
scattering, the irradiance of scene is attenuated
gradually along the line of sight. 2) The airlight -
ambient light reflected into the line of sight by
atmospheric particles (He et al., 2009)-is blended
into the camera.
Due to the uncertainty of weather itself, single
image dehazing has always been a challenging task.
Recently, many single image haze removal
algorithms have been proposed. Oakley et al.
assumed that atmospheric light of whole image is
constant and the mean and deviation of local pixels
have a proportional relationship. Oakley proposed a
statistical model to revise image contrast by
optimizing the global cast function (Oakley et al.,
2007). Tan et al. assumed that atmospheric light of
whole image is constant and construct cast function
of edge strength using Markov Random Field (MRF)
model (Tan et al., 2008). His method just maximizes
the local contrast and does not conform to physical
model. Fattal et al. assumed that atmospheric light of
whole image is constant and the albedo of the scene
and the medium transmission are locally
uncorrelated (Fattal et al., 2008). Meng et al.
assumed that medium transmission derive an
inherent boundary constraint on the scene
transmission (Meng et al., 2013). The final
transmission is calculated through iterative
optimization. He et al. proposed dark channel prior
for single image dehazing (He et al., 2009). He
found that, in most of the local regions which do not
cover the sky, some pixels very often have very low
intensity in at least one color channel. But his
approach is invalid when the scene object is
inherently similar to the airlight. In this paper, we
propose an improved method for images which
cover the sky.
224
Zhang S. and Bai W.
Single Image Dehazing based on Dark Channel Prior with Different Atmospheric Light.
DOI: 10.5220/0006154702240229
In Proceedings of the 12th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications (VISIGRAPP 2017), pages 224-229
ISBN: 978-989-758-225-7
Copyright
c
2017 by SCITEPRESS Science and Technology Publications, Lda. All rights reserved
2 SINGLE IMAGE DEHZING
BASED ON DARK CHANNEL
PRIOR
The model widely used in computer vision and
computer graphics to describe the formation of a
hazy image is(Tan et al., 2008; Fattal et al., 2008;
Narasimhan et al., 2000; Narasimhan et al., 2002):
I
(
x
)
=J
(
x
)
t
(
x
)
+ A(1 t(x)) (1)
where I is the observed image, J is the scene
radiance, t is the medium transmission and A is the
global atmospheric light. I, J and t are three-
dimensional matrix function and A is a constant
scalar. The goal is to get J from I in the premise that
A and t are unknown.
Dark channel prior considers that in most of the
non-sky patches at least one color channel has some
pixels whose intensity are very low and close to zero
(He et al., 2009). The dark channel
dark
J
is calculated
by
J

(
x
)
=max
∈()
(min
∈{,,}
())) (2)
where
is a channel of surface shading, and () is
a local patch centered at x.
He et al. randomly pick out 5,000 images and
manually cut out the sky regions. The intensity of all
the 5,000 dark channel show that about 75 percent of
the pixels in the dark channel have zero values, and
the intensity of 90 percent of the pixels is below
25(He et al., 2009). According to the statistic the
dark channel is given by.
J

(x) 0 (3)
Putting (3) into (1), we can simplified the formula
I

(
x
)
=A(1t
̃
(x)) (4)
when pixels at infinite distance, the medium
transmission
̃
tends to be zero .The intensity of the
pixels at infinite distance could be regard as the
global atmospheric light:
I


=A (5)
If the regions of infinite distance do not exist in
the image, He et al. select the regions in which the
concentration of mist is highest. In that areas t is
small, and the approximation of A could be
obtained. He picks the top 0.1 percent brightest
pixels in the dark channel. Among these pixels, the
pixels with highest intensity in the input image I are
selected as the atmospheric light (He et al., 2009).
Figure 1: Haze removal with a larger atmospheric light.
Left: Input hazy image. Right: Recovered haze free image.
The atmospheric light A is computed from
formula (5). If the atmospheric light A is known,
medium transmission could be got from formula (4):
t
̃
=1

(6)
With the atmospheric light and the transmission
map, the scene radiance could be got according to
formula (1). However, the scene scattering term
J(x)t(x) may be close to zero when the medium
transmission t(x)is tend to zero. Therefore, He
restricts the medium transmission t(x) by a lower
bound t0=0.1 (He et al., 2009). The final scene
radiance J(x) is recovered by
J
(
x
)
=
(
)

(
(
)
,
)
+A (7)
For reducing the complexity and reducing the
halo artifact, He et al. applied guided image filter
(He et al., 2013) to refine the medium transmission
t(x). But, for sky regions, the method cannot perform
very well. We presented a method to solve the
problem
3 OUR PROPOSED METHOD
Dark channel prior is a simple but effective image
prior. But it may be invalid when the scene
containing sky. In the image containing sky the
atmospheric light used to recover hazy image is
larger than actual atmospheric light. Thus, the
recovered image is darker than actual scene surface
and color deviation exists in sky regions (see in
Figure 1 right).
3.1 Different Atmospheric Light
We believe that the atmospheric lights of sky
regions and land surface are different. The light of
sky is come from the sun, but the light of land
Single Image Dehazing based on Dark Channel Prior with Different Atmospheric Light
225
Figure 2: Haze removal using different atmospheric light. Left: Input hazy image. Atmospheric light of sky region is 223.
Atmospheric light of land surface is 162. Middle: Recovered by atmospheric light A=223. Right: Recovered by atmospheric
light A=162.
surface is come from sky. The light is attenuated in
the atmospheric medium. Therefore, the atmospheric
light of sky is larger than land surface. Previous
algorithm based on the atmospheric lights of sky and
land surface are same. This is the reason why dark
channel prior just perform well in non-sky images.
In He’s method (He et al., 2009), the atmospheric
light is selected in sky region because the intensity
of pixels in sky regions is larger than land surface.
Thus, the atmospheric light of land surface is larger
than actual light. According to formula (7), the land
surface region in recovered haze free image is darker
than actual scene and the sky region has a perfect
result (see Figure 2 Middle). If we choose the
atmospheric light of land surface as the atmospheric
light of whole image, the sky region in recovered
haze free image is brighter than actual scene and the
land surface region perform well (see Figure 2
Right).From the comparison we confirm the
conclusion that the atmospheric lights of sky and
land surface are different.
3.2 Divide the Input Image
Lord Rayleigh proposed the theory of scattering in
1871. In the theory, when the size of particles in
medium is same as molecule the intensity of
scattering is inversely proportional to the fourth
power of wavelength. The wavelength of blue and
violet light is the shortest and the wavelength of red
light is the longest in the solar spectrum. Otherwise,
blue light has the largest power in short wave
spectrum. Thus, sky is blue. The intensity of blue
channel is largest and red channel is least in the sky
regions of images.
Through a large number of experiments, we
conclude three factors to distinguish the sky regions
1) The intensity of three channels is almost same
and the saturation is very small in sky regions. On
the contrary, colorful scene has a larger saturation.
In sky regions the intensity of blue channel is
slightly higher and red channel is slightly lower.
Therefore, the saturation of sky is close to zero.
Through a lot of experiments, we find that the
saturation of sky regions is below to 0.09. The
saturation is expressed as:
S=

∈
{
,,
}

∈
{
,,
}

∈
{
,,
}
(8)
2) The intensity of pixels in sky regions is larger
than land surface regions if there is not artificial
light. Through experimental observation we find that
the intensity of sky regions is above 200 in sunny
day and above 160 in cloudy day.
3) According to Rayleigh scattering theory, the
intensity of blue channel is largest and red channel is
least in sky regions. In RGB channels, R<G<B.
Overview of dividing the Hazy image I(x):
Input: Hazy image I(x)
(1). Limiting condition c
1
: c
1
is a matrix which
size is same as saturation S.
if (S > 0.09) c
1
=1; else c
1
=0
(2). Limiting condition c
2
:
if (maximum intensity of pixel>200) c
2
=1
else c
2
=0
(3). Limiting condition c
3
:
if (R<G<B) c
3
=1 else c
3
=0
VISAPP 2017 - International Conference on Computer Vision Theory and Applications
226
Figure 3: Image segmentation. Left: Input image. Middle: Sky region. Right: Land surface scene region.
Dark channel
prior + Guided
Image Filter
Reduce
Intensity
Increase
Intensity
Dark channel
prior + Guided
Image Filter
Figure 4: Algorithmic flow.
(4). c=c
1
&c
2
&c
3
. If c=1, corresponding regions
of input image is sky.
Output: sky region I
sky
(x), land surface region
I
land
(x)
In Figure 3, we show the results of segmentation
using the three constraints.
3.3 Algorithmic Flow
This paper mainly focuses on the effect of
atmospheric light and draws the conclusion that the
atmospheric light of sky and land surface is
different. The algorithmic flow is shown as Figure 4.
Since the different atmospheric light of sky and
land surface, we divide input image into sky image
Single Image Dehazing based on Dark Channel Prior with Different Atmospheric Light
227
Figure 5: Comparison with He’s work. Left: Input image. Middle: He’s result. Right: Our result.
Figure 6: Comparison with He’s work. Left: Input image. Middle: He’s result. Right: Our result.
Figure 7: Comparison with He’s work. Left: Input image. Middle: He’s result. Right: Our result.
Figure 8: Comparison with other’s work. Input image. Fattal’s result. Meng’s result. He’s result. Our result.
and land scene image firstly. Dark channel prior
could be directly used in land scene image. For sky
image we reduce the intensity of sky by minus a
constant value B. Recovered sky image plus B is the
haze free sky image. Finally the integral haze free
image could be got by stitching sky region and land
VISAPP 2017 - International Conference on Computer Vision Theory and Applications
228
scene region.
When the value of B is too large, the intensity of
recovered sky regions may exceed 255 resulting in
loss of information. When the value of B is too
small, variation range of recovered pixels is too
small lead to low contrast. Through a large number
of experiments, it is appropriate when B is 100.
4 EXPERIMENTAL RESULTS
In Figure 5, Figure 6 and Figure 7 we compare our
result with He’s result. In Figure 5 Middle, the
intensity of scene is darker than actual scene (e g:
the red elliptical box) and color distortion occurs in
sky patches. In Figure 6 Middle, the reflected light
of water surface (see in the red elliptical box) is
mistaken for haze and the distant scene is darker
than actual scene. Artificial light (see in the red
elliptical box) is exist in Figure 7 Left, and is
mistaken for atmospheric light in Figure 7 Middle.
Therefore, the color of whole image is darker than
the actual color. Artificial light which atmospheric
light is larger than land surface is same as sky.
In Figure 8, Fattal can’t achieve a proper result.
The overall recovered image is darker than real
reflection image. In Meng’s result sky regions
appear color distortion, and there is a perfect
recovery in land surface regions. Our results keep
the actual color of sky and have the state-of-the-art
contrast.
5 CONCLUSIONS
In this paper, we propose a method to solve the
defect of dark channel prior-dark channel prior does
not perform well in sky-images. Through the above
discussion, our method has the state-of-the-art result
for images which covered sky. But, our method may
not work well for some particular images (e. g.,
images containing snow). The reason is that we need
to divide the input image into sky region and land
surface scene. Since the atmospheric light used in
these two regions is different and the edge of
segmented image is not accurate, the edge between
them become more conspicuous, or may be brighter
than sky region. We intend to solve the problem
using image matting (Chuang et al., 2001; Levin et
al., 2006) in future research.
ACKNOWLEDGEMENTS
The authors would like to thank the Advanced
Sensor and Integrated System Lab, Graduate School
at Shenzhen, Tsinghua University, for financially
supporting this research under project
NO.ZDSYS20140509172959969.
REFERENCES
He, K., Sun, J., Tang, X., 2009. Single image haze
removal using dark channel prior. In IEEE Conference
on Computer Vision and Pattern Recognition, 2009.
pp. 1956-1963.
Oakley, J, P., Bu, H., 2007. Correction of simple contrast
loss in color images. In IEEE Transactions on Image
Processing A Publication of the IEEE Signal
Processing Society, vol. 16, pp. 511-22.
Tan, R, T., 2008. Visibility in bad weather from a single
image. Proc. IEEE Conf. Computer Vision and Pattern
Rrcognition pp. 1-8.
Fattal, R., 2008. Single image dehazing. Acm Transactions
on Graphics, vol. 27, pp. 1-9.
Meng, G., Wang, Y., Duan, J., Xiang, S., Pan, C., 2013.
Efficient Image Dehazing with Boundary Constraint
and Contextual Regularization. In IEEE International
Conference on Computer Vision, pp. 617-624.
Narasimhan, S, G., Nayar, S. K., 2000. Chromatic
framework for vision in bad weather. In Computer
Vision and Pattern Recognition, 2000. Proceedings.
IEEE Conference on, pp. 598-605 vol.1.
Narasimhan, S, G., Nayar, S, K., 2002. Vision and the
Atmosphere. International Journal of Computer Vision,
vol. 48, pp. 233-254.
He, K., Sun, J., Tang, X., 2013. Guided Image Filtering.
IEEE Transactions on Software Engineering, vol. 35,
pp. 1397-1409.
Chuang, Y, Y., Curless, B., Salesin, D, H., Szeliski, R.,
2001. A Bayesian Approach to Digital Matting. CVPR,
vol. 2, pp. 264-271.
Levin, A., Lischinski, D., Weiss, Y., 2006. A Closed Form
Solution to Natural Image Matting. In IEEE Computer
Society Conference on Computer Vision & Pattern
Recognition, pp. 61-68.
Single Image Dehazing based on Dark Channel Prior with Different Atmospheric Light
229