## 2 Methods and Process Procedures
### Cloud and Cloud Shadow Identification
#### 2.3.2 Cloudy Pixel Identification  
Clouds, especially thick clouds, have high spectral reflectance compared to most of the surface objects in all six bands (blue, green, red, near infrared, shortwave infrared 1, and shortwave infrared 2 as listed in Table 1 in Section 3). Therefore, a cloudy pixel had larger values in every band compared to a cloud-free pixel of the same kind. For cloudy pixel identification, we simply used the average of the six bands in Equation (1):  
\[dDN_{c}(i,j)=(\sum_{b=1}^{N}DN_{o}(i,j,b)-\sum_{b=1}^{N}DN_{s}(i,j,b))/N \tag{3}\]where \(\sum\) is the summation on all six pixel bands \((i,j)\) and N is the total number of the bands that equals to 6. The summation on all the bands of a pixel \((i,j)\) is used by [PERSON] et al. [27] as a cloud index. For the identification of cloudy pixels, Equation (2) becomes:  
\[dDN_{c}(i,j)=\left\{ \begin{array}{ll}\geq T_{c}&\text{ {a cloudy pixel}}\\ <T_{c}&\text{ {a cloud free pixel}}\end{array} \right. \tag{4}\]  
The question of identifying cloudy pixels becomes how to determine \(T_{c}\) in Equation (4). Through our analysis, we found that a graph of sorted \(dDN_{c}\) value in ascending order for an entire image against their accumulated pixel number can help determine the threshold \(T_{c}\). Figure 2 presents a typical graph of a cloud contaminated image. In this figure, a cloudy pixel shows a large positive \(dDN_{c}\) value at the right end due to its significantly increased reflectance while a cloud shadow pixel shows a large negative \(dDN_{c}\) at the left end of the graph due to its considerably decreased reflectance. The majority of cloud-free pixels between the two extremes indicate small differences between the observation and its corresponding synthetic image, which mainly coming from modelling bias or error. To visually determine the threshold \(T_{c}\) value in Equation (4), we pinpointed a few tries to identify cloudy pixels. The threshold was largely located where the change rate of the curve had a large jump towards the right end of the graph. Mathematically, this can be determined by differencing the sorted \(dDN_{c}\) and comparing their changes to locate the point where a large curve change rate occurs. Specifically, \(T_{c}\) can be derived by the following steps. First, the sorted \(dDN_{c}\) values were arranged into multiple bins by a given interval, e.g., 100. Then the average of all the values of every bin was computed. Thereafter, the difference between the consecutive two bins can be calculated as:  
\[d_{kc}=dDN_{c,k+1}-dDN_{c,k} \tag{5}\]  
where \(dDN_{c,k}\) and \(dDN_{c,k+1}\) are the average values of the \(K\)th bin and \((K+1)\)th bin, respectively, and \(d_{kc}\) is the difference between the two average values. Assuming that the middle portion of the graph represents the values of those cloud-free pixels, a pixel with any value significantly greater than the average of those values could be considered as a cloudy pixel. Hence, the threshold \(T_{c}\) can be determined by using the \(d_{kc}\) in the middle portion (taking one third of the entire values conservatively) to calculate their mean \(d_{m}\) and standard deviation \(\sigma_{m}\) and then to find the first \(dDN_{c}\) value towards the right end of the graph that meets \(d_{kc}\geq d_{m}+C\ \sigma_{m}\). Here, \(C\) was an adjustable parameter. From our experiment, \(C=5\) was a good choice for cloudy pixel  
Figure 2: A typical sorted \(dDN_{c}\) and its accumulative pixel number distribution of a cloud contaminated image. identification, i.e., when \(d_{kc}\geq d_{m}+5\ \sigma_{m}\), the corresponding value of \(dDN_{c}\) was the threshold \(T_{c}\) for cloudy pixel identification. In comparison to other methods for cloudy pixel identification, the proposed method requires only one parameter, while other methods such as FMASK [28] require a few parameters in order to produce a cloud mask.