## 2 Materials and Methods
### Multi-Level-Information Shadow-Balanced Compensation  
Conventional linear correlation correction (LCC) is an image enhancement method. On the basis of the shadow detection result, each shadow area is regarded as a global analysis object. Additionally, through morphological expansion, the surrounding non-shadow area is obtained. Then, the characteristic value in a shadow area is considered a compensation goal. In the end, overall shadow area compensation can be realized by calculating the brightness mean and mean square error of the shadow area and its surrounding non-shadow area, substituted into Equation (7),  
\[I^{\prime}(i,j)=\frac{\sigma_{NSD}}{\sigma_{SD}}[I(i,j)-m_{SD}]+m_{NSD} \tag{7}\]  
where \(I(i,j)\) is the brightness value of shadow pixels \((i,j)\), \(I^{\prime}(i,j)\) is the brightness value after compensation, and \(m_{SD}\) and \(\sigma_{SD}\), and \(m_{NSD}\) and \(\sigma_{NSD}\) are the feature mean value and standard deviation of shadow area and non-shadow area, respectively. Compared to gamma correction and histogram matching, the linear correlation correction method is more effective in taking the characteristic mean and variance of the non-shadow area as the target value to recover the information of the shadow area [44]. Additionally, the linear correlation correction has a wider application range. After detecting the shadows in image #1 in Figure 5a and image #2 in Figure 5d, linear correlation compensation (LCC) is performed for pixels in the shadow area. The results are shown in Figure 5c,f. It can be seen that there is an obvious problem of unbalanced compensation in the shadow area, including insufficient compensation in the blue box and excessive compensation in the yellow circle. Due to the inconsistent cloud thickness, the cloud shadow shelter degree is different. The cloud shadow position with a thinner cloud is prone to excessive compensation, and the brightness is higher than that in other areas. The cloud shadow position with the thick cloud is prone to insufficient compensation. Such methods that only use the information of shadow pixels, the shadow area, and the non-shadow area will cause the problem of uneven compensation in the cloud shadow area. Additionally, brightness enhancement cannot really be used to achieve the same effect as that when it is used in a non-shadow area. Therefore, this paper proposes a cloud shadow-balanced compensation method combined with multi-level information. Based on the principle of linear correlation correction, in this study we designed a balanced compensation model that combined multi-level information, as shown in Equation (8). It is integrated with four kinds of information: raw pixel, super-pixel unit, shadow area, and non-shadow area information. Then, it still takes the mean brightness and the sum of the mean square deviation as the target value. Additionally, the original brightness is balanced and compensated for to obtain the brightness value, \(I_{rec}(i,j)\). \[I_{rec}(i,j)=m_{NSD}+\left[I(i,j)-\left(\mu\cdot m_{SD}^{R}+v\cdot m_{SD}^{S} \right)\right]\frac{\sigma_{NSD}}{\left(\mu\cdot\sigma_{SD}^{R}+v\cdot\sigma_ {SD}^{S}\right)} \tag{8}\]  
where, \(m_{SD}^{S}\) and \(\sigma_{SD}^{S}\), and \(m_{SD}^{R}\) and \(\sigma_{SD}^{R}\) are the mean value and the variance of the shadow region, R, and the super-pixel, S, respectively. \(m_{NSD}\) and \(\sigma_{NSD}\) are the mean value and the variance of the non-shadow area, which is used as the target value. \(\mu\) and \(v\) are the weights of the region, \(R\), and super-pixel, \(S\), and \(\mu+v=1\). Generally, \(\mu=v=0.5\). \(I(i,j)\) and \(I_{rec}(i,j)\) are the original brightness value and the compensated value of the pixel \((i,j)\), respectively. This balanced compensation model makes full use of the super-pixel homogeneous unit information. Additionally, it provides shadow shelter information for a super-pixel unit in a shadow area.