## 4 Method
### Adaptive Color Correction  
Sandstorm images often appear yellow or red due to wavelength-dependent light absorption and scattering. Effective color correction is crucial in restoring their original colors. Unlike haze images, sandstorm images exhibit histograms that are shifted, concentrated, and sequentially distributed [7], as shown in Figure 1.  
Inspired by the findings in [33], this paper proposes a novel channel compensation scheme based on the distribution characteristics of sandstorm image histograms. Primarily, we compensate for the severely attenuated blue channel using the red and green channels, as shown in Equation (1):  
\[I_{c}^{B}(x)=I^{B}(x)+\frac{1}{2}\bigg{(}\frac{\overline{I}_{G}-\overline{I}_{ B}}{\overline{I}_{G}+\overline{I}_{B}}\bigg{)}\Big{(}1-I^{B}(x)\Big{)}I^{G}(x)+ \frac{1}{2}\bigg{(}\frac{\overline{I}_{R}-\overline{I}_{B}}{\overline{I}_{G}+ \overline{I}_{B}}\bigg{)}\Big{(}1-I^{B}(x)\Big{)}I^{R}(x), \tag{1}\]  
where \(I_{c}^{B}(x)\) represents the compensated blue channel, and \(I^{R}(x)\), \(I^{G}(x)\), and \(I^{B}(x)\) denote the original RGB color channels. \(\overline{I}_{R}\), \(\overline{I}_{G}\), and \(\overline{I}_{B}\) represent the mean values of the red, green, and blue channels, respectively. When the color attenuation in sand-dust images is minimal, the mean values of the RGB channels are generally above 0.5, causing the denominator to exceed 1. This results in the suppression of the channel compensation. In contrast, when the color attenuation in sand-dust images is severe, the channel compensation receives an additional boost. This strategy effectively prevents under-compensation in images with severe color attenuation and minimizes over-compensation in images with mild color shifts.  
Considering that the green channel may also suffer significant attenuation in extreme red sandstorm images, we use Equation (2) to compensate for the green channel and Equation (3) to attenuate the excessive intensity of the red channel:  
\[I_{c}^{G}(x)=I^{G}(x)+\bigg{(}\frac{\overline{I}_{R}-\overline{I}_{G}}{ \overline{I}_{R}+\overline{I}_{G}}\bigg{)}\Big{(}1-I^{G}(x)\Big{)}I^{R}(x), \tag{2}\]  
\[I_{c}^{R}(x)=I^{R}(x)-\bigg{(}\frac{\overline{I}_{R}-\overline{I}_{G}}{ \overline{I}_{R}+\overline{I}_{G}}\bigg{)}\Big{(}1-I^{R}(x)\Big{)}I^{G}(x). \tag{3}\]  
Figure 2: Overview of the proposed sand dust image restoration algorithm.  
While the color channel compensation significantly reduces the color shift in red sandstorm images, it cannot eliminate color distortions. Subsequently, we employ a color transfer method to perform color correction, as shown in Equation (4):  
\[I^{c}(x)=\left(\frac{I^{c}_{c}(x)-I^{c}_{\text{avg}}}{I^{c}_{\text{std}}}\right) \cdot I^{m}_{\text{std}}+I^{m}_{\text{avg}}, \tag{4}\]  
where \(I^{c}_{\text{avg}}\) and \(I^{c}_{\text{std}}\) represent the mean and standard deviation of channel c. \(I^{m}_{\text{std}}\) represents the average of the standard deviations of the RGB channels, and \(I^{m}_{\text{avg}}\) denotes the average of the means of the RGB channels. We selected the statistical characteristics of sand-dust images as the targets for color transfer, eliminating the need for additional reference images. The color transfer process largely rectifies the color shift in the sandstorm image, yet the dynamic range remains constrained. Therefore, Equation (5) is applied to stretch the dynamic range accordingly:  
\[I^{c}_{cc}(x)=O_{\text{min}}+\left(O_{\text{max}}-O_{\text{min}}\right)\frac{I ^{c}(x)-I_{\text{min}}}{I_{\text{max}}-I_{\text{min}}}, \tag{5}\]  
where \(I_{cc}(x)\) represents the final color-corrected image. \(O_{\text{max}}\) and \(O_{\text{min}}\) represent the maximum and minimum of the output image, respectively. \(I_{\text{max}}\) and \(I_{\text{min}}\) correspond to the 99.5% and 0.5% percentiles of the normalized image. By setting \(O_{\text{min}}\) to 0.05, the issue of locally dark regions in the image can be effectively mitigated.