>  Docs Center  >  Using ENVI  >  Warp and Resample
ENVI

Warp and Resample

Warp and Resample

ENVI offers three warping options: RST, polynomial, and Delaunay triangulation. The resampling methods include nearest neighbor, bilinear, and cubic convolution.

Reference

J.A. Richards, 1999, Remote Sensing Digital Image Analysis Springer-Verlag, Berlin, p. 240.

See the following sections:

Warp and Resample Image-to-Image


You can write a script to resample images using the ENVIResampleRaster routine.

  1. Select the ground control points (GCPs).
  2. From the Ground Control Points Selection dialog menu bar, select Options > Warp Displayed Band or Options > Warp File.
    • If you select Warp Displayed Band, the Registration Parameters dialog appears.
    • If you select Warp File, the Input Warp Image dialog appears. Select the input warp file and click OK. The Registration Parameters dialog appears.
  3. In the Registration Parameters dialog, select the warping method from the Method drop-down list. The method you select determines the additional Warp Parameters options available to you. The available warping methods are as follows:
    • RST: Rotation, scaling, and translation; this is the simplest method. To perform RST warping, you need three or more GCPs. The RST warping algorithm uses an affine transformation:

      x = a1 + a2X + a3Y

      y = b1 + b2X + b3Y

      This algorithm does not allow for shearing in the image warp. To allow for shearing, use a first-order polynomial warp. While the RST method is very fast, in most cases, you can achieve more accurate results with a first-order polynomial warp.

    • Polynomial: Polynomial warping is available from the 1st to nth degree. The degree available is dependent upon the number of GCPs selected where #GCPs > (degree + 1)2.

      A first-order polynomial warp includes an XY interaction term to account for image shear:

      x = a1 + a2X + a3Y + a4XY

      y = b1 + b2X + b3Y + b4XY

    • Triangulation: Delaunay triangulation warping fits triangles to the irregularly spaced GCPs and interpolates values to the output grid. This is the default option.
  4. Depending on the Method you chose, set the following method-specific options:
    • For polynomial warping, enter the desired polynomial Degree. The degree available is dependent on the number of GCPs defined where #GCPs > (degree + 1)2.
    • For triangulation warping, use the Zero Edge toggle button to select whether or not you want a one-pixel border of background color at the edge of the warp data.

      By selecting this option, you will avoid a smearing effect that may appear at the edges of warped images and that you often see when using ENVI’s data-specific georeferencing functions.

  5. From the Resampling drop-down list, select the resampling method:
    • Nearest Neighbor: Uses the nearest pixel without any interpolation to create the warped image.
    • Bilinear: Performs a linear interpolation using four pixels to resample the warped image.
    • Cubic Convolution: Uses 16 pixels to approximate the sinc function using cubic polynomials to resample the image. Cubic convolution resampling is significantly slower than the other methods.
  6. In the Background field, enter a digital number (DN) value to use to fill areas where no image data appear in the warped image.

    To override the output dimensions, enter the desired values in the Output Image Extent fields for image-to-image registration. The output image dimensions are automatically set to the size of the bounding rectangle that contains the warped input image. Therefore, the output warp image size is usually not the same size as the base image. The output size coordinates are determined in base image coordinates. As a result, the upper-left corner values are typically not (0,0), but they indicate the x and y offset from the base image upper-left corner. These offset values are stored in the header and allow for dynamic overlay of the base and warp images even when they are different sizes.

    Note: If you want the registration result to exactly match the coverage of the base image, change the Upper Left X and Upper Left Y values to 1. Change the Output Samples and Output Lines values so they are the same size as the base image. If the coverage of your input image is smaller than that of the base image, the result will have areas of “no data” where there is no coverage.

  7. Select output to File or Memory.
  8. Click OK. ENVI adds the resulting output to the Available Bands List.

Warp and Resample Image-to-Map


  1. Select the ground control points (GCPs).
  2. In the Ground Control Points Selection dialog, select Options > Warp Displayed Band or Options > Warp File.

    The options Warp Displayed Band (as Image to Map) and Warp File (as Image to Map) are also available from the Ground Control Points Selection dialog when selecting image-to-image GCPs.

    • If you select Warp Displayed Band, the Registration Parameters dialog appears.
    • If you select Warp File, the Input Warp Image dialog displays. Select the input warp file and click OK. The Registration Parameters dialog appears.
  3. In the Output Projection and Map Extent area of the Registration Parameters dialog, set the output projection for the image:
    • To change the projection of the upper-left coordinate only, click Change Proj.
    • To change the map coordinates or latitudes/longitudes for the upper-left coordinate, use the X Pixel Size, Y Pixel Size, Output X Size, and Output Y Size fields.
    • Click Options and select from the menu to manage the output projection and map extent settings.
  4. In the Warp Parameters area of the Registration Parameters dialog, select the warping and resampling methods.
  5. Click OK. ENVI adds the resulting output to the Available Bands List.

Warp from GCPs: Image-to-Image


Use Warp from GCPs: Image to Image Registration to perform image-to-image registration without having the images displayed. Use GCPs you selected previously to perform the registration.

  1. From the Toolbox, select Geometric Correction > Registration > Warp from GCPs: Image to Image Registration. An Enter the GCP Filename dialog appears.
  2. Enter the GCP filename or select the appropriate GCP input file from the list. The Input Warp Image dialog appears.
  3. Select an input file and perform optional spatial and spectral subsetting, then click OK. The Input Base Image dialog appears.
  4. Select an input base image and click OK.
  5. In the Registration Parameters dialog, perform the image-to-image registration.

Warp from GCPs: Image-to-Map


Use Warp from GCPs: Image to Map to perform image-to-map registration without having the images displayed. Use GCPs you selected previously to perform the registration.

  1. From the Toolbox, select Geometric Correction > Registration > Warp from GCPs: Image to Map Registration. The Enter GCP Filename dialog appears.
  2. Select a .pts file and click OK. The Image to Map Registration dialog appears. See Image to Map Registration for the remaining steps.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us