Cloud-masking Sentinel-2

Hey there!
Sentinel-2 is a relatively new satellite and cloud masking still is a big issue with this sensor. There are many ways on how to get cloud free images of Sentinel-2A (hopefully 2B soon as well). Here is an overview on possible technologies you can use, as well as an outlook on future developments.


FMask is a very popular method that was developed by Zhu and Woodcock for Landsat 8. Since Sentinel-2 uses other bands (i.e. no thermal infrared but) the method had to be revised and is currently available here. Generally speaking are the FMask results for Sentinel-2 not as good as for Landsat (mainly due to the missing thermal band). The algorithm is implemented in Python and can be executed via the command line.


Sen2Cor is a processor for cloud-free Sentinel-2 Level 2A products. It performs the atmospheric-, terrain and cirrus correction of Top-Of- Atmosphere Level 1C input data. Sen2Cor returns three cloud  probability classes: High, medium and low. The satellite image can then be masked with a custom user combination of these three classes.  Sen2Cor can be downloaded here.  It’s executable via command line or can also be integrated into a desktop application via SNAP. Another very useful website concerning Sen2Cor is the official user forum with designated trouble shooting sections. Many users have reported bugs while using Sen2Cor which are currently being worked on. Sen2Cor is a good cloud masking alternative but there are still many unresolved issues (over-/underestimation, bugs with water pixels.)


Many people are looking forward to MACCS because in contrast to the FMASK and Sen2Cor algorithms, MACCS uses a time-series based approach and compares pixels from previous images to assess the cloud probability. MACCS has been developed by CESBIO and CNES. Unfortunately they have made the decicsion that they rather distribute the cloud-free pictures than the processor. The processing of cloud-free images has already started and they can be viewed and downloaded on ther website. Please note, that not the entire world will be processed but only small predefined regions of interest which can be seen here.

But there is some good news from the developers as well:

It is likely your ROI is not included in the above map, as the regions processed by Theia cover less than 5% of the world land surfaces, even if it is already a lot to process. If it is the case, please note that MACCS will be integrated into the Sentinel-2 for Agriculture system (Sen2Agri), which will be released next May. You will then be able to process the data, but the system will only run on a RedHat7/centOS7 linux system . However it should be possible to mange with a virtual machine. You’ll find here some comparisons with sen2cor cloud masks. Without being perfect, I think it brings some improvement.


If you have any questions, please leave me a comment or have a look the linked websites which explain the algorithms in more detail.

Cheers Martin

About This Author

Martin was born in Czech Republic and studied at the University of Natural Resources and Life Sciences, Vienna. He is currently working at GeoVille - an Earth Observation Company based in Austria, specialised in Land Monitoring. His main interests are: Open-source applications like R, (geospatial) statistics and data-management, web-mapping and visualization. He loves travelling, geocaching, photography and sports.


You can post comments in this post.

  • Hi Martin,
    I just stumbled upon your web page, Thank you for advertising our work.
    The good news is that we managed to convince CNES to distribute MACCS (under its new name MAJA) before the end of this week.

    Here is the url :

    I strongly advise to try the installation only if you have a good computer background and support, an a computer running with CENT-OS or Redhat 6 or 7.

    Best regards,

    Olivier Hagolle 7 years ago Reply

    • Dear Olivier! That’s great news! I had a closer looked at the results of MACCS and I am sure that the release of the algorithm will be a big benefit for the Sentinel-2 user community! Thanks for sharing this information as well! Best regards, Martin

      Martin 7 years ago Reply

  • Hi Martin,
    Thank you for your very useful and informative blog post. I’m hydrologist trying to use S2 data for my work, and I got very useful tips to use Sen2Cor for getting a Level-2A product. However, my experience with remote sensing being limited, is there a way in SNAP to use 2 or more quality_scene_classification masks that accompany quality data of a Level-2A Sentinel 2 product?
    Thanks for your time!

    Baron 6 years ago Reply

Post A Reply