This task performs automatic tie point generation using mutual information as a similarity measure. This method is optimized for registering images with different modalities (e.g., registering SAR with optical images, or thermal with visible images).
The normalized mutual information between the patch in the first image and the patch in the second image is computed as the matching score. Mutual information is based on information theory and measures the mutual dependence of the two random variables. Mutual information produces more accurate results than the traditional correlation-based measures for cross-modality image registration. This method takes longer to run since it is more computationally intensive.
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. Update the file references in the example with the correct locations.
e = ENVI()
File1 = 'quickbird_2.4m.dat'
File2 = 'ikonos_4.0m.dat'
Raster1 = e.OpenRaster(File1)
Raster2 = e.OpenRaster(File2)
Task = ENVITask('GenerateTiePointsByMutualInformation')
Task.INPUT_RASTER1 = Raster1
Task.INPUT_RASTER2 = Raster2
Task.Execute
TiePoints = Task.OUTPUT_TIEPOINTS
FilterTask = ENVITask('FilterTiePointsByGlobalTransform')
FilterTask.INPUT_TIEPOINTS = TiePoints
FilterTask.Execute
TiePoints2 = FilterTask.OUTPUT_TIEPOINTS
RegistrationTask = ENVITask('ImageToImageRegistration')
RegistrationTask.INPUT_TIEPOINTS = TiePoints2
RegistrationTask.WARPING = 'Triangulation'
RegistrationTask.Execute
WarpedRaster = RegistrationTask.OUTPUT_RASTER
DataColl = e.Data
DataColl.Add, WarpedRaster
View = e.GetView()
Layer1 = View.CreateLayer(Raster1)
Layer2 = View.CreateLayer(Raster2)
Layer3 = View.CreateLayer(WarpedRaster)
Syntax
Result = ENVITask('GenerateTiePointsByMutualInformation')
Input parameters (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 parameters (Get only): MATCHING_SCORES, OUTPUT_TIEPOINTS
Parameters marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Parameters marked as "Get" are those whose values you can retrieve but not set.
Input Parameters
INPUT_RASTER1 (required)
Specify the first raster.
INPUT_RASTER2 (required)
Specify the second 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.
- Forstner: Obtains and analyzes the gray scale gradient matrix between one pixel and its adjacent pixels. The Forstner operator is typically better for image matching than the Moravec operator.
- Moravec: Seearches for gray scale value differences between one pixel and its adjacent pixels. The Moravec operator is typically faster than the Forstner operator.
- Harris: Improves upon Moravec by using the auto-correlation matrix and avoids using discrete directions and shifts.
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 the minimum matching score to automatically remove the tie points if the matching score is less than the value. The default value is 0.6.
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.
Output Parameters
MATCHING_SCORES
The normalized mutual information between the matching windows (specified with the MATCHING_WINDOW parameter) 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 parameter designed for users who want more control over filtering tie points by matching scores. See Example: Matching Scores for a code example.
OUTPUT_TIEPOINTS
This is a reference to an ENVITiePointSet object with the output tie points.
Methods
Execute
Parameter
ParameterNames
Properties
DESCRIPTION
DISPLAY_NAME
NAME
REVISION
TAGS
Example: Matching Scores
The following script shows how to use the MATCHING_SCORES parameter to filter tie points using matching scores:
e = ENVI()
File1 = 'quickbird_2.4m.dat'
File2 = 'ikonos_4.0m.dat'
Raster1 = e.OpenRaster(File1)
Raster2 = e.OpenRaster(File2)
Task = ENVITask('GenerateTiePointsByMutualInformation')
Task.INPUT_RASTER1 = Raster1
Task.INPUT_RASTER2 = Raster2
Task.MINIMUM_MATCHING_SCORE = 0.0
Task.Execute
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
See Also
ENVITask, GenerateTiePointsByCrossCorrelation Task, FilterTiePointsByGlobalTransform Task, FilterTiePointsByFundamentalMatrix Task, FilterTiePointsByPushbroomModel Task, ImageToImageRegistration Task, ENVITiePointSet