Image Haze Removal Using DCP
Image Haze Removal Using DCP
Image Haze Removal Using Dark Channel Prior and Inverse Image
1 1 1 1 1 2
Lei Shi , Xiao Cui , Li Yang , Zhigang Gai , Shibo Chu and Jing Shi
1
Institute of Oceanographic Instrumentation, Shandong Academy of Sciences, Qingdao, China
2
Luoyang Institute of electro-optical devices, China Aviation Industry Corporation, Luoyang, China
Abstract. Image haze removal using dark channel prior is prone to encountering color distortion in sky and
brightness region. To solve the problem, we proposed an improved method based on inverse image and dark channel
prior. Firstly, we applied inverse image to estimating a new transmission map. The new transmission map can be
used to modify original transmission map in order to avoid color distortion. Next, fast guider filter was applied to
refining transmission map. Using the transmission map, we can recover a high quality haze-free image. Experimental
results showed that the proposed method is feasible, and visibility can be enhanced.
© The Authors, published by EDP Sciences. This is an open access article distributed under the terms of the Creative Commons Attribution
License 4.0 (http://creativecommons.org/licenses/by/4.0/).
MATEC Web of Conferences 75, 03008 (2016) DOI: 10.1051/ matecconf/2016 7503008
ICMIE 2016
transmission tf (x) is restricted by a low bound to, which applied sky segmentation based on gradient threshold,
means that a small amount of haze is preserved in very then set the transmission values in sky region directly
dense haze regions. to is set as 0.1. The final scene into a fixed value. Deng et al. [14] separated firstly sky
radiance J(x) is recovered by region from background image, then applied histogram
equalization. Kim et al. [6] enhanced visibility and
J(x)=(I(x)-A)/t(x)+A, tf(x)=max(tf (x),to) (4) contrast by minimizing energy function. to was equal to
In [7], He analyzed about 5000 out-door images. Then, 0.3. All of the above algorithms can eliminate color
He told us that about 75% of the pixels in the dark distortion in some cases. These algorithms both depend
channels have zero values, and the intensities of 90% of on the experience value. But, there are also some
the pixels are below 25. This statistic gave very strong situation is that they can't deal with it. Besides that, if we
support to DCP. The algorithm can perform very well in have to separating sky region from background image,
most cases. Most pixels satisfied DCP. But, for bright this will result in burdensome calculation.
pixels such as pixels in sky region, the method can not In [15], Ancuti et al. applied semi-inverse image to
perform very well because these pixels cannot satisfy image haze removal. The semi-inverse image can be
DCP. We presented an improved method to solve the obtained by replacing the RGB values of each pixel on a
problem. per channel basis by the maximum of the initial channel
value and its inverse. In many cases, the methods can do
it well. In [6], Kim built cost function by two constraints,
3 Image haze removal based on dark as described in Equation (6) and Equation (7):
channel prior and inverse Image
I c ( y)
If there are large-area sky region and brightness object in t f ( x) min( min (1 )) (6)
c yI ( x ) A
out-door image, color distortion may appear in these
255 I c ( y)
regions when He’s method [7] is applied, as described in t f ( x) max(max(1 )) (7)
Figure 2 under section 4. According to our observations, c yI ( x ) 255 A
these regions will be brighter than others in most cases,
and these differences between RGB channels values are Equation (7) denoted inverse image can be used to
very small. In general, the pixel values of RGB channels haze removal. Kim‘s cost function included two portions.
may be close to atmospheric light value A. DCP is not Besides Equation (6) and Equation (7), he also added the
established in these regions. According to Equation (1), information loss cost. In [16], Tang et al. proposed
we obtained˖ similar constraints to [15].
1 min( min ( I c ( y) A))
c y ( x )
tactual ( x) (5)
1 min( min ( J c ( y) A))
c y ( x )
2
MATEC Web of Conferences 75, 03008 (2016) DOI: 10.1051/ matecconf/2016 7503008
ICMIE 2016
The three works [6], [15]-[16] told us that inverse utilizing He’s method [7], [10]. Only our proposed
image is very useful for haze removal. But, only it can method can deal with color distortion in all cases.
not deal with all cases. We presented an improved
method to overcoming color distortion using inverse Table 1. Consuming time.
image. The algorithm can be described as follows:
Sample He’s Our Our Picture
1) Calculated inverse image of original image, then Number method by method by method by size
calculated their dark channel images, and applied Guider Guider Fast (pixels)
minimum filtering. filter(ms) filter(ms) Guider
2) Calculated global atmospheric light value filter(ms)
respectively. 1 733 1451 406 690×517
3) Calculated initial transmission map respectively. 2 172 328 93 320×240
4) In order to reduce the complexity of calculation, 3 359 687 187 500×333
we refined the two transmission map by fast guide filter 4 515 967 266 585×413
[10] respectively.
5) Determined the maximum between the two In Table 1, we gave the time consumption comparison
refined transmission maps. with He et al. [7], [10]. As can be seen, our approach will
6) Recovered free-haze image by Equation (4). spend more time if the transmission map was refined by
The flow chart is described as in Figure 1. guider filtering [9]; but, aided by fast guider filtering [10],
our approach is much faster than others and may achieve
the real-time requirement.
4 Experiment and analysis
All of these pictures in this paper are from the internet. In 5 Conclusion
experiments, we applied minimum filtering, and the patch
size was set to 9×9. In Equation (3), ω was equal to 0.95. In the paper, we presented an improved method based on
The parameters were r = 40, ɛ= 0.001 for the fast guided He’s work [7], [10] to deal with color distortion. The
filter [10]. In order to compare these algorithms, we method firstly determined the inverse image and
didn’t enhance these results after processing. The corresponding dark channel images, and then applied
program was written in C++ using Microsoft Visual 2008. minimum filtering. Next, we calculated the transmission
We installed OpenCV 2.4.1 Library for programming. maps and refined it by the fast guider filter [10]. Then,
Our CPU was Intel(R) Core(TM) i5-3450 CPU we modified original transmission map based on it. The
@3.10GHz. Computer memory was 8G. Operating final transmission map can be used to obtain haze-free
system was Windows 7. image. In final, we can deal with color distortion and
enhance the visibility. In future work, we will extend our
work to real-time video dehazing.
Acknowledgment
We thank He Kaiming for generating the results of his
method [7], [10]. The authors were supported by the
Shinan District Science and technology development
fund of Qingdao City under Grant No. 2014-14-013-ZH
and Qingdao pioneering and innovative leading talent
project under Grant No. 13-CX-23.
References
1. S. G. Narasimhan, S. K. Nayar, Contrast restoration
of weather degraded images. IEEE Transactions on
pattern Analysis and Machine Intelligence (PAMI).
25:713–724 (2003)
2. Y. Y. Schechner, S. G. Narasimhan, and S. K. Nayar,
Instant dehazing of images using polarization.
Figure 2. Comparison with He’s work [7]. From left to right: Processing of 2006 IEEE Conference on Computer
Input image, He’s results, our results Vision and Pattern Recognition CVPR. 1:325 (2006)
3. Kopf, J., Neubert, B., Chen, B., Cohen, M., Cohen-
We selected the four pictures. All pictures both Or, D. et al., Deep photo: Model-based photograph
included large-area sky region. In experiments, we enhancement and viewing. Processing of the 1st
compared our method with He’s method [7], [10]. These ACM SIGGRAPH Conference and Exhibition on
results can be shown in Figure 2 and Table 1. According Computer Graphics and Interactive Techniques in
to Figure 2, we observed that these samples encountered Asia. 27(5):110.1-110.6 (2008)
color distortion when there is large-area sky region and
3
MATEC Web of Conferences 75, 03008 (2016) DOI: 10.1051/ matecconf/2016 7503008
ICMIE 2016
4. Tan R T., Visibility in bad weather from a single 11. Jiang Jianguo, Hou Tianfeng, Qi Meibin, Improved
image. Processing of 2008 IEEE Conference on algorithm on image haze removal using dark channel
Computer Vision and Pattern Recognition (CVPR). prior. Journal of Circuits and Systems. 16(2):7-12
1:1-8 (2008) (2011)
5. Fattal R, Single image dehazing. Processing of the 12. Sun Xiaoming, Sun Junxi, Zhao Lirong, Cao
1st ACM SIGGRAPH Conference and Exhibition on Yonggang, Improved algorithm for single image
Computer Graphics and Interactive Techniques in haze removing using dark channel prior. Journal of
Asia. 27(3):1-9 (2008) Image and Graphics, 19(3):381-385 (2014)
6. Jin-Hwan Kim, Won-Dong Jang, Jae-Young Sim., O 13. Wang Gangyi, Ren Guanghui, Jiang Lihui, Quan
Chang-Su Kim: Optimized contrast enhancement for Taifan, Single image dehazing Algorithms based on
real-time image and video dehazing. Journal of sky region segmentation, Information Technology
Visual Communications and Image Representation. Journal. 12( 6):1168-1175 (2013)
24(3): 410-426 (2013) 14. Deng Yue, Wang Yanjie, Li Jing-yu, Chen Xiaoxi,
7. He Kaiming, Sun Jian, Tang Xiaoou, Single image Zhang Ye, Improvement of enhancement algorithm
haze removal using dark channel prior. Processing of for aerial image. Laser & Infrared. 42(9):1080-1085
2009 IEEE Conference on Computer Vision and (2012)
Pattern Recognition (CVPR). 1956-1963 (2009) 15. Ancuti C O, Ancuti C, Hermans C, et a1, A Fast
8. Levin A, Lischinski D, Weiss Y, A closed form Semi inverse Approach to Detect and Remove the
solution to natural image matting. Processing of Haze from a Single Image. 10th Asian Conference
2006 IEEE Conference on Computer Vision and on Computer Vision (ACCV 2010). Part II. LNCS,
Pattern Recognition (CVPR). 1: 61-68 (2006) 6493, pp. 501–514 (2014)
9. He Kaiming, Sun Jian, Tang Xiaoou, Guided Image 16. Tang Ketan, Yang Jianchao, Wang Jue, Investigating
Filtering. IEEE Transactions on Pattern Analysis and Haze-relevant Features in A Learning Framework for
Machine Intelligence. 35(6):1397-1409 (2013) Image Dehazing. IEEE Conference on Computer
10. He Kaiming, Sun Jian, Fast Guided Filter. Vision and Pattern Recognition (CVPR). 2995–3002
http://arxiv.org/abs/1505.00996. (2015) (2014)