Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  Using ENVI  >  Image Change

ENVI

Image Change

Image Change

TutorialImage Change Tutorial

The Image Change workflow compares two images of the same geographic extent, taken at different times. It identifies differences between them. The difference can be computed on a specified input band or on a feature index. You can optionally apply thresholding. You can also apply an image transform to extract features correlating to change.

See the following for help on a particular step of the workflow:

Select a File for Image Change


File inputs can have standard map projections, be pixel-based, or have RPC information. A pseudo projection does not provide spatial locations with the accuracy needed for use in image change detection. Inputs with different map information are allowed. When inputs have different map information, reprojection and resampling are handled as follows:

  • If the files use different projections, the first input file establishes the projection that is used throughout the workflow. The overlap of the two inputs is the area that is included in the analysis.
  • If the files use different pixel sizes, the input file with the lower resolution is resampled to use the higher resolution of the other input file.
  1. From the Toolbox, select Change Detection > Image Change Workflow. Select an input file from the File Selection dialog.

    Note: Datasets from JPIP servers are not allowed as input.

  2. To apply a mask, select the Input Mask tab in the File Selection panel. Masked pixels constitute a separate class in image difference output.

    Tip: Reprojected vectors are not supported when the original input data has RPCs. To apply a mask in this case, either draw the mask on the image in the current Image window view, or use the RPC Orthorectification workflow to reproject the image to standard map projections, then use the orthorectified image and the shapefile as inputs.

  3. Select the Input Files tab again.
  4. Enter the path and filename for the Time 2 File.

    To navigate to a file, click Browse. The Select Time 2 File dialog appears. Do one of the following:

    • If the file you want to use is listed in the dialog, select it.
    • Click Open File to open a new file. The Open dialog appears.
    • Click Open Remote Dataset to open a geodatabase or remote dataset. The Remote Connection Manager dialog appears.

      Note: Datasets from JPIP servers are not allowed as input.

  5. Click Next. The Image Registration panel appears, and the files open in a new workflow view. If one or both of the selected files are displayed in an active view before you start the workflow, the display bands and any brightness, contrast, stretch, and sharpen settings are retained when ENVI creates the workflow view. The image location is not retained for pixel-based images or those with pseudo or arbitrary projections. If the selected Time 1 File was displayed in an active view before you start the workflow, the image center location is retained.

Automatic Image Registration


Image registration geometrically aligns two images with different viewing geometry and/or different terrain distortions into the same coordinate system. Registration is achieved by identifying corresponding features in the two images and establishing common tie points, then warping one image based on these tie points to match the base image. Because manually identifying tie points can be a time-consuming process, automatic image registration can quickly generates tie points, making image registration a quick step in the Image Change workflow.

In this panel you can choose Skip Image Registration, or you can choose Register Images Automatically.

Skip Image Registration

If you skip image registration and the input files have different map information, the following fields appear:

  1. Select a Reprojection Method from the drop-down list. The choices are as follows:
    • Polynomial: 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 gridded data points and interpolates values to the output grid. This is the default option.
    • Rigorous: Performs a full projection transformation (including datum shift, if needed) for every pixel in the output image.
  2. Select one of the following resampling options from the Resampling drop-down list:
    • 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.
  3. Click Next to go to the Difference Method Choice panel.

Register Images Automatically

If the input files are not pixel-based, you can select to register images automatically.

  1. Enter the Matching Band to use for the registration. The default is Band 1.
  2. Enter the Requested Number of Tie Points to use for image registration. The minimum is 9; however, the recommended value is the default number that is set based on the input file. Though smaller values provide quicker processing time, they do not result in an alignment as precise as one that used more tie points.
  3. Enter the tolerance for the search range in the Search Window Size field. This moving window is a subset of the warp image that is searched to find topographic feature matches for tie point placement. The recommended value is the default number that is set based on the input file.
  4. Enter the maximum error to allow for each tie point in the Maximum Allowable Error Per Tie Point. The tie point with the largest error distance from the predicted location is iteratively removed until no tie points have an error greater than the this value. The default value is 5.00 pixels. Setting this field to a higher value means less accuracy.
  5. Set the Warping Method to use for the transformation. Polynomial is the default. If you know the original transform for the image, select that as the method.
    • RST: Rotation, scaling, and translation; this is the simplest method. 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: 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.
  6. Click Next. The Difference Method Choice panel appears, and an Image Registration layer appears in the Layer Manager.
  7. Right-click on the base image in the Layer Manager, then select Display in Portal. In the following image, the Portal shows the base image on the registered image, and you can see that registration was accurate:

    Coregistration results

    By comparison, the following image shows a view at 50% transparency. You can see the offset between the a base image and the warp image that needed registration:

    Before coregistration

    If registration was not successful, you can go back to the previous step to change auto registration parameters.

  8. When you are satisfied with registration, continue with the image difference process.

Changing the Search Window Size

If registration failed to align two images, a common reason is because the Search Window Size value was not large enough. If the pixel offset between the two images to register is greater than the Search Window Size, the search will not be able to detect corresponding features. You can redo the registration by clicking Back in the Image Difference panel and changing the value.

To determine a new Search Window Size value:

  1. Set the transparency to 50%.
  2. Open the Cursor Value window.
  3. In the view, find a feature and click on it. Note the pixel location in the Cursor Value window.
  4. Click on the same location in the second image and note the pixel location in the Cursor Value window.
  5. Determine the distance in pixels between the two readings. Find the maximum distance across the image and use 2*(distance+5) as your new Search Window Size value.

    For example, the pixel location of a feature in the base image is [200, 200], but the pixel location for the same feature in the warp image is [300, 300], creating an offset of 141 pixels. Use 2*(141+5)=292 as the Search Window Size value.

Select a Difference Method


In the Change Method Choice panel, select the difference method to use:

  • Image Difference: Performs an image difference, with or without change thresholding options, and without performing image transformation.
  • Image Transform: Performs a selected transform and creates a difference image, without change thresholding options. Transforms change data to another data space and are done to easily extract features correlating to change.

Click Next to go to the Image Difference panel after you select Image Difference, or to go to the Transform Method Choice panel when you select Image Transform.

Image Difference Settings


If you selected Image Difference in the Difference Method Choice panel, the Image Difference panel appears. Set the parameters to use for the difference analysis.

In the Difference Method tab:

  1. Select one of the following:

    • Difference of Input Band: Performs difference analysis on a specific band in the image. (Note: you can write a script to perform this task automatically using the ENVIImageBandDifferenceTask routine.)
    • Difference of Feature Index: Performs difference analysis on a specific feature.

    • Spectral Angle Difference: Performs difference analysis by the spectral angle. This option determines the spectral similarity between the Time 1 spectra and the Time 2 spectra by calculating the angle between the spectra and treating them as vectors in a space with dimensionality equal to the number of bands. Spectral Angle Difference is recommended for hyperspectral data. It is a good choice if there is not enough information in a single input band or there are too many bands to choose from for the Difference of Input Band option, or if there are no features of interest for the Difference of Feature Index option. (Note: you can write a script to perform this task automatically using the ENVISAMImageDifferenceTask routine.)
  2. If you are using Difference of Input Band, select a band from the drop-down list.
  3. To use advanced settings for band input, select the Advanced tab. If you see that the two images have obviously different dynamic ranges caused by different illumination conditions, enable the Radiometric Normalization check box. Otherwise, leave the check box disabled. Radiometric normalization minimizes radiometric differences between two images caused by inconsistencies of acquisition conditions, such as changes caused by different atmospheric and illumination conditions. The radiometric normalization process applies a gain and an offset to the Time 2 image so that it has the same mean and standard deviation as the Time 1 image.
  4. If you are using Difference of Feature Index, select one of the following indices from the drop-down list:

    • Vegetation Index (NDVI): The Normalized Difference Vegetation Index transforms multispectral data into a single image band where vegetation distribution is bright. The following equation shows how NDVI is computed, using Landsat TM bands as an example:

    NDVI = (Band 4 - Band 3) / (Band 4+ Band 3)

    • Water Index (NDWI): The Normalized Difference Water Index produces a single grayscale image, where water is bright. The following equation shows how NDWI is computed, using Landsat TM bands as an example:

    NDWI = (Band 4 - Band 5) / (Band 4 + Band 5)

    • Built-up Index (NDBI): The Normalized Difference Built-up Index produces a single grayscale image, where built-up areas are bright. The following equation shows how NDBI is computed, using Landsat TM bands as an example:

    NDBI = (Band 5 - Band 4) / (Band 5 + Band 4)

    • Burn Index: The Burn Index (-NBR) is the opposite of the Normalized Burn Ratio. It produces a single grayscale image where burn areas are bright. The result is the same as the Differenced Normalized Burn Ratio.

    -NBR = -[(Band 4 - Band 7) / (Band 4 + Band 7)]

    Note: The Difference of Feature Index option is available only when the input files are multispectral or hyperspectral. An option is only available for selection if the bands in your image meet the wavelength requirements of that index.

    See References for additional information about the feature indices.

  5. To use advanced settings for the feature index, select the Advanced tab. Specify the bands for Band 1 and Band 2. The workflow provides default bands for each index type. The equation the workflow uses for computing the feature index is:

    (Band2 - Band1) / (Band2 + Band1)
  6. If you are using Spectral Angle Difference, there are no advanced parameters to set.
  7. To preview how the parameter settings look before processing, enable the Preview check box. A Preview Window appears. The Preview Window works with full or higher resolution views. You can change settings and preview the results again, as needed. If either the image lines or samples is greater than 1024 pixels and you want to zoom out of the data, you cannot zoom out further than 50% because it will significantly increase processing time and delay the previewed data from displaying. Zooming out further than 50% will result in a black Preview Window.
  8. Click Next. The difference analysis begins.

    When image difference processing is complete, the Thresholding or Export panel appears.

Select Thresholding or Export


In the Thresholding or Export panel, select one of the following:

  • Apply Thresholding: takes you to the Change Thresholding panel, where you can set parameters that help the workflow process determine the areas that have big change. Change Thresholding describes the settings. When you select this option, you can export multiple outputs at the end of the workflow.
  • Export Image Difference Only: provides a shorter workflow that does not include thresholding, and takes you directly to the Export panel. When you select this option, you export only a difference image.

Change Thresholding


In the Change Thresholding step for image change detection, specify the type of change you want to show between the two images. You can use pre-set auto-thresholding techniques, and you can manually adjust thresholding.

You can also write a script to perform these tasks using the ENVIAutoChangeThresholdClassificationTask or ENVIChangeThresholdClassificationTask routines.

  1. If you are using the Difference of Input Band or Difference of Feature Index method, select the change of interest from the Select Change of Interest drop-down list. The choices are:

    • Increase and Decrease: Shows areas of increase (in blue) and decrease (in red).
    • Increase Only: Shows areas of increase (in blue) only.
    • Decrease Only: Shows areas of decrease (in red) only.

    Note: This setting is not used for the Spectral Angle Difference method. Areas of change show in green.

  2. In the Select Auto-Thresholding Method drop-down list, select one of the following:

    • Otsu's: A histogram shape-based method. It is based on discriminate analysis and uses the zero- and the first-order cumulative moments of the histogram for calculating the value of the thresholding level.
    • Tsai's: A moment-based method. It determines the threshold so that the first three moments of the input image are preserved in the output image.
    • Kapur's: An entropy-based method. It considers the thresholding image as two classes of events, with each class characterized by Probability Density Function (PDF). The method then maximizes the sum of the entropy of the two PDFs to converge on a single threshold value.
    • Kittler's: A histogram shape-based method. It approximates the histogram as a bimodal Gaussian distribution and finds a cutoff point. The cost function is based on the Bayes classification rule.

    See References for additional information about the auto-thresholding methods.

  3. If you are using the Difference of Input Band or Difference of Feature Index method, you can set thresholding manually by selecting the Manual tab. The Increase Threshold value controls the thresholding on areas of increase. The Decrease Threshold value controls the thresholding on areas of decrease. Use the following to set the thresholds:

    • Use the Increase Threshold and the Decrease Threshold slider bars to increase and/or decrease the threshold values.
    • Enter the threshold values into the fields provided.
    • Use the up arrow and right arrow keyboard keys to increase the value by 0.0001.
    • Use the down arrow and left arrow keyboard keys to decrease the value by 0.0001.
    • Use the Page Up and Page Down keyboard keys to increase/decrease the values by 10 percent.
    • Click the Reset button Reset to return to the default value.
  4. If you are using the Spectral Angle Difference method, if you prefer to set thresholding manually, select the Manual tab. The Change Threshold value controls the thresholding on areas of big change. Use the following to set the thresholds:

    • Use the Change Threshold slider bar to increase and/or decrease the threshold value.
    • Enter the threshold value into the field provided.
    • Use the keyboard keys or the Reset button described in the previous step .
  5. To preview how the thresholding settings look before processing, enable the Preview check box. A Preview Window appears. The Preview Window works with full or higher resolution views. You can change settings and preview the results again, as needed.
  6. Click Next. When you click Next, the difference image is classified based on the threshold values. If you selected Difference of Input Band or Difference of Feature Index as the difference method, the image is classified into Big Increase, Big Decrease, and Other. If you selected Spectral Angle Difference as the difference method, the image is classified into Big Change and Other. The Cleanup panel appears.

Clean Up Image Change Results


In the Cleanup panel, you can refine the change detection result and preview what the refinement will look like before you apply the settings. Performing cleanup is an optional step; to skip it click Skip and continue to the export step.

Tip: If you plan to save the vectors created during processing to a file in the final step of the workflow, the Cleanup step is recommended. Performing cleanup significantly reduces the time needed to export vectors.

  1. Enable the check boxes for the cleanup methods you want to use. The following are available:
    • Enable Smoothing removes speckling noise during cleanup.
    • Enable Aggregation removes small regions.
  2. Enter values for the cleanup methods you enabled:
    • Specify the Smooth Kernel Size using an odd number (e.g., 3 = 3x3 pixels). The square kernel's center pixel will be replaced with the majority class value of the kernel. The default is 3.
    • Specify the Aggregate Minimum Size in pixels. Regions with a size of this value or smaller are aggregated to an adjacent, larger region. The default for thematic change detection is 9. The default for image change detection is 100.
  3. The Preview Window should still be open. Preview the results of your changes.
  4. Click Next. The Export panel appears.

Select a Transform Method


If you selected Image Transform in the Difference Method Choice panel, the Transform Method Choice panel appears.

  1. Select the image transform to use. The choice are:
    • PCA: Principal Components Analysis (PCA) produces uncorrelated output bands to segregate noise components, and to reduce the dimensionality of data sets. Because multispectral data bands are often highly correlated, the PCA transformation is used to produce uncorrelated output bands. This is done by finding a new set of orthogonal axes that have their origin at the data mean and that are rotated so the data variance is maximized.
    • MNF: Minimum Noise Fraction (MNF) determines the inherent dimensionality of image data to segregate noise in the data, and to reduce the computational requirements for subsequent processing.
    • ICA: Independent Component Analysis (ICA) works well with hyperspectral data because it is more likely to treat sparse targets as important features, compared with the PCA or MNF methods. ICA can a longer time to process.
  2. If you selected PCA or MNF, click Next to go to the Export panel.
  3. If you selected ICA, set the following parameters:
    • Enter a Sampling Percentage to improve performance for larger images. Specify a percent value from 0.1 to 100. The sample pixels are chosen based on a uniform random distribution.
    • Enter the Maximum Iterations to perform for IC optimization using a fixed-point algorithm. The default is 100. The lower limit is 100. More iterations help to find more optimal components; however, each iteration adds to processing time, depending on the CPU and system load.
    • Enter the Maximization Stabilization Iterations for IC optimization using a stabilized fixed-point algorithm. When estimating one independent component, the fixed-point algorithm runs first. If the algorithm does not converge after maximization iterations, the stabilized fixed-point algorithm runs to improve convergence. The default value is 100. The lower limit is 0 (no stabilization step). Enabling stabilization and increasing stabilization iterations helps to find the optimal components; however, each iteration adds to processing time, depending on the CPU and system load.
    • Select one of the following Contrast Function types from the drop-down list:

      LogCosh. (default). LogCosh is a good general-purpose contrast function. Its first-order derivative follows:

      LogCosh

      Kurtosis. Its first-order derivative follows:

      Kurtosis

      Gaussian. Its first-order derivative follows:

      Gaussian

  4. Click Next to go to the Band Choice panel.

Select a Band


If you are performing an image transform, the Band Choice panel appears after the transform is complete. In this panel, you can select a specific band to view, and you can export the selected band.

  1. From the Select Band to Reflect Change drop-down list, select the band to view.
  2. The selected band is added to the Layer Manager and the band appears in the view. If needed, you can select a different band and the new selection will appear in the view.
  3. Click Next to go to the Export panel.

Export Image Change Results


  1. In the Export Files tab in the Export panel, enable the output options you want. The following are available:
    • Export Change Class Image saves the thresholding result to an ENVI raster.
    • Export Change Class Vectors saves the vectors created during thresholding. The supported vector output formats are shapefile and geodatabase. The output area units are in square meters.

      Note: Depending on the image size, exporting to vectors may be time-consuming. To reduce the export time, performing the Cleanup step prior to export is recommended.

  2. In the Additional Export tab, enable any other output options you want. The following are available:

    Note: If you did not apply thresholding, or if you chose the Image Transform option during the workflow, the only available option is Export Change Grayscale Image.

    • Export Change Class Statistics saves statistics on the thresholding image.The output area units are in square meters.
    • Export Change Grayscale Image saves the difference image to an image. The supported image output formats are ENVI, geodatabase, and TIFF.
  3. Click Finish to create the output, add the new layers to the Layer Manager, and save the files to the directories you specified. For Image Transform, the output is from the single band you selected in the Band Choice panel. When the export is complete, the workflow view closes. The original data and the export data display in the Image window view.

Related Topics


Change Detection Analysis, Thematic Change, SPEAR Change Detection, THOR Change Detection



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