2

I'm trying to run fmask on a Sentinel-2 granule. I downloaded the 3.2 version of Windows stand alone software for Sentinel 2 from https://github.com/prs021/fmask When I try to run fmask by calling the FmaskMSI.exe through cmd from the folder containing the Sentinel-2 Granule (or from within the granule folder) i get the following error:

No L*MTL.txt header in the current folder!
Output argument "clr_pct" (and maybe others) not assigned during call to "autoFmask".
MATLAB:unassignedOutputs

The L*MTL.txt suggests that its's looking for a Landsat type product but i specifically point to the Sentinel-2 installation of fmask

How do i get fmask to run for Sentinel-2 data?

unnic
  • 360
  • 2
  • 15
  • I searched a bit for this because I also need to implement fmask. I am trying to use the Python version of this algorithm, but I got stuck at reading the .xml metadata file. Maybe it will help you. This is the link to the Python package: http://pythonfmask.org/en/latest/#downloads Let me know if you managed to perform the cloud correction. All the best! – Litwos Feb 15 '17 at 14:21
  • 1
    Cross-posted: http://forum.step.esa.int/t/sentinel-2-cloud-mask-with-fmask/4152 – Aaron Mar 26 '17 at 13:15

1 Answers1

2

You can use the cloud mask .gml file provided by ESA with the archive you download from the hub or other vendors. You only need to convert the .gml file into .shp. I use GDAL's ogr2ogr to do this, a link for this conversion is here: Using ogr2ogr to convert GML to shapefile in Python?

Litwos
  • 338
  • 2
  • 14
  • The cloud mask provided by ESA does not have a satisfactory performance, that's why I am looking for alternatives. – unnic Jan 18 '17 at 13:40