# An Introduction to Machine and Deep Learning Methods for Cloud Masking Applications
## 2 Thresholding Methods  
Traditional cloud detection approaches generally use combinations of multi-spectral information derived from solar reflectance and thermal emissions. These methods are based on the general spectral properties of clouds compared to those of underneath elements. Cloud reflectances are generally higher in visible spectral bands than most cloud-free Earth's surfaces, while cloud-top thermal radiances (Brightness Temperatures, BT), when available, are lower than the cloud-free surface temperatures [16; 17]. Fixed or adaptive thresholds on BTs, BT-Differences and BT ratio, are applied to perform multi tests, which when combined with the results of those on solar reflectance bands, according to fixed rules, contribute to determine the final output mask. The band tests take into account different cloud and scene types [18; 19; 20]; however, there are conditions where cloud detection is not a straightforward process, such as clouds over ice/snow due to their similar radiative appearance, or very transparent cirrus (Figure 1), whose temperature is affected by the underlying atmosphere. In general, the radiance BT received by a sensor in the thermal infrared (TIR) band would not be exactly that emitted by the cloud top, especially in the case of cirrus, very high thin clouds, where the measured radiance represents the temperature of the underlying objects (lower thick clouds or surfaces). Therefore, in this case, some correction algorithms based on the radiative transfer process are needed to account for the atmospheric effects and retrieve the true cloud top temperature [10; 21; 22]. Combining information from multiple bands is then useful for resolving uncertain cases. In [23], it is reported how the TIR band can help to improve the performance of a combined radiative transfer and Machine Learning method in doubtful cases for cloud and haze discrimination. In [24], the water vapour absorption band, used also for the Moderate Resolution Imaging Spectroradiometer (MODIS) masks [19], is a way to identify cloud cirrus in Landsat 8 images. The solar radiation, in fact, is partially absorbed in that band so that the typical bright appearance of the cloud is maintained. Hence, the availability of instruments with a large range of spectral bands is helpful in dealing with some extensively studied issues of cloud identification e.g., clouds over sand, snow or ice, whose spectra, in general, are similar in reflectance, cloud-haze discrimination, semi-transparent thin cloud detection [25; 26; 27]. Nevertheless, traditional cloud detection methods show difficulty to perform with high accuracy. They are limited to instruments that are equipped with the required bands, are more effective at detecting high, thick clouds than low, thin clouds. Thin cloud can be omitted above all cloud edges or when surfaces have smooth texture or high reflectance [28; 29]. Some relevant operational algorithms that provide advanced products for Landsat 8 and Sentinel-2 satellite imagery as well as NASA and ESA missions dedicated to Earth-monitoring for environment surveillance and security [30; 31], respectively, are listed below. These two satellites and the methods developed are mentioned here because the results of the latest Machine Learning algorithms are mainly compared with them. Furthermore, the annotated cloud masks for their image archives are publicly available and used to train and validate the more recent Deep Learning algorithms. FMask [26; 32; 33; 34] is an operational algorithm initially developed to discriminate between cloud and cloud shadows, and successively improved to include snow and water detection. It is based on a single scene analysis where tests and thresholds are applied to the image spectral bands according to the brightness and temperature characteristics of clouds and cloud-free surfaces, and the darkness characteristics of cloud shadows. The method was initially developed for Landsat 4 to 7 data, but was subsequently improved and developed for Landsat 8 and Sentinel-2 data.