# Improved Color Attenuation Prior for Single-Image Haze Removal
## 3 Proposed Algorithm
### Adaptive Constraints for Transmission Map  
The transmission map calculated from the estimated depth map using Equation (13) is called the raw transmission map, and it is usually not good enough for haze removal. [PERSON] et al. [20] implicitly refined the raw transmission map by refining the depth map using a very large guided image filter, and then simply constrained the transmission map between two fixed boundaries: 0.05 and 1. The small-global limit (0.05) indicates that image regions with this lower bound will be heavily dehazed, possibly resulting in background noise or color distortion, which can be seen in Section 4.2 of the qualitative evaluation. The depth map is not utilized in this paper to estimate the atmospheric light, as will be discussed in Section 3.5. Hence, we can get rid of the guided image filter since the depth map is not passed through the minimum filter. Instead, the simple mHMF can be employed to refine the estimated depth map. Additionally, we also develop two adaptive constraints from the atmospheric scattering model to refine the transmission map. To begin with, the transmission map can be derived from Equation (1) as:  
\[\mathbf{t}(x,y)=\frac{A-\mathbf{I}(x,y)}{A-\mathbf{J}(x,y)} \tag{15}\]  
When the haze-free image \(\mathbf{J}\) is correctly recovered, its value will lie within the range 0 to 1 (normalized value). Hence, applying the condition \(\mathbf{J}\geq 0\) to Equation (15) yields:  
\[\mathbf{t}(x,y)\geq\frac{A-\mathbf{I}(x,y)}{A}=1-\frac{\mathbf{I}(x,y)}{A}, \tag{16}\]  
\[\mathbf{t}(x,y)\geq max_{c\in[R,G,B]}\left[1-\frac{\mathbf{F}(x,y)}{A^{c}}\right]=1- min_{c\in[R,G,B]}\left[\frac{\mathbf{F}(x,y)}{A^{c}}\right], \tag{17}\]  
since the atmospheric light \(A\) is constant in the image. Equation (17) is the first adaptive constraint for the raw transmission map. Figure 4: Histograms of 200,000 random numbers: (**a**) drawn from the standard uniform distribution and (**b**) drawn from the enhanced equidistribution. The second adaptive constraint is inspired by the mean and standard deviation definitions in statistics. To simplify, haze removal is the subtraction of haze from a hazy image, where the amount of subtraction is controlled by the values of the transmission map. The smaller these values are, the more haze that is removed, and therein lies the cause of the dehazed image's usually low intensities. Pixel values within dark images are limited to zero in case they become negative after dehazing. These pixels are called black pixels [36]. To prevent black pixels from occurring in the dehazed image, the second constraint specifies that the image local average should be greater than or equal to the image local standard deviation, as follows:  
\[mean_{i,j\in\Omega(x,y)}[\mathbf{J}(i,j)]\geq f\times std_{i,j\in\Omega(x,y)}[ \mathbf{J}(i,j)], \tag{18}\]  
where \(f\) is a constant to control the deviation, and the empirical choice of \(f=1.0\) is used for the evaluation in Section 4. When the input image is mostly quite dark, its pixels are highly likely to become black pixels after removing haze. The constant \(f\), in such a case, can be set to a value greater than 1.0 (e.g., 2.0, 2.5, or 3.0) to tighten the constraint.