IMAGE FAST DEHAZING ALGORITHM BASED ON DARK CHANNEL PRIOR IMPROVEMENT

Aiming at the long-running time and the defogging image darkening problem in the dark channel prior algorithm, a fast deaeration algorithm based on the guided filter and improved two-dimensional gamma function for dark channel prior image is proposed. The algorithm uses the guided filter instead of the soft matting to obtain the image transmittance. The summation operation in the window replaces the quadrature operation in the window to reduce the complexity of the algorithm, and the image is processed by the two-dimensional gamma function. The brightness is adjusted to increase the brightness of the dark areas of the image, improve the contrast of the image, and enhance the image's performance in detail. The experimental results show that compared with the dark channel prior defogging algorithm and other image dehazing algorithms, the image fast dehazing algorithm based on dark channel prior improvement has high effective detail intensity, image information entropy and average gradient. The running time of the dark channel prior defogging algorithm is reduced, which effectively solves the long running time and the defogging image darkness problem of the dark channel prior defogging algorithm and has good robustness, and improves the quality and display effects of defogging image. * Jiang Jianwu E-mail: fengbuxi@glut.edu.cn


General Instructions
Due to the haze of the atmosphere and the optical limiting factors in the atmosphere, the contrast in the visual scene is reduced, resulting in a decrease in image sharpness and even blurring. At present, the focus of relevant professional research is to obtain the constraint condition by the fog image itself [1,2,3] and use some algorithms to estimate the parameters of the atmospheric scattering model to obtain the ideal dehazing effect. He KM et al. [4] proposed an image dehazing method based on the dark channel prior theory, and estimated the medium propagation function to optimize it, which can obtain better experimental results, but only a rough estimate of atmospheric light and transmittance. At the same time, there are also defects with low execution efficiency; Gibson K et al. [5] use standard median filter instead of soft mapping to refine the roughness, thus greatly reducing the time overhead, but for areas with large white objects. However, only a rough estimate of atmospheric light and transmittance can be obtained, and there are also defects with relatively low execution efficiency; Wang JB et al. [6] use the variogram to improve the choice of atmospheric light, although these methods have achieved certain effects. However, there is no fundamental solution to the defect of the dark channel prior image dehazing method; Tan RT [7] obtains the restored image by maximizing the local contrast of the fog degraded image, but the defogged image is oversaturated and appears Not true enough; Kratz L et al. [8] based on the statistical independent a priori of scene reflectance and depth of field, using fuzzy Markov random field modeling of foggy days, Expectation-maximization algorithm to solve edge to fog the image is maintained better, but prone to over-enhancement phenomenon.
Aiming at the problem of the defogging image darkness and the long running time of the original dark channel-based prior defogging algorithm, this paper improves the contrast enhancement of the image based on the two-dimensional gamma function and the Subsampled improved dark channel prior algorithm. And effectively shorten the running time of the algorithm and improve the operating efficiency of the algorithm.

General Instructions
In most non-sky partial regions, some pixels of at least one color channel in the image have very low values, which are very low and approach zero. For the input image J, the dark channel is as shown in equation (1): Where c J represents one of a color channel in the image J's three channels of RGB, and ( , ) x y  represents a neighborhood centered on the pixel point ( , ) x y .
According to the study of the physical causes of foggy images [9] , the physical model of atmospheric scattering is divided into direct attenuation term and atmospheric illumination. The relationship between the original foggy image and the clear image after defogging is: ( , ) f x y is the original foggy image, ( , ) g x y is the clear image obtained after defogging, A is the global atmospheric light intensity, and ( , ) t x y is the transmittance of the corresponding pixel point of the image: It is assumed that in the window of a certain matrix area of the image, ( , ) t x y is constant to ( , ) t x y % , and the image corresponding to the transmittance value is obtained as shown in the formula (4): Finally, the output image ( , ) O x y after defogging is obtained: The dark channel defogging algorithm can well eliminate the influence of factors such as smog and improve the clarity and quality of the image.

IMPROVED DARK CHANNEL PRIOR DEFOGGING ALGORITHM
The dark channel prior defogging algorithm is simple to implement and has the good defogging effect, but the algorithm itself still has many shortcomings, such as long-running time can not meet the requirements of industrial grade, and the image after darkening is dark. In this paper, the image dehazing contrast enhancement based on two-dimensional gamma is used to improve the image contrast in the dark image. For the problem of the long-running time of the algorithm, the steering filter and image subsampled are adopted, which effectively improves the efficiency of the algorithm. The algorithm optimization framework in this paper is shown in Figure 1. While using the dark channel prior to image dehazing has a good defogging effect, but the image after defogging is dark. In real life, whether it is drone aerial survey, 3D modeling or video surveillance, images require to have high brightness and contrast.
To avoid the RGB channels influence each other, the HSV color space is required to enhance the brightness of the image, and then the enhanced image is converted to RGB space. First, the image is processed using a multi-scale Gaussian function. And by assigning different weights to the luminance components extracted by different Gaussian functions, the overall brightness and local brightness of the image are balanced.
In equation (6), ( , ) I x y is the illumination component value obtained by extracting and weighting the illumination component of the image by a plurality of Gaussian functions of different weights at point ( , ) x y . i  is the weight of the illumination component extracted by the i th Gaussian function as a percentage of the total illumination component. i is the number of Gaussian functions used. In order to balance the speed and accuracy of the illumination component extraction, the value of N is set to 3, and ( , ) F x y is the input image. ( , ) i G x y is a Gaussian function: After extracting the illumination component of the scene, it is also necessary to correct the illumination of the image to improve the brightness value of the image in the dark area. Its function expression is as follows: In formula (8)  O x y is smaller than the brightness value input at the point, thereby achieving the purpose of adjusting the brightness value of the image. Figure 2 shows the results of the two-dimensional gamma function processing. It can be seen that the darker areas in the figure are significantly enhanced and the details are more prominent.
In the equation (9), the position where the corresponding pixel is located in the original image, ( ) ij I  is the clear image of the output, and I is the guide map, indicating the weight determined by the guide map I. The steering filter is a local linear model between I and q, and the coefficients of a and b which are linear functions of the current window center at k can be expressed by the following formula: I denotes a position in an image pixel, and I denotes a defogged image in which the guidance image q is an output. In the above formula, I is known. If q is required, the coefficients a, b need to be obtained.
The above formula can be solved to find the values of a and b, which are consistent in the derivation of the least-squares method: The coefficients a, b can be found by the above formula. Where k u and 2 k  are the mean and mean values in the k w in the guided image, both: i a and i b in equation (13) represent the pixel mean within the filter window, respectively. And the guided filter is mainly to perform the summation operation in the window, so the softer drawing is faster. The improved algorithm replaces the soft buckle graph in the original dark channel prior algorithm with the steering filter, which effectively reduces the complexity of the algorithm and improves the operating efficiency of the algorithm.

Image Subsampled
: The magnification of the image Subsampled will directly affect the running speed of the algorithm and the sharpness of the image after defogging. At present, the mainstream subsampled ratios are 0.25, 0.5, 0.75 and so on. Because the image quality is low under the nearest neighbor method and the cubic convolution method is too timeconsuming, this paper uniformly uses bilinear interpolation to sample the image. The running time of the algorithm when the Subsampled was not performed was set as the control group and the time was set to 1, and the running time of the algorithm under different sampling magnifications was recorded and compared with the control group.
It can be seen from Figure 3 that when the subsampled rate is between 0.75-1, although the calculation time of the transmittance is reduced, the overall running time of the algorithm is higher than that of the unprocessed image because the image Subsampled and interpolation take a lot of time. The running time of the algorithm at the time of sampling. When the Subsampled rate is between 0.5 and 0.25, although the operation of the Subsampled algorithm and the interpolation algorithm takes a certain amount of time, the overall running time of the algorithm is reduced to some extent because the calculation time of the transmittance is greatly reduced. It can be seen that when the sampling rate of the algorithm is below 0.5, the running time of the algorithm can be effectively reduced to improve the working efficiency.

EXPERIMENT AND ANALYSIS
At present, the mainstream objective evaluation methods can be divided into three categories: no reference information, semireference information, and full reference information. In the image defogging, it is difficult to obtain a fog-free image similar to the foggy image information. Therefore, this paper adopts a method without information reference to test the dehazing effect of different algorithms [10] .
The objective indicators of image defogging without reference are effective detail intensity, no reference structural definition (NRSS), color picture information entropy, and average gradient. The effective detail intensity reflects the clarity of the image. The higher the value, the clearer the image is. The NRSS obtains the image distortion value by calculating the change of the target structure information. The smaller the value, the smaller the image distortion degree; the color picture information entropy, it the size reflects the richness of image information. In general, the higher the information entropy of the image, the richer the information and the better the image quality. The average gradient provides an objective standard for measuring the sharpness of the image. The larger the average gradient is, The clearer the image, the more layers the image contains. The larger the value of these indicators, the better the quality of the image. The defogging image of each algorithm is shown in Figure 4. The size of the image is 283*432. The objective evaluation indicators of the defogged image are shown in Table 1.

CONCLUSION
Aiming at the darkening problem of the original dark channel prior defogging algorithm after defogging, the image de-mist contrast enhancement based on the two-dimensional gamma improvement is used to enhance the contrast of the dark image; the guided filter and image subsampled are used to effectively improve the image. Algorithm operation efficiency. The experimental results show that the proposed algorithm has better effective detail intensity, image information entropy and average gradient than other dehazing algorithms, which effectively reduces the running time of the dark channel prior defogging algorithm using soft button graph filter. Very good robustness can be applied to foggy image processing in different scenes.