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.

Advertisements

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 – Detecting snow/ice using NDSI

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

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.

The two previous articles focused on Differentiating water using NDWI and Using NDVI to delineate vegetation.

Landsat 8 Lake Tahoe Snow/Ice

Here we explore the Normalized Difference Snow Index (NDSI) (Dozier 1989, Hall et al. 1995; Hall and Riggs 2014) to demonstrate how this index can be utilized to delineate the presence of snow/ice.

Note that NDSI is already included in the Landsat 8 quality assessment procedure; however, as currently implemented, NDSI is used primarily as a determining parameter in the decision trees for the Cloud Cover Assessment algorithms.

Additionally, as discussed in the MODIS algorithm documentation (Hall et al. 2001), NDSI has some acknowledged limits, in that snow can sometimes be confused with water, and that lower NDSI thresholds are occasionally needed to properly identify snow covered forests. This suggests that NDSI performance can be improved through integration with other assessment indices.

For now we consider NDSI on its own, but with plans to ultimately integrate this and other indices into a rule-based decision tree for generating a cohesive overall quality assessment.

NDSI is calculated using the following general equation: NDSI = (Green – SWIR)/(Green + SWIR). To calculate this index for our example Landsat 8 images in ENVI, we used Band Math (Toolbox > Band Ratio > Band Math) to implement the following equation (float(b3)-float(b6))/(float(b3)+float(b6)), where b3 is Band-3 (Green), b6 is Band-6 (SWIR), 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 snow/ice characteristics in our test images, results of the analysis indicate the following NDSI snow/ice thresholds: low confidence (NDSI ≥ 0.4), medium confidence (NDSI ≥ 0.5), and high confidence (NDSI ≥ 0.6).

Example 1: Lake Tahoe

This example illustrates output from a Landsat 8 scene of Lake Tahoe acquired on April 12, 2014 (LC80430332014102LGN00). For this image, both the NDSI output and QA assessment successfully differentiate snow/ice from other image features. The only significant difference, as can be observed here in the medium confidence output, is that the QA assessment identifies two lakes to the east and southeast of Lake Tahoe that are not included in the NDSI output. Without knowledge of ground conditions at the time of image acquisition, however, it is not feasible to assess the relative accuracy of whether these are, or are not, ice-covered lakes. Otherwise, the snow/ice output is in agreement for this image.

Landsat 8 Lake Tahoe NDSI Snow/Ice

Example 2: Cape Canaveral

This example illustrates output from a Landsat 8 scene of Cape Canaveral acquired on October 21, 2013 (LC80160402013294LGN00). Given its location, there is not expected to be any snow/ice identified in the image, as is the case for the high confidence NDSI output. However, for the medium and low confidence NDSI output there is some confusion with clouds, and for the QA assessment there is confusion with clouds and sand. This suggests a need to either incorporate other indices to refine the snow/ice output and/or include some geographic awareness in the analysis to eliminate snow/ice in regions where it is not expected to occur.

Landsat 8 Cape Canaveral NDSI Snow/Ice

Stay tuned for future posts on other Landsat 8 assessment options, as well as a discussion on how to combine the various indices into a single integrated quality assessment algorithm.

In the meantime, we welcome your feedback on how these indices perform on your own images.

– –

Dozier, J. (1989). Spectral signature of alpine snow cover from the Landsat Thematic Mapper. Remote sensing of Environment, 28, p. 9-22.

Hall, D. K., Riggs, G. A., and Salomonson, V. V. (1995). Development of methods for mapping global snow cover using Moderate Resolution Imaging Spectroradiometer (MODIS) data. Remote sensing of Environment, 54(2), p. 127-140.

Hall, D. K., Riggs, G. A., Salomonson, V. V., Barton, J. S., Casey, K., Chien, J. Y. L., DiGirolamo, N. E., Klein, A. G., Powell, H. W., and Tait, A. B. (2001). Algorithm theoretical basis document (ATBD) for the MODIS snow and sea ice-mapping algorithms. NASA GSFC. 45 pp.

Hall, D. K., and Riggs, G. A. (2014). Normalized-Difference Snow Index (NDSI). in Encyclopedia of Snow, Ice and Glaciers, Eds. V. P. Singh, P. Singh, and U. K. Haritashya. Springer. p. 779-780.