ENVI Tutorial #14

Multispectral Processing using ENVI's Hyperspectral Tools


 The following topics are covered in this tutorial:

Overview of This Tutorial

Background

Standard (Classical) Multispectral Image Processing

Application of ENVI'S Hyperspectral Tools to Multispectral Data Analysis

Summary

References


Overview of This Tutorial

This tutorial is designed to show you how ENVI's advanced hyperspectral tools can be used for analysis of multispectral data. To gain a better understanding of the hyperspectral concepts and tools, please see the ENVI hyperspectral tutorials. For additional details, please see the ENVI User's Guide or the ENVI On-Line help.

Files Used in This Tutorial

You must have the ENVI TUTORIALS & DATA CD-ROM mounted on your system to access the files used by this tutorial, or copy the files to your disk.

The files used in this tutorial are contained in the BH_TMSUB subdirectory of the ENVIDATA directory on the ENVI TUTORIALS & DATA CD-ROM.

Required Files

The files listed below are required to run this exercise.

BHTMREF.IMG	Bighorn Basin, Wyoming Landsat TM Reflectance
BHTMREF.HDR	ENVI Header for Above
BH_RATS.IMG	Band Ratio Image 5/7, 3/1, 3/4 9RGB)
BH_RATS.HDR	ENVI Header for Above
BHTMISO.IMG	Isodata Classification
BHTMISO.HDR	ENVI Header for Above
BHISIEV.IMG	Sieve Image of Isodata Classification
BHISIEV.HDR	ENVI Header for Above
BHICLMP.IMG	Clump Image of the Sieved Classification
BHICLMP.HDR	ENVI Header for Above
BHTM.GRD	Saved Grid for Bighorn TM data
BHTMISO.ANN	Map Annotation for Bighorn TM data
BHTM_MNF.ASC	ACII Eigenvalue data for MNF Transform
BHTM_MNF.IMG	MNF Transform Data
BHTM_MNF.HDR	ENVI Header for Above
BHTM_MNF.STA	ENVI Statistics File for above
BHTM_NS.STA	ENVI Noise statistics for above
BHTM_PPI.IMG	Pixel Purity Index Image
BHTM_PPI.HDR	ENVI Header for Above
BHTM_PPI.CNT	Counter for PPI analysis
BHTM_PPI.roi	Regions of Interest threshold from the PPI
BHTM_PP.NDV	n-D Visualizer Save State file
BHTM_ND.ROI	ROIs from n-D Visualizer Analysis
BHTM_EM.ASC	ASCII Spectral Endmembers from n-D
BHTM_SAM.IMG	SAM Classification
BHTM_SAM.HDR	ENVI Header for Above
BHTM_SAM.ANN	Map Annotation for the SAM images
BHTM_RUL.IMG	ENVI SAM Rule Images
BHTM_RUL.HDR	ENVI Header for Above
BHTM_UNM.IMG	Linear Spectral Unmixing Result
BHTM_UNM.HDR	ENVI Header for Above
BHUNM_EM.ASC	Endmembers used for Spectral Unmixing

Background

ENVI was not designed solely as a hyperspectral image processing system. The decision was made in 1992 to develop a general purpose image processing software package with a full suite of standard tools in response to the general lack of powerful yet flexible commercial products capable of handling a wide variety of scientific image data formats. This included support for panchromatic, multispectral, hyperspectral, and both basic and advanced radar systems. ENVI presently contains most of the same basic capabilities as other major image processing systems such as ERDAS, ERMapper, and PCI. Where ENVI differs is in the many advanced, state-of-the-art algorithms resulting from active leading-edge remote sensing research. While many of these features were developed specifically to deal with imaging spectrometer data or "hyperspectral" data having up to hundreds of spectral bands, many of these techniques are applicable to multispectral data and other standard data types. This tutorial presents a scenario for use of some of these methods for analysis of Landsat Thematic Mapper data.

This example is broken into two portions: 1) a typical multispectral analysis of TM data using "standard" or classical multispectral analysis techniques, and 2) analysis of the same dataset using ENVI's hyperspectral tools.


Standard (Classical) Multispectral Image Processing

A typical Landsat TM analysis scenario might consist of the following (though many other variations are available within ENVI. See Sabins, 1987 for other examples):

Start ENVI

Before attempting to start the program, ensure that ENVI is properly installed as described in the installation guide.

The ENVI Main Menu appears when the program has successfully loaded and executed.

Read TM Tape or CD

ENVI provides the tools to read standard Landsat Thematic Mapper data from both tape and CD/disk.

Open and Display Landsat TM Data

To open an image file:

  1. Select File -> Open Image File on the ENVI Main Menu.

Note that on some platforms you must hold the left mouse button down to display the submenus from the Main Menu.

An Enter Input Data File file selection dialog appears.

  1. Navigate to the BH_TMSUB subdirectory of the ENVIDATA directory on the ENVI TUTORIALS & DATA CD-ROM just as you would in any other application and select the file BHTMREF from the list and click "OK".

The Available Bands List dialog will appear on your screen. This list allows you to select spectral bands for display and processing.

Note that you have the choice of loading either a grayscale or an RGB color image.

  1. Select bands 4, 3, and 2 listed at the top of the dialog by first selecting the RGB Color toggle button in the Available Bands List, then clicking on the bands sequentially with the left mouse button.

Display and Examine a Color Composite Image

  1. To load the image, click "Load RGB".
  2. Once the image is displayed, click the right mouse button within the Main Display window to toggle ENVI's interactive Functions Menu and execute some of the available functions.
  3. Resize the image display windows by grabbing one of the corners with the left mouse button and dragging. Scroll and Pan the image by grabbing and dragging the red outline boxes in the Scroll and Zoom windows. Zoom the image by clicking with the left mouse button in the Zoom window to zoom out and the right mouse button to zoom in. The middle mouse button centers the cursor on the clicked pixel.
  4. Select Functions->Interactive Analysis->Cursor Location/Value and use the interactive cursor to determine location and pixel value.
  5. Contrast stretch the images by selecting Functions->Display Enhancements->Default (Quick) Stretches->Stretch Type.

Figure 1: A Color Composite Image showing Landsat TM Bands 4, 3, 2 (RGB)

Conduct a Ratio Analysis

Here you will create Color-Ratio-Composite (CRC) Images using standard TM band-ratio images. This method tries to get around the limitations of relatively broad spectral bands in Landsat TM data by using ratios of bands to determine relative spectral slope between bands and thus the approximate shape of the spectral signature for each pixel. Common band-ratios include: Band-Ratio 5/7 for Clays, Carbonates, Vegetation; Band-Ratio 3/1 for Iron Oxide; Band-Ratios 2/4 or 3/4 for Vegetation; and Band-Ratio 5/4 also for vegetation.

Figure 2: A Color-Ratio Composite Image of ratios 5/7, 3/1, and 2/4 (RGB)

To create a band-ratio image:

  1. Select Transforms->Band Ratios from the ENVI Main Menu.
  2. Select the Numerator and Denominator bands from the Available Bands list in the dialog, click "Enter Pair", and repeat for as many band-ratios as desired.
  3. Click "OK" to calculate the ratios and display from the Available Bands List when complete.

The combination of 5/7, 3/1, 2/4 (RGB) results in an image in which clays/carbonates are magenta, iron oxides are green, and vegetation is red. Other ratio combinations and color schemes can be designed to highlight specific materials.

  1. Load and display your CRC image, or select File->Open Image File and choose the CRC image BH_RAT.IMG and display. Use a histogram equalization stretch by selecting Functions->Display Enhancements->Default (Quick) Stretches->[Image] Quick Equalization.
  2. Compare the CRC image to the False CIR image above using image linking and dynamic overlays by selecting Functions->Link, and then clicking and dragging using the left mouse button in one of the images to display the dynamic overlay.

Run Unsupervised Classification (IsoData)

Unsupervised classification provides a simple way to segment multispectral data using the data statistics. IsoData calculates class means evenly distributed in the data space and then iteratively clusters the remaining pixels using minimum distance techniques. Each iteration recalculates means and reclassifies pixels with respect to the new means. This process continues until the number of pixels in each class changes by less than the selected pixel change threshold or the maximum number of iterations is reached.

  1. To perform an IsoData classification, select Classification->Unsupervised->ISODATA from the ENVI Main Menu. Choose the image BHTMSUB.IMG and use the default settings to create the Isodata classified image.
  2. Alternatively, select File->Open File and choose the file BHTMISO.IMG and load as a grayscale image using the Available Bands List.
  3. Compare the Isodata classification image to the CRC image and the False CIR image above using image linking and dynamic overlays by selecting Functions->Link, and then clicking and dragging using the left mouse button in one of the images to display the dynamic overlay.

Figure 3: An IsoData Image.

Clump and Sieve, Combine Classes

Once the classification is complete, because classified images often suffer from a lack of spatial coherency (speckle or holes in classified areas), it is often desirable to generalize the classes to generalize the classification for operational use. Low pass filtering could be used to smooth these images, however, the class information would be contaminated by adjacent class codes. The Sieve Class and Clump Class operators have been designed to avoid this problem by removing isolated pixels and clumping together adjacent similar classified areas respectively using morphological operators.

Figure 4: Sieve and Clump Classification Generalization. Sieve is on the left, Clump of the Sieved image on the right.

Annotate and Output Map

The final output from any image processing within ENVI is usually a map-oriented, scaled image-map for presentation or visual analysis and interpretation. In this case, the TM data were already geographically referenced, however, ENVI includes full image-to-image and image-to-map registration capabilities. Please see the Registration Tutorial or the ENVI User's Guide and on-line tutorials.

ENVI also provides all of the tools to produce fully annotated publication-quality maps. This includes pixel, map, and geographic (latitude/longitude) grids; scale-bars; declination diagrams and north arrows; text and symbols; polygons, polylines, and geometric shapes (circles, rectangles); map keys and legends; and image insets. For additional information on map composition, please see the Map Composition Tutorial or the ENVI User's Guide and on-line tutorials.

  1. To add a grid to the displayed Isodata classification, select Functions->Overlays->Grid Lines. Choose File->Restore Setup, click on the file BHTM.GRD and Open. To add the grid to the image, click Apply in the Grid Line Parameters dialog.
  2. To add map annotation to the displayed Isodata classification, select Functions->Overlays->Annotation. Choose File->Restore Annotation and pick the file BHTMISO.ANN and click on Open. The map annotation will be loaded onto the image.

Figure 5: Isodata Classification annotated image-map.


Application of ENVI'S Hyperspectral Tools to Multispectral Data Analysis

Read TM Tape or CD

As described above, ENVI provides the tools to read standard Landsat Thematic Mapper data from both tape and CD/disk.

Calibrate TM to Reflectance

A reflectance calibration is required for Landsat TM data to compare image spectra to library reflectance spectra and to run some of ENVI's hyperspectral routines. ENVI provides TM calibration through the use of pre-launch gains and offsets calculated for the Landsat Sensors (Markham and Barker, 1986).

  1. Select Utilities->Data Specific Utilities->Landsat TM->Landsat TM Calibration.
  2. When the TM Calibration dialog appears, choose the image to be calibrated.
  3. Enter the calibration parameters, including the Satellite. the month, day, and year of acquisition, and the sun elevation (usually available in the data header).
  4. Choose Reflectance calibration and click "OK".

The resulting image approximates reflectance.

 

 

 

 

Display a Color Composite Image and Extract Spectra

  1. As above select bands 3, 2, 1 (RGB - True Color) or 4, 3, 2 RGB (Color Infrared) from the Available bands list and click on Load RGB.
  2. Once the image is displayed, click the right mouse button within the Main Display window to toggle ENVI's interactive Functions Menu and execute some of the available functions.
  3. Scroll, Pan, Zoom the image.
  4. Use the interactive cursor to determine location and values.
  5. Contrast stretch and/or density slice the images.
  6. Extract Z-profiles (reflectance spectra) from the data by selecting Functions->Profiles->Z Profile in the Main Display window and browse around the image by clicking and dragging the red Zoom Window box using the left mouse button.

Figure 7: Landsat TM reflectance spectra.

 

Run Minimum Noise Fraction (MNF) Transformation

MNF Transform is a method similar to Principal Components used to segregate noise in the data, determine inherent data dimensionality, and reduce computational requirements for subsequent processing (Green et al., 1988; Boardman and Kruse, 1994). For hyperspectral data (less-so for multispectral data), the MNF divides data space into two parts; one with large eigenvalues and coherent eigenimages and the second with near-unity eigenvalues and noise-dominated images. It is used as a preparatory transformation to put most of the interesting information into just a few spectral bands and to order those bands from most interesting to least interesting.

Figure 8: Landsat TM MNF Bands.

See the Hyperspectral Tutorials for additional background information and examples. To calculate the MNF transformation from the TM reflectance data:

  1. From the ENVI Main Menu, select Transforms->MNF Rotation->Forward MNF->Estimate Noise Statistics from the Data.
  2. Enter filenames for the statistics files and output file and click "OK".

When the MNF transform is completed, an eigenvalue plot will be shown and the MNF-transformed bands will be displayed in the Available Bands List.

  1. Alternatively, examine the precalculated MNF Eigenvalue plot BHTMMNF.ASC by selecting Basic Tools->Display Controls->Start New Plot Window and then loading the ASCII file using File->Input Data->ASCII from the plot window menu bar.

Figure 9: MNF Eigenvalue Plot.

 

The decreasing eigenvalue with increasing MNF band shown in the eigenvalue plot above shows how noise is segregated in the higher number MNF bands.

  1. Also load and examine the MNF image file BHTMMNF.IMG. Be sure to examine both the low and high MNF bands. Look at the different MNF Bands and note the decrease in spatial coherency with increasing MNF Band number.

Run PPI to Find Endmembers

The Pixel Purity Index (PPI) function finds the most spectrally pure or "extreme" pixels in multispectral and hyperspectral data (Boardman and Kruse, 1994). These correspond to the materials with spectra that combine linearly to produce all of the spectra in the image. The PPI is computed by using projections of n-dimensional scatterplots to 2-D space and marking the extreme pixels in each projection. The output is an image (the PPI Image) in which the digital number (DN) of each pixel in the image corresponds to the number of times that pixel was recorded as extreme. Thus bright pixels in the image show the spatial location of spectral endmembers. Image thresholding is used to select several thousand pixels for further analysis, thus significantly reducing the number of pixels to be examined. See the Hyperspectral Tutorials for additional PPI background information and examples.

To start the PPI analysis:

  1. Select Spectral Tools->Pixel Purity Index->[FAST] New Output Band from the ENVI Main Menu.

This calculates the PPI in memory.

The PPI image will appear in the Available Bands List when processing has completed.

  1. Alternatively, use the precalculated PPI image, BHTMPPI.IMG.
  2. Display the PPI image and select Functions-Region of Interest->Image Threshold to ROI in the Main Display to extract a Region of Interest by thresholding the image.

Figure 10: Pixel Purity Index Image.

  1. Choose the PPI image as the input file, enter a minimum threshold value, of 5, and click "OK".

The selected pixels will be entered into ENVI's ROI Controls Dialog.

  1. Alternatively, load the ROI file BHTMPPI.ROI into the ROI Controls.

n-D Visualization and Extract Endmembers

Though both the MNF and PPI operations above effectively reduce the data volume to be analyzed interactively, the high dimensionality of hyperspectral data requires advanced visualization techniques. ENVI's N-Dimensional Visualizer is an interactive n-dimensional scatterplotting paradigm that allows real-time rotation of scatterplots in n-dimensions (Boardman et al., 1995). This is accomplished by casting the scatterplots from n-d to 2-D to simplify analysis. Animation of the scatterplots then provides the capability to simultaneously use all bands for interactive analysis. The scientist's visual skills and scatterplot geometry are used to locate image spectral endmembers. See the Hyperspectral Tutorials and the ENVI User's Guide and on-line help for additional background information and examples.

Figure 11: The n-Dimensional Visualizer.

 

  1. Select Spectral Tools->n-Dimensional Visualizer->Visualize With New Data and use the ROI created from the PPI image as described above and the MNF images as the input data file.
  2. When the n-D Visualizer dialog and window appear, select the first three MNF bands by clicking on the band numbers in the dialog.
  3. Click on the "Start/Stop" button to start and stop the animation.
  4. Look for corners on the scatterplot and then use ENVI's ROI definition paradigm to draw ROIs encompassing the corner pixels.
  5. Alternatively, select Spectral Tools->n-Dimensional Visualizer->Visualize With Previously Saved Data and load the file BHTMPPI.NDV and use this in the visualization.
  6. Select Options->Z Profile from the menu bar at the top of the n-D Controls dialog and choose the TM reflectance image as the file from which to get the reflectance spectra.
  7. Click the middle mouse button in the n-D Visualizer window to extract spectra for specific scatterplot locations.
  8. Click the right mouse button in the n-D Visualizer window to extract multiple spectra.
  9. Export the spectral endmembers you have selected in the n-D Visualizer to the ROI Controls dialog by selecting on Options->Export All in the n-D Controls dialog.
  10. Plot these spectra by choosing Options->Mean for All Regions in the ROI Controls dialog. Alternatively, instead of collecting your own spectra, load and view the spectra in the file BHTM_EM.ASC.

 

 

 

Compare Image Spectra to Spectral Library

ENVI allows comparison of image spectra to spectra measured in the laboratory and saved in spectral libraries. Several relatively high spectral resolution spectral libraries are provided with ENVI.

  1. Open the ENVI spectral library USGS_MIN.SLI.
  2. Select Spectral Tools->Spectral Libraries->Spectral Library Viewer from the ENVI Main Menu and click on several of the mineral and/or vegetation spectra names.

The spectra will be plotted in an ENVI plot window.

  1. Compare these high resolution spectra to the TM spectral endmembers.
  2. Resample the entire library to the Landsat wavelengths and resolution using ENVI's spectral tools.
  3. Select Spectral Tools->Spectral Libraries->Spectral Resampling from the ENVI Main Menu.
  4. Select the USGSMIN.SLI spectral library and choose resampling to Landsat TM5.
  5. Click "OK" and the library will be resampled and placed in the Available Bands List.
  6. Select Spectral Tools->Spectral Libraries->Spectral Library Viewer from the ENVI Main Menu.
  7. Choose the library you just created and click on several of the mineral and vegetation spectra to display their resampled spectra.

Compare these spectra to the Landsat TM image spectra.

Figure 13: Library Spectra resampled to TM,

 

 

Spectral Angle Mapper Classification

The Spectral Angle Mapper (SAM) measures the similarity of unknown and reference spectra in n-dimensions. The angle between the spectra treated as vectors in n-space is the "spectral angle", this is illustrated in 2 Dimensions in the figure below. This method assumes that the data have been reduced to apparent reflectance and uses only the "direction" of the spectra, and not their "length". Thus the SAM classification is insensitive to illumination effects. See the Hyperspectral Tutorials and the ENVI User's Guide and on-line help for additional background information and examples.

To start SAM:

  1. Select Classification->Supervised->Spectral Angle Mapper.
  2. Enter the Landsat TM reflectance data BHTMREF.IMG as the input file.
  3. When the Endmember Collection:SAM dialog appears, select Import->from ROI Mean and choose the ROIs you created in the n-D Visualizer. Alternatively, load the ROIs in the file BHTM_EM.ROI.
  4. Click "Apply" and enter the output file names to start the classification.

Figure 14: The Spectral Angle Mapper (SAM) concept.

 

The results of the classification will be a set of rule images corresponding to the number of endmembers you selected and a SAM Classification Image. The rule images show the best matches in black when first displayed, however, these are typically inverted to better show the matches as bright pixels in the displayed rule images, select Functions->Color Mapping->ENVI Color Tables in the Main Display Window and reverse the Stretch Bottom and Stretch Top slider bars to invert the image.

The figure below shows the best match for each pixel (within the default threshold of 0.10 radians) color coded for each endmember.

Figure 15: SAM classification result.

 

Linear Spectral Unmixing

Image pixels typically represent areas of from 1 to several square meters. Within these pixels, the Earth's surface is composed of mixtures of materials; pure pixels are extremely rare (Boardman). The mixed spectrum received by most imaging systems is a linear combination of the "pure" or "endmember" spectra, each weighted by their fractional abundance of area. Mixed pixels can be analyzed using a mathematical model where the observed spectrum is the result of multiplication of the mixing library of pure endmember spectra by the endmember abundances. Mixing can also be visualized, however, using a geometric model; this is the basis of ENVI's 2-D Projections of n-dimensional scatterplots. See ENVI's Hyperspectral Tutorials and the ENVI User's Guide and on-line tutorials for additional unmixing background information and examples.

Figure 16: Linear Spectral Mixiung

 

Figure 17: The linear spectral mixing concept.

To perform linear spectral unmixing using ENVI:

  1. Use the endmember spectra from the n-D Visualizer above.
  2. Select Spectral Tools->Mapping Methods->Linear Spectral Unmixing and choose the TM calibrated reflectance data as the input file.
  3. Select Import->From ROI Mean from the menu bar at the top of the Endmember Collection:Unmixing dialog and click "Apply".

When complete, the Spectral Unmixing endmember image will appear in the Available Bands List.

  1. Display these images and the "RMS" (error) image generated during the analysis.
  2. Alternatively, display the precalculated results in BHTM_UNM.IMG.

Bright values in the abundance images represent high abundances; the Cursor Value/Location function can be used to examine the actual values.

When the RMS image doesn't have any more high errors, and all of the abundance images are non-negative and sum to less than one, then the unmixing is completed. This iterative method is much more accurate than trying to artificially constrain the mixing, and even after extensive iteration, also effectively reduces the compute time by several orders of magnitude compared to the constrained method.

Figure 19: Linear Spectral Unmixing Results.

 

Annotate and Output Map

As previously described, the final output from any image processing within ENVI is usually a map-oriented, scaled image-map for presentation or visual analysis and interpretation. In this case, the TM data were already geographically referenced, however, ENVI includes full image-to-image and image-to-map registration capabilities. Please see the Registration Tutorial in this volume or the ENVI User's Guide and on-line help. ENVI also provides all of the tools to produce fully annotated publication-quality maps. This includes pixel, map, and geographic (latitude/longitude) grids; scale-bars; declination diagrams and north arrows; text and symbols; polygons, polylines, and geometric shapes (circles, rectangles); map keys and legends; and image insets. For additional information on map composition, please see the Map Composition Tutorial or the ENVI User's Guide or on-line help.


Summary

A wide variety of advanced tools have been developed for analysis of imaging spectrometer (hyperspectral data). These tools are mature and are being used operationally for analysis of AVIRIS and other datasets. We don't have hyperspectral data for many of the areas we would like to investigate, however, widely available mulispectral data can be analyzed using some of the "hyperspectral" tools. ENVI allows users to use approaches developed for analysis of hyperspectral data to provide new insight to the use and analysis of multispectral datasets.


References

Boardman, J. W., Kruse, F. A., and Green, R. O., 1995, Mapping target signatures via partial unmixing of AVIRIS data: in Summaries, Fifth JPL Airborne Earth Science Workshop, JPL Publication 95-1, v. 1, p. 23-26.

Boardman, J. W., 1993, Automated spectral unmixing of AVIRIS data using convex geometry concepts: in Summaries, Fourth JPL Airborne Geoscience Workshop, JPL Publication 93-26, v. 1, p. 11 - 14.

Green, A. A., Berman, M., Switzer, P, and Craig, M. D., 1988, A transformation for ordering multispectral data in terms of image quality with implications for noise removal: IEEE Transactions on Geoscience and Remote Sensing, v. 26, no. 1, p. 65-74.

Markham, B. L., and Barker, J. L.,1986, Landsat MSS and TM post-calibration dynamic ranges, exoatmopspheric reflectances and at-satellite temperatures: EOSAT Landat Technical Notes, No. 1, August 1996.

Research Systems Inc, 1997, ENVI User's Guide, Chapter 10.

Sabins, F. F. Jr., 1986, Remote Sensing Principles and Interpretation: W. H. Freeman and Company, New York, 449 p.


Copyright 1993 - 1998, BSCLLC, All rights reserved. ENVI is a registered trademark of Better Solutions Consulting LLC, Lafayette, Colorado,Web: http://www.envi-sw.com, Email: envi@bscllc.com. .(Last Update, December 10, 1997)