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.
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.
- 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.
- 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.
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.