Cloud Masks

Sentinel-2 MSI Technical Guide - Cloud Mask

The cloud mask is included in the MSK_CLASSI and contains both opaque clouds and cirrus clouds with an indicator specifying the cloud type (cirrus or opaque cloud). Three spectral bands are used to process this mask: a blue band (B1 (443 nm) or B2 (490 nm)), the band B10 (1375 nm) and a SWIR band (B11 (1610 nm) or B12 (2190 nm)).

The blue and the SWIR bands are defined in a GIPP. By default, the BLUE band is the band B1 and the SWIR band is the band B11.

The processing is performed at a spatial resolution of 60 m (the lower resolution of the three spectral bands).

The processing steps are:

  • Resampling the data in 60 m resolution (modification of the spatial resolution + radiometric interpolation),
  • Cloud detection.

The cloud detection is based on spectral criteria:

  • Opaque cloud mask: the same criteria as for the inventory, described in paragraph 3.1.4, are used.
  • Cirrus mask: the cirrus clouds are very wispy and are often transparent. They form themselves only at high altitudes (about 6 or 7 km above the Earth’s surface). These properties are used to discriminate this type of clouds from opaque clouds. Therefore, the cirrus mask processing is based on two spectral criteria. As cirrus clouds are formed only at high altitude, they are characterised by a high reflectance in the band B10 (1375 nm). As they are also semi-transparent, they are not detected by the blue threshold defined above. A pixel, which respects these two criteria, has a good probability to be a cirrus. Nevertheless, it is important to notice that it is just a probability and not a certainty. Indeed, there exists some opaque clouds which are characterised by a low reflectance in the blue band and which are detected by this cirrus mask algorithm.

The cloud mask determination method is then composed of theses following steps:

  • Atmospheric correction
  • Threshold on blue reflectance for opaque clouds detection
  • Threshold on B10, including a threshold modulation in accordance with ground elevation, to detect cirrus clouds.
  • Snow index calculation
  • Cloud masks refinement
  • Mathematical morphology
  •  
  • Some of them are detailed in the next paragraphs.

Atmospheric correction

Ground reflectance is not the only contributor to the signal observed by the satellite. In fact, the Rayleigh diffusion and the aerosols diffusion add a positive contribution. Consequently, by removing the diffuse atmospheric contribution, it should improve the effectiveness of the thresholds that are applied to the reflectance.

The aerosols atmospheric content is very variable in time and space, and it is almost impossible to predict it. On the other hand, Rayleigh diffusion depends on the acquisition geometry (solar and viewing angles) and is perfectly modelled by radiative transfer code. It is then proposed, as a pre-processing, to remove the effect of the Rayleigh diffusion. For that, a Look Up Table (LUT) was created. It contains the top of atmosphere reflectance due to the Rayleigh diffusion for many different acquisition geometries. The solar zenithal angle has been chosen in a range from 0° to 90° with a step of 5°, the viewing zenithal angle in a range from 0° to 20° with a step of 5° and the difference between the solar azimuthal angle and the viewing azimuthal angle in a range from 0° to 360° with a step of 10°. The reflectance due to Rayleigh diffusion has been calculated in each case with the 6S radiative transfer code and is stored in an ascii file.

B10 altitude thresholding

The B10 band is an absorption band of water vapor so, at low altitude, this band shows clouds and not ground. Indeed, the B10 band detects only things at high altitude (cirrus clouds, top of the opaque clouds and mountaintops). The cirrus cloud mask is essentially calculated with the spectral band B10. Nevertheless, mountaintops higher than about 3,000 m of altitude are, at least, as bright as cirrus clouds. So, beyond an elevation of 3,000 m, it is impossible to distinguish cirrus clouds and ground that is why the cirrus cloud mask is calculated only below 3,000 m. Moreover, at this altitude, ground has, in general, a reflectance on B10 below 0.0220.

To avoid these false detections, a modulation of the B10 threshold value is created as follows:

Figure 1: Absorption spectrum of water vapor with SENTINEL-2 band B10

This modification is applied on cirrus cloud mask and opaque cloud mask.

Snow index calculation

With the spectral criteria used for opaque cloud detection algorithm, snow is most of the time identified as opaque clouds. Snow, on mountain, is as bright as opaque clouds in bands B1 and B10. To avert these false detections, a snow index can be derived from bands B4 (665 nm) and B11 (1610 nm). Indeed, snow reflectance is very low in B11 but not in B4 as shown in next figure:

 

Figure 2: Evolution of threshold_B10 with ground elevation in wetlands

The snow index is defined as follows:

Snow_index = (B4) / (B11)

Then it is possible to create a snow mask with this index:

If (B1) > threshold_B1 and B10 < threshold_B10 modulatedWithGroundElevation and snow_index > threshold_snow_index:

Pixel is snow

This mask allows distinguishing snow and opaque clouds.

Cloud mask refinement

The clouds masks can be computed taking the snow masks and the threshold on B10 modulated with ground elevation as follows:

If (B1) > threshold_B1 and Pixel is not snow

Pixel is opaque

Else If (B1) < threshold_B1

(B10) > threshold_B10 modulatedWithGroundElevation

Pixel is cirrus

A pixel is declared cloudy if it satisfies the criteria defined above. A cloud image is then filled in with 0 if is a cloud free pixel, 1 if it is an opaque pixel and 2 for a cirrus pixel. Nevertheless, these criteria are not perfect. There could be false detections due to a high reflected feature in the blue band or due to a geometric error. Indeed, clouds are not spectrally registered.

To limit the impact of such errors, a filtering is performed on the cloud masks (on the opaque and on the cirrus masks separately) using an opening (morphology-based operations). This processing ensures that a pixel declared cloud free is really cloud free. The intersection of the two masks is then handled after the filtering operation. If a pixel has two labels (i.e. 1 and 2), the opaque label (1) prevails.

The percentage of cloudy pixels is calculated on the cloud mask. It corresponds to the ratio between the pixels declared cloudy (including opaque and cirrus clouds: label 1 and label 2) and the total number of pixels in the image.

The percentage of cirrus clouds is also calculated on the cloud mask. It corresponds to the ratio between the pixels declared cirrus (label 2) and the pixels declared cloudy (including cirrus and opaque clouds).