This task warps an input raster to align with the base raster using tie points.

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.

; 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('ImageToImageRegistration')

Input parameters (Set, Get): BASE_RASTER, DATA_IGNORE_VALUE, FULL_EXTENT, INPUT_RASTER, INPUT_TIEPOINTS, OUTPUT_PIXEL_SIZE, OUTPUT_RASTER_URI, POLYNOMIAL_DEGREE, RESAMPLING, WARPING

Output parameters (Get only): OUTPUT_RASTER

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


BASE_RASTER (optional)

Set this parameter to one of the following strings, indicating which input raster is the base raster:

  • Raster 1 from Tie Points (default)
  • Raster 2 from Tie Points

DATA_IGNORE_VALUE (optional)

Specify a pixel value to fill areas where no image data appears in the warped image. The default value is 0.

FULL_EXTENT (optional)

Output the full extent of the warp image instead of the overlapping area only. The default value is 1 (true).

INPUT_RASTER (optional)

Specify the raster that will be registered to the base raster. This will take precedence over the warp raster defined in INPUT_TIEPOINTS.

INPUT_TIEPOINTS (required)

This is a reference to an ENVITiePointSet object.

OUTPUT_PIXEL_SIZE (optional)

Set the output pixel size in the map unit of the base raster. The default output pixel sizes are the same as those of the base raster.

OUTPUT_RASTER_URI (optional)

Specify a string with the fully qualified filename and path of the associated OUTPUT_RASTER.

  • If you do not specify this parameter, or set it to an exclamation symbol (!), ENVI creates a temporary file.
  • If you set it to the hash symbol (#), ENVI creates a file in the temporary directory, but this file will not be deleted when ENVI closes.

POLYNOMIAL_DEGREE (optional)

Specify the polynomial degree when using the Polynomial warping method. The default value is 1.

RESAMPLING (optional)

Specify the resampling method to use when creating the spatial grid:

  • Nearest Neighbor (default): Uses the nearest pixel without any interpolation.
  • Bilinear: Performs a linear interpolation using four pixels to resample.
  • Cubic Convolution: Uses 16 pixels to approximate the sinc function using cubic polynomials to resample the image.

WARPING (optional)

Specify the warping method. The default value is Polynomial.

  • RST
  • Polynomial
  • Triangulation

Output Parameters


OUTPUT_RASTER

This is a reference to the output raster of filetype ENVI.

Methods


Execute

Parameter

ParameterNames

Properties


DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History


ENVI 5.2.1

Introduced

ENVI 5.4.1

Renamed the BACKGROUND parameter to DATA_IGNORE_VALUE

ENVI 6.2 Added the INPUT_RASTER parameter

See Also


ENVITask, FilterTiePointsByFundamentalMatrix Task, FilterTiePointsByGlobalTransform Task, FilterTiePointsByGlobalTransformWithOrthorectificationTask, FilterTiePointsByPushbroomModel Task, GenerateTiePointsByCrossCorrelation Task, GenerateTiePointsByCrossCorrelationWithOrthorectification Task, GenerateTiePointsByMutualInformation Task, GenerateTiePointsByMutualInformationWithOrthorectification Task, Masking Support in ENVITasks