Sentinel-2 cloud mask with fmask

you can use gdal_translate to convert the output.img to geotiff: (example at the end of the page)


Hi @Lionel.dete,

how do you want to visualize the file? If you want to do that in a GIS environment you could use QGIS ( in addition to GDAL directly. It can open and visualize the file as it is. You can then export it to different formats.



Sorry for the missing elements !
I just wanted to get a jpeg or tiff or something equivalent to this format to visualize it in matlab (and do some operation after).
As both of you suggested, I use Gdal (by setting Gdal in my variable environement) and next using this command line in an anaconda prompt :

gdal_translate -of “Gtiff” in_FileName.ext1 out_FileName.ext2

With ext1 the extension of the File to “transform” and ext2 the extension (for the format) you want (jp2, tif…).

Thank you for your help anyways !


Hello @abgbaumann,
which version of python are you using fmask with?
I’ve just tried to install it, through conda install -c conda-forge python-fmask, in my python environment where I have also snappy installed (python 3.4) but it says it is only compatible with python 3.5.
As far as I know snappy is not yet compatible with python 3.5 so, how do you manage to get both snappy and fmask working together?
Thank you!

Can FMask work with Landsat level 2 or it only work with image level 1?

I ran FMask 4.0 for a Landsat 8 image, but there were error. Is there anyone found this message when running FMASK: “Error: Index exceeds matrix dimensions” ??