# Investigations into Picture Defogging Techniques Based on Dark Channel Prior and Retinex Theory
## 3 The Proposed Methods
### Optimization of Atmospheric Light Values  
The dark channel a priori defogging algorithm selects the top 0.1% of the highest brightness pixel values in the dark channel map to be used as the global atmospheric light estimation value, and it considers that the position with the highest brightness represents the position at infinity; when there is a bright object in the image, the algorithm will be incorrectly localized on the bright object, which will result in the incorrect estimation of the atmospheric light value. In this paper, we adopt the Otsu algorithm and the edge extraction method to estimate the atmospheric light value. First, the Otsu algorithm is used to perform binary segmentation on the enhanced image in Figure 4a. The segmented image is shown in Figure 4b. The mathematical expression of [PERSON]'s algorithm is shown below:  
\[B(x)=\left\{ \begin{array}{ll}I_{E1}(x)&,p(x)\geq T_{1}\\ I_{E2}(x)&,p(x)\leq T_{1}\end{array} \right. \tag{22}\]  
In this formula, \(p(x)\) represents the pixel value of the image; \(T_{1}\) represents the optimal threshold for binary segmentation, which takes the value of 0.65; \(I_{E1}(x)\) represents the foggy area and the bright area of the image; and \(I_{E2}(x)\) represents the foggy area and the fog-free area. The white car existing in \(I_{E1}(x)\) is a bright object, which will affect the judgment of the atmospheric light area and needs to be extracted separately. Considering that the overall gray level of foggy images is relatively smooth and contains more noise, the Sobel operator is relatively accurate in edge location for high-noise images with gradual grayscale changes. Therefore, the Sobel operator is used to extract the edges. The extraction  
Figure 3: Dark channel compensation analysis: (**a**) enhanced image \(I_{E}(x)\); (**b**) minimum dark channel image \(I_{dark1}(x)\); (**c**) compensated dark channel \(I_{dark}(x)\); (**d**) sensitivity analysis of weighting coefficient \(\alpha\) on halo artifact suppression. results are shown in Figure 4c. The convolution kernels in the x and y directions are \(G_{x}(x)\) and \(G_{y}(x)\), respectively:  
\[\left\{ \begin{array}{l}G_{x}(x)=I_{E}(x)*gx\\ G_{y}(y)=I_{E}(x)*gy\end{array} \right. \tag{23}\]  
where \(I_{E}(x)\) denotes a Retinex-enhanced image, and \(g_{x}\) and \(g_{y}\) denote the convolution kernel in the \(x\) and \(y\) directions, respectively. Considering the gradients \(G_{x}(x)\) and \(G_{y}(x)\) obtained by Equation (23), the sum of the absolute values of both is calculated as the edge extraction result \(G(x)\) with the following expression:  
\[G(x)=\left|G_{x}(x)\right|+\left|G_{y}(x)\right| \tag{24}\]  
where \(G(x)\) represents the edge extraction result. Figure 4: Selection of atmospheric light region: (**a**) enhanced fog image \(I_{E}(x)\); (**b**) result of Otsu algorithm \(I_{E1}(x)\); (**c**) [PERSON] operator edge extraction result \(G(x)\); (**d**) Otsu algorithm binary segmentation and Sobel operator edge extraction fusion result \(D(x)\); (**e**) morphological expansion result \(D_{1}(x)\). To eliminate the influence of highlighted objects on the atmospheric light region, we fuse the results obtained by the Otsu algorithm with the results of edge extraction. The specific fusion process is as follows: Invert the edge extraction result \(G(x)\), turning the original white edge area into a non-black edge area and the original black non-edge area into a new white edge area. Then, perform an operation on the Otsu algorithm result \(I_{E1}(x)\) and the inverted \(G(x)\) to obtain the fusion result \(D(x)\) to remove the highlighted object.