Harris Geospatial / Docs Center / Using ENVI / Tutorials / Workflows / Image Change Tutorial

ENVI

Image Change Tutorial

Image Change Tutorial

In this tutorial, you will use the Image Change workflow to compare two images of an area over Indonesia that was impacted by the December 26, 2004 tsunami. The first image is a before image, taken in April, 2004. The second image was taken in January, 2005.

The first image shown below is from tsunami_before.dat, and the second image shows tsunami_after.dat in a Standard Portal. You can see in the portal that there are substantial differences between the two images when you adjust the Transparency sliders on the toolbar. Specifically, many vegetation areas were washed out by the tsunami.

Before image

After image

References

Image Change Detection:

Normalized Difference Vegetation Index (NDVI): Jensen, J. R., 1986. Introductory Digital Image Processing, Prentice-Hall, New Jersey, p. 379.

Normalized Difference Water Index (NDWI): McFeeters, S.K., 1996. The use of normalized difference water index (NDWI) in the delineation of open water features, International Journal of Remote Sensing, 17(7):1425–1432.

Normalized Difference Built-up Index (NDBI): Zha, Y., J. Gao, and S. Ni, 2003. Use of normalized difference built-up index in automatically mapping urban areas from TM imagery, International Journal of Remote Sensing, 24(3):583–594.

Burn Index: Burn Index uses an opposite Normalized Burn Ratio (NBR), which is -NBR. The NBR reference is Key, C.H.; Z. Zhu; D. Ohlen; S. Howard; R. McKinley; and N. Benson, 2002. The normalized burn ratio and relationships to burn severity: ecology, remote sensing and implementation. In J.D. Greer, ed. Rapid Delivery of Remote Sensing Products. Proceedings of the Ninth Forest Service Remote Sensing Applications Conference, San Diego, CA 8-12 April, 2002. American Society for Photogrammetry and Remote Sensing, Bethesda, MD.

Auto-thresholding:

Otsu's: Otsu, N. A threshold selection method from gray-level histograms. IEEE Trans. Systems Man Cybernet. Vol. 9, pp. 62–66, 1979.

Tsai's: Tsai, W. Moment-preserving thresholding. Comput. Vision Graphics Image Process. Vol. 29, pp. 377–393, 1985.

Kapur's: Kapur, J., Sahoo, P., Wong, A. A new method for graylevel picture thresholding using the entropy of the histogram. Comput. Vision Graphics Image Process. Vol. 29 (3), pp. 273–285.

Kittler's: Kittler, J., Illingworth, J., Minimum error thresholding, Pattern Recogn. Vol. 19, pp. 41–47, 1986.

Files Used in this Tutorial


Tutorial files are available from our website or on the ENVI Resource DVD in the change_detection directory.

File

Description

tsunami_before.dat

QuickBird image over Indonesia, April, 2004

tsunami_before.hdr

Header file for above

tsunami_after.dat

QuickBird image over Indonesia, January, 2005

tsunami_after.hdr

Header file for above

Selecting Files for Image Change


In the File Selection panel, you choose the two images to include in image change detection.

  1. Start ENVI.
  2. From the Toolbox, select Change Detection > Image Change Workflow. The Select File panel appears.
  3. Click Browse next to the Time 1 File field. The Select Time 1 Input File dialog appears.
  4. Click Open File. The Open dialog appears.
  5. Navigate to change_detection , select tsunami_before.dat, and click Open.
  6. Click OK.
  7. Click Browse next to the Time 2 File field. The Select Time 2 Input File dialog appears.
  8. Click Open File. The Open dialog appears.
  9. Navigate to change_detection, select tsunami_after.dat, and click Open.
  10. Click Next. The Image Registration panel displays.
  11. Since the Time 1 and Time 2 images are co-registered already, keep the default selection of Skip Image Registration.
  12. Click Next. The Change Method Choice panel appears.
  13. Keep the default selection of Image Difference, and click Next. The Image Difference panel appears.

Image Difference Settings


In the Image Difference panel, set the parameters to use for the difference analysis. In this step, you perform an image difference analysis based on a band or feature index. The feature index provides options to detect changes of a specific feature, such as vegetation, water, built-up areas, or fire burn areas. For the QuickBird data used in this exercise, Vegetation Index (NDVI) and Water Index (NDWI) are available. Built-up Index and Burn Index are available only if if an image has a shortwave infrared band, such as Landsat data,

  1. The Difference of Input Band option and Band 1 were selected by default.
  2. In the toolbar Go To field, enter 746319.499,585303.471 and press the Enter key on the keyboard. The view centers over the area.
  3. Enable the Preview check box. A Preview Window appears. In the Preview Window, areas that decreased in the data value of the selected band appear as red, and areas that increased appear as blue.

    Band preview

  4. With the Preview Window still open, enable the Difference of Feature Index and keep Vegetation Index (NDVI) as the selected feature index.

    Preview Portal

  5. Click Next. The difference analysis begins.
  6. When image difference processing is complete, the difference image appears in the Image window and the Thresholding or Export panel appears.
  7. Keep the default selection of Apply Thresholding. This option allows you to set parameters that help the algorithm determine which areas have big change. When you select this option, you can export multiple outputs at the end of the workflow. (If you select Export Image Difference Only, you will not be able to select additional processing parameters, and you can only export the difference image.)
  8. Click Next. The Change Thresholding panel appears.

Change Thresholding


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

  1. In the Auto-Thresholding tab, keep the default selection of Increase and Decrease. This option shows areas of increase (in blue) and decrease (in red). (If you are only interested in areas of vegetation decreased by the tsunami, select Decrease Only.)
  2. In the Select Auto-Thresholding Method drop-down list, try selecting each option, one at a time, then examine the result in the Preview Window. The auto-thresholding choices are:

    • Otsu's: A histogram shape-based method. It is based on discriminate analysis and uses the zeroth- 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 a 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 works on approximating the histogram as a bimodal Gaussian distribution and finds a cutoff point. The cost function is based on the Bayes classification rule.

    The References at the beginning of this tutorial provide additional information about the auto-thresholding methods.

  3. In this exercise, we will use the default Otsu's thresholding method. Below is an example of the Preview Window with the Otsu's method selected.

    Otsu method

  4. You can also experiment with manually adjusting the threshold settings. To do this, select the Manual tab.
  5. Use the slider bars to adjust the Increase Threshold and Decrease Threshold settings, then view the changes in the Preview Window.
  6. When you are done experimenting with manual adjustments, click the ResetReset button to return to the default settings.
  7. Click Next. When you click Next, the difference image will be classified into Big Increase, Big Decrease and Other, based on the threshold values. The Cleanup panel appears.

Cleaning Up Image Change Results


The cleanup step refines the result. You can preview what the refinement will like look before you apply the settings.

  1. Keep the default selections for both cleanup methods:
    • Enable Smoothing removes speckling noise.
    • Enable Aggregation removes small regions.
  2. Enter values for the cleanup methods:
    • 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. Keep the value at 5.
    • Specify the Aggregate Minimum Size in pixels. Regions with a size of this value or smaller are aggregated to an adjacent, larger region. Keep the value at 100.
  3. Preview the cleanup result before processing.

    Preview of cleanup results

    You can change the cleanup settings and preview the results again, if desired.

  4. Click Next. The Export panel appears.

Exporting Image Change Results


In the final step of the workflow, you will save the output from the analysis.

To export results:

  1. In the Export Files tab, enable the check boxes for the exports:
    • Export Change Class Image saves the thresholding result to a raster file.
    • Export Change Class Vectors saves the vectors created during thresholding to a shapefile.
  2. Use the default paths and filenames.
  3. In the Additional Export tab, enable the check boxes for the remaining exports:

    • Export Change Class Statistics saves statistics on the thresholding image.
    • Export Difference Image saves the difference image to a raster file.
  4. Use the default paths and filenames.
  5. Click Finish. ENVI creates the output, opens the layers in the Image window, and saves the files to the directory you specified.
  6. Select File > Exit to exit ENVI.

This information is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). However, it may be restricted from transfer to various embargoed countries under U.S. laws and regulations.
© 2017 Exelis Visual Information Solutions, Inc., a subsidiary of Harris Corporation