Single Image Haze Removal
Using Dark Channel Prior
HE, Kaiming
A Thesis Submitted in Partial Fulfilment
of the Requirements for the Degree of
Doctor of Philosophy
in
Information Engineering
The Chinese University of Hong Kong
August 2011
Abstract of thesis entitled:
Single Image Haze Removal Using Dark Channel Prior
Submitted by HE, Kaiming
supervised by Prof. TANG, Xiaoou
for the degree of Doctor of Philosophy
at The Chinese University of Hong Kong in August 2011
Haze is a natural phenomenon that obscures scenes, reduces visibility, and
changes colors. It is an annoying problem for photographers since it degrades
image quality. It is also a threat to the reliability of many applications, like
outdoor surveillance, object detection, and aerial imaging. So removing haze
from images is important in computer vision/graphics.
But haze removal is highly challenging due to its mathematical ambiguity,
typically when the input is merely a single image. In this thesis, we propose
a simple but effective image prior, called dark channel prior, to remove haze
from a single image. The dark channel prior is a statistical property of out-
door haze-free images: most patches in these images should contain pixels
which are dark in at least one color channel. Using this prior with a haze
imaging model, we can easily recover high quality haze-free images. Exper-
iments demonstrate that this simple prior is powerful in various situations
and outperforms many previous approaches.
Speed is an important issue in practice. Like many computer vision prob-
lems, the time-consuming step in haze removal is to combine pixel-wise con-
straints with spatial continuities. In this thesis, we propose two novel tech-
niques to solve this problem efficiently. The first one is an unconventional
large-kernel-based linear solver. The second one is a generic edge-aware fil-
ter which enables real-time performance. This filter is superior in various
applications including haze removal, in terms of speed and quality.
The human visual system is able to perceive haze, but the underlying
mechanism remains unknown. In this thesis, we present new illusions showing
that the human visual system is possibly adopting a mechanism similar to
the dark channel prior. Our discovery casts new insights into human vision
research in psychology and physiology. It also reinforces the validity of the
dark channel prior as a computer vision algorithm, because a good way for
artificial intelligence is to mimic human brains.
i
Contents
Abstract
Contents
1 Introduction
1.1 Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Thesis Overview . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Background
2.1 Haze Imaging Model
. . . . . . . . . . . . . . . . . . . . . . .
2.1.1 Depth . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.2
Image Degradation . . . . . . . . . . . . . . . . . . . .
i
ii
1
4
4
6
6
8
9
2.1.3 Problem Formulation and Ambiguity . . . . . . . . . . 11
2.2 Related Works . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2.1 Multiple-Image Haze Removal . . . . . . . . . . . . . . 12
2.2.2
Single Image Haze Removal
. . . . . . . . . . . . . . . 17
3 Dark Channel Prior and Single Image Haze Removal
22
3.1 Dark Channel Prior . . . . . . . . . . . . . . . . . . . . . . . . 23
3.1.1 Observation . . . . . . . . . . . . . . . . . . . . . . . . 23
3.1.2 Mathematical Formulation . . . . . . . . . . . . . . . . 25
3.1.3 Experimental Verification . . . . . . . . . . . . . . . . 29
ii
3.2 A Novel Algorithm for Single Image Haze Removal
. . . . . . 32
3.2.1 Transmission Estimation . . . . . . . . . . . . . . . . . 33
3.2.2
Soft Matting . . . . . . . . . . . . . . . . . . . . . . . . 35
3.2.3 Atmospheric Light Estimation . . . . . . . . . . . . . . 39
3.2.4
Scene Radiance Recovery . . . . . . . . . . . . . . . . . 43
3.2.5
Implementation . . . . . . . . . . . . . . . . . . . . . . 45
3.2.6 Relation to Previous Methods . . . . . . . . . . . . . . 46
3.3 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . 48
3.3.1 Patch Size . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.3.2 Results of Our Method . . . . . . . . . . . . . . . . . . 49
3.3.3 Comparisons with Previous Methods
. . . . . . . . . . 51
3.3.4 Limitations
. . . . . . . . . . . . . . . . . . . . . . . . 57
3.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4 Efficient Solutions to Refinement
64
4.1 A Large-Kernel-Based Linear Solver . . . . . . . . . . . . . . . 65
4.1.1 Related Works: Linear Solvers . . . . . . . . . . . . . . 65
4.1.2 Matting Laplacian Matrix . . . . . . . . . . . . . . . . 66
4.1.3 Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 69
4.1.4 Experiments . . . . . . . . . . . . . . . . . . . . . . . . 76
4.1.5 Conclusion and Discussion . . . . . . . . . . . . . . . . 77
4.2 Guided Image Filtering . . . . . . . . . . . . . . . . . . . . . . 78
4.2.1 Related Works: Edge-aware Filtering . . . . . . . . . . 80
4.2.2 Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.2.3 Properties . . . . . . . . . . . . . . . . . . . . . . . . . 87
4.2.4 Experiments and Applications . . . . . . . . . . . . . . 94
4.2.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . 101
5 Dark Channel Prior and Human Vision
103
5.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
5.2 Related Works . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
iii
5.3
Illusion Experiments
. . . . . . . . . . . . . . . . . . . . . . . 107
5.4 Proposed Model . . . . . . . . . . . . . . . . . . . . . . . . . . 115
5.5 Discussion and Conclusion . . . . . . . . . . . . . . . . . . . . 116
6 Conclusion
A Physical Model
118
120
A.1 Scattering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
A.2 Direct Attenuation . . . . . . . . . . . . . . . . . . . . . . . . 121
A.3 Airlight
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
A.4 Colorimetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
B Mathematical Derivations
126
B.1 Derivation 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
B.2 Derivation 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
B.3 Derivation 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Bibliography
131
iv
Chapter 1
Introduction
Haze is an atmospheric phenomenon where turbid media obscure the scenes.
Haze brings troubles to many computer vision/graphics applications. It re-
duces the visibility of the scenes and lowers the reliability of outdoor surveil-
lance systems; it reduces the clarity of the satellite images; it also changes
the colors and decreases the contrast of daily photos, which is an annoying
problem to photographers (see Fig. 1.1 left1). Therefore, removing haze from
images is an important and widely demanded topic in computer vision and
computer graphics areas.
The main challenge lies in the ambiguity of the problem. Haze attenuates
the light reflected from the scenes, and further blends it with some additive
light in the atmosphere. The target of haze removal is to recover the re-
flected light (i.e., the scene colors) from the blended light. This problem is
mathematically ambiguous: there are an infinite number of solutions given
the blended light. How can we know which solution is true? We need to
answer this question in haze removal.
Ambiguity is a common challenge for many computer vision problems.
In terms of mathematics, ambiguity is because the number of equations is
smaller than the number of unknowns. The methods in computer vision to
solve the ambiguity can roughly categorized into two strategies. The first
one is to acquire more known variables, e.g., some haze removal algorithms
capture multiple images of the same scene under different settings (like po-
larizers). But it is not easy to obtain extra images in practice. The second
strategy is to impose extra constraints using some knowledge or assumptions
1All the images in this thesis are best viewed in the electronic version.
1
Figure 1.1: Haze removal from a single image. Left: input hazy image. Right:
haze removal result of our approach.
known beforehand, namely, some “priors”. This way is more practical since
it requires as few as only one image. To this end, we focus on single image
haze removal in this thesis. The key is to find a suitable prior.
Priors are important in many computer vision topics. A prior tells the al-
gorithm “what can we know about the fact beforehand” when the fact is not
directly available. In general, a prior can be some statistical/physical prop-
erties, rules, or heuristic assumptions. The performance of the algorithms
is often determined by the extent to which the prior is valid. Some widely
used priors in computer vision are the smoothness prior, sparsity prior, and
symmetry prior.
In this thesis, we develop an effective but very simple prior, called the dark
channel prior, to remove haze from a single image. The dark channel prior
is a statistical property of outdoor haze-free images: most patches in these
images should contain pixels which are dark in at least one color channel.
These dark pixels can be due to shadows, colorfulness, geometry, or other
factors. This prior provides a constraint for each pixel, and thus solves the
ambiguity of the problem. Combining this prior with a physical haze imaging
model, we can easily recover high quality haze-free images. Experiments
demonstrate that our method is very successful in various situations (e.g.,
Fig. 1.1 right) and outperforms many previous approaches.
Besides quality, speed is another concern in practical applications, typi-
cally in real-time video processing and interactive image editing. The time-
2