AUTOCHIP

Automatic image chip matching for GCPs


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Return Value :: Details :: Example :: Related

Back to top

Description


AUTOCHIP registers a set of ground control points (GCPs) from a chip database file onto a raw image through chip matching and generates a GCP segment containing the successfully matched GCPs.
Back to top

Parameters


autochip(file, dbic, mmseg, dbgc, chipfile, chipsens, chipdate, chipdbic, algo, searchr, searchun, minscore, proc, numgcps)

Name Type Caption Length Value range
FILE* str Input raster file name 1 -    
DBIC List[int] Input image channel 0 -   Default: 1
MMSEG List[int] Input math model segment 0 - 1  
DBGC List[int] Output GCP segment 0 - 1  
CHIPFILE* str Chip database file 1 -    
CHIPSENS str Sensor type 0 - 16 See Details section
Default: Unknown
CHIPDATE str Chip acquisition dates 0 - 21  
CHIPDBIC List[int] Chip image matching channel(s) 0 -   Default: 1
ALGO str Matching algorithm 0 -   FFTP | NCC
Default: FFTP
SEARCHR List[int] Search radius 0 - 1 1 -
Default: 100
SEARCHUN str Search radius units 0 - 7 PIXEL | METER | FEET | US_FEET
Default: PIXEL
MINSCORE List[float] Minimum correlation score for acceptance 0 - 1 0.0 - 1.0
Default: 0.75
PROC str Processing algorithm 0 -  
NUMGCPS List[int] Total number of GCPs collected 0 - 1 0 -

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the raw input image file.

DBIC

Specifies the channel(s) to use from the raw input file. Multiple channels will be averaged together.

If no input channel is specified, the function uses the first channel in the input file.

MMSEG

Specifies the math model segment of the input raw image to use in the chip matching process. All math model types are supported.

If this parameter is not specified, the last model segment of the input file is used.

DBGC

Specifies the GCP segment of the image file (FILE) to receive the collected GCPs.

If the specified segment does not exist or if this parameter is not specified, a new GCP segment is created.

If the specified segment already exists, new GCPs are appended to that segment; GCPs already present in the segment are not overwritten.

CHIPFILE

Specifies the name of the chip database file that contains the image chips to be used for GCP collection.

CHIPSENS

Specifies the type of sensor from the chip library to use for GCP collection. The default value of 'Unknown' matches any sensor type value.

Refer to the Details section for a list of supported sensors.

CHIPDATE

Defines an expression for the acquisition dates of the image chips that will be used for GCP collection. Ranges of dates may be specified using the wildcard character, *.

The basic format of the date is [day]-[mon]-[year], where [mon] is the three-letter abbreviation for the month.

Example expressions are:

If this parameter is not specified, the function uses chips acquired on any date.

CHIPDBIC

Specifies the channel(s) of the image chip to be used for GCP collection. The selected channel(s) should match, in the spectral response sense, the selected image channel(s) for which GCPs are collected. Multiple channels will be averaged together.

If no input chip matching channel is specified, the function uses the first channel in the input chip database.

ALGO

Specifies the algorithm used for automated GCP matching.

Supported methods are:

If this parameter is not specified, FFTP is the default method.

When the two images being matched have similar gray values and appearances, NCC generally produces acceptable results. When there is a rotation or image size error in the initial math models, NCC may produce better matching results than FFTP. Because the template size that NCC uses is smaller than the one used by FFTP, this method also typically generates faster results.

For more consistently accurate results, FFTP is recommended. This method uses a larger template size than NCC and, because it works in the frequency domain, it looks at the patterns of details in the image rather than the gray values in a small neighborhood, which NCC uses. This makes FFTP more robust than NCC in cases where there is a large brightness difference between images or when a major land use change has occurred between the images and allows it to better match images of the same area from different sensors or spectral bands.

SEARCHR

Optionally specifies the distance in the X and Y directions from a starting location on the reference image over which the search for the best match with a fixed point on the input image will be conducted. The units for this value are controlled by the SEARCHUN (Search Radius Units) parameter.

The search radius is an estimation of error with the raw image's positional information and the DEM accuracy. If you know that your image is accurate to 80 meters and your DEM is accurate to 200 meters, set the search radius to 280 meters. A larger search radius will require more processing time, because more locations are evaluated to determine the best match for a GCP.

If this parameter is not specified, the function uses a search radius of 100 pixels.

SEARCHUN

Optionally specifies the units of the search radius value, as specified by the SEARCHR (Search Radius) parameter.

Acceptable values are:

When using PIXEL, the search radius value is interpreted to mean the number of pixels in the reference image. If the specified unit is METER, FEET, or US_FEET, the search radius represents meters or feet in the reference image.

MINSCORE

Optionally specifies a threshold value that controls whether a candidate GCP is accepted as a GCP or rejected. This parameter specifies the minimum match quality that is considered an acceptable match, with 1.0 indicating a perfect match.

When using the FFTP algorithm, this value is converted internally to a minimum acceptable phase shift peak value.

When using the NCC matching method, this value specifies the minimum match score value required to accept a local match between the input and reference images as a GCP. The default value is 0.75.

PROC

Controls the amount of memory (in megabytes) used by the algorithm.

If the host memory limit is not specified, the function uses a default of 1 GB or half the available physical memory, whichever is smaller.

NUMGCPS

Returns the total number of GCPs collected.

This is an output parameter; no user input is required.

Back to top

Return Value

Returns: GCP segment number

Type:  PCI_INT

The segment number of the newly created GCP segment is returned.

This function returns only if it executes successfully; otherwise, it throws an exception.

Back to top

Details

AUTOCHIP automatically collects GCPs for an input image, using automatic image correlation with a chip database (.cdb) file.

The sensor math model associated with the image data in the input file, together with the known geographic coordinates of an image chip, are used to estimate an initial location of the chip in the image. Then, the neighborhood of the initial location is searched, in a three-level hierarchical fashion, for a better match with the chip. The best match location at the highest (coarsest search) level is used as the initial location in the second-highest level, and so on.

A match in the finest search level that passes the match score threshold test becomes a collected GCP.

Use CHIPEXT to automatically create a chip database, or create one manually using CATALYST Professional Chip Manager.

The chips used for GCP collection may be restricted to a subset of those stored in the specified chip database by specifying non-default values for the CHIPSENS (Chip Sensor Type) and CHIPDATE (Chip Acquisition Dates) parameters.

Supported sensors are:
Back to top

Example

In this example, AUTOCHIP automatically matches chips for GCPs in an image file named "spotrght.pix". The chip database name used in this example is "sample_spot.cdb".

from pci.autochip import *


file = "SPOTRGHT.PIX"           # input file
dbic = [1]                      # input channel
mmseg = []                      # use last numbered math model segment in file
dbgc = []                       # create a new segment
chipfile = "sample_spot.cdb"    # chip database.
chipsens = ""
chipdate = ""
chipdbic = [1]
algo = "NCC"
searchr = [200]
searchun = "PIXEL"
minscore = [0.75]
proc = ""
numgcps = []

autochip(file, dbic, mmseg, dbgc, chipfile, chipsens, chipdate, chipdbic, algo, searchr, searchun, minscore, proc, numgcps)

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