Research Article  Open Access
Wenbo Zhang, Xiaorong Hou, "Incident Light FrequencyBased Image Defogging Algorithm", Mathematical Problems in Engineering, vol. 2017, Article ID 9739201, 8 pages, 2017. https://doi.org/10.1155/2017/9739201
Incident Light FrequencyBased Image Defogging Algorithm
Abstract
To solve the color distortion problem produced by the dark channel prior algorithm, an improved method for calculating transmittance of all channels, respectively, was proposed in this paper. Based on the BeerLambert Law, the influence between the frequency of the incident light and the transmittance was analyzed, and the ratios between each channel’s transmittance were derived. Then, in order to increase efficiency, the input image was resized to a smaller size before acquiring the refined transmittance which will be resized to the same size of original image. Finally, all the transmittances were obtained with the help of the proportion between each color channel, and then they were used to restore the defogging image. Experiments suggest that the improved algorithm can produce a much more natural result image in comparison with original algorithm, which means the problem of high color saturation was eliminated. What is more, the improved algorithm speeds up by four to nine times compared to the original algorithm.
1. Introduction
The images taken by cameras in foggy weather are born with poor visibility and low contrast, which makes lots of trouble to image segmentation and target detection in video surveillance system and makes various outdoor monitoring systems, such as video surveillance system, unable to work reliably in bad weather. Therefore, it is an important research topic to improve the reliability and robustness of the outdoor monitoring system with simple and effective image defogging algorithm. Many researchers have made extensive studies and achieved a series of theoretical and application results [1–19].
Image defogging methods fall into two categories [20, 21]: image enhancement and physical modelbased restoration. The image enhancement method does not consider the cause of image degradation in foggy weather, only dealing with the characteristics of the foggy image with high precision and low contrast. This can weaken the fog effect on images, improve the visibility of scenes, and enhance the contrast of images. The most commonly used method in image enhancement is histogram equalization, which can effectively enhance the contrast of images, but owing to the uneven depth of scenes in foggy images, namely, different scenes are affected by fog in varying degree, global histogram equalization cannot fully remove the fog effect, while some details are still blurred. In literature [22], the sky is first separated by local histogram equalization, and then depth information matching is obtained skillfully in the nonsky zone by a moving template. This algorithm overcomes the shortcoming of the global histogram equalization for the detail processing and avoids the influence of the sky noise. But when this algorithm is applied, subimage selection easily leads to block effect and thereby cannot improve the visual effect considerably.
The physical modelbased restoration method analyzes and processes the degradation process of foggy images in depth. To solve the problem of degraded image restoration, it first analyzes the inverse generation process of degraded images and builds a model for the effect of atmospheric scattering on the attenuation of image contrast. Generally speaking, since the degradation of physical process is considered, foggy images can be enhanced more effectively in this way than simple image processing. Yitzhaky et al. [23] were the first to consider the cause of foggy image degradation. Based on the detailed analysis of the influence of atmosphere on image degradation, an image degradation model was proposed. The effect of the atmosphere on the degradation of the image is considered as a degraded system, which can be used to eliminate the influence of weather factors on the image. However, since the key to building an image degradation model is to determine an atmospheric modulation transfer function and that the ratio of the effect of atmospheric turbulence and aerosol particles in the atmospheric modulation transfer function has something to do with the meteorological conditions of image photographing, the corresponding local meteorological parameters should be acquired from the meteorological station. However, these parameters are usually hard to get due to the harsh additional conditions.
In recent years, He et al. [24] proposed an algorithm based on dark channel a priori, which has attracted broad attention for its simplicity and efficacy. Dark channel a priori enables quick acquisition of transmissivity corresponding to each point from the original image, thus making realtime defogging possible, which is a premium feature for outdoor surveillance. Its practical application, however, usually produces results that are affected by color oversaturation, leading to image distortion. For this reason, this paper proposed an improved algorithm. First, incident light frequency’s effect on the transmittance of various color channels was analyzed according to the BeerLambert Law, from which a proportion among various channel transmittances was derived; after that, images were preprocessed by downsampling to refine transmittance, and then the original size was restored to enhance the operational efficiency of the algorithm; finally, the transmittance of all color channels was acquired in accordance with the proportion, and then the corresponding transmittance was used for image restoration in each channel.
The remainder of this paper is structured as follows. Section 2 outlines the principle of the defogging algorithm based on dark channel prior; Section 3 analyzes the shortcomings of the original algorithm and derives an improved algorithm; Section 4 proves the validity of the improved algorithm by comparing it with the existing algorithms in experiments.
2. Dark Channel PriorBased Defogging Algorithm
2.1. Atmospheric Scattering Model
The atmospheric scattering model proposed by Narasimhan et al. [25–29] describes the degradation process of foggy images:where represents the intensity of the image observed, represents the intensity of scene light, represents the atmospheric light at infinity, and is known as transmittance. The first equation item is an attenuation term, and is an atmospheric light item. The aim of image defogging is to restore from .
2.2. Dark Channel Prior
Dark channel prior knowledge comes from statistical observations of a great many outdoor fogless images. It shows that in most images there are always some pixels that have a small value on a color channel. This prior knowledge can be defined as follows:
represents a color channel of , while is a pixel centered square area. Suppose is an outdoor fogless image, and is a dark channel of , and the above experiential law obtained by observations is known as dark channel prior. Dark channel prior knowledge indicates that the value of is always very low and close to 0.
2.3. Defogging by Dark Channel Prior
Suppose that atmospheric light has been fixed; then suppose transmittance is constant in a local region. The minimum operator is adopted for (1), and meanwhile is divided, reducing towhere superscript denotes the component of a certain color channel and denotes a roughly estimated transmittance. The minimum operator is adopted for color channel , so
According to the law of dark channel prior, the dark channel item in the outdoor fogless images should approach 0:
A rough transmittance can be estimated if the above equation is substituted into (4):
It has been discovered that in the practical application if the fog is removed thoroughly, an image will, however, look unreal, and depth perception will be lost. Therefore, constant can be introduced to (6) to retain some fog:
Transmittance can only be roughly estimated according to the above equation, so to improve the accuracy, the original paper used an image matting algorithm [30] to refine the transmittance. The following linear equation can be solved to refine the transmittance:where is a corrected parameter and is the Laplacian matrix proposed by the image matting algorithm, which is usually a large sparse matrix.
After a refined transmittance is obtained, the equation below is used to calculate the resulting image of defogging:where atmospheric light is estimated this way: sort the pixels in dark channel in descending order by brightness value, compare the brightness value of the corresponding points of the first 0.1% pixels in the original image , and finally take the brightest point as atmospheric light .
For most outdoor foggy images, the above algorithm can achieve a good defogging effect, but color distortion or excessive color saturation may be caused when this algorithm is used to process some images. Moreover, the algorithm runs very slowly. For instance, it will take 39.96 seconds to process an image with a size of . To solve this problem, this paper improved the original algorithm.
3. Incident Light FrequencyBased Algorithm
The imaging formula popular in the machine vision field is adopted in the existing defogging models [25–29], which was derived based on the BeerLambert Law [31]:where represents the brightness value of the pixel at coordinate in the image, represents the reflection coefficient of various body surfaces, and is transmittance , which represents the attenuation degree of energy when light propagates in atmosphere.
As can be seen from the proof procedure of the BeerLambert Law, transmittance is derived from the equation below:where represents incident light frequency, represents a certain point on the propagation path of incident light. As shown in (11), transmittance is related to the medium attribute of each point on the propagation path of incident light.
3.1. Original Algorithm Hypotheses
To reduce the complexity of the existing defogging model, two hypotheses are made on transmittance in it.
3.1.1. Constant Frequency
When incident light frequency is constant, (11) is simplified into
As can be seen in the equation above, the medium attribute function on the propagation path is simplified from bivariate function into singlevariable function .
3.1.2. Homogeneous Atmospheric Media
Suppose there are homogeneous atmospheric media on the propagation path of incident light; then (12) is further simplified intowhere represents the field depth at point in the image, namely, the spatial distance between object and imaging device.
3.2. Improvement Direction
Although the above two hypotheses have greatly simplified the complexity of the defogging model, they also reduce the quality of defogging. To further improve defogging quality, we reintroduced the effect of incident light frequency on attenuation coefficient into atmospheric light imaging formula (10), thus further improving the atmospheric light imaging formula, as shown below:
At this point, attenuation coefficient is turned into the function of incident light frequency .
According to the distance between object and imaging device (field depth), foggy images can fall into three categories.
(i) LongField Images. The overwhelming majority of scenes in the images are in the range of longfield depth (objects are over 500 m away from the camera).
(ii) ShortField Images. The overwhelming majority of scenes in the images are in the range of shortfield depth (objects are less than 500 m away from the camera).
(iii) MixedField Images. Long and shortfield scenes exist side by side in the images.
For longfield images, since field depth has increased, the concentration of fog on the propagation path of incident light will show increasingly complex changes with distance increasing. So, the prerequisites for the tenability of (14) are as follows: media are no longer uniformly distributed on the propagation path of light, and a new atmospheric light model needs to be built. According to the observation of the real world, if an observed object is farther away from the observer, the light from it will be harder to discover and thereby be replaced with atmospheric light (the sum of the various light beams from the environment that interact with each other). Thus, the analytical processing of such images can be translated into that of atmospheric light distribution.
For shortfield images, due to the small field depth, the concentration of fog within this range can be considered constant, so such foggy images can be processed by (14).
For mixedfield images, zones can be partitioned according to field depth, and then images can be processed separately by scene types.
This paper proposed an improved method for the processing of shortfield images. As can be seen from (14), the key to the processing of shortfield images lies in the calculation of attenuation coefficient . That is the focus of research in this paper.
3.3. Attenuation Coefficient
Since only the incident light from such three frequency bands as red (R), green (G), and blue (B) is imaged by a sensing method in the current cameras, the analysis of can be limited to R, G, and B. A typical frequency value is fetched, respectively, from R, G, and B, which correspond to attenuation coefficients , respectively. The value of attenuation coefficient can be calculated by the analytical statistics of the attenuation of pure light R, G, and B in foggy weather.
After the value of is calculated, their ratio can be computed. The result is denoted by
The statistical experiment shows that the effect of image restoration is comparatively ideal when .
Suppose it is known that some color channel’s transmittance ; other channels’ transmittance can be calculated by it:where .
As can be seen in the equation above, once a color channel’s transmittance is worked out, other color channels’ transmittance can be calculated according to it, as shown below:
3.4. An Improved Image Restoration Method
Based on the analysis above, this section put forward a new transmittance calculation method.
The main steps are shown as follows:(1)Reduce image size, desampling the input image to .(2)Acquire dark channel pixel value and its color channel according to the formula below:(3)Calculate the transmittance corresponding to the color channel in which the dark channel is located using the formula below:(4)Use (8) to refine transmittance into .(5)Restore to the size of the original image by interpolation and get .(6)Calculate the transmittance of all color channels by (17).(7)Restore original image in all color channels using the formula below:
The rough operating process of the defogging algorithm is shown in Figure 1.
4. Experiments and Analysis
To test the effect of this algorithm, this paper selected six images: Tiananmen (); House (); Swan (); Sweden (); NY (); Gugong ().
To prove the superiority of the proposed algorithm, four famous defogging algorithms, CLAHE [19], Tarel’s [18], Meng’s [17], and He’s [24], were used. The code of CLAHE was downloaded from Xu’s Website [32], and the parameter ClipLimit used by this algorithm is set to 0.02. The code of Tarel’s algorithm was downloaded from Tarel’s Website [33], the percentage of restoration is set to 0.95, balance is set to 0.5, smax is set to 1, and factor is set to 1.3. The code of Meng’s algorithm was downloaded from Meng’s home page [34], the parameter method of Airlight function is set to our, and the Window size is set to 15. The parameter C0 of Boundcon function is set to 30, C1 is set to 300, and the Window size is set to 3. The parameter lambda of CalTransmission function is set to 2 and param is set to 0.5; the parameter delta of Dehazefun function is set to 0.85. The code of He’s algorithm was implemented by MATLAB code, the Window used for dark channel calculation is set to , and used in (6) is set to 0.95. The soft matting algorithm [30] is used to optimize the transmittance result.
The experimental platform we used: hardware platform is Intel(R) Core(TM) i33220 CPU with a basic frequency of 3.3 GHz, 8 G memory with a basic frequency of DDR3 1600 MHz, software platform is MATLAB R2016a 64bit.
Image matting was adopted to refine transmittance in the original algorithm [24]. But this method essentially has high time complexity and space complexity since it is usually used to solve largescale sparse linear equations. However, the effect of this step on restoration is no more than softening the edge of the transition region between foreground and background to weaken edge effect. Thus, the algorithm proposed in this paper reduces image size significantly, then refines transmittance by image matting, and finally restores the refined transmittance image to the original size by tricubic interpolates.
Figure 2 is a comparison of transmittance between the improved algorithm and the original algorithm. As can be seen in the figure, there is little difference between both in edge softening. However, size reduction can help greatly improve the computational efficiency of restoration algorithm.
As can be seen from Table 1, He’s algorithm consumes the most time; it takes nearly 70 seconds to process an image with size of (typical size of monitor image). CLAHE algorithm consumes the least time, but the defogging effect is very poor because of the serious color distortion. Tarel’s algorithm has the same problem of color distortion as CLAHE. Meng’s algorithm and our algorithm consume almost the same time and both have good defogging effect. However, as can be seen from the local magnification result, Figure 4, our algorithm is better than Meng’s algorithm in detail. It also can be seen that, by downsampling before refining transmittance, the time of the operating efficiency of our algorithm is 49 times as high as that of the original one.

According to the results before and after improvement shown in Figure 3, after the transmittance of multiple channels is corrected, the algorithm proposed in this paper solves the problem of slightly higher color saturation in the existing algorithm and achieves a better and more natural visual effect than the original algorithm.
(a) Tiananmen
(b) House
(c) Swan
(d) Sweden
(e) NY
(f) Gugong
5. Conclusions
This paper made a theoretical analysis and experimental observation of the dark channel priorbased defogging algorithm, discovering from its theoretical basis that the existing algorithm ignores the effect of incident light frequency on transmittance. Therefore, this paper started with the derivation process of transmittance to reversely derive the relation between various channel transmittances to enhance the defogging algorithm. The experimental results suggest that this improved algorithm can achieve a more natural color effect in the restoration result. Since roughly calculated dark channel was still used to compute the relationship between various transmittances, a slight block effect appeared in our restoration result. The proposed algorithm will be improved in the next work to eliminate the block effect.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
References
 H. Zhang, X. Liu, and Y. Cheung, “Efficient single image dehazing via sceneadaptive segmentation and improved dark channel model,” in Proceedings of the International Joint Conference on Neural Networks (IJCNN '16), Vancouver, Canada, July 2016. View at: Publisher Site  Google Scholar
 M. Ju, D. Zhang, and X. Wang, “Single image dehazing via an improved atmospheric scattering model,” The Visual Computer, pp. 1–13, 2016. View at: Publisher Site  Google Scholar
 H. Lu, Y. Li, S. Nakashima, and S. Serikawa, “Single image dehazing through improved atmospheric light estimation,” Multimedia Tools and Applications, vol. 75, no. 24, pp. 17081–17096, 2016. View at: Publisher Site  Google Scholar
 Z. Mi, H. Zhou, Y. Zheng, and M. Wang, “Single image dehazing via multiscale gradient domain contrast enhancement,” IET Image Processing, vol. 10, no. 3, pp. 206–214, 2016. View at: Publisher Site  Google Scholar
 T. Cui, L. Qu, J. Tian, and Y. Tang, “Single image haze removal based on luminance weight prior,” in Proceedings of the IEEE International Conference on Cyber Technology in Automation, Control, and Intelligent Systems (CYBER '16), pp. 332–336, Chengdu, China, June 2016. View at: Publisher Site  Google Scholar
 Z. Tang, X. Zhang, X. Li, and S. Zhang, “Robust image hashing with ring partition and invariant vector distance,” IEEE Transactions on Information Forensics and Security, vol. 11, no. 1, pp. 200–214, 2016. View at: Publisher Site  Google Scholar
 Z. Gao and Y. Bai, “Single image haze removal algorithm using pixelbased airlight constraints,” in Proceedings of the 22nd International Conference on Automation and Computing (ICAC '16): Tackling the New Challenges in Automation and Computing, no. 1, pp. 267–272, Colchester, UK, 2016. View at: Google Scholar
 S. Santra and B. Chanda, “Single image dehazing with varying atmospheric light intensity,” in Proceedings of the 5th National Conference on Computer Vision, Pattern Recognition, Image Processing and Graphics (NCVPRIPG '15), December 2015. View at: Publisher Site  Google Scholar
 Q. Zhu, J. Mai, and L. Shao, “A fast single image haze removal algorithm using color attenuation prior,” IEEE Transactions on Image Processing, vol. 24, no. 11, pp. 3522–3533, 2015. View at: Publisher Site  Google Scholar  MathSciNet
 B. Huo, F. Yin, and B. Polytechnic, “Image dehazing with dark channel prior and novel estimation,” International Journal of Multimedia and Ubiquitous Engineering, vol. 10, no. 3, pp. 13–22, 2015. View at: Google Scholar
 C. Science and M. Studies, “Image enhancement techniques for different atmospheric conditions,” International Journal of Advance Research in Computer Science and Management Studies, vol. 3, no. 2, pp. 49–52, 2015. View at: Google Scholar
 L. K. Choi, J. You, and A. C. Bovik, “Referenceless prediction of perceptual fog density and perceptual image defogging,” IEEE Transactions on Image Processing, vol. 24, no. 11, pp. 3888–3901, 2015. View at: Publisher Site  Google Scholar  MathSciNet
 H. Zhao, C. Xiao, J. Yu, and X. Xu, “Single image fog removal based on local extrema,” IEEE/CAA Journal of Automatica Sinica, vol. 2, no. 2, pp. 158–165, 2015. View at: Publisher Site  Google Scholar  MathSciNet
 L. Zhang, X. Li, B. Hu, and X. Ren, “Research on fast smog free algorithm on single image,” in Proceedings of the 1st International Conference on Computational Intelligence Theory, Systems and Applications (CCITSA '15), pp. 177–182, IEEE, Yilan, Taiwan, December 2015. View at: Publisher Site  Google Scholar
 Y.K. Wang and C.T. Fan, “Single image defogging by multiscale depth fusion,” IEEE Transactions on Image Processing, vol. 23, no. 11, pp. 4826–4837, 2014. View at: Publisher Site  Google Scholar  MathSciNet
 Z. Tang, X. Zhang, and S. Zhang, “Robust perceptual image hashing based on ring partition and NMF,” IEEE Transactions on Knowledge and Data Engineering, vol. 26, no. 3, pp. 711–724, 2014. View at: Publisher Site  Google Scholar
 G. Meng, Y. Wang, J. Duan, S. Xiang, and C. Pan, “Efficient image dehazing with boundary constraint and contextual regularization,” in Proceedings of the 14th IEEE International Conference on Computer Vision (ICCV '13), pp. 617–624, December 2013. View at: Publisher Site  Google Scholar
 J.P. Tarel and N. Hautiere, “Fast visibility restoration from a single color or gray level image,” in Proceedings of the IEEE 12th International Conference on Computer Vision (ICCV '09), pp. 2201–2208, IEEE, Kyoto, Japan, September 2009. View at: Publisher Site  Google Scholar
 K. Zuiderveld, “Contrast limited adaptive histogram equalization,” in Graphics Gems IV, P. S. Heckbert, Ed., pp. 474–485, Academic Press Professional, San Diego, Calif, USA, 1994. View at: Google Scholar
 Y. Xu, J. Wen, L. Fei, and Z. Zhang, “Review of video and image defogging algorithms and related studies on image restoration and enhancement,” IEEE Access, vol. 4, pp. 165–188, 2016. View at: Publisher Site  Google Scholar
 S. Lee, S. Yun, J.H. Nam, C. S. Won, and S.W. Jung, “A review on dark channel prior based image dehazing algorithms,” EURASIP Journal on Image and Video Processing, vol. 2016, article 4, 2016. View at: Publisher Site  Google Scholar
 Z. Pei, Z. Hong, Q. I. Xueming, and L. Han, “An image clearness method for fog,” Journal of Image and Graphics, vol. 9, no. 1, pp. 124–128, 2004. View at: Google Scholar
 Y. Yitzhaky, I. Dror, and N. S. Kopeika, “Restoration of atmospherically blurred images according to weatherpredicted atmospheric modulation transfer functions,” Optical Engineering, vol. 36, no. 11, pp. 3064–3072, 1997. View at: Publisher Site  Google Scholar
 K. He, J. Sun, and X. Tang, “Single image haze removal using dark channel prior,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 33, no. 12, pp. 2341–2353, 2011. View at: Publisher Site  Google Scholar
 S. G. Narasimhan and S. K. Nayar, “Contrast restoration of weather degraded images,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 25, no. 6, pp. 713–724, 2003. View at: Publisher Site  Google Scholar
 S. G. Narasimhan and S. K. Nayar, “Vision and the atmosphere,” International Journal of Computer Vision, vol. 48, no. 3, pp. 233–254, 2002. View at: Publisher Site  Google Scholar  Zentralblatt MATH
 Y. Y. Schechner, S. G. Narasimhan, and S. K. Nayar, “Instant dehazing of images using polarization,” in Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR '01), vol. 1, pp. I325–I332, December 2001. View at: Google Scholar
 F. Cozman and E. Krotkov, “Depth from scattering,” in Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pp. 801–806, June 1997. View at: Google Scholar
 S. K. Nayar and S. G. Narasimhan, “Vision in bad weather,” in Proceedings of the 17th IEEE International Conference on Computer Vision ( ICCV '99), vol. 2, pp. 820–827, Kerkyra, Greece, 1999. View at: Google Scholar
 A. Levin, D. Lischinski, and Y. Weiss, “A closedform solution to natural image matting,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 30, no. 2, pp. 228–242, 2008. View at: Publisher Site  Google Scholar
 D. F. Swinehart, “The BeerLambert law,” Journal of Chemical Education, vol. 39, no. 7, pp. 333–335, 1962. View at: Publisher Site  Google Scholar
 Y. Xu, J. Wen, L. Fei, and Z. Zhang, “Implementation code of clahe,” http://www.yongxu.org/code/the%20survey%20of%20defogging.zip. View at: Google Scholar
 J.P. Tarel and N. Hautiere, “Implementation code of fast visibility restoration from a single color or gray level image,” http://perso.lcpc.fr/tarel.jeanphilippe/visibility/visibresto2.zip. View at: Google Scholar
 G. Meng, Y. Wang, J. Duan, S. Xiang, and C. Pan, “Implementation code of efficient image dehazing with boundary constraint and contextual regularization,” http://www.escience.cn/people/menggaofeng/research.html. View at: Google Scholar
Copyright
Copyright © 2017 Wenbo Zhang and Xiaorong Hou. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.