| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Algorithm :: Related |
| Back to top |
| Back to top |
gcd(fili_in, fili_ref, filo_dif, dbic_ref, dbic_in, dboc_dif)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILI_IN * | str | Input file (I1) | 1 - | |
| FILI_REF * | str | Input file (I2) | 1 - | |
| FILO_DIF * | str | Output file (GCD Image) | 1 - | |
| DBIC_REF * | List[int] | Input reference channel/layer | 1 - 1 | 1 - |
| DBIC_IN * | List[int] | Input image channel/layer | 1 - 1 | 1 - |
| DBOC_DIF * | List[int] | Output difference channel/layer | 1 - 1 | 1 - |
| Back to top |
FILI_IN
Specifies the PCIDSK file that contains the input image data channel. The image must have the same dimensions and datatype (8-bit unsigned) as FILI_REF.
FILI_REF
Specifies the PCIDSK file that contains the image data to use as a reference. The reference image must have the same dimensions and datatype (8-bit unsigned) as FILI_IN.
FILO_DIF
Specifies the output PCIDSK file which will receive the GCD image.
The file must already exist and must have the same dimensions (pixels and lines) as FILI_IN, and FILI_REF.
DBIC_REF
Specifies the reference image channel or layer. This reference image channel must be the same size and datatype (8-bit unsigned) as DBIC_IN (Input).
DBIC_IN
Specifies the input image channel or layer. This image channel must be the same size and datatype (8-bit unsigned) as DBIC_REF (Input2).
DBOC_DIF
Specifies the image channel or layer to receive the GCD image data. This image channel must have the same dimensions as DBIC_IN (Input) and DBIC_REF (Input2), and must be 32-bit real (32R).
| Back to top |
GCD performs a Change Detection comparison of two input images, with the output going to a 32-bit real image of the same size. Input is restricted to 8-bit unsigned images, of the same X/Y (pixels and lines) dimensions.
GCD performs its change detection on a global scale, meaning it calculates difference on the whole image. The least squares minimization parameters, B0 and B1, are calculated once on the whole image (globally), then using the following formula:
FILI_DIF = Minimize || FILI_IN - (B1 * FILI_REF + B0) ||
The difference image is calculated.
| Back to top |
Determine the global change between channel 2 of the multispectral image database (ms.pix), and channel 1 of the panchromatic image database (pan.pix). Save the real GCD output image to the 1st channel (32R) of GCD.pix.
from pci.gcd import gcd fili_in = "ms.pix" fili_ref = "pan.pix" filo_dif = "gcd.pix" dbic_in = [2] dbic_ref = [1] dboc_dif = [1] gcd( fili_in, fili_ref, filo_dif, dbic_ref, dbic_in, dboc_dif)
| Back to top |
Global Change Detection obtains a difference image from two input images, I1(Input) and I2 (Input2), using the the following formula:
I1 - (b1 * I2 + b0) (1)
The coefficients b0 and b1 are calculated using a Least Square Minimization, namely:
Min || I1 - (b1 * I2 + b0) || (2)
The coefficients b0 and b1 are calculated from the entire image databases, I1 (Input) and I2 (Input2), before the equation (1) is applied, to obtain the difference image.
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.