Summary
Makes transitions from one image to an adjoining image appear seamless.
Usage
Color balancing can only take place if the following is true about your data:
- All the bands have their statistics calculated.
- All the bands have their histograms built.
- All the raster datasets have the same number of bands.
- All the raster datasets have the same pixel type and pixel depth. Only 8-bit unsigned and 16-bit unsigned bit depths are supported.
- None of the raster datasets have an associated color map.
The actions defined by the Exclude Area Raster, Stretch Type, and Gamma parameters (exclude_raster, stretch_type, and gamma in Python) are performed before any color balancing takes place. On the tool's dialog box, these three parameters are found in the Pre-processing Options tab.
The target color surface is only available if the dodging balancing technique is chosen. When using the dodging technique, each pixel needs a target color, which is picked up from the target color surface. There are five types of target color surfaces that you can choose from: single color, color grid, first order surface, second order surface, and third order surface.
The Target Raster is a raster that is used to guide color balancing.
- When dodging balancing is used—The target color that will be derived depends on the target color surface type that was chosen. For single color, the average value of the reference target image is used. For color grid, the reference target image is resampled to a suitable grid. For the polynomial order surfaces, the coefficients of the polynomial are obtained by least square fitting, from the reference target image.
- When histogram balancing is used—The target histogram is obtained from the reference target image.
- When standard deviation balancing is used—The target standard deviation is obtained from the reference target image.
To remove a color correction, right-click the mosaic dataset in ArcCatalog or the Catalog window and click Remove > Remove Color Balancing.
Syntax
ColorBalanceMosaicDataset_management (in_mosaic_dataset, {balancing_method}, {color_surface_type}, {target_raster}, {exclude_raster}, {stretch_type}, {gamma}, {block_field})
Parameter | Explanation | Data Type |
in_mosaic_dataset | The mosaic dataset you want to color balance. | Mosaic Layer |
balancing_method (Optional) | The balancing algorithm to use.
| String |
color_surface_type (Optional) | When using the Dodging balance method, each pixel needs a target color, which is determined by the surface type.
| String |
target_raster (Optional) | The raster that you want to use to color balance the other images. The balance method and color surface type, if applicable, will be derived from this image. | Internet Tiled Layer; Map Server Layer; Raster Layer |
exclude_raster (Optional) | Applies a mask before color balancing the mosaic dataset. Create the mask using the Generate Exclude Area tool. | Raster Layer |
stretch_type (Optional) | Stretch the range of values before color balancing. Choose from one of the following options:
| String |
gamma (Optional) | Adjust the overall brightness of an image. A low value will minimize the contrast between moderate values by making them appear darker. Higher values increase thecontrast by making them appear brighter. | Double |
block_field (Optional) | The name of the field within a mosaic dataset's attribute table used to identify items that should be considered one item when performing some calculations and operations. | String |
Code sample
ColorBalanceMosaicDataset example 1 (Python window)
This is a Python sample for ColorBalanceMosaicDataset.
import arcpy
arcpy.ColorBalanceMosaicDataset_management(
"C:/workspace/CC.gdb/cc1", "DODGING", "SINGLE_COLOR",
"C:/workspace/Aerial.lyr", "#", "STANDARD_DEVIATION", "3", "BLOCKNAME")
ColorBalanceMosaicDataset example 2 (stand-alone script)
This is a Python script sample for ColorBalanceMosaicDataset.
#########*#########*##########*#########*#########*#########*#########*&&&&&&&&&&
# Color Correction Mosaic Dataset with target layer
import arcpy
arcpy.env.workspace = "C:/workspace"
mdname = "CC.gdb/cc1"
ccmethod = "DODGING"
dogesurface = "SINGLE_COLOR"
targetras = "C:/workspace/Aerial_photo.lyr"
excluderas = "#"
prestretch = "NONE"
gamma = "#"
blockfield = "#"
arcpy.ColorBalanceMosaicDataset_management(
mdname, ccmethod, dogesurface, targetras, excluderas,
prestretch, gamma, blockfield)
Environments
This tool does not use any geoprocessing environments
Licensing information
- ArcGIS Desktop Basic: No
- ArcGIS Desktop Standard: Yes
- ArcGIS Desktop Advanced: Yes