# Saturation-Based Airlight Color Restoration of Hazy Images
## 3 Proposed Dehazing Method
### Depth Map Setting Based on Luminance and Saturation  
#### 3.3.1 Depth Map of Haze Based on Existing Studies  
The relation of a depth map to the saturation and luminance of a hazy image has already been proven in previous studies [5; 31] using linear models. Accordingly, the depth map in the LAB channel can be expressed in a linear model as shown below.  
\[d(x)=a_{1}+a_{2}L(x)+a_{3}(|a(x)|+|b(x)|)+\epsilon_{0} \tag{14}\]  
In this equation, saturation is expressed as \(|a|+|b|\); \(a_{1}\), \(a_{2}\), and \(a_{3}\) indicate the parameters for linear representation of the depth map. In addition, \(\varepsilon(x)\) is a random error that can be calculated using a Gaussian distribution model, \(N\big{(}0,\sigma^{2}\big{)}\), where the average is 0 and the scattering is \(\sigma\)[5].  
\[d(x)\sim p\big{(}d(x)|x,a_{0},a_{1},a_{2},\sigma^{2}\big{)}=N\big{(}a_{1}+a_{2 }L+a_{3}(|a|+|b|),\sigma^{2}\big{)} \tag{15}\]  
The multiple linear regression model satisfies \(\varepsilon\sim N\big{(}0,\sigma^{2}\big{)}\) by the normality of the errors and has an expected value of zero. This causes the conditional expected value of the output to mean \(a_{1}+a_{2}L+a_{3}(|a|+|b|)\), the \(d(x)\) formula without the error term. \(\sigma\), \(N\big{(}0,\sigma^{2}\big{)}\)'s input value, can be computed by the embedded multiple linear regression algorithm. Based on previous studies [5; 31], a depth map has a strong correlation with the luminance and saturation of an image. Therefore, this study estimated the parameters \(a_{1}\), \(a_{2}\), and \(a_{3}\) using multilinear regression, as presented Algorithm 1.  
```
Input dataset  Depth map: 450 depth map datasets on NYU ground truth images  L, C, a, b: 450 L, \(|a|+|b|\), a, b channel NYU images calculated from Section 3.1.1 Output:\(\sigma\) for parameters \(a_{1}\), \(a_{2}\), \(a_{3}\), and the normal distribution of the residual zone Begin  for index = 1:450  Constant matrix with its component only at x1 = 1; x2 = L(index); x3 = C(index);  X = [x1 x2 x3]; Y = depth map(index);  Perform the multilateral regression algorithm using X as the input and Y as the output. Enter the parameter and scattering of the corresponding index output to the 1, 2, 3, 4  columns of the output matrix \(l\). End  If a value with \(R^{2}\leq 0.5\) exists, the corresponding data are deleted.  Calculate the average of the final data on the output \(l\), and \(a_{1}\), \(a_{2}\), \(a_{3}\), \(\sigma\). End
```  
**Algorithm 1** Parameter estimation algorithm using multilinear regression.  
To estimate the parameters in Equation (14), a depth map of a fog-free image is required as a dataset. Thus, we use the NYU dataset included in the D-Hazy dataset [33] as a sample. The NYU dataset provides depth maps of the hazy and ground truth images for each of the 450 fog images. For each of the collected NYU datasets, the values of L, a, b, and \(|a|+|b|\) are computed and are set as the input value X for the multiple linear regression. When setting the depth map to the output Y, according to Equation (14), the estimated parameters are output as the matrix \(l\) of size \(450\times 4\), and the final parameters are computed by averaging \(l\).  
Equations (14) and (15) can effectively estimate the depth map using only a simple linear equation. However, because the same equation is applied to the entire region, the performance of restoring visibility for nearby objects' shading or distant scene visibility is still unsatisfactory. Therefore, this study introduces weights reflecting saturation characteristics, as explained in Section 3.3.2.