Fmask Cloud and Cloud Shadow Detection
- Author: J.Spitzmüller, O.Conrad (c) 2025
- Menu: Imagery | Feature Extraction
Description
This tool implements the Function of mask (Fmask) algorithm for cloud and cloud shadow detection in Landsat and Sentinel-2 imagery. Input is Top-of-Atmosphere (TAO) reflectance obtained from processing Level-1C (both programs).
References
- Zhu, Z., Wang, S., Woodcock, C.E. (2015): Improvement and expansion of the Fmask algorithm: cloud, cloud shadow, and snow detection for Landsats 4-7, 8, and Sentinel 2 images. Remote Sensing of Environment 159, 269-277. doi:10.1016/j.rse.2014.12.014.
- Zhu, Z., Woodcock, C.E. (2012): Object-based cloud and cloud shadow detection in Landsat imagery. Remote Sensing of Environment 118, 83-94. doi:10.1016/j.rse.2011.10.028.
Parameters
| Name | Type | Identifier | Description | Constraints |
Input | Blue | grid, input | BLUE | TM & ETM: Band 1; OLI/TIRS: Band 2; MSI: Band 2 | - |
Green | grid, input | GREEN | TM & ETM: Band 2; OLI/TIRS: Band 3; MSI: Band 3 | - |
Red | grid, input | RED | TM & ETM: Band 3; OLI/TIRS: Band 4; MSI: Band 4 | - |
Near Infrared | grid, input | NIR | TM & ETM: Band 4; OLI/TIRS: Band 5; MSI: Band 8 | - |
Shortwave Infrared 1 | grid, input | SWIR1 | TM & ETM: Band 5; OLI/TIRS: Band 6 | - |
Shortwave Infrared 2 | grid, input | SWIR2 | TM & ETM: Band 7; OLI/TIRS: Band 7 | - |
Cirrus | grid, input | CIRRUS | OLI/TIRS: Band 9; MSI: Band 10 | - |
Radiometric Saturation Green | grid, input, optional | QARAD_G | - | - |
Radiometric Saturation Red | grid, input, optional | QARAD_R | - | - |
Thermal Infrared 1 | grid, input | THERMAL | TM & ETM: Band 6; OLI/TIRS: Band 10 | - |
Shortwave Infrared 1 | grid, input | SWIR1_MSI | MSI: Band 11 | - |
Shortwave Infrared 2 | grid, input | SWIR2_MSI | MSI: Band 12 | - |
Cirrus | grid, input | CIRRUS_MSI | MSI: Band 10 | - |
Output | Clouds | grid, output | CLOUDS | - | - |
Options | Bands | grid system | BANDS | - | - |
Bands | grid system | VEGETATION | - | - |
Bands | grid system | ATMOSPHERE | - | - |
Thermal | grid system | THERMAL_SYS | - | - |
Unit | choice | THERMAL_UNIT | - | Available Choices:
[0] Kelvin
[1] Celsius
Default: 0 |
Sensor (Spacecraft) | choice | SENSOR | - | Available Choices:
[0] TM (Landsat 4,5)
[1] ETM+ (Landsat 7)
[2] OLI/TIRS (Landsat 8,9)
[3] MSI (Sentinel-2)
Default: 2 |
Algorithm | choice | ALGORITHM | - | Available Choices:
[0] Fmask 1.6
[1] Fmask 3.2
Default: 1 |
Dilation Distance | floating point number | DILATION | - | Minimum: 0.000000
Default: 240.000000 |
Sun's Azimuth | floating point number | SUN_AZIMUTH | Direction of sun clockwise from North [degree]. | Minimum: 0.000000
Maximum: 360.000000
Default: 180.000000 |
Sun's Height | floating point number | SUN_HEIGHT | Height of sun above horizon [degree]. | Minimum: 0.000000
Maximum: 90.000000
Default: 45.000000 |
Command Line
Usage: saga_cmd imagery_tools 26 [-BLUE ] [-GREEN ] [-RED ] [-NIR ] [-SWIR1 ] [-SWIR2 ] [-CIRRUS ] [-QARAD_G ] [-QARAD_R ] [-THERMAL ] [-SWIR1_MSI ] [-SWIR2_MSI ] [-CIRRUS_MSI ] [-THERMAL_UNIT ] [-CLOUDS ] [-SENSOR ] [-ALGORITHM ] [-DILATION ] [-SUN_AZIMUTH ] [-SUN_HEIGHT ]
-BLUE: Blue
grid, input
-GREEN: Green
grid, input
-RED: Red
grid, input
-NIR: Near Infrared
grid, input
-SWIR1: Shortwave Infrared 1
grid, input
-SWIR2: Shortwave Infrared 2
grid, input
-CIRRUS: Cirrus
grid, input
-QARAD_G: Radiometric Saturation Green
grid, input, optional
-QARAD_R: Radiometric Saturation Red
grid, input, optional
-THERMAL: Thermal Infrared 1
grid, input
-SWIR1_MSI: Shortwave Infrared 1
grid, input
-SWIR2_MSI: Shortwave Infrared 2
grid, input
-CIRRUS_MSI: Cirrus
grid, input
-THERMAL_UNIT: Unit
choice
Available Choices:
[0] Kelvin
[1] Celsius
Default: 0
-CLOUDS: Clouds
grid, output
-SENSOR:
Sensor (Spacecraft)
choice
Available Choices:
[0] TM (Landsat 4,5)
[1] ETM+ (Landsat 7)
[2] OLI/TIRS (Landsat 8,9)
[3] MSI (Sentinel-2)
Default: 2
-ALGORITHM: Algorithm
choice
Available Choices:
[0] Fmask 1.6
[1] Fmask 3.2
Default: 1
-DILATION: Dilation Distance
floating point number
Minimum: 0.000000
Default: 240.000000
-SUN_AZIMUTH:
Sun's Azimuth
floating point number
Minimum: 0.000000
Maximum: 360.000000
Default: 180.000000
-SUN_HEIGHT: Sun's Height
floating point number
Minimum: 0.000000
Maximum: 90.000000
Default: 45.000000