Minimize Level-2A Algorithm Overview

The SENTINEL-2 Level-2A processing provides Level-2 products (BOA reflectance) from Level-1C products (TOA reflectance). These products are not operationally produced, but can be generated by the user using the Sentinel-2 Toolbox.

Level 2A-processing is split into two parts:

  • Scene Classification (SC) aims at providing a pixel classification map (cloud, cloud shadows, vegetation, soils/deserts, water, snow, etc.)
  • Atmospheric Correction (S2AC) aims at transforming TOA reflectance into BOA reflectance.

The Level-2A algorithms have been developed by DLR/Telespazio.

Defective, non-existent and saturated pixels are excluded from the Level-2A processing steps. The surface reflectance is performed at the resolution of the native products depending on the band resolution (10, 20 and 60 m). The Level-2A algorithms require information derived from bands with different resolutions. Some channels are resampled at 60 m for the needs of the algorithms.

Scene Classification (SC)

The SC algorithm enables:

  • generation of a classification map which includes four different classes for clouds (including cirrus) and six different classifications for shadows, cloud shadows, vegetation, soils/deserts, water and snow
  • provision of associated quality indicators corresponding to a map of cloud probability and a map of snow probability.

The SC algorithm steps are presented in Figure 1. The algorithm includes:

  • cloud/snow detection
  • cirrus detection
  • cloud shadow detection
  • classification map generation.

The SC processing is applied to Level-1C products (TOA reflectance) resampled at a spatial resolution of 60 m.

Figure 1: Level-2A Classification Processing Modules (grey) and Outputs (red) (NN: Neural Network, TS: Threshold algorithm)

Cloud/Snow Detection

The steps of the cloud/snow detection algorithm sequence are presented in Figure 2.

Figure 2: Level 2 Cloud/Snow Detection Algorithm Sequence

The cloud/snow detection algorithm is based on a series of threshold filtering steps:

 

Step 1a: Brightness Thresholds on Red (Band 4)

This step is targeted at discarding cloud-free pixels by applying two thresholds on band 4 (red) reflectance. If:

  • band 4 reflectance is lower than a band 4 T1 threshold (0.07), the pixel is considered as cloud-free (cloud probability equal to 0.0)
  • band 4 reflectance is higher than a band 4 T2 threshold (0.25), the pixel is considered as cloudy (cloud probability equal to 1.0) and passes to step 2 processing

Pixels with band 4 reflectance between band 4 T1 and band 4 T2 threshold values are considered as potentially cloudy (with a cloud probability calculated linearly from 0.0 to 1.0) and pass to step 1b processing.

 

Step 1b: Normalised Difference Snow Index (NDSI)

The NDSI ratio (Equation 1) is a ratio of two bands: one in the VIR (Band 3) and one in the SWIR (Band 11). Snow absorbs in the SWIR, but reflects in the VIR, whereas cloud is generally reflective in these Bands.

Equation 1: NDSI Ratio

Most potential cloudy pixels have NDSI values in a range between -0.1 and +0.2, therefore:

  • pixels with strong NDSI negative values (lower than NDSI T1 threshold) are considered as cloud-free (cloud probability equal to 0.0)
  • pixels with NDSI values exceeding an NDSI T2 threshold value are considered as cloudy (cloud probability equal to 1.0)
  • pixels with NDSI values between NDSI T1 and T2 threshold values are considered as potentially cloudy (with a cloud probability calculated linearly from 0.0 to 1.0 and multiplied by step 1a cloud probability).

Pixels with a cloud probability higher than zero pass to Step 2 processing.

 

Step 2: Snow Detection / Snow Confidence Mask

The objective of this step is to detect snow pixels and to create a snow confidence mask. This step is split into four successive filters on band 2, band 3, band 8 and band 11 reflectance values. It is only applied to pixels for which snow has been detected during the past 10 years.

Step 2.1 Snow Filter 1: Normalised Difference Snow Index (NDSI)

The first filter (step 2.1) is particularly useful for eliminating snow. It is based on the understanding that:

  • cloud and snow reflectances are similar in band 3
  • band 11 reflectance for clouds is very high while it is low for snow.

This filter is based on applying two thresholds on NDSI values. If:

  • pixels have NDSI value under a NDSI T1 threshold (0.20), they are considered as 'no snow' pixels (snow probability equal to 0.0)
  • pixels with NDSI values exceeding NDSI T2 threshold (0.42) are considered as 'snow' pixels (snow probability equal to 1.0)
  • pixels with NDSI values between NDSI T1 and NDSI T2 thresholds are potentially snowy (with a snow probability calculated linearly from 0.0 to 1.0).

Pixels with a snow probability higher than zero pass to step 2.2.

Step 2.2 Snow Filter 2: Band 8 thresholds

The second filter (step 2.2) eliminates pixels that have high NDSI values and low band 8 (NIR) reflectance. If:

  • pixels have band 8 reflectance lower than a band 8 T1 threshold value (0.15), they are considered as 'no snow' pixels (snow probability equal to 0.0)
  • pixels have band 8 reflectance higher than a band 8 T2 threshold value (0.35), they are considered as 'snow' pixels (snow probability equal to 1.0)
  • pixels have band 8 reflectance between band 8 T1 and band 8 T2 threshold values, they are considered as potentially snowy (with a snow probability calculated linearly from 0.0 to 1.0 and multiplied with precedent snow probability).

Pixels with a snow probability higher than zero pass to step 2.3.

Step 2.3 Snow Filter 3: Band 2 thresholds

The third filter (step 2.3) eliminates pixels that have high NDSI values and low band 2 (blue) reflectance. If:

  • pixels have band 2 reflectance lower than a band 2 T1 threshold value (0.18), they are considered as 'no snow' pixels (snow probability equal to 0.0)
  • pixels have band 2 reflectance higher than a band 2 T2 threshold value (0.22), they are considered as 'snow' pixels (snow probability equal to 1.0)
  • pixels have band 2 reflectance between band 2 T1 and Band 2 T2 threshold values, they are considered as potentially snowy (with a snow probability calculated linearly from 0.0 to 1.0 and multiplied with precedent snow probability).

Pixels with a snow probability higher than zero pass to step 2.4.

Step 2.4 Snow Filter 4: Ratio Band 2 / Band 4

The fourth filter (step 2.4) eliminates pixels that have high NDSI values and low Band 2/Band 4 reflectance ratio which usually corresponds to water bodies. If:

  • pixels have band 2/band 4 reflectance ratio lower than a band 2/band 4 T1 threshold value (0.85), they are considered as 'no snow' pixels (snow probability equal to 0.0)
  • pixels have band 2/band 4 reflectance ratio higher than a band 2/band 4 T2 threshold value (0.95), they are considered as 'snow' pixels (snow probability equal to 1.0)
  • pixels have band 2/band 4 reflectance ratio between band 2/band 4 T1 and band 2/band 4 T2 threshold values, they are considered as potentially snowy (with a snow probability calculated linearly from 0.0 to 1.0 and multiplied with precedent snow probability).

Pixels with a snow probability higher than zero pass to step 2.5.

 

Step 2.5: Processing of Snow Boundaries Zones

This process removes false cloud detection at the boundaries of a snowing region where mixed pixel (snow and ground) could be detected as 'cloud' in the cloud detection algorithm. The 'snow' region is dilated and band 12 reflectance threshold filtering is applied on the dilated boundary zone. Pixels with band 12 reflectance lower than a band 12 threshold value have snow confidence that remains unchanged. Pixels that exceed the threshold have their snow probability set to 0.0 and are identified as 'no snow'.

Step 2 ends considering the pixel snow probability. If it is below a threshold value, pixels pass to the next cloud detection step, whereas pixels that have their snow probability higher than this threshold are classified as 'snow' pixels in the classification map.

 

Step 3: Normalised Difference Vegetation Index (NDVI)

This step eliminates highly reflective vegetation pixels using filtering tests based on NDVI (Equation 2).

Equation 2: NDVI Ratio

The NDVI ratio can be determined from the contribution of visible wavelength and near-infra-red wavelengths. Strong and well-nourished vegetation will absorb most of the visible wavelengths that it receives and will reflect back a large proportion of the near-infra-red light, whereas poor condition vegetation or thin areas, will reflect more visible wavelength light and less near-infra-red light.

The NDVI ratio for SENTINEL-2 is outlined in Equation 2a:

Equation 2a: SENTINEL-2 NDVI

 

  • Pixels with NDVI higher than NDVI T2 threshold value are considered as 'cloud-free' pixels (cloud probability equal to 1.0) and classified as 'vegetation' pixels in the classification map.
  • Pixels with NDVI value lower than NDVI T1 threshold value have a cloud confidence that remains unchanged.
  • Pixels that have a NDVI value between NDVI T1 and NDVI T2 thresholds are considered as potentially cloudy (the cloud probability is calculated linearly from 0.0 to 1.0 and multiplied with precedent cloud probability).

Pixels with a cloud probability higher than zero pass to step 4.

 

Step 4 Band 8/Band 3 Ratio For Senescing Vegetation

This process eliminates highly reflective senescing vegetation using filtering tests on band 8/band 3 reflectance ratio. This test is based on the fact that senescing vegetation is highly reflective in NIR and more highly reflective in the green than green vegetation due to chlorophyll loss. The band 8/band 3 reflectance ratio is higher for vegetation than for cloud or other scene features.

  • Pixels with band 8/band 3 ratio higher than band 8/band 3 T2 threshold value (0.40) are considered as cloud-free pixels (cloud probability equal to 1.0) and classified as 'vegetation' pixels in the classification map.
  • Pixels with band 8/band 3 ratio lower than band 8/band 3 T1 threshold value (0.36) have a cloud confidence that remains unchanged.
  • Pixels with band 8/band 3 ratio between band 8/band 3 T1 and band 8/band 3 T2 thresholds are potentially cloudy (the cloud probability is calculated linearly from 0.0 to 1.0 and multiplied with precedent cloud probability).

Pixels with a cloud probability higher than zero pass to step 5.

 

Step 5 Band 2/Band 11 Ratio for Soils and Water Bodies

This process identifies bare soils and bright water/lake pixels via two steps.

Step 5.1 Pass 1 for soils detection

This step allows identification of bare soil pixels using a threshold on the band 2/band 11 reflectance ratio.

The band 2/band 11 ratio values are lower for soils than other scene features including clouds. This identification step is only applied on pixels with band 2 values lower than a threshold that varies linearly as a function of the band 2/band 11 ratio.

  • Pixels with band 2/band 11 ratio lower than the band 2/band 11 T1 threshold value (1.50) are considered as cloud-free pixels (cloud probability equal to 1.0) and classified as soil pixels in the classification map.
  • Pixels with band 2/band 11 ratio higher than the band 2/band 11 T2 threshold value (2.50) have a cloud confidence that remains unchanged.
  • Pixels with band 2/band 11 ratio between band 2/band 11 T1 and band 2/band 11 T2 thresholds are considered as potentially cloudy (the cloud probability is calculated linearly from 0.0 to 1.0 and multiplied with precedent cloud probability).

Pixels with a cloud probability higher than zero pass to step 5.2.

Step 5.2 Pass for water bodies detection

This step identifies different types of water bodies.

The band 2/band 11 ratio values are higher for water bodies than other scene features including clouds. This identification step is only applied to pixels with band 12 values lower than a threshold that varies linearly as a function of band 2/band 11 ratio.

  • Pixels with band 2/band 11 ratio higher than the band 2/band 11 T2 threshold value are considered as cloud-free pixels (cloud probability equal to 1.0) and classified as water pixels in the classification map.
  • Pixels with band 2/band 11 ratio lower than the band 2/band 11 T1 threshold value have a cloud confidence that remains unchanged.
  • Pixels with a band 2/band 11 ratio between band 2/band 11 T1 and band 2/band 11 T2 thresholds are considered as potentially cloudy (the cloud probability is calculated linearly from 0.0 to 1.0 and multiplied with precedent cloud probability).

Pixels with a cloud probability higher than zero pass to step 6.

 

Step 6 Band 8/Band 11 Ratio for Rocks and Sands in Deserts

This process allows identification of highly reflective rocks and sands in desert landscapes. Rocks and sands tend to exhibit higher reflectance in band 11 than in band 8, whereas the opposite is true for clouds.

  • Pixels with a band 8/band 11 ratio lower than the band 8/band 11 T1 threshold value (0.90) are considered as cloud-free pixels (cloud probability equal to 1.0) and classified as soil/desert pixels in the classification map.
  • Pixels with a band 8/band 11 ratio higher than the band 8/band 11 T2 threshold values (1.10) have a cloud confidence that remains unchanged.
  • Pixels with a band 2/band 11 ratio between band 2/band 11 T1 and band 2/band 11 T2 thresholds are considered as potentially cloudy (the cloud probability is calculated linearly from 0.0 to 1.0 and multiplied with precedent cloud probability).

Pixels with a cloud probability higher than zero pass to step 7.

 

Step 7 Spatial Filtering

This is is an optional step related to spatial filtering.

At this stage, cloud and snow confidence masks are available. This optional filtering takes into account the slight mis-registration of S2 spectral bands at the altitude of clouds. Indeed, S2 spectral bands are co-registered at ground level with the use of a DEM. The spatial filtering also helps to reduce false cloud detection occurring on the borders of highly contrasted regions like river contours or shorelines. It applies a median filter followed by a dilatation operator to the final cloud mask. The kernel size of the filters could be 3 by 3 or 5 by 5, depending on the level of desired artefacts reduction. This spatial filtering is performed for the generation of the three cloud classes and the thin cirrus class in the classification map.


Cirrus Cloud Detection Algorithm and cloud quality cross check

Cirrus cloud detection is based on band 10 (1.375 µm) reflectance threshold filtering tests. The cloud detection relies on strong water vapour absorption at 1.38 µm. If the pixel reflectance exceeds the clear-sky threshold (0.012) and is below the thick cloud threshold (0.035), then thin cirrus clouds are detected.

An additional test is performed with the probabilistic cloud mask obtained at the end of the cloud/snow detection step. This is because pixels classified as cirrus could have a cloud probability unequal to 0. The cloud probability of thin cirrus cloud pixels is checked:

  • If the cloud probability is above 0.65 then the thin cirrus cloud classification is rejected and the pixel classification is set to cloud high probability.
  • If the cloud probability is above 0.35 then the thin cirrus cloud classification is rejected and the pixel classification is set to cloud medium probability.
  • If the cloud probability is below or equal 0.35 then the thin cirrus cloud classification is accepted.


Cloud Shadow Detection Algorithm

The cloud shadow mask is built by multiplying the 'geometrically probable' cloud shadows derived from the final cloud mask, sun position and cloud height distribution, and the 'radiometrically probable' cloud shadow derived from the neural network "dark areas" classification (based on a Kohonen map algorithm).

The pixels that have a cloud shadow probability that exceeds a threshold are classified as cloud shadow pixels in the classification map.


Classification Mask Generation

The classification mask is generated along with the process of generating the cloud mask quality indicator and by merging the information obtained from cirrus cloud detection and cloud shadow detection.

The classification map is produced for each SENTINEL-2 Level-1C product at 60 m resolution and byte values of the classification map are organised as shown in Figure 3:

Figure 3: Scene Classification Values

 

Atmospheric Correction (AC)

This algorithm allows calculation of Bottom Of Atmosphere (BOA) reflectance from Top Of Atmosphere (TOA) reflectance images available in Level-1C products.

SENTINEL-2 Atmospheric Correction (S2AC) is based on an algorithm proposed in Atmospheric/Topographic Correction for Satellite Imagery (ATCOR; Richter and Schlaepfer, 2011). The method performs atmospheric correction based on the LIBRADTRAN radiative transfer model (Mayer and Kylling, 2005).

The model is run once to generate a large LUT of sensor-specific functions (required for the AC: path radiance, direct and diffuse transmittances, direct and diffuse solar fluxes, and spherical albedo) that accounts for a wide variety of atmospheric conditions, solar geometries and ground elevations. This database is generated with a high spectral resolution (0.6 nm) and then resampled with SENTINEL-2 spectral responses. This LUT is used as a simplified model (running faster than the full model) to invert the radiative transfer equation and to calculate BOA reflectance.

All gaseous and aerosol properties of the atmosphere are either derived by the algorithm itself or fixed to an a priori value.

The Aerosol Optical Thickness (AOT) can be derived from the images themselves above reference areas of known reflectance behaviour, preferably Dark Dense Vegetation (DDV) targets and water bodies. If no sufficiently dark reference areas can be found in the scene, an incremental threshold in the 2.2 µm band is applied (from 0.05 to 0.1 and 0.12) to identify reference areas with medium brightness. The visibility, and consequently the corresponding AOT, is automatically derived from a correlation of SWIR reflectance (band 12 = 2.19 µm) with the blue (band 2) and red (band 4) reflectance. The principle of the AOT retrieval method is based on Kaufman et al. (1997) with some slight differences (reduction of negative reflectance values, fixed rural/continental aerosol type, etc.).

Water vapour retrieval over land is performed using the Atmospheric Pre-corrected Differential Absorption (ADPA) algorithm which is applied to band 8a and band 9. Band 8a is the reference band in an atmospheric window region and band 9 is the measurement channel in the absorption region. Haze removal over land is an optional process.

Cirrus detection and removal is the baseline process. Haze removal can be selected instead of cirrus removal. The cirrus detection and removal is based on the exploitation of the band 10 (1.38 µm) measurements and potential correlation of the cirrus signal at this wavelength and other wavelengths in the VNIR and SWIR region.

S2AC employs Lambert's reflectance law. Topographic effects can be corrected during the surface retrieval process using an accurate Digital Elevation Model (DEM). S2AC accounts for and assumes a constant viewing angle per tile (sub-scene). The solar zenith and azimuth angles can either be treated as constant per tile or can be specified for the tile corners with a subsequent bilinear interpolation across the scene.