# Dynamic Dark Channel Prior Dehazing with Polarization
## 2 Theoretical Analysis  
### Principle of Dark Channel Prior Dehazing  
The dark channel prior method relies on the atmospheric scattering model for the process of dehazing [20], as shown in Figure 1.  
In this model, the influence of the scattering effect on the imaging can be described as follows:  
\[I(x)=J(x)t(x)+A(1-t(x)), \tag{1}\]  
where \(I(x)\) is the foggy image, \(J(x)\) represents the fog-free image, \(A\) indicates the intensity of global atmospheric light, \(x\) is the spatial position of the pixel, and \(t(x)\) is the transmittance with the following expression:  
\[t(x)=e^{-rd(x)}, \tag{2}\]  
where \(r\) represents the atmospheric scattering coefficient and \(d\) is the depth of the scene light field.  
From Figure 1 and Equation (1), the incoherent superposition of direct transmission and atmospheric scattering light is what the optical imaging system ultimately achieves [21].  
By observing and summarizing outdoor foggy images, [PERSON] et al. [22] found the existence of dark channels in the image and proposed a dehazing method based on dark channels. In most local areas (excluding the sky), the intensities of some pixels (called 'dark pixels') in at least one color (RGB) channel are very low and can approach zero.  
\[J^{dark}(x)=\min_{y\in\Omega(x)}(\min_{c\in\{r,g,b\}}J^{c}(y))\sim 0. \tag{3}\]  
The top 0.1% of pixels with the highest intensity are located in the dark channel image and matched in the hazy image. The brightest pixel among the matched ones is chosen as the estimated value of the atmospheric light. Equation (1) is normalized with the estimated value.  
\[\frac{I^{c}(x)}{A^{c}}=t(x)\frac{I^{c}(x)}{A^{c}}+(1-t(x)), \tag{4}\]  
\(t(x)\) is simplified as a constant to \(\widetilde{t}(x)\), and the minimum value of both sides of Equation (4) is taken twice to obtain the following Equation (5)  
\[\min_{y\in\Omega(x)}(\min_{c}\frac{I^{c}(x)}{A^{c}})=\widetilde{t}(x)\min_{y \in\Omega(x)}(\min_{c}\frac{I^{c}(y)}{A^{c}})+(1-\widetilde{t}(x)). \tag{5}\]  
Based on the principle of dark channel prior, the estimated value of the transmittance can be calculated as:  
\[\widetilde{t}(x)=1-\min_{y\in\Omega(x)}(\min_{c}\frac{I^{c}(y)}{A^{c}}). \tag{6}\]  
In real-life scenarios, even on fog-free days, there are still some particles suspended in the air. Therefore, the presence of thin fog is still perceived when people are observing distant objects. Moreover, a certain degree of fog adds depth information to the image. It is necessary to preserve a small amount of fog when defogging. A factor of \(\omega=0.95\) is introduced to make the defogged more consistent with human visual perception. The modified formula is shown as follows:  
\[\widetilde{t}(x)=1-\omega\min_{y\in\Omega(x)}(\min_{c}\frac{I^{c}(y)}{A^{c}}). \tag{7}\]  
The premise of the above inference is that the atmospheric light value \(A\) is known. [PERSON] et al. [22] proposed that the value of atmospheric light can be estimated based on the dark channel image. The pixels with gray values in the top 0.1% are found in the dark channel image. Then, the gray value of the pixel with the maximum gray value in the original foggy image \(I(x)\) at the corresponding position is taken as the value of \(A\).  
Figure 1: Atmospheric scattering model.  
Given the transmittance and the value of atmospheric light, the dehazed image can be formulated as:  
\[J(x)=\frac{I(x)-A}{t(x)}+A. \tag{8}\]  
In addition, to avoid overexposure of the restored image \(J(x)\) due to the small values of the transmittance, a threshold \(t_{0}=0.1\) is introduced for correction. The final dehazed image formula is written as:  
\[J(x)=\frac{I(x)-A}{\max(t(x),t_{0})}+A. \tag{9}\]