Compute Color Correction

Compute Color Correction diagram

The ComputeColorCorrection operation is a service tool that's used to compute color correction for the image collection, usually after the image collection has been block adjusted. Typically, the color correction is computed for images that will be used for generating orthoimage mosaics.

Licensing

License:

As of ArcGIS 10.5, you must license your ArcGIS Server as an ArcGIS Image Server to use this resource.

This operation is supported at 10.6.1 and later.

Request URL

http://<orthomapping service tool url>/ComputeColorCorrection/submitJob?
imageCollection={"itemId": "1780d648db3545bba8661ad98df824a4"}&colorCorrectionMethod=Dodging&dodging
Surface=Color_Grid&referenceImage={"itemId": "1780d648db3545bba8661ad98df824a4"}&context={}

Request parameters

The following table lists the parameters with syntax and details for each.

ParameterDescription

imageCollection

The image collection (mosaic dataset) name or url.

The image service must exist before calling the service to compute color correction.

Syntax: A JSON object supports three keys, itemId, url and uri. These keys are case sensitive.

Example:

{"itemId": “<portal item id>”}
{“url”: “<image service url>”}
{“uri”: “<cloud raster uri or shared data path>”}

colorCorrectionMethod

(Required)

This is the method that will be used for computing the color correction. The following are the available options:

  • Dodging—Changes each pixel's value toward a target color. With this technique, you must also choose the type of target color surface, which affects the target color. Dodging tends to give the best result in most cases.
  • Histogram—Changes each pixel's value according to its relationship with a target histogram. The target histogram can be derived from all the rasters, or you can specify a single target raster. This technique works well when all the rasters have a similar histogram.
  • Standard_Deviation—Changes each pixel's value according to its relationship with the histogram of the target raster, within one standard deviation. The standard deviation can be calculated from all the rasters in the mosaic dataset, or you can specify a target raster. This technique works best when all the rasters have normal distributions.

dodgingSurface

(Required)

When using the Dodging balance method, each pixel needs a target color, which is determined by the surface type. The following are the available options:

  • Single_Color—Use when there are only a small number of raster datasets and a few types of ground objects. If there are too many raster datasets or too many types of ground features, the output color may become blurred. All the pixels are altered toward a single color point—the average of all pixels.
  • Color_Grid—Use when you have a large number of raster datasets, or areas with a large number of diverse ground objects. Pixels are altered toward multiple target colors, which are distributed across the mosaic dataset.
  • First_Order—This technique tends to create a smooth color change and uses less storage in the auxiliary table, but it may take longer to process compared to the color grid surface. All pixels are altered toward many points obtained from the two-dimensional polynomial slanted plane.
  • Second_Order—This technique tends to create smoother color changes and uses less storage in the auxiliary table, but it may take longer to process compared to the color grid surface. All input pixels are altered toward a set of multiple points obtained from the two-dimensional polynomial parabolic surface.
  • Third_Order—This technique tends to create smoother color changes and uses less storage in the auxiliary table, but it may take longer to process compared to the color grid surface. All input pixels are altered toward multiple points obtained from the cubic surface.

targetImage

(Optional)

Use this parameter as the target to color balance the images in the image collection.

Example:

{"itemId": “<portal item id>”}
{“url”: “<image service url>”}
{“uri”: “<cloud raster uri or shared data path>”}

context

(Optional

Contains additional settings that allow you to customize the statistics computation settings.

Example:

{“skipRows”: 10, “skipCols”: 10, "reCalculateStats": “OVERWRITE”}

f

The response format. The default response format is html.

Values: html | json

Response

When you submit a request, the task assigns a unique job ID for the transaction.

Syntax:

{ "jobId": "<unique job identifier>", "jobStatus": "<job status>" }

After the initial request is submitted, you can use the jobId to periodically check the status of the job and messages as described in Checking job status. Once the job has successfully completed, use the jobId to retrieve the results. To track the status, you can make a request of the following form:

http://<Orthomapping service tool url>/ComputeColorCorrection/jobs/<jobId>

Accessing results

When the status of the job request is esriJobSucceeded, you can access the results of the analysis by making a request of the following form:

http://<Orthomapping service tool url>/ComputeColorCorrection/jobs/<jobId>/results/result?token=<your token>&f=json

The result will be the image service URL of the image collection.