Compute Color Correction

URL:
https://<root>/System/OrthomappingTools/GPServer/ComputeColorCorrection
Methods:
GET
Version Introduced:
10.6.1

Description

Compute Color Correction diagram

The ComputeColorCorrection operation is a service tool that computes color corrections for the mosaic dataset, usually after the mosaic has been block adjusted. Images that are used for generating orthoimage mosaics typically have color correction computed.

Request parameters

ParameterDetails

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:

Use dark colors for code blocksCopy
1
2
3
{"itemId": “<portal item id>”}
{“url”: “<image service url>”}
{“uri”: “<cloud raster uri or shared data path>”}

colorCorrectionMethod

(Required)

The method used to compute color correction. The following are the color correction options:

  • Dodging : Changes each pixel's value toward a target color. With this option, 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 option 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 option works best when all the rasters have normal distributions.

dodgingSurface

(Required)

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

  • Single_Color : All the pixels are altered toward a single color point, the average of all pixels. Use this option when there are 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.
  • Color_Grid : The pixels are altered toward multiple target colors, which are distributed across the mosaic dataset. Use this option when you have a large number of raster datasets, or areas with a large number of diverse ground objects.
  • First_Order : All pixels are altered toward many points obtained from the two-dimensional polynomial slanted plane. This option 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.
  • Second_Order : All input pixels are altered toward a set of multiple points obtained from the two-dimensional polynomial parabolic surface. This option 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.
  • Third_Order : All input pixels are altered toward multiple points obtained from the cubic surface. This option 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.

targetImage

(Optional)

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

Use dark colors for code blocksCopy
1
2
3
{"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.

Use dark colors for code blocksCopy
1
{"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:

Use dark colors for code blocksCopy
1
2
3
4
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}

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

Use dark colors for code blocksCopy
1
https://<orthomapping tools url>/ComputeColorCorrection/jobs/<jobId>

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:

Use dark colors for code blocksCopy
1
https://<orthomapping tools url>/ComputeColorCorrection/jobs/<jobId>/results/result?token=<your token>&f=json

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

Example usage

The following is a sample URL for ComputeColorCorrection :

Use dark colors for code blocksCopy
1
https://services.myserver.com/arcgis/rest/services/System/OrthomappingTools/GPServer/ComputeColorCorrection/submitJob

JSON request example

Use dark colors for code blocksCopy
1
2
3
4
5
imageCollection={"itemId": "17080d648db3545bba8661ad98df824a4"}&
colorCorrectionMethod=Dodging&
dodgingSurface=Color_Grid&
referenceImage={"itemId": "1780d648db3545bba8661ad98df824a4"}&
context={}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.