Generate Exclude Area (Data Management)
Summary
Allows you to set the exclude area, based on color mask or histogram percentage. The output of this tool can then be used within the Color Balance Mosaic Dataset tool.
Usage
This tool is used to exclude areas that will be difficult to color correct, such as water, clouds, and anomalous areas.
The output of this tool can be used in the Color Balance Mosaic Dataset tool.
Syntax
Parameter | Explanation | Data Type |
in_raster |
The file path and file name of the input raster. Valid inputs include raster layers and mosaic datasets layers. | Mosaic Dataset; Composite Layer; Raster Dataset; Raster Layer |
out_raster |
The file path and file name of the input raster. The output will be a raster dataset. The output can then be used as the Exclude Area Raster parameter within the Color Balance Mosaic Dataset tool. | Raster Dataset |
pixel_type (Optional) |
Choose the pixel depth of your input raster dataset. This parameter is important, since any pixel depth above 8-bit will need to have the color mask and histogram values adjusted.
| String |
generate_method (Optional) |
Choose which method you want to use to exclude areas of your input.
| String |
max_red (Optional) |
This is the maximum red value to exclude. The default is 255. | Double |
max_green (Optional) |
This is the maximum green value to exclude. The default is 255. | Double |
max_blue (Optional) |
This is the maximum blue value to exclude. The default is 255. | Double |
max_white (Optional) |
This is the maximum white value to exclude. The default is 255. | Double |
max_black (Optional) |
This is the maximum black value to exclude. The default is 0. | Double |
max_magenta (Optional) |
This is the maximum magenta value to exclude. The default is 255. | Double |
max_cyan (Optional) |
This is the maximum cyan value to exclude. The default is 255. | Double |
max_yellow (Optional) |
This is the maximum yellow value to exclude. The default is 255. | Double |
percentage_low (Optional) |
This is the minimum percentage of the histogram to exclude. The default is 0. | Double |
percentage_high (Optional) |
This is the maximum percentage of the histogram to exclude. The default is 100. | Double |
Code Sample
This is a Python sample for GenerateExcludeArea.
import arcpy GenerateExcludeArea_management("C:/workspace/fgdb.gdb/mosdata", "C:/workspace/excludeArea.tif","8_BIT", "COLOR_MASK","255","255","255","255","15", "255","255","255","0","100")
This is a Python script sample for GenerateExcludeArea.
##=========================== ##Generate Exclude Area ##Usage: GenerateExcludeArea_management in_raster out_raster 8_BIT | 11_BIT | ## 12_BIT | 16_BIT COLOR_MASK | HISTOGRAM_PERCENTAGE ## {max_red} {max_green} {max_blue} {max_white} ## {max_black} {max_magenta} {max_cyan} ## {max_yellow} {percentage_low} {percentage_high} try: import arcpy arcpy.env.workspace = "c:/workspace" # Generate exclude area dataset from raster dataset with Histogram arcpy.GenerateExcludeArea_management("srcimage.tif", "exarea.tif", "8_BIT", "HISTOGRAM_PERCENTAGE", "", "", "", "", "", "", "", "", "10", "100") # Generate exclude area dataset from mosaic dataset with Color Mask arcpy.GenerateExcludeArea_management("CC.gdb/srcmd", "exarea.tif", "8_BIT", "COLOR_MASK", "255", "200", "50", "255", "10", "210", "100", "255", "", "") except: print "Generate Exclude Area example failed." print arcpy.GetMessages()