MASKING

Create cloud, haze, and water masks from satellite imagery


EnvironmentsPYTHON :: EASI :: MODELER
Batch ModeYes
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: References :: Related

Back to top

Description


MASKING calculates haze, cloud, saturated pixels, and water masks for use in haze removal, color balancing, and atmospheric correction.
Back to top

Parameters


Name Type Length Value range
Input1: Blue (or green) image channel (0.4-0.57 micron)* Raster port 1 - 1  
Input2: Red image channel (0.6-0.7 micron)* Raster port 1 - 1  
Input3: NIR image channel (0.79-0.89 micron) Raster port 0 - 1  
Input4: SWIR image channel (1.5-1.8 micron) Raster port 0 - 1  
Source background options String 0 -   Default: File Metadata
Source background values Integer 0 - 1024 Default: 0
Satellite sensor String 0 - 1
Calibration file name String 0 -    
Solar zenith (degrees) Float 0 - 1 0.0 - 90.0
Haze cover (%) Float 0 - 1 Default: 50
Cloud reflectance thresholds Float 0 - 8  
Water upper reflectance threshold (NIR, SWIR) Integer 0 - 2 Default: 5,3
Output: Bitmap masks* BMP port 1 -    

* Required parameter
Back to top

Parameter descriptions

Input1: Blue (or green) image channel (0.4-0.57 micron)

The image channel in the input file that contains the blue sensor band. If the blue band is not available, the green band can be used instead.

Input2: Red image channel (0.6-0.7 micron)

The image channel in the input file that contains the red sensor band.

Input3: NIR image channel (0.79-0.89 micron)

The image channel in the input file that contains the near-infrared (NIR) sensor band.

This parameter is optional.

Input4: SWIR image channel (1.5-1.8 micron)

The image channel in the input file that contain the shortwave infrared (SWIR) sensor band.

This parameter is optional.

Source background options

This parameter specifies, potentially with the value of Source Background Values, which pixels in the source image are to be considered background (NoData) pixels. In general, if a pixel is considered NoData, the application handles the pixel in a specific manner.

Available options are:

For specific examples, see the parameter Source Background Values.

Source background values

This parameter specifies the one or more source background values when the following options are specified for the Source Background Options parameter:
Note: If necessary, you can specify multiple values using a comma-delimited list. The first value applies to the first channel, the second value to the second channel, and so on. If fewer values are specified than the number of input channels, the last value is repeated for all remaining channels. If more values are specified than the number of input channels, the extra values are ignored.
For example:

Satellite sensor

The name of the sensor used to capture the input image.

If no value is specified for this parameter, MASKING checks for the metadata tag PlatformName at the file level. If the aforementioned metadata tag is not found, an error will occur.

For a list of supported sensors, see Details.

This parameter is optional.

Calibration file name

The path and file name of the text file that contains, for each band, the calibration coefficients used to transform the values from the image to absolute radiance values. Typically, this information is provided with the data set as an offset and a gain for each channel. The specified text file should contain the band number, offset and gain, and the units for each. The following shows an example of a calibration file for SPOT Landsat-7 images:

7          c0       c1         [mW/cm2 sr micron]
1   	-0.6200   0.0776000
2   	-0.6400   0.0796000  
3   	-0.5000   0.0619000
4   	-0.5100   0.0637000
5   	-0.1002   0.0126000 
6   	 0.0000   0.00670866
7   	-0.0350   0.00437000				
				
The folder atcor\cal in your installation folder contains sample calibration files for each supported sensor. In a calibration file, each row lists the calibration coefficients for each sensor band; the bands are listed in increasing order. You must ensure that the offset (c0) and gain (c1) values correspond to the scene. These values must be provided in the expected units for the specific sensor (shown at the top right of the calibration file). If no value is specified for this parameter, the following metadata tags for each channel in the input file are used:

Also, if no value is specified for Calibration File, or if the coefficients cannot be derived from the metadata, an error message will be displayed.

Important: Do not modify the calibration files, because they indicate the nominal bands for each sensor.

Solar zenith (degrees)

The solar zenith angle (0-90 degrees) at the time of image acquisition.

If no value is specified for this parameter, MASKING derives the solar zenith from any one of the following combination of metadata tags found at the file level of the input file (FILI):

If no value is specified for this parameter, and none of the combinations of metadata tags are found in full, an error occurs.

Haze cover (%)

The approximate percentage of coverage of hazy pixels in the image.

The value of this parameter is used to determine the size of the haze mask generated to identify haze pixels. This percentage value should be based on the total number of pixels in the image, excluding saturated pixels. By default, haze coverage is assumed to be close to 50 percent.

This parameter is optional.

Cloud reflectance thresholds

The minimum and maximum top of the atmosphere (TOA) reflectance value, in percentage, of the blue band (or green, if blue is not available) used to identify cloud pixels. Lower thresholds will tend to identify more pixels as cloud, but may also misclassify more urban features with unnaturally high reflectance as clouds.

The cloud reflectance threshold is specified as follows:
<low_thr>,<seed_thr>,<dilation_in_pixels>
For example, the thresholds can be set per sensor as:

The high threshold is used to identify the brightest pixels in the cloud. The low threshold is used to identify the remaining cloud pixels.

This parameter is optional.

Water upper reflectance threshold (NIR, SWIR)

The maximum TOA reflectance value, in percentage, in the NIR band and the SWIR band (~1.6um), used to identify water pixels.

The Water Upper Reflectance Threshold is specified as follows:
<NIR_THRESH>,<SWIR_THRESH>

The first value is the upper TOA reflectance value of water for the NIR band; the second value is the upper TOA reflectance value of water for the SWIR band. If the input file does not contain a NIR and SWIR band, this parameter is ignored and the water mask is not produced.

This parameter is optional.

Output: Bitmap masks

The output channel to receive the output masks.

The output file will contain the following masks:

Each bitmap segment is identified from the metadata tags LayerType. The metadata values will be Haze, Cloud, Saturated, and Water for each of the preceding output bitmaps listed. The first three masks are always created, even if they are empty. The water mask is created only if both the NIR and SWIR bands are available.

Back to top

Details

MASKING generates coarse classification masks used for classification, mosaicking, haze removal, and atmospheric correction.

The coarse classification masks provide a quick and simple method of identifying general ground features (clouds, haze) and ground features (water). These masks are used to facilitate haze removal (HAZEREM), atmospheric correction (ATCOR), and mosaicking operations. They may be used as exclusion masks for color balancing.

The output masks from this program are generally used as input into HAZEREM (haze removal) or ATCOR (atmospheric correction). HAZEREM uses the coarse classification masks to clarify non-hazy pixels and to appropriately compute the statistics of the influence of haze. ATCOR uses the haze mask to determine the candidate pixels for Dark Vegetation, when computing a visibility map under varying atmospheric conditions.

With the parameter ZNANGLE (Solar Zenith Angle), you can specify the zenith angle for the scene. If sufficient metadata exists to extract or compute the solar zenith angle, you need not specify a value for this parameter. If sufficient metadata is not found, a value must be specified. If the input image contains the metadata tag Acquisition_DateTime, this parameter can be defaulted; the angle will be computed based on the date from the image metadata and scene center. The solar zenith and azimuth angles can also be computed using SOLARZAZ.

Supported sensors

The following sensors are supported:
  • ALI
  • ALOS Avnir-2
  • Aster
  • Cartosat PAN
  • CBERS-4
  • Deimos-1
  • Deimos-2
  • DMC
  • FASat-Charlie
  • Formosat-2
  • FORMOSAT-5
  • Geoeye-1
  • GF1
  • GF2
  • GF4
  • GF6
  • GF7
  • Gokturk1
  • IRS-1A
  • IRS-1B
  • IRS-1C
  • IRS-1D
  • IRS-P6
  • Ikonos-2
  • Jilin-1
  • KazEOSat-2
  • KOMPSAT-2
  • KOMPSAT-3
  • KOMPSAT-3A
  • Landsat-4 MSS
  • Landsat-5 MSS
  • Landsat-4 TM
  • Landsat-5 TM
  • Landsat-7 ETM+
  • Landsat-8
  • OrbView-3
  • PeruSAT-1
  • PlanetScope
  • Pleiades
  • QuickBird
  • PlanetScope
  • RapidEye
  • Resourcesat-2
  • SAC-C
  • Sentinel-2
  • SPOT-1
  • SPOT-2
  • SPOT-3
  • SPOT-4
  • SPOT-5
  • SPOT-6
  • SPOT-7
  • SuperView
  • Thaichote (THEOS)
  • TripleSat
  • WorldView-2
  • WorldView-3
  • WorldView-4
  • ZY3
  • ZY3-2
Note: When specifying a sensor, use the exact syntax, as shown in the preceding list.
Back to top

References

Zhang, Y, B Guindon, and J Cihlar, An image transform to characterize and compensate for spatial variations, Remote Sensing of Environment 82 (2002): 173-87.

© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.