## 2 Materials and Methods
### Related Area Acquisition
#### 2.2.2 Super-Pixel Unit Acquisition  
Super-pixel algorithms collect and group a set of pixels into meaningful portions or regions, which can be named super-pixels and used for replacing the solid structure of a pixel grid [41; 42]. Super-pixels were generated by clustering pixels depending on their image forms, color similarity, and proximity. Super-pixel units are the segmentation unit formed by merging a series of spatially adjacent pixels with similar features, which can provide locally homogeneous regions around shadow pixels and local statistics between  
Figure 2: Cloud shadow feature images and detection results. (**a**) Original image #1. (**b**) \(H\) characteristic diagram. (**c**) \(I\) characteristic diagram. (**d**) \(B^{\prime}\)characteristic diagram. (**e**) \(Q\) characteristic diagram. (**f**) MSI characteristic diagram. (**g**) Initial shadow results. (**h**) Shadow post-processing results. Red pixels in (**g,h**) are the detected shadow pixels. the shadow pixel and the global shadow area. The uneven loss within a cloud shadow area is reflected through the varying shadow shelter degree at different positions in the same shadow area. It is not possible to present internal differences only through region-level characteristic statistics. Therefore, this paper proposes a shadow compensation model based on super-pixel unit information. Simple linear iterative clustering (SLIC) is a commonly used method for super-pixel segmentation [43]. SLIC is considered a customized version of the k-means method to generate super-pixels for an image. In this paper, the SLIC method is used for the super-pixel segmentation of a shadow image. The super-pixel homogenous unit obtained from it can reflect local shadow information. The SLIC image segmentation method is as follows:  
1. Initialize the seed point: Assume a raw high-resolution remote sensing image is composed of \(N\) pixels. Firstly, the image is divided into \(K\) rectangular grids with a size of \(N\)/K. The center point of the grid is the initial seed point of the super-pixel, and the distance between adjacent seed points is about \(S=\sqrt{N/K}\). Initialize the center point position of \(L\) super-pixels based on the grid steps, \(S\), and assign a label to each seed point. The color features, \(F_{k}=\left[l_{k},b_{k},a_{k}\right]^{\mathrm{T}}\), of the super-pixel \(k\) are defined as the average of the pixel colors in the super-pixel cluster, where \((l,b,a)\) are the three color components in the CIELab color space, respectively. The coordinate position of super-pixel \(k\) is defined as \(X_{k}=\left[x_{k},y_{k}\right]^{\mathrm{T}}\). The initial cluster center is \(C_{k}=\left[l_{k},a_{k},b_{k},x_{k},y_{k}\right]^{\mathrm{T}}\), where \(k\in\left[0,K-1\right]\). 2. Similarity measurement: The similarity between seed points and super-pixels in the image will be calculated. The similarity measurement relationship between any pixel, \(i\), and super-pixel, \(C_{k}\), is a weighted average based on color and spatial distance. The distance \(D(i,C_{k})\) between \(i\) and \(k\) can be illustrated in Equation (6). The smaller the \(D\) is, the more similar the \(p\) and the \(k\) are. \[D(i,C_{k})=\sqrt{\left(d_{C}\right)^{2}+m^{2}\left(\frac{d_{S}}{S}\right)^{2}} \tag{6}\]  
where \(d_{C}(i,C_{k})=\left\|F_{i}-F_{C_{k}}\right\|_{2}\) is the color difference, and \(d_{S}(i,C_{k})=\left\|X_{i}-X_{C_{k}}\right\|_{2}\) is the spatial distance between pixels. \(m\) is the balance parameter used to balance the proportion of color and distance in the similarity measurement. \(S\) is the step distance. Figure 3: Related regions of shadow compensation. 3. Iterative update: In the 2S \(\times\) 2S range centered on the seed point, a search is conducted for the most similar seed point to the super-pixel. Then, its label is assigned to the super-pixel. Additionally, the mean position of all pixels in the new super-pixel set is calculated as the center point.