# A Nighttime and Daytime Single-Image Dehazing Method
## 3 Proposed Dehazing Method
### High-Light Area Transmission Compensation  
Inspired by [PERSON] et al. [14], we used boundary-constrained initial transmission estimation to replace the dark channel prior. The initial transmission obtained by this method can make the image more structured:  
\[t(x)=\min\biggl{\{}\max_{c\in r,g,b}\left\{\frac{A^{c}(x)-I^{c}(x)}{A^{c}(x)-C_{0 }^{c}}\,\ \frac{A^{c}(x)-I^{c}(x)}{A^{c}(x)-C_{1}^{c}}\right\},1\biggr{\}} \tag{11}\]  
where \(C_{0}^{c}\) and \(C_{1}^{c}\) are the upper and lower boundaries of the three channels.  
After the nighttime haze image has been processed for dehazing, the problem of light source diffusion often occurs. It causes the light source to lose its original shape and boundary. This is because the transmission of the light source area is incorrectly estimated. We can draw a conclusion from (3) that with the increased transmission, the pixel value of the image after dehazing will decrease, and when the transmission is closer to 1, the dehazed image will be closer to the hazy image. Thus, the transmission affects the degree of image dehazing. The transmission of the light source area of these methods is estimated to be low, which causes the pixel value to increase after the dehazing of the light source area, and the phenomenon of diffusion occurs. Based on this, we propose high-light area transmission compensation for nighttime scenes to reduce the degree of the dehazing of the light source area to suppress the diffusion. At the same time, considering that the nighttime light sources are mostly colored light sources, at least one of the color channels has a very high value. So the maximum value of the two-channel product is selected as the basis for distinguishing whether it is the light source area as follows:  
\[t_{B}(x)=\begin{cases}1\max_{c_{1},c_{2}\in r,g,b_{1}\in r_{2}}I^{c_{1}}(x)I^{ c_{2}}(x)\geq\eta\\ 0\max_{c_{1},c_{2}\in r,g,b_{1}\in r_{2}}I^{c_{1}}(x)I^{c_{2}}(x)<\eta\end{cases} \tag{12}\]  
Figure 2: Comparison of ambient light estimation and dehazing by different methods. In order to ensure a fair comparison, we use the ambient illumination estimation methods of [PERSON] et al. [9], [PERSON] et al. [26] and [PERSON] and use the proposed transmission estimation method to remove haze to compare the effects of different ambient illumination estimation methods.  
where \(\eta\) is the threshold with a value of 0.3, which is used to distinguish whether the light source area is in this image, \(c_{1}\) and \(c_{2}\) represents two different color channels in the image, and \(t_{B}\) is the compensation value.  
After the transmission is compensated for the high-light area, in order to prevent it from exceeding the boundary, it is restricted using the following:  
\[t_{M}(x)=\min\{(t(x)+t_{B}(x)),1\} \tag{13}\]  
Finally, guided filtering is used to solve the problem of artifacts in the synthesized transmission after dehazing. Figure 3 shows the effect comparison of whether to use high-light area transmission compensation. This simple method improves the image quality of the light source area so that it retains the shape and boundary of the original light source.