# Improved Color Attenuation Prior for Single-Image Haze Removal
## 3 Proposed Algorithm
### Color Distortion  
Another drawback of CAP is that it does not work well in the dark image region, where both the saturation and brightness are low. Thus, CAP misinterprets this region as the close region, resulting in a small estimated depth value (close to zero), subsequently leading to a large transmission map value (close to one) according to Equation (13). Figure 10 shows this.  
To determine the cause of color distortion, five pixels in the dark region of the input hazy and dehazed images have been taken into consideration, as illustrated in Figure 11. When the scene radiance of the haze-free image is recovered using Equation (2), the pixel values within the dark image region marked A, B, C, D, and E will be decreased slightly or sometimes un  
Figure 8: Estimated depth maps: (**a**) before applying the low-pass filter and (**b**) after applying the low-pass filter.  
Figure 10: CAP misinterprets the dark region as the close region: (**a**) hazy image and (**b**) estimated depth map.  
Figure 9: Background noise removal low-pass filter’s coefficients and one-dimensional frequency response: (**a**) coefficients and (**b**) one-dimensional frequency response.  
the blue channel has larger values, in comparison to the red and green channels. Following dehazing, the small decrease has a negligible impact on the large blue channel, but significant impact on the small red and green channels. Therefore, the dark regions in the dehazed image look blue, as shown in Figure 11b.  
Regarding this kind of color distortion, one solution is to add a weight factor to make the color in the dark image region consistent, that is, going darker after removing haze. Adding to that, the weight factor is set in linear form to lighten the computational complexity of the proposed algorithm. Hence, we propose an adaptive weight factor \(\mathbf{w_{t}}\) depicted in Figure 12, where \(w_{0}\) denotes the starting value of \(\mathbf{w_{t}}\), and \(d_{0}\) represents the depth value that specifies the close region. We have found empirically that the values of \(w_{0}=0.9\) and \(d_{0}=0.1\) are effective in providing visually-pleasing results for almost all images tested for the proposed algorithm. The formula of \(\mathbf{w_{t}}\) and the revised formula for recovering scene radiance are as follows:  
\[\mathbf{w_{t}}(x,y)=\left(\frac{1-w_{0}}{d_{0}}\right)\mathbf{d}(x,y)+w_{0}, \tag{23}\]  
\[\mathbf{J}(x,y)=\frac{\mathbf{I}(x,y)-A[1-\mathbf{w_{t}}(x,y)\mathbf{t}(x,y)]}{\mathbf{t}(x,y)} \tag{24}\]  
\begin{table}
\begin{tabular}{c c|c} \hline \hline \multirow{2}{*}{**Pixel**} & \multicolumn{2}{c}{**RGB Values**} \\ \cline{2-3}  & **Figure 11a** & **Figure 11b** \\ \hline A & [0.071, 0.129, 0.255] & [0.044, 0.096, 0.220] \\ B & [0.094, 0.133, 0.247] & [0.057, 0.091, 0.196] \\ C & [0.122, 0.157, 0.247] & [0.077, 0.105, 0.184] \\ D & [0.055, 0.114, 0.220] & [0.045, 0.101, 0.204] \\ E & [0.067, 0.118, 0.235] & [0.052, 0.099, 0.235] \\ \hline \hline \end{tabular}
\end{table}
Table 1: Red-Green-Blue (RGB) values of dark pixels in Figure 11.  
Figure 12: Adaptive weight factor for resolving color distortion.  
Figure 13 shows dehazed images before and after applying the proposed weight factor \(\mathbf{w_{t}}\). The difference is noticeable, since adding \(\mathbf{w_{t}}\) forces the color of the dark region to go darker, which is the desired effect according to the atmospheric scattering model. This is another obvious distinction between the proposed ICAP and the original CAP.