Application Tips for ENVI – Implementing the Classification Workflow

This is part of a series on tips for getting the most out of your geospatial applications. Check back regularly or follow HySpeed Computing to see the latest examples and demonstrations.

Objective: Utilize ENVI’s automated step-by-step Classification Workflow to perform a supervised classification.

Scenario: This tip demonstrates the steps used for supervised classification of an index stack created from a Landsat 8 scene of Lake Tahoe, CA USA. The index stack combines three different spectral indices into a single multi-layer image. The indices include the Normalized Difference Vegetation Index (NDVI), Normalized Difference Water Index (NDWI), and Normalized Difference Snow Index (NDSI).

Here we are using the index stack as a form of data reduction and normalization; however, in most application users will utilize most or all of the individual spectral bands to maximize the spectral information used in the classification analysis.

Lake Tahoe Landsat image classification

Lake Tahoe, CA: Landsat 8 image (upper left); index stack (lower left); supervised classification output (right).


The Tip: Below are the steps used to implement the Classification Workflow in ENVI:

  • After opening the selected image in ENVI, launch the workflow from the toolbox by selecting: Toolbox > Classification > Classification Workflow
  • The first step of the workflow allows you to select the input image, perform any spatial and spectral subsetting, and also select a mask, if applicable.

ENVI Classification Workflow file selection

  • The next step provides the option to specify whether the classification is to be performed using No Training Data (unsupervised classification) or to Use Training Data (supervised classification). In our example we have selected to Use Training Data.
  • For supervised classification, the user is next given a chance to interactively define or upload the training data. Had we selected unsupervised classification, then our next step would have been to select parameters for implementing the ISODATA classification algorithm.
  • To define the training data, users have the option of uploading a previously defined training dataset, or alternatively to use the ENVI annotation tools to interactively select polygons, ellipses, rectangles or points to define training areas for each desired class.
  • There is also an option at this stage in the workflow to specify the supervised classification scheme (Maximum Likelihood, Minimum Distance, Mahalanobis Distance, or Spectral Angle Mapper) and any of its associated classification parameters. In our example we use the Maximum Likelihood classification scheme with its default parameters.

ENVI Classification Workflow training data

  • Note that you can select the Preview button at the bottom left of the workflow window to see the classification results dynamically updated as you proceed through the training data definition process. However, there are limits on how big an area can be previewed. If the area is too large then the preview will appear black by default. If this occurs, then simply increase the zoom and/or reduce the size of the preview window.
  • It also important to remember to save your training data once complete so that you can later replicate the same classification process or utilize the data in another image.
  • In our example we have defined five classes (water, snow/ice, vegetation, barren, and cloud), each represented using five different training polygons.
  • Once satisfied with the training data, selecting Next at the bottom of the window will initiate the classification process.
  • Once classification is complete, if you’re not happy with the results or want to change the training data or input parameters, then there’s no cause for concern. You can easily move forward and backward throughout the classification process using the Back and Next buttons at the bottom of the workflow window, allowing you to check your results and/or go back and change settings.
  • Once the classification is complete the output will be displayed in ENVI, and the user is then given additional options to refine the output using smoothing (removes speckling) and aggregation (removes small regions). We have selected to do both for our example.
  • The final step after smoothing and aggregation is to save the results, which includes options for saving the classification image, classification vectors, and classification statistics.

ENVI Classification Workflow output

We have demonstrated just one of many different classification options included in the Classification Workflow. To learn more about the various different algorithms and settings for supervised and unsupervised classification techniques, just read through the ENVI help documentation and/or follow the classification tutorial included with ENVI.


Working with Spectral Indices using Landsat – Building an ‘index stack’

As part of our ongoing series using spectral indices to automatically delineate landscape features such as clouds, snow/ice, water and vegetation in Landsat imagery, here we extend this analysis to create an ‘index stack’ using a set of three indices.

Specifically, we utilize a Landsat 8 image of Lake Tahoe to generate output layers for the Normalized Difference Vegetation Index (NDVI), Normalized Difference Water Index (NDWI), and Normalized Difference Snow Index (NDSI). We then stack these output layers into a single image and display the resulting ‘index stack’ as an RGB image.

Lake Tahoe index stack

The specific steps and equations utilized for calculating the three indices are outlined in our earlier posts in this series: NDVI, NDWI, and NDSI. These indices, along with many other spectral indices, can also be calculated using the new Spectral Index tool included in ENVI 5.2; however, note that the NDWI calculation in this tool is a different index than the one presented here.

Once the indices have been calculated, the next step is to stack the output layers together into a single image. In ENVI this can be accomplished using the Layer Stacking tool found under Raster Management in the ENVI Toolbox.

The resulting image can then be displayed as a standard RGB, where in our example we have stacked the indices as follows: R – NDSI, G – NDVI, B – NDWI.

Lake Tahoe index compilation

It becomes readily apparent in this image stack that particular colors can be equated to different landscape features. For example, vegetation displays here as green, water as purple, snow/ice as magenta, and soil, rocks, and barren land as blue. Clouds also appear as a mixture of purple and magenta, so in this case these indices alone are not sufficient for differentiating clouds from water and snow/ice. Hence there is a need for including additional indices when developing a robust automated assessment procedure.

The index stack not only provides rapid visualization of different landscape features, but also delivers the numerical foundation for quantitative analysis and image classification using the index values. Considering the many different indices that are available beyond those presented here, the possibilities for expanding and modifying this type of analysis are virtually limitless.

So while these types of indices may be conceptually simple, together they can be powerful tools for image analysis.

Enhancing the Landsat 8 Quality Assessment band – Using NDVI to delineate vegetation

This is the second installment in a series on developing alternative indices to automatically delineate features such as clouds, snow/ice, water and vegetation in Landsat imagery.

The previous article focused on utilizing the Normalized Difference Water Index to differentiate water from non-water (see Differentiating water using NDWI).

In this series of investigations, the challenge we have given ourselves is to utilize relatively simple indices and thresholds to refine some or all of the existing Landsat 8 quality assessment procedure, and wherever possible to also maintain backward compatibility with previous Landsat missions.

Landsat8 Lake Tahoe Vegetation

In this article we explore one of the most commonly used vegetation indices, the Normalized Difference Vegetation Index (NDVI) (Kriegler et al. 1969, Rouse et al. 1973, Tucker 1979), to see how it can be utilized to delineate the presence of vegetation. Since the Landsat 8 quality assessment band currently does not include output for vegetation, NDVI seems like a logical foundation for performing this assessment.

NDVI is typically used to indicate the amount, or relative density, of green vegetation present in an image; however, here we adapt this index to more simply indicate confidence levels with respect to the presence of vegetation.

To calculate NDVI in ENVI, you can either directly use the included NDVI tool (Toolbox > Spectral > Vegetation > NDVI) or calculate NDVI yourself using Band Math (Toolbox > Band Ratio > Band Math). If using Band Math, then implement the following equation (float(b5)-float(b4))/(float(b5)+float(b4)), where b4 is Band-4 (Red), b5 is Band-5 (NIR), and the float() operation is used to transform integers to floating point values and avoid byte overflow.

After visually inspecting output to develop thresholds based on observed vegetation characteristics in our test images, results of the analysis indicate the following NDVI vegetation thresholds: low confidence (NDVI ≥ 0.2), medium confidence (NDWI ≥ 0.3), and high confidence (NDWI ≥ 0.4).

Example 1: Lake Tahoe

This example illustrates output from a Landsat 8 scene of Lake Tahoe acquired on April 12, 2014 (LC80430332014102LGN00). The NDVI output for this image successfully differentiates vegetation from water, cloud, snow/ice and barren/rocky land. Note particularly how the irrigated agricultural fields to the east and southeast of Lake Tahoe are appropriately identified, and how the thresholds properly indicate increased vegetation trending westward of Lake Tahoe as one transitions downslope from the Sierra Nevada into the Central Valley of California.

Landsat8 Lake Tahoe NDVI Vegetation

Example 2: Cape Canaveral

This example illustrates output from a Landsat 8 scene of Cape Canaveral acquired on October 21, 2013 (LC80160402013294LGN00). As with the Lake Tahoe example, NDVI once again performs well at differentiating vegetation from water, cloud and barren land. Given the cloud extent and high prevalence of both small and large water bodies present in this image, NDVI demonstrates a robust capacity to effectively delineate vegetation. Such results are not unexpected given the general acceptance and applicability of this index in remote sensing science.

Landsat8 Cape Canaveral NDVI Vegetation

We’ll continue to explore other enhancements in future posts, and ultimately combine the various indices into a single integrated quality assessment algorithm.

In the meantime, we’re interested in hearing your experiences working with Landsat quality assessment and welcome your suggestions and ideas.

– –

Kriegler, F.J., W.A. Malila, R.F. Nalepka, and W. Richardson (1969). Preprocessing transformations and their effects on multispectral recognition. Proceedings of the Sixth International Symposium on Remote Sensing of Environment, p. 97-131.

Rouse, J. W., R. H. Haas, J. A. Schell, and D. W. Deering (1973). Monitoring vegetation systems in the Great Plains with ERTS, Third ERTS Symposium, NASA SP-351 I, p. 309-317.

Tucker, C. J. (1979). Red and photographic infrared linear combinations for monitoring vegetation. Remote sensing of Environment, 8(2), p. 127-150.

Application Tips for ENVI 5.x – Calculating vegetation indices for NDVI and beyond

This is part of a series on tips for getting the most out of your geospatial applications. Check back regularly or follow HySpeed Computing to see the latest examples and demonstrations.

Objective: Calculate a collection of vegetation indices for hyperspectral and multispectral imagery using ENVI’s Vegetation Index Calculator.

Scenario: In this tip, vegetation indices are calculated for two variants of AVIRIS data from Jasper Ridge, California: one version using the full range of 224 possible hyperspectral bands (400-2500 nm); and the other using a version that has been spectrally convolved to match 8 of the 11 possible multispectral bands of Landsat 8 OLI (i.e., all bands except the thermal and panchromatic).

The AVIRIS data (JasperRidge98av_flaash_refl; shown below) was obtained from the ENVI Classic Tutorial Data available from the Exelis website, and has already been corrected to surface reflectance using FLAASH.

Jasper Ridge, CA

Vegetation Indices: There are numerous vegetation indices included in ENVI, so in most cases there is already a vegetation tool available that meets your needs. These indices can be found in three main locations within the ENVI Toolbox: (1) Spectral > Vegetation; (2) SPEAR > SPEAR Vegetation Delineation; and (3) THOR > THOR Stressed Vegetation.

The core functionality for deriving vegetation properties in ENVI is the Vegetation Index Calculator (located in Toolbox > Spectral > Vegetation). This tool provides access to 27 different vegetation indices, and will conveniently pre-select the indices that can be calculated for a given input image dependent on the spectral characteristics of the data. Despite this bit of assistance, however, properly implementing and interpreting the various vegetation indices still requires thorough understanding of what is being calculated. To obtain this information, details and references for each index are provided in the ENVI help documentation.

  • Broadband Greenness [5 indices]: Normalized Difference Vegetation Index, Simple Ratio Index, Enhanced Vegetation Index, Atmospherically Resistant Vegetation Index, Sum Green Index.
  • Narrowband Greenness [7 indices]: Red Edge Normalized Difference Vegetation Index, Modified Red Edge Simple Ratio Index, Modified Red Edge Normalized Difference Vegetation Index, Vogelmann Red Edge Index 1, Vogelmann Red Edge Index 2, Vogelmann Red Edge Index 3, Red Edge Position Index.
  • Light Use Efficiency [3 indices]: Photochemical Reflectance Index, Structure Insensitive Pigment Index, Red Green Ratio Index.
  • Canopy Nitrogen [1 index]: Normalized Difference Nitrogen Index
  • Dry or Senescent Carbon [3 indices]: Normalized Difference Lignin Index, Cellulose Absorption Index, Plant Senescence Reflectance Index.
  • Leaf Pigment [4 indices]: Carotenoid Reflectance Index 1, Carotenoid Reflectance Index 2, Anthocyanin Reflectance Index 1, Anthocyanin Reflectance Index 2.
  • Canopy Water Content [4 indices]: Water Band Index, Normalized Difference Water Index, Moisture Stress Index, Normalized Difference Infrared Index.

There are also five additional vegetation tools included in Toolbox > Spectral Vegetation. The Vegetation Suppression Tool essentially removes the spectral contributions of vegetation from the image. The NDVI tool simply provides direct access to the commonly used Normalized Difference Vegetation Index. And the three other tools consolidate select subsets of the above vegetation indices into specific application categories: Agricultural Stress Tool, Fire Fuel Tool, and Forest Health Tool.

Two additional vegetation tools are also available as part of the THOR and SPEAR toolboxes. The THOR Stressed Vegetation and the SPEAR Vegetation Delineation tools both provide workflow approaches to calculating vegetation indices, inclusive of options such as atmospheric correction, mask definition, and spatial filtering. The SPEAR Vegetation Delineation tool uses NDVI to assess the presence and relative vigor of vegetation, whereas the THOR Stressed Vegetation tool provides a step-by-step methodology for processing imagery using the same suite of vegetation indices as defined for the Spectral toolbox.

It is important to note that input images should be atmospherically corrected prior to running the vegetation tools, or in the case of the SPEAR and THOR tools atmospherically corrected as part of the image processing workflow.

The Tip: This example demonstrates the steps used for running ENVI’s Vegetation Index Calculator. Interested users are also encouraged to download the tutorial data from Exelis, or use their own data, and explore what the other vegetation tools have to offer.

  • As specified above, two sets of imagery are used in this example: one is the full AVIRIS hyperspectral dataset, and the other is a spectrally convolved Landsat 8 OLI multispectral dataset of the same image.
  • After opening the images in ENVI, the vegetation tool is started by selecting Spectral > Vegetation > Vegetation Index Calculator.
  • The opening dialog window is used to specify the Input File along with any desired Spatial Subset and/or Mask Band.
  • Next is the main dialog for selecting Vegetation Indices and specifying the Output Filename. There is also an option for Biophysical Cross Checking, which compares results from different indices and masks out pixels with conflicting data values. Using Biophysical Cross Checking is application dependent, but can be useful for removing anomalous pixels from your analysis.
  • As illustrated below, the general process for calculating Vegetation Indices is always the same for any given dataset; the only difference is the list of vegetation indices that are actually available for a particular set of bands. In our example, the full AVIRIS hyperspectral dataset allows for 25 different indices to be calculated, whereas the Landsat 8 LOI multispectral dataset allows only 6 indices.

Vegetation Index Calculator

  • Once you have selected the relevant vegetation indices for your application, simply select OK and the Vegetation Index Calculator will generate an output file with individual bands corresponding to each of the selected vegetation indices.

Shown below is the output data from our two images, along with example quicklooks demonstrating the variability in the various output indices. The reason for this variability is that each index derives different, but related, biophysical information. Thus, be sure to look at the definitions and references for each index to help guide interpretation of the output.

Vegetation Indices