| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Examples :: Algorithm :: Related |
| Back to top |
| Back to top |
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILREF * | String | Reference-image file name | 1 - 192 | |
| FILI | String | Input file name | 0 - 192 | |
| DBIC | Integer | Input raster channels | 0 - | |
| DESATAMT | Integer | Desaturation amount | 0 - 1 | 1 - 99 Default: 25 |
| DESATPER | Integer | Percentage to change in image | 0 - 1 | 1 - 99 Default: 50 |
| DESATOPT | String | Desaturation options | 0 - 192 | |
| FILO | String | Output file name | 0 - 192 | |
| FTYPE | String | Output file type | 0 - 4 | Default: PIX |
| FOPTIONS | String | Output file options | 0 - 192 | |
| MONITOR | String | Monitor mode | 0 - 3 | ON, OFF Default: ON |
| Back to top |
FILREF
The name of the file with the reference image on which to base desaturation statistics. This file is typically a full-mosaic overview. The channels in FILREF and FILI are assumed to have a one-to-one correspondence in type and order, though they can be at different resolutions.
Overviews must exist for the reference file or be created with PYRAMID.
FILI
The name of the file with the image to desaturate. This file must have the same projection as the reference image and be completely inside the area covered by it. The value of FILI can be the same as that of FILREF.
DBIC
The channel or channels to read from the input image file to be processed and written to the output file. The channels specified for FILREF and FILI are assumed to have a one-to-one correspondence in type and order, though they can be at different resolutions. The first value (channel) specified will be written to the first channel in FILO, and so on. If no channels are specified, all channels will be used.
Data should be 8-bit (8U) or 16-bit (16U). Other data types, such as real, will be processed, but may yield poor results if values are outside the range of 0 to 65,535.
Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.
DESATAMT
The amount (or aggressiveness) of desaturation to perform. This relates approximately to the amount (area) of the image that can be modified. The range of values is from 1 (apply almost no desaturization) to 99 (desaturate virtually the entire image). A high value, such as 50, means all bright and semi-bright areas will be desaturated. A low value, such as 5, means only a small number of very bright areas will be modified. Starting with a lower value is recommended.
This parameter is optional.
DESATPER
Percentage of bright area pixels to be desaturated. Of the bright pixels identified as candidates, those that occur below the specified percentage will not be modified, while those above may be tweaked. The range of values is from 1% (essentially no bright areas are modified) to 99% (almost all bright areas will be modified). A higher value will mean more modification is made and results will be more substantial. A low value, such as 10, means only subtle changes can occur. The default value is 50 so half of the pixels in the bright regions will be modified.
This parameter is optional.
DESATOPT
Advanced settings that can further influence the desaturation process.
This parameter is optional.
FILO
The name of the PCIDSK (.pix) or TIF (.tif) file to create to hold the desaturated imagery. This file will have the same dimensions, projection, and data type as that specified for FILI. This file will be created and must not already exist.
FTYPE
The default value is PIX.
For more information on GDB-recognized file types, see the topic GDB file formats in the CATALYST Professional Help under Technical Reference.
FOPTIONS
The available options on creation of the output file. The available options are specific to the file format; however, you need not necessarily specify any options.
For more information on GDB-recognized file types, including the available options for each, see the topic GDB file formats in the CATALYST Professional Help under Technical Reference.
This parameter is optional.
MONITOR
The program progress can be monitored by printing the percentage of processing completed. A system parameter, MONITOR, controls this activity.
Available options are:
| Back to top |
DESATUR is an algorithm that can be used to adjust overly bright areas in any image, but it was developed specifically to create better-looking mosaics. Images often have large overly bright (or saturated) areas in which detail appears "washed out" when an enhancement (LUT) is applied. Such areas are typically quarries, beaches, building roofs, parking lots, and so forth.
Attempting to bring out detail in the washed-out areas by darkening them results in an image that is unacceptably darker overall. DESATUR solves this problem by automatically identifying washed-out areas and adjusting the data values in these areas without modifying the surrounding areas. When an enhancement is applied to this modified image, the washed-out areas will have more detail. The overall radiometry of the image is not affected.
DESATUR is ideally suited to large image mosaics as a post-processing step. The mosaic overview (usually created with MOSPREP) is used to derive global statistics and control the processing of the full-resolution mosaic tiles.
Use the FILREF parameter to specify the reference file, such as a mosaic preview. It must have overviews (or pyramids), with powers of two (2,4,8,16...) recommended. FILI contains the data to be desaturated. The area covered by FILI must be inside the area covered by FILREF. The channels specified by DBIC will be processed. FILO specifies the name of the file to which the processed data will be written. FILO cannot be the same as FILI, it must be a new file. FILO will automatically be created with the same projection, extents, and metadata as FILI.
The reference file is used to control global parameters and processing to ensure that mosaic-tile files are each processed in the same way to ensure a seamless result between tiles.
The DESATAMT, DESATPER, and DESATOPT parameters can be used to override the default processing options.
Computing the global statistics from FILREF can be time consuming. After choosing the processing options and channels (DBIC), an optional run of DESATUR can be performed, which saves the processing statistics as metadata of FILREF so that in subsequent runs–on individual tiles on distributed systems, for example–they do not need to be recomputed. This optional run is set up by specifying no values for the FILI and FILO parameters.
If DBIC, DESATAMT, DESATPER or DESATOPT are changed, the metadata will be ignored and the processing parameters will be recomputed as normal. If the imagery in FILREF is changed, the optional run of DESATUR must be repeated to update the metadata; otherwise, improper values will be used. The metadata tags used can be identified in FILREF with the prefix DESATUR_ at the file and image-channel levels.
| Back to top |
The goal is to reduce the washed-out bright areas in a single image, workimage.pix, on which pyramids have been built previously. In this case, the image can be used as both the reference image, FILREF, and the image to process, FILI. All channels are processed using the default options.
EASI>filref = "workimage.pix"
EASI>fili = "workimage.pix"
EASI>dbic =
EASI>desatamt =
EASI>desatper =
EASI>desatopt =
EASI>filo = "workimage_desaturated.pix"
EASI>ftype =
EASI>foptions =
EASI>run DESATUR
To continue with this example, if you want to target smaller features more aggressively, run DESATUR again with some advanced options specified.
EASI>filref = "workimage.pix" EASI>fili = "workimage.pix" EASI>dbic = EASI>desatamt = EASI>desatper = EASI>desatopt = "power=3 pyramid=32" EASI>filo = "workimage_desaturated2.pix" EASI>ftype = EASI>foptions = EASI>run DESATUR
The output file workimage_desaturated.pix will contain the resulting image.
A large mosaic has been produced previously. The file mosaic_preview.pix contains a preview of the full mosaic and the files tile_1_1.pix, tile_1_2.pix, and so on contain the full-resolution tiles that make up the full-mosaic area. The following processing methodology will be used: run DESATUR on the preview file with various options, and then examine it visually to determine the best settings. These settings will then be applied to each of the full-resolution tiles, using the preview file as the reference file to ensure that same processing parameters are used on each tile to produce seamless results.
EASI>FILREF = "mosaic_preview.pix"
EASI>FILI = "mosaic_preview.pix"
EASI>DBIC =
EASI>DESATAMT = 35
EASI>DESATPER = 40
EASI>DESATOPT =
EASI>FILO = "desaturated_preview.pix"
EASI>FTYPE =
EASI>FOPTIONS =
EASI>run DESATUR
Examine the file desaturated_preview.pix, in CATALYST Professional Focus, for example, and, as a result, run DESATUR again with processing options that are not as aggressive:
EASI>FILREF = "mosaic_preview.pix"
EASI>FILI = "mosaic_preview.pix"
EASI>DBIC =
EASI>DESATAMT = 30
EASI>DESATPER = 25
EASI>DESATOPT =
EASI>FILO = "desaturated_preview_2.pix"
EASI>FTYPE =
EASI>FOPTIONS =
EASI>run DESATUR
Examine the file desaturated_preview_2.pix again and, after determining that these processing options produce better results, apply them to each of the tiles. To speed up processing, complete an optional run of DESATUR with no input file (FILI) specified. By doing so, the global statistics are saved in metadata and do not need to be recomputed each time:
EASI>FILREF = "mosaic_preview.pix" EASI>FILI = EASI>DBIC = EASI>DESATAMT = 30 EASI>DESATPER = 25 EASI>DESATOPT = EASI>FILO = EASI>FTYPE = EASI>FOPTIONS = EASI>run DESATUR
The individual tiles can now be processed efficiently. While the input tiles are in PCIDSK (.pix) format, the desaturated tiles are created in TIFF (.tif) format.
EASI>FILREF = "mosaic_preview.pix" EASI>FILI = "tile_1_1.pix" EASI>FILO = "tile_1_1_desaturated.tif" EASI>FTYPE = "TIF" EASI>FOPTIONS = "TILED512" EASI>run DESATUR
Repeat the preceding for each remaining tile by changing the values of FILI and FILO accordingly.
| Back to top |
The algorithm is proprietary to PCI Geomatics.
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.