ENVI_REGISTER_DOIT
Use ENVI_REGISTER_DOIT to warp (georeference) image data, such as image-to-image or image-to-map registration.
Note: The image-to-image component of this routine has been replaced by a combination of the following tasks:
Automatic tie point generation: GenerateTiePointsByCrossCorrelation or GenerateTiePointsByMutualInformation
Tie point filtering: FilterTiePointsByFundamentalMatrix, FilterTiePointsByGlobalTransform, FilterTiePointsByPushbroomModel
Warping: ImageToImageRegistration
Use the PTS keyword to specify the base points and the corresponding input image warp points. The goal is to warp the image so that the warp points align with the base points. If the base and warp points are in pixel coordinates, image-to-image registration is performed, and you must specify both a base and warp file ID. If the base points are in map coordinates and the warp points are in pixel coordinates, then image-to-map registration is performed and you only specify the warp file ID.
Syntax
ENVI_DOIT, 'ENVI_REGISTER_DOIT' [, B_FID=file ID] [, BACKGROUND=integer] [, DEGREE=value] [, /IN_MEMORY] [, METHOD={0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8}] [, OUT_BNAME=string array] [, OUT_NAME=string] [, PIXEL_SIZE=array] [, PROJ=structure], PTS=array [, R_FID=variable], W_DIMS=array, W_FID=file ID, W_POS=array [, X0=value] [, XSIZE=value] [, Y0=value] [, YSIZE=value] [, /ZERO_EDGE]
Keywords
B_FID (optional)
Use this keyword to specify the file ID for the base file. B_FID is only specified when performing image-to-image warping (georeferencing). The goal is to warp the warp image (W_FID) so it aligns with the base image (B_FID). This is the value returned from the keyword R_FID in the ENVI_OPEN_FILE procedure. FID is a long integer with a value greater than 0. An invalid file ID has a value of -1.
BACKGROUND (optional)
Use this keyword to specify the value for all background pixels. The default is 0.
DEGREE (optional)
Use this keyword to specify the degree of the warping polynomial for the polynomial method. The degree of the polynomial is limited by the number of ground control points (GCPs), and you must be sure that #GCPs >= (degree + 1)2. DEGREE has no effect for RST and triangulation methods. The default is DEGREE=1.
IN_MEMORY (optional)
Set this keyword to specify that output should be stored in memory. If you do not set IN_MEMORY, output will be stored on disk and you must specify OUT_NAME (see below).
METHOD (optional)
Set this keyword to one of the following values to specify the warping method to use.
- 0: RST with nearest neighbor
- 1: RST with bilinear
- 2: RST with cubic convolution
- 3: Polynomial with nearest neighbor (default)
- 4: Polynomial with bilinear
- 5: Polynomial with cubic convolution
- 6: Triangulation with nearest neighbor
- 7: Triangulation with bilinear
- 8: Triangulation with cubic convolution
OUT_BNAME (optional)
Use this keyword to specify a string array of output band names.
OUT_NAME (optional)
Use this keyword to specify a string with the output filename for the resulting data. If you set the keyword IN_MEMORY, you do not need to specify OUT_NAME.
PIXEL_SIZE (optional)
Use this keyword only when performing image-to-map warping. Set this keyword to an array of double-precision values containing the x and y pixel sizes of the output image. You should specify the pixel sizes in the units contained in the projection structure passed to the PROJ keyword. The default is PIXEL_SIZE = [1.0d, 1.0d].
PROJ (optional)
Use this keyword to specify the projection of the x and y map coordinates listed in the PTS array when performing image-to-map registration. You must set PROJ when performing image-to-map registration. PROJ is a projection structure returned from ENVI_GET_PROJECTION or ENVI_PROJ_CREATE.
PTS
Use this keyword to specify an array of double-precision values representing the x and y positions of the base and warp tie points. The dimensions of the array are [4, #points], where the base and warp points for image-to-image are defined as follows.
- PTS[0, #points]: x base points
- PTS[1, #points]: y base points
- PTS[2, #points]: x warp points
- PTS[3, #points]: y warp points
Image-to-map warp points are defined as follows:
- PTS[0, #points]: x map points
- PTS[1, #points]: y map points
- PTS[2, #points]: x image points
- PTS[3, #points]: y image points
Note: This procedure converts any variable used for PTS to double-precision. It also converts x and y base points to x and y map points.
R_FID (optional)
ENVI Classic library routines that result in new images also have an R_FID, or “returned FID.” This is simply a named variable containing the file ID to access the processed data. Specifying this keyword saves you the step of opening the new file from disk.
W_DIMS
Use this keyword to specify the spatial dimensions of the warp image (W_FID) on which to perform the operation. W_DIMS is a five-element array of long integers with the following definitions:
- W_DIMS[0]: A pointer to an open ROI; use only in cases where ROIs define the spatial subset. Otherwise, set to -1L.
- W_DIMS[1]: The starting sample number. The first x pixel is 0.
- W_DIMS[2]: The ending sample number
- W_DIMS[3]: The starting line number. The first y pixel is 0.
- W_DIMS[4]: The ending line number
W_FID
Use this keyword to specify the file ID for the warp file. This is the file ID of the image that is warped to the base points. This value is returned from the keyword R_FID in the ENVI_OPEN_FILE procedure. FID is a long integer with a value greater than 0. An invalid file ID has a value of -1.
W_POS
Use this keyword to specify an array of band positions for the warp image indicating the band numbers on which to perform the operation. W_POS is an array of long integers, ranging from 0 to the number of bands minus 1.
X0 (optional)
Use this keyword to specify the x location (in pixel coordinates for image-to-image or map coordinates for image-to-map) of the upper-left pixel of the output image.
XSIZE (optional)
Use this keyword to specify the output image x size. This value is in pixels for image-to-image or output map units for image-to-map.
Y0 (optional)
Use this keyword to specify the y location (in pixel coordinates for image-to-image or map coordinates for image-to-map) of the upper-left pixel of the output image.
YSIZE (optional)
Use this keyword to specify the output image y size. This value is in pixels for image-to-image or output map units for image-to-map.
ZERO_EDGE (optional)
Set this keyword to set the edges outside of any triangles to the value specified by BACKGROUND. Use this keyword only when METHOD=6, 7, or 8.
API Version
4.2
image to map registration
image to map registration
image-to-map registration
image-to-map registration