GenerateTiePointsByCrossCorrelation Task

This task performs automatic tie point generation using cross correlation as a similarity measure. This method works well for general purposes, especially registering images with similar modality (e.g., registering optical images with optical images).

The following diagram shows where this task belongs within an image-to-image registration workflow:

References

Jin, Xiaoying. ENVI automated image registration solutions. NV5 Geospatial Solutions, Inc. whitepaper (2017). ENVI automated image registration solutions can be downloaded from our website.

Jin, Xiaoying, and Robert Schafer. Method and system for automatic registration of images. Exelis, Inc., assignee; now owned by NV5 Global, Inc. U.S. Patent No. 9,245,201 (issued January 26, 2016).

Example

This example uses sample images from the Image Registration tutorial. The files are available from our ENVI Tutorials web page. Click the Image Registration link to download the .zip file to your machine, then unzip the files.

; Start the application

e = ENVI()

 

; Open input rasters

File1 = 'quickbird_2.4m.dat'

File2 = 'ikonos_4.0m.dat'

Raster1 = e.OpenRaster(File1)

Raster2 = e.OpenRaster(File2)

 

; Get the auto tie point generation task from the catalog of ENVITasks

Task = ENVITask('GenerateTiePointsByCrossCorrelation')

 

; Define inputs

Task.INPUT_RASTER1 = Raster1

Task.INPUT_RASTER2 = Raster2

 

; Run the task

Task.Execute

 

; Get the output tie points

TiePoints = Task.OUTPUT_TIEPOINTS

 

; Get the tie point filter task from the catalog of ENVITasks

FilterTask = ENVITask('FilterTiePointsByGlobalTransform')

 

; Define inputs

FilterTask.INPUT_TIEPOINTS = TiePoints

 

; Run the task

FilterTask.Execute

 

; Get the output tie points

TiePoints2 = FilterTask.OUTPUT_TIEPOINTS

 

; Get the image-to-image registration task from the catalog of ENVITasks

RegistrationTask = ENVITask('ImageToImageRegistration')

 

; Define inputs

RegistrationTask.INPUT_TIEPOINTS = TiePoints2

RegistrationTask.WARPING = 'Triangulation'

 

; Run the task

RegistrationTask.Execute

 

; Get the output raster

WarpedRaster = RegistrationTask.OUTPUT_RASTER

 

; Get the collection of data objects currently available in the Data Manager

DataColl = e.Data

 

; Add the output to the Data Manager

DataColl.Add, WarpedRaster

 

; Display the input rasters

View = e.GetView()

Layer1 = View.CreateLayer(Raster1)

Layer2 = View.CreateLayer(Raster2)

 

; Display the result

Layer3 = View.CreateLayer(WarpedRaster)

Syntax

Result = ENVITask('GenerateTiePointsByCrossCorrelation')

Input properties (Set, Get): INPUT_RASTER1, INPUT_RASTER2, INPUT_SEED_TIEPOINTS, INTEREST_OPERATOR, MATCHING_WINDOW, MINIMUM_MATCHING_SCORE, OUTPUT_TIEPOINTS_URI, REQUESTED_NUMBER_OF_TIEPOINTS, SEARCH_WINDOW

Output properties (Get only): MATCHING_SCORES, OUTPUT_TIEPOINTS

Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.

Methods

This task inherits the following methods from ENVITask:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties

This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

This task also contains the following properties:

INPUT_RASTER1 (required)

Specify the base raster.

INPUT_RASTER2 (required)

Specify the raster that will be registered with the base raster.

INPUT_SEED_TIEPOINTS (optional)

This is a reference to an ENVITiePointSet object with input seed tie points.

INTEREST_OPERATOR (optional)

Specify the interest operator to use to identify feature points. The default value is Forstner.

MATCHING_SCORES (optional)

The normalized cross-correlation between the matching windows (specified with the MATCHING_WINDOW property) in both input images is computed as the matching score. This value is a double-precision array in the form [number of tie points].

This is an advanced property designed for users who want more control over filtering tie points by matching scores. See Example: Matching Scores for a code example.

MATCHING_WINDOW (optional)

Specify the matching window size used for computing the matching score between the two images. The default value is 61.

MINIMUM_MATCHING_SCORE (optional)

Specify a floating-point value indicating the minimum matching score. Tie points with a matching score less than the minimum value are considered outliers and are removed. If the image pairs have a large parallax, it is likely that the matching score is low and you should decrease this value. The default value is 0.6. To register images with different modalities (e.g., registering SAR with optical images), set the minimum matching score to a lower value.

OUTPUT_TIEPOINTS

This is a reference to an ENVITiePointSet object with the output tie points.

OUTPUT_TIEPOINTS_URI (optional)

Specify a string with the fully qualified path and filename for OUTPUT_TIEPOINTS.

REQUESTED_NUMBER_OF_TIEPOINTS (optional)

Specify the requested number of tie points. The default value is 121.

SEARCH_WINDOW (optional)

Specify the tolerance for the search range. The default value is 255.

Example: Matching Scores

The following script shows how to use the MATCHING_SCORES property to filter tie points using matching scores:

; Start the application

e = ENVI()

 

; Open input rasters

File1 = 'quickbird_2.4m.dat'

File2 = 'ikonos_4.0m.dat'

Raster1 = e.OpenRaster(File1)

Raster2 = e.OpenRaster(File2)

 

; Get the auto tie point generation task

; from the catalog of ENVITasks

Task = ENVITask('GenerateTiePointsByCrossCorrelation')

 

; Define inputs

Task.INPUT_RASTER1 = Raster1

Task.INPUT_RASTER2 = Raster2

Task.MINIMUM_MATCHING_SCORE = 0.0

 

; Run the task

Task.Execute

 

; Filter the tie points by matching scores

; and remove any outliers

TiePointSet = Task.OUTPUT_TIEPOINTS

MatchingScore = Task.MATCHING_SCORES

 

Indices = Where(MatchingScore ge 0.6)

Tiepoints = TiePointSet.Get(Indices)

FilteredTiePoints = ENVITiePointSet(TIEPOINTS=Tiepoints, $

  INPUT_RASTER1=Raster1, INPUT_RASTER2=Raster2)

Version History

ENVI 5.2. 1

Introduced

API Version

4.2

See Also

ENVITask, GenerateTiePointsByMutualInformation Task, FilterTiePointsByGlobalTransform Task, FilterTiePointsByFundamentalMatrix Task, FilterTiePointsByPushbroomModel Task, ImageToImageRegistration Task, ENVITiePointSet