This task performs a refined Rational Polynomial Coefficient (RPC) orthorectification by automatically generating Ground Control Points (GCPs) from a reference image.

Example


This example uses sample images from the RPC Orthorectification tutorial. Tutorial files are available from our ENVI Tutorials web page. Click the RPC Ortho 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 the input raster
inputFile = 'OrbViewSubset.dat'
inputRaster = e.OpenRaster(inputFile)
 
; For reference image, use NAIP image with
; one-meter ground sample distance
referenceFile = 'NAIPReferenceImage.dat'
referenceRaster = e.OpenRaster(referenceFile)
 
; For DEM, use NED 1/9-arc second resolution
DEMFile = 'DEM.dat'
DEMRaster = e.OpenRaster(DEMFile)
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('RPCOrthorectificationUsingReferenceImage')
 
; Define inputs
Task.INPUT_RASTER = inputRaster
Task.INPUT_REFERENCE_RASTER = referenceRaster
Task.INPUT_DEM_RASTER = DEMRaster
 
; Run the task
Task.Execute
 
; Display the orthorectified image
View = e.GetView()
Layer = View.CreateLayer(Task.OUTPUT_RASTER)
View.Zoom, /FULL_EXTENT

Syntax


Result = ENVITask('RPCOrthorectificationUsingReferenceImage')

Input parameters (Set, Get): DEM_IS_HEIGHT_ABOVE_ELLIPSOID, GRID_SPACING, INPUT_DEM_RASTER, INPUT_RASTER, INPUT_REFERENCE_RASTER, OUTPUT_COORDINATE_SYSTEM, OUTPUT_GCPS_URI, OUTPUT_PIXEL_SIZE, OUTPUT_RASTER_URI, REQUESTED_NUMBER_OF_GCPS, RESAMPLING, SEARCH_WINDOW

Output parameters (Get only): OUTPUT_GCPS, 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


DEM_IS_HEIGHT_ABOVE_ELLIPSOID (optional)

Set this parameter to true if the DEM is already expressed as the height above the ellipsoid and no geoid correction is required. Most DEM data contain orthometric heights, which are elevations above mean sea level (for example, GMTED2010 or National Elevation Dataset, NED). In these cases, keep the default selection of false.

GRID_SPACING (optional)

Specify the grid spacing (in pixels) to use for orthorectification. The default value is 10.

INPUT_DEM_RASTER (required)

Specify a digital elevation model (DEM) raster. A DEM raster is only required if the input raster has an RPC sensor model. It must have valid map information. If you do not have a DEM file readily available, you can use the global DEM named GMTED2010.jp2 that is provided under the ENVI installation folder. The Global Multi-resolution Terrain Elevation Data 2010 (GMTED2010) has a mean resolution of 30 arc seconds.

INPUT_RASTER (required)

Specify a raster with an RPC spatial reference.

INPUT_REFERENCE_RASTER (required)

Specify a reference image from which to match and find the geographic coordinates of the GCPs. The reference raster should be a true orthorectified image with the same or slightly higher spatial resolution than the input raster. Try to choose a reference image that is close to the year and season of the input raster. Automatic GCP generation is based on image matching between the reference image and source image, so the scene contents should not be vastly different. Automatic GCP generation is more robust if the reference image and input image have similar resolution. If the reference image has a much higher resolution than the input image (i.e., the ratio is greater than 2.5), consider down-sampling the reference image first.

OUTPUT_COORDINATE_SYSTEM (optional)

Set this parameter to a valid ENVICoordSys object indicating the coordinate system to use. The default value is a UTM projection.

OUTPUT_GCPS_URI (optional)

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

OUTPUT_PIXEL_SIZE (optional)

Specify a two-element array indicating the output X and Y pixel size, in the units defined by OUTPUT_COORDINATE_SYSTEM. The default value is the pixel size of the input image.

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.

REQUESTED_NUMBER_OF_GCPS (optional)

Specify the requested number of GCPs. The default value is 25.

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.

SEARCH_WINDOW (optional)

Specify the search window size. Increase the value if there is a big misalignment between the input raster and the reference raster.

Output Parameters


OUTPUT_GCPS

This is a reference to the output GCPs.

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.3. 1

Introduced

ENVI 5.3.2

Added the OUTPUT_PIXEL_SIZE parameter

ENVI 5.4.1

Input rasters can have a replacement sensor model (RSM) or an RPC sensor model. The INPUT_RASTER and DEM_RASTER descriptions were updated.

ENVI 5.4.2

Added the SEARCH_WINDOW parameter

ENVI 5.5.1

Added the OUTPUT_COORDINATE_SYSTEM parameter

See Also


ENVITask, GenerateGCPsFromReferenceImage Task, GenerateGCPsFromTiePoints Task, ENVIGCPSet, ENVITiePointSet, RPCOrthorectification Task, RPCOrthorectificationUsingDSMFromDenseImageMatching Task