Remote Sensing in the Cloud – Calculating a land/water mask using HICO IPS

Last year we launched the HICO Image Processing System (HICO IPS) – a prototype web application for on-demand remote sensing data analysis in the cloud.

HICO IPS

To demonstrate the capabilities of this system, we implemented a collection of coastal remote sensing algorithms to produce information on water quality, water depth and benthic features using example imagery from the HICO instrument on the International Space Station.

As the HICO IPS approaches its one year anniversary, and continues its excellent performance, we’d like to take a moment to highlight each of the algorithms currently implemented in the system.

Here we begin with an overview of the land/water mask utilized in the HICO IPS.

Objective – Implement an automated algorithm for classifying land versus water, thereby masking land pixels from further analysis and allowing subsequent processing steps to focus on just water pixels.

Algorithm – Generates a binary mask differentiating land from water using the Normalized Difference Water Index (NDWI; McFeeters 1996). This algorithm can be implemented on its own, or as a pre-processing step in other algorithm workflows.

Inputs – User specified HICO scene, with optional region-of-interest; and user adjustable NDWI threshold, where -1.0 ≤ NDWI ≤ 1.0, land ≤ threshold < water, and default threshold = 0.0.

HICO IPS Christchurch

Output – Binary land/water mask (0 = land; 1 = water), where land is displayed in the online map using a black mask and water remains unchanged.

HICO IPS Christchurch mask

Reference – McFeeters SK (1996) The use of the Normalized Difference Water Index (NDWI) in the delineation of open water features, International Journal of Remote Sensing, vol. 17(7), 1425-1432.

Try it out today for yourself: http://hyspeedgeo.com/HICO/

 

Related posts

Introducing the HICO Image Processing System

Deriving chlorophyll concentration using HICO IPS

Evaluating water optical properties using HICO IPS

Characterizing shallow coastal environments using HICO IPS

Advertisements

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 – Differentiating water using NDWI

(Update: 09-23-2014) Just added – see our related post on Using NDVI to delineate vegetation.

Are you working with Landsat 8 or other earlier Landsat data? Are you looking for solutions to automatically delineate features such as clouds, snow/ice, water and vegetation? Have you looked at the Landsat 8 Quality Assessment band, but find the indicators don’t meet all your needs?

If so, you’re not alone. This is a common need in most remote sensing applications.

After recently exploring the contents of the Quality Assessment (QA) band for examples from Lake Tahoe and Cape Canaveral (see Working with Landsat 8), it became readily apparent that there is room for improvement in the quality assessment indicators. So we set out to identify possible solutions to help enhance the output.

Landsat8 Lake Tahoe - Water

The challenge we gave ourselves was to utilize only relatively simple indices and thresholds to further refine some or all of the existing Landsat 8 quality assessment procedure, and wherever possible to also maintain backward compatibility with previous Landsat missions.

As a first step, let’s explore how the Normalized Difference Water Index (NDWI), as described by McFeeters (1996), can be utilized to differentiate water from non-water.

To calculate NDWI in ENVI, we used Band Math (Toolbox > Band Ratio > Band Math) to implement the following equation (float(b3)-float(b5))/(float(b3)+float(b5)), where b3 is Band-3 (Green), b5 is Band-5 (NIR), and the float() operation is used to transform integers to floating point values and avoid byte overflow.

The NDWI output was visually inspected to develop thresholds based on known image and landscape features. Additionally, as with the QA band, rather than identify a single absolute threshold, three threshold values were used to indicate low, medium and high confidence levels whether water is present.

As a caveat at this stage, note that this analysis currently only incorporates two example test images, which is far from rigorous. Many more examples would need to be incorporated to perform thorough calibration and validation of the proposed index. It is also expected that developing a robust solution will entail integrating the different indices into a rule-based decision tree (e.g., if snow/ice or cloud, then not water).

Results of the NDWI analysis for water indicate the following: low confidence (NDWI ≥ 0.0), medium confidence (NDWI ≥ 0.06), and high confidence (NDWI ≥ 0.09).

Example 1: Lake Tahoe

This example illustrates output for a subset Landsat 8 scene of Lake Tahoe acquired on April 12, 2014 (LC80430332014102LGN00). Here we see improvement over the QA band water index, which exhibits significant confusion with vegetation. The NDWI output performs very well at the high confidence level, but includes some confusion with snow/ice and cloud at the low and medium confidence levels. We expect much of this confusion can be resolved once a decision tree is incorporated into the analysis.

Landsat8 Lake Tahoe Quality Assessment - Water

Example 2: Cape Canaveral

This example illustrates output for a subset Landsat 8 scene of Cape Canaveral acquired on October 21, 2013 (LC80160402013294LGN00). As with the previous example, there is significant improvement over the existing QA band water index. There is again some confusion with cloud at the low and medium confidence levels, but strong performance at the high confidence level. As a result, this output also shows promise as the foundation for further improvements using a decision tree.

Landsat8 Cape Canaveral Quality Assessment - Water

We’ll continue to explore other enhancements in future posts. In the meantime, we’d love to hear your experiences working with Landsat quality assessment and welcome your suggestions and ideas.

– –

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