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.

Advertisements

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.

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.

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.

Working with Landsat 8 – Using and interpreting the Quality Assessment (QA) band

So you’ve downloaded a Landsat 8 scene and eager to begin your investigation. As you get started, let’s explore how the Quality Assessment band that is distributed with the data can be used to help improve your analysis.

Landsat8 Lake Tahoe

What is the QA band?

As summarized on the USGS Landsat 8 product information website: “Each pixel in the QA band contains a decimal value that represents bit-packed combinations [QA bits] of surface, atmosphere, and sensor conditions that can affect the overall usefulness of a given pixel.”

“Rigorous science applications seeking to optimize the value of pixels used in a study will find QA bits useful as a first level indicator of certain conditions. Otherwise, users are advised that this file contains information that can be easily misinterpreted and it is not recommended for general use.”

What are QA bits?

Rather than utilize multiple bands for indicating conditions such as water, clouds and snow, the QA band integrates this information into 16-bit data values referred to as QA bits. As a result, a significant amount of information is packed into a single band; however, this also means that certain steps are required to extract the multi-layered information content from the integrated QA bits.

“The pixel values in the QA file must be translated to 16-bit binary form to be used effectively. The gray shaded areas in the table below show the bits that are currently being populated in the Level 1 QA Band, and the conditions each describe. None of the currently populated bits are expected to exceed 80% accuracy in their reported assessment at this time.”

Landsat8 QA Bands

“For the single bits (0, 1, 2, and 3):

  • 0 = No, this condition does not exist
  • 1 = Yes, this condition exists.”

“The double bits (4-5, 6-7, 8-9, 10-11, 12-13, and 14-15) represent levels of confidence that a condition exists:

  • 00 = Algorithm did not determine the status of this condition
  • 01 = Algorithm has low confidence that this condition exists (0-33 percent confidence)
  • 10 = Algorithm has medium confidence that this condition exists (34-66 percent confidence)
  • 11 = Algorithm has high confidence that this condition exists (67-100 percent confidence).”

How are QA bits calculated?

QA bit values are calculated at various stages during the radiometric and geometric correction process. An overview of the algorithms used for calculating QA bits is provided in the LDCM CAL/VAL Algorithm Description Document.

The single QA bits (0-3) are used to signify: missing data and pixels outside the extent of the image following geometric correction (designated fill); dropped lines (dropped frame); and pixels hidden from sensor view by the terrain (terrain occlusion).

The double QA bits (4-15) are calculated using the LDCM Cloud Cover Assessment (CCA) system, which consists of several intermediate CCA algorithms whose results are merged to create final values for each Landsat 8 scene. The algorithms utilize a series of spectral tests, and in one case a statistical decision tree model, to assess the presence of cloud, cirrus cloud, snow/ice, and water.

As the name implies, the heritage of the CCA system is based on cloud detection; hence algorithms are directed primarily at identifying clouds, with secondary attention to snow/ice and water. Keep this in mind when interpreting results, particularly with respect to water discrimination, which is reportedly poor in most cases.

How do I use QA bits?

While it is feasible to translate individual QA bits into their respective information values, or implement thresholds to extract specific values or ranges of values, this isn’t practical for accessing the full information content contained in the QA band.

Instead, try using the L-LDOPE Toolbelt, a no-cost tool available from the USGS Landsat 8 website that includes “functionality for computing histograms, creating masks, extracting statistics, reading metadata, reducing spatial resolution, band and spatial subsetting, and unpacking bit-packed values… the new tool [also] extracts bits from the OLI Quality Assessment (QA) band to allow easy identification and interpretation of pixel condition.”

Note that the L-LDOPE Toolbelt does not include a graphical user interface, but instead operates using command-line instructions. So be sure to download the user guide, which includes the specific directions for implementing the various executables.

L-LDOPE Toolbelt example

As an example, let’s walk through the steps needed to unpack the QA bits from a Landsat 8 image of Lake Tahoe using a Windows 7 x64 desktop system:

  • Unzip the L-LDOPE Toolbelt zip file and place the contents in the desired local directory.
  • Open the Windows Command Prompt (All Programs > Accessories > Command Prompt) and navigate to the respective ‘bin’ directory for your operating system (‘windows64bit_bin’ in our example).
  • For simplicity, copy the QA file (e.g., LC80430332014102LGN00_BQA.TIF) to the same ‘bin’ directory as identified in the previous step. For users familiar with command-line applications the data can be left in a separate directory with the executable command adjusted accordingly.
  • Execute the unpacking application (unpack_oli_qa.exe) using the following command (typed entirely on one line):

Landsat8 Unpack QA

  • The above example extracts all the QA bits using the default confidence levels and places them in separate output files.
  • Refer to the user guide for instructions on how to change the defaults, extract only select QA bits, and/or combine output into a single file.

Example 1: Lake Tahoe

This example illustrates QA output for a subset Landsat 8 scene of Cape Canaveral acquired on October 21, 2013 (LC80160402013294LGN00). Here the cloud discrimination is reasonable but includes confusion with beach areas along the coastline, the snow/ice output interestingly misidentifies some cloud and beach areas, and water discrimination is again poorly defined.

Landsat8 Lake Tahoe QA

Example 2: Cape Canaveral

This example illustrates QA output for a subset Landsat 8 scene of Lake Tahoe acquired on April 12, 2014 (LC80430332014102LGN00). Note that snow/ice in the surrounding mountains in identified with reasonable accuracy, cloud discrimination is also reasonable but includes significant confusion with snow/ice, and water is poorly characterized, including many extraneous features beyond just water bodies.

Landsat8 Cape Canaveral QA

With these examples in mind, it is worth repeating: “Rigorous science applications seeking to optimize the value of pixels used in a study will find QA bits useful as a first level indicator of certain conditions. Otherwise, users are advised that this file contains information that can be easily misinterpreted and it is not recommended for general use.”

Be sure to keep this in mind when exploring the information contained in the QA band.

For more info on L-LDOPE Toolbet: https://landsat.usgs.gov/L-LDOPE_Toolbelt.php

For more info on Landsat 8: https://landsat.usgs.gov/landsat8.php