FFTMPOLY

Extracts GCPs with image to polygon matching


EnvironmentsPYTHON :: EASI :: MODELER
Batch ModeYes
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Algorithm :: Acknowledgements :: References :: Related

Back to top

Description


FFTMPOLY extracts ground control points (GCPs) using image to polygon matching. Note that this function is designed to work with high-resolution data; using low-resolution data such as Landsat may not produce the desired results.
Back to top

Parameters


Name Type Length Value range
InputRaster: Input raster channels or layers Raster port 0 - 1024  
InvertedInputRaster: Inverted input raster channels or layers Raster port 0 - 1024  
InputVector: Input vector segment or layer  * Vector port 1 - 1  
OutputGCP: Output GCP segment or layer GCP port 0 - 1024  
SAR Image String 2 - 1 YES, NO
Default: NO
Report String 0 - 192 See parameter description

* Required parameter
Back to top

Parameter descriptions

InputRaster: Input raster channels or layers

Specifies the image layers used in the matching process. At least one raster layer must be specified by the InputRaster or InvertedInputRaster port. To allow sufficient room for matching windows, the image must have at least 512 pixels and 512 lines. The polygons should appear darker than their surroundings.

The same layer cannot appear in both InputRaster or InvertedInputRaster ports.

InvertedInputRaster: Inverted input raster channels or layers

Specifies the inverted image layers used in the matching process. Each layer is inverted relative to its maximum. At least one raster layer must be specified by the InputRaster or InvertedInputRaster port. To allow sufficient room for matching windows, the image must have at least 512 pixels and 512 lines. The polygons should appear brighter than their surroundings.

The same layer cannot appear in both InputRaster or InvertedInputRaster ports.

InputVector: Input vector segment or layer

Specifies the vector segment or layer containing the polygon data used for matching.

OutputGCP: Output GCP segment or layer

Specifies the output GCP layer to receive the extracted GCPs.

SAR Image

Specifies whether the input channel or layer contains SAR image data. The two supported values are YES and NO. If YES is specified, the internal processing parameters are tuned for the radar image characteristics. If NO is specified, the parameters are tuned for the optical image characteristics. The default value is NO.

Report

Specifies where to direct the generated report.

Available options are:

Back to top

Details

FFTMPOLY extracts ground control points (GCPs) by matching an optical or SAR image with rasterized polygons.

FFTMPOLY automatically collects GCPs by matching patches in the image with polygons, usually lakes. The matching is performed in the spatial frequency domain using the Fast Fourier Transform (FFT) to transform and match image patches and rasterized polygons. The matching algorithm is based on the Kuglin and Hines (1975) paper in the "References" section. The number of extracted GCPs depends on the number of polygons in the area used for GCP extraction. The GCPs can then be used in automated image orthorectification workflows.

The input image can be in the raw (image acquisition) geometry, but it must contain nominal georeferencing or a sensor-specific math model. All formats supported by GDB can be used in FFTMPOLY. The file must be writable, and its format must support the creation or update of GCP segments. Note also that FFTMPOLY is designed to work with high-resolution images; low-resolution data such as Landsat may not generate desired output.

The DBIC parameter (InputRaster port) specifies the list of image channels used as is in the matching process. The DBINVC parameter (InvertedInputRaster port) specifies the list of inverted channels used for matching. At least one channel or layer must be specified between the DBIC parameter (InputRaster port) and DBINVC parameter (InvertedInputRaster port). The polygons should appear darker than their surroundings in the DBIC channels (InputRaster layers), and brighter in the DBINVC channels (InvertedInputRaster layers).

If only one DBIC channel (InputRaster layer) is specified, its pixels are used directly for matching. If only one DBINVC channel (InvertedInputRaster layer) is specified, its pixels are inverted with respect to the maximum value in the patch before matching.

If two or more channels are combined, the pixels in channels from DBIC (InputRaster) and the inverted pixels from channels in DBINVC (InvertedInputRaster) are averaged before matching.

When extracting GCPs from lakes in multi-channel (polarimetric) SAR images, it is recommended that you derive the total intensity at each pixel, and specify it as a single channel or layer. When extracting GCPs from lakes in multi-channel optical images, and the infrared channel is available, specify it as a single DBIC channel (InputRaster layer). Vegetation is bright in IR channels and provides good contrast for the lakes. Otherwise specify in the DBIC parameter (InputRaster port) the combination of channels or layers in which the lakes appear the darkest. The DBINVC parameter (InvertedInputRaster port) should be used for lakes only in special circumstances, for example for scenes with frozen lakes.

The extracted GCPs are stored in the GCP layer specified by the OutputGCP port. The details of the extracted GCPs are written to the destination specified by the Report parameter.

The SARIMAGE (SAR Image) parameter specifies whether the input image is SAR or optical. This information is required to set some of the internal processing parameters differently for the two image types.

The REPORT (Report) parameter specifies the destination of the FFTMPOLY report. The report provides some details of the matching process and the list of all extracted GCPs.

The entry for each GCP has the following format:

GCP 1     2957.79    9661.26  53.99900767 -122.98764174   -34.21    -2.74  50.70
where:

FFTMPOLY assigns GCP elevations extracted from the global DEM. Please see point 2 in the Algorithm section for further details.

The matching algorithm is robust and relatively insensitive to spurious or incorrect data such as inaccurate or seasonally varying lake shorelines. It properly handles polygons with islands provided they have sufficient contrast. The match may fail if the polygons are not uniform or their contrast differs from the setting in the DBIC parameter (InputRaster port) and the DBINVC parameter (InvertedInputRaster port). For polygons representing lakes, this may be due to sun glint in optical images, for example, or waves or aquatic vegetation in SAR images.

The number of extracted and accepted GCPs depends on the sizes and distribution of the polygons, and on the contrast of the image areas corresponding to individual polygons. For well-matching images, typically fewer than 10 percent of incorrect matches are classified as valid, and this is acceptable for the intended use of FFTMPOLY.

Back to top

Algorithm

FFTMPOLY extracts GCPs by matching the image with rasterized polygon patches. Matching is performed in the Fast Fourier Transform (FFT) spatial frequency domain. The GCP extraction follows these main steps:
  1. Parameter extraction and process initialization:

    In this step, the run parameters are extracted and verified, and the FFT software is set up. It is critical that it is possible to convert coordinates between the "reference" polygon data in FILV (InputVector) and the "object" image data in FILE (InputRaster and InvertedInputRaster). The conversion does not need to be very accurate, as long as the positions agree to within about 200 image lines and pixels.

  2. GCP candidate extraction:

    The locations and sizes of the polygons determine their use as potential GCPs (GCP candidates). For each polygon, its bounding box in the image coordinates is determined. If the center of the bounding box lies outside the window selected for processing, the polygon is rejected. For the remaining polygons, their sizes are examined. A polygon is rejected if the area of its bounding box is less than 1,600 image pixels or if the line or pixel dimension of the bounding box exceeds 1,920. All remaining polygons are accepted as GCP candidates. FFTMPOLY throws an exception if there are no GCP candidates in the specified window.

    Ground coordinates of each GCP candidate are set at the center of its bounding box. The elevation of each GCP candidate is retrieved automatically at this location from the PCI-supplied global DEM. If a more detailed DEM is available it can be used, by setting its full path in an environment variable PCI_GLOBAL_DEM just before running FFTMPOLY, and unsetting it after the module completion.

  3. Patch contrast threshold derivation:

    Not all image patches corresponding to GCP candidate polygons may have sufficient contrast for the matching to be successful, for example, lakes surrounded by dark forests in optical images. Therefore, a threshold for the acceptable patch contrast is derived from an approximate histogram of the image.

  4. GCP patch extraction:

    The resolution adjustment factor is derived for each GCP candidate polygon to fit it into a matching patch. The requirement is that both bounding box dimensions must not exceed 256 lines or pixels of the adjusted-resolution patch. Then, a co-located adjusted-resolution image patch (1024 by 1024) is extracted, and its contrast verified against the threshold derived in the previous step. If the contrast of the image patch is greater than the threshold, the polygon is smoothly rasterized into a 256 by 256 patch. During the rasterization process the GCP candidate elevation is used to reproject each GCP polygon vertex to image coordinates. The image patch is derived by averaging all channels or layers in the DBIC parameter (InputRaster port) with inverted channels or layers specified in the DBINVC parameter (InvertedInputRaster port). The pixels are inverted by subtracting them from the maximum value of all pixels of the corresponding channel or layer in the patch. The edges of the polygons are smoothed out to avoid step-like discontinuities.

  5. Matching:

    For each GCP candidate, the image and rasterized polygon patches are matched iteratively. A 256 by 256 image subpatch is extracted and centered on the predicted GCP position. The spatial displacement (X, Y shift) between the two patches is derived by image to image matching based on phase correlation in the 2D Fourier transform domain. The shifts are used to adjust the GCP position before the next iteration. The iterations continue until the shifts between the two iterations are sufficiently small or the iteration limit is reached. The magnitude of the last iteration phase peak provides the GCP weight.

  6. Matching evaluation:

    The matches are accepted or rejected based on the GCP weight. The acceptable weight is reduced for SAR images. Every match is assessed on its own without reference to the other matches.

Back to top

Acknowledgements

FFTMPOLY is a PCI Geomatics implementation of the patchMatcher module from the GEOCOR package developed by Dr. Jack Gibson from the Canada Centre for Remote Sensing (CCRS). Produced under license from Her Majesty the Queen in Right of Canada, represented by the Minister of Natural Resources.

The implementation was carried out under the Canadian Space Agency EOADP contract 28/7003796.

The Fast Fourier Transforms required by the algorithm are computed by the code adapted from www.kurims.kyoto-u.ac.jp/~ooura/fft.html (Copyright Takuya OOURA, 1996-2001).

Back to top

References

Kuglin, C.D. and D.C. Hines (1975). "The phase correlation image alignment method". Proceedings of the IEEE 1975 International Conference on Cybernetics and Society, San Francisco, California, pp. 163-165.

Guo, X. and Y. He (2008). "Mismatch of band sequences between an image and header file: a potential error in SPOT L1A products". Canadian Journal of Remote Sensing, Volume 34, Number 1, February 2008, pp. 1-4.

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.