=> A new version o Sen2cor has been published recently, and this comparison was re-iterated with Sen2cor 2.2.1. The corresponding post is published here. While CNES is getting ready to produce and distribute Sentinel-2A  products obtained with our MACCS processor, I have been asked by impatient users what I thought of SEN2COR Sentinel-2 cloud masks. In this aim, I have downloaded SEN2COR and made a few runs. SEN2COR works on all sorts of multi-platform, and is rather easy to install and to run in its nominal configuration, which is not the case of MACCS, which is intended to be implemented in ground segments, and only works on a Red Hat environment. However, I have been able to process the same date on two sites, and here are the results I obtained. 


Comparison of MACCS and SEN2COR cloud masks on a cloud free image of Toulouse. The contours of detected clouds (green), shadows (yellow), water (blue), and snow (pink) are overlayed on the images.


 As you know if you have been following this blog, MACCS uses a multi-temporal method to get a better discrimination of clouds and earth surfaces :

  • The clouds are mainly detected by an increase of their reflectance in the blue, but of course, we also rely on the 1.38 µm spectral band available on Sentinel-2 to detect the clouds with an altitude higher than 2000 m.
  • The potential cloud shadows are also detected using a multi-temporal detection (a shadow apparently darkens the surface),  and to be qualified as shadows, a potential shadow must be matched to a cloud.
  • The water also is detected with a multi-temporal method, to avoid confusion with cloud shadows. Only water and cloud shadows have negative vegetation indexes, but the cloud shadows are usually only present on one image while the water stays longer.
  • A pixel is flagged as snow only if it has been detected has a cloud, but also has a very low SWIR reflectance.

As MACCS masks (can you repeat that loudly and quickly several times?) are quite complicated, in order to speed up the results, they are computed at 240 m resolution.


In order to distribute an easy to use software (and they succeded in that), SEN2COR authors decided to rely on single date algorithms. Although the documentation is very short, we can guess that :

  • Cloud masks are determined through spectral tests, using the 1.38 µm band, and thresholds in the blue as well as whiteness criteria. SEN2COR provides a cloud mask with 3 levels of cloud probability : low, medium, high, and also provides the cirrus mask from the 1.38 µm band. Given that the SEN2COR cloud mask tends to over detect clouds, we have only considered the High probability and the cirrus as clouds.
  • Cloud shadows are also detected using spectral criteria, shadows are dark…
  • Water is dark and has a very low reflectance in the Near Infrared
  • Snow is bright and has a very low SWIR reflectance

Sen2cor masks are computed at 20m resolution.

Comparison :

The validation of cloud masks is really not easy, as there is no reliable source to declare if a pixel is a cloud or not in our images. For this reason, we have to rely on our eyes, which, once a little trained are able to tell if a given pixel is cloudy or not. Our US colleagues from NASA and USGS have made a hand made cloud reference image data set, in which a large set of LANDSAT 8 images has been manually classified to serve as reference. But this must be quite costly, and no one in Europe seems to be ready to undertake the same work with Sentinel-2 (I have asked several times, believe me !). For this comparison, we have produced MACCS and SEN2COR Level2 products and compared the outputs. We use quicklook RGB images on which we overlay the contours of clouds (green), shadows (yellow), water (blue), and snow (pink). As you will see, it is quite easy to spot the differences. The example above comes from a completely cloud free image obtained above Toulouse at the end of August (August 25th). Two small clouds are found on the MACCS images, while on the SEN2COR image, all the towns and even nearly all buildings are wrongly classified as clouds.Here is another example obtained above Provence in France, on August 22nd.



Contours from the MACCS and SEN2COR cloud masks have been added to the images. Cloud contours are plotted in green, shadows in yellow, water in blue and snow in pink. The footprint of images is different, because MACCS data are based on L1C products produced at CNES, while SEN2COR is based on the ESA L1C product.

In both cases, SEN2COR really detects too many clouds, because thin clouds are not always very bright while some elements of the landscape are brighter (buildings, bare soils). But what is really strange is the fact that a lot of water bodies are detected within the clouds. (the authors of SEN2COR confirmed that it is a bug).  But you may also notice that some thin clouds escape the detection in SEN2COR, while the only missed clouds in MACCS are very small clouds such as the thinner plane contrails, because of the coarse cloud mask resolution. MACCS also wrongly detect some snow, on the beaches and salt crops in Camargue (salt and sand are white powders, just as snow), while SEN2COR finds snow within the clouds. We have to consider that both softwares are in their early tuning phases, and next versions will bring enhancements (such as the correction of bugs for SEN2COR) and an enhanced cloud shadows ask for MACCS.  However,  it is already easy to spot the discriminating power of multi-temporal detection within MACCS ! 

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.