# An Improved Random Forest Approach on GAN-Based Dataset Augmentation for Fog Observation
## 2 Data and Methodology
### Extraction of Image Features Related to Fog Density  
In foggy weather, images typically display low contrast, muted colors, and saturation shifts due to the scattering and absorption of atmospheric particles. To investigate simple yet effective fog-related features, we test sixteen Natural Scene Statistics (NSS) features [35]. These include the variance of Mean Subtracted Contrast Normalized (MSCN) coefficients, dark channel, colorfulness, sharpness, sharpness variance coefficient, image entropy, saturation value, chroma, chroma variance, Weber contrast of luminance, local contrast, contrast energy (gray), contrast energy (yb), contrast energy (rg), gradient magnitude, and  
Figure 1: Resized images in the experiment. Figure 2: Diagram of data augmentation with StyleGAN2-ADA. color variance. These features are analyzed to assess images with varying fog densities. Our goal is to explore several effective fog-relevant features. (1) Coefficient of MSCN Variance [36]:  
\[f_{\text{MSCN}}(i,j)=\frac{I_{\text{gray}}\left(i,j\right)-\mu(i,j)}{\sigma(i,j)+1} \tag{1}\]  
\[\mu(i,j)=\sum_{k=-K}^{K}\sum_{l=-L}^{L}\omega_{k,l}I_{\text{gray}}\left(i+k,j+l\right)\]  
\[\sigma(i,j)=\sqrt{\sum_{k=-K}^{K}\sum_{l=-L}^{L}\omega_{k,l}\big{[}I_{\text{ gray}}\left(i+k,j+l\right)-\mu(i,j)\big{]}^{2}}\]  
where, \(i\in\{1,2,\dots,M\}\), \(j\in\{1,2,\dots,N\}\) are spatial indices, \(M\) and \(N\) are image dimensions, \(\omega=\{\omega_{k,l}|k=-K,\dots,K,l=-L,\dots L\}\) is a 2D circularly symmetric Gaussian weighting function sampled out to three standard deviations (\(K=L=3\)) and rescaled to unit volume, and \(I_{\text{gray}}\) is the gray version of a natural image \(I\). (2) Dark Channel [37]:  
\[f_{\text{dark-channel}}\left(x;I\right)=\min_{y\in\Omega(x)}\left(\min_{c\in (R,G,B)}I^{c}(y)\right) \tag{2}\]  
where, \(I^{c}\) denotes a color channel of image \(I\), \(\Omega(x)\) represents a local patch centered at \(x\), and \(y\) is the pixel around \(x\) in \(\Omega(x)\). (3) Colorfulness [38]:  
\[f_{colorfulness}(x;I)=0.3\sqrt{(\mu_{rg}^{2}(x;I)+\mu_{yb}^{2}(x;I))}+\sqrt{( \sigma_{rg}^{2}(x;I)+\sigma_{yb}^{2}(x;I))} \tag{3}\]  
where \(\mu_{rg}\), \(\mu_{yb}\), \(\sigma_{rg}^{2}\), and \(\sigma_{yb}^{2}\) represent the mean and variance values for \(rg\) and \(yb\) channels of image \(I\) in the local patch \(\Omega(x)\) centered at \(x\), and they are defined as  
\[\mu_{rg}(x;I)=\frac{1}{\left|\Omega(x)\right|}\sum_{y\in\Omega(x)}rg(y;I)\]  
\[{\sigma_{rg}}^{2}(x;I)=\frac{1}{\left|\Omega(x)\right|}\sum_{y\in\Omega(x)} \left(rg^{2}(x;I)-{\mu_{rg}}^{2}(x;I)\right)\]  
(4) Sharpness [36]:  
\[\hat{I}(x)=\frac{I_{\text{gray}}\left(x\right)-\mu(x)}{\sigma(x)+1}\]  
with  
Figure 2:0  
Figure 2:1  
where, \(I_{gray}\) represents the grayscale version of the target image \(I\), and \(\omega\) denotes a 2D Gaussian weighting function with circular symmetry. (5) Coefficient of Sharpness Variance [36]: The coefficient is defined for a local patch \(\Omega(x)\), centered at point \(x\) in image \(I\), as  
Figure 2:2with  
Figure 2:3 Figure 2:4  
where \(\left|\Omega(x)\right|\) is the size of \(\Omega(x)\). (6) Image Entropy [39]:  
Figure 2:5  
where, \(p(h(y))\) denotes the probability of the pixel \(y\) intensity \(h(y)\). (7) Saturation-Value [40]:  
Figure 2:6  
(8) Chroma [38]: Let \([L(x;I)a(x;I)b(x;I)]^{T}\) be the pixel values of an image \(I\) in the CIELab space, and the chroma is defined as  
Figure 2:7  
(9) Variance of Chroma [38]: This variance is defined within a local patch \(\Omega(x)\), centered at point \(x\) in image \(I\), as  
Figure 2:8  
(10) Weber Contrast of Luminance [41]:  
Figure 2:9  
where \(v_{b}\) represents the background luminance, and \(\Delta v\) denotes the contrast in luminance for a pixel \(x\) within an image patch \(\Omega(x)\). The background luminance \(v_{b}\) is derived by applying a low-pass filter to the luminance component \(v\) of the HSV color space.