Mathematical Problems in Engineering

Volume 2017, Article ID 9739201, 8 pages

https://doi.org/10.1155/2017/9739201

## Incident Light Frequency-Based Image Defogging Algorithm

School of Energy Science and Engineering, University of Electronic Science and Technology of China, Chengdu 611731, China

Correspondence should be addressed to Wenbo Zhang; moc.361@toorts and Xiaorong Hou; nc.ude.ctseu@rxuoh

Received 12 December 2016; Revised 29 March 2017; Accepted 2 April 2017; Published 10 April 2017

Academic Editor: Jean Jacques Loiseau

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.

#### 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 Beer-Lambert 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 model-based 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 non-sky 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 model-based 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 real-time 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 Beer-Lambert 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 Prior-Based 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 Frequency-Based 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 Beer-Lambert 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 Beer-Lambert 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 single-variable 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) Long-Field Images*. The overwhelming majority of scenes in the images are in the range of long-field depth (objects are over 500 m away from the camera).

*(ii) Short-Field Images*. The overwhelming majority of scenes in the images are in the range of short-field depth (objects are less than 500 m away from the camera).

*(iii) Mixed-Field Images*. Long and short-field scenes exist side by side in the images.

For long-field 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 short-field 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 mixed-field 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 short-field images. As can be seen from (14), the key to the processing of short-field 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.