ENVI Tutorial: Basic Hyperspectral Analysis

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

ENVI Tutorial: Basic

Hyperspectral Analysis
Basic Hyperspectral Analysis
Files Used in this Tutorial
Define ROIs
Load AVIRIS Data
Create and Restore ROIs
Extract Mean Spectra from ROIs
Discriminate Mineralogy
Close Plot Windows and ROI Controls
2D Scatter Plots
Density Slice the Scatter Plot
Dancing Pixels
Scatter Plots Linked to a Spectral Profile
Scatter Plot ROIs
Image ROIs
Scatter Plots and Spectral Mixing
References

2
2
3
3
3
4
6
6
7
7
7
8
8
9
9
10

ENVI Tutorial: Basic Hyperspectral Analysis

Basic Hyperspectral Analysis


This tutorial shows you how to extract spectra from regions of interest (ROIs), how to create directed
color composites, and how to use 2D scatter plots for simple classification. You will use 1995 Airborne
Visible/Infrared Imaging Spectrometer (AVIRIS) atmospherically corrected apparent reflectance data
for Cuprite, Nevada, USA. The subsetted data cover the 1.99 to 2.48 m range in 50 spectral bands,
approximately 10 nm wide. You will extract ROIs for specific minerals, compare them to library
spectra, and design RGB color composites to best display the spectral information. You will also use 2D
scatter plots to locate unique pixels, query the data distribution, and perform simple classification.
You should be familiar with the concepts presented in the Introduction to Hyperspectral Data tutorial
before beginning this tutorial.

Files Used in this Tutorial


ENVI Resource DVD: Data/c95avsub
File

Description

cup95_at.int (.hdr) AVIRIS atmospherically corrected reflectance data


jpl1.sli (.hdr)

JPL Spectral Library in ENVI format with header

usgs_min.sli (.hdr) USGS Spectral Library in ENVI format with header


cup95_av.roi

Saved ROI locations

ENVI Tutorial: Basic Hyperspectral Analysis

Define ROIs
You can use ROIs to extract statistics and average spectra from groups of pixels. You can define as
many ROIs as you wish in any displayed image.

Load AVIRIS Data


Before attempting to start the program, ensure that ENVI is properly installed as described in the
installation guide.
1. From the ENVI main menu bar, select File > Open Image File. A file selection dialog appears.
2. Navigate to Data\c95avsub and select cup95_at.int. Click Open.
3. In the Available Bands List, select Band 193 and click Load Band.

Create and Restore ROIs


1. From the Display group menu bar, select Overlay > Region of Interest. An ROI Tool dialog
appears.
2. Draw a polygon ROI anywhere in the image by clicking repeatedly to define straight-line
segments. Or, draw a free-form polygon by clicking and dragging inside the image.
3. Right-click to complete the ROI and to close the polygon. Right-click again to lock the ROI in
place.
4. In the ROI Tool dialog, click Stats. An ROI Statistics Results dialog appears with an embedded
plot window that shows the following:
l

Mean spectrum (white)

First standard deviation above and below the mean spectrum (green)

Minimum and maximum envelope containing all of the spectra in the ROI (red)

5. From the ROI Statistics Results dialog menu bar, select File > Cancel.
6. In the ROI Tool, click Delete to delete the selected ROI.
7. From the ROI Tool dialog menu bar, select File > Restore ROIs. An Enter ROI Filenames
dialog appears.
8. Navigate to Data/c95avsub and select cup95_av.roi. Click Open. This file contains
previously defined ROIs for known areas of specific minerals. The ROIs are listed in an ENVI
message dialog and loaded into the ROI Tool dialog as shown in the following figure:

ENVI Tutorial: Basic Hyperspectral Analysis

9. In the ROI Tool dialog, select the Off radio button to enable pixel positioning in the display group.
10. From the Display group menu bar, select Tools > Profiles > Z Profile (Spectrum).
11. Move the crosshairs in the Zoom window to a pixel inside of an ROI.

Extract Mean Spectra from ROIs


1. In the ROI Tool dialog, click Select All, followed by Stats to extract statistics and spectral plots
of the selected ROIs.
2. In the ROI Statistics Results dialog, click Select Plot and select Min/Max/Mean.
3. Examine the spectral variability of each ROI by comparing the mean spectrum (white) with the
first standard deviation spectra (green above and below the mean) and the envelope spectra (red
above and below the mean).
4. Click Playa (Red) 28 points at the top of the ROI Statistics Results dialog, select other ROIs,
and view their minimum, maximum, and mean data values.
5. In the ROI Statistics Results dialog, click Select Plot and select Mean for all ROIs to plot the
average spectrum for each ROI.
6. Right-click in the plot window (in the ROI Statistics Results dialog) and select Stack Plots. This
option offsets spectra for comparison.
7. Right-click again in the same plot window and select Plot Key. The plot should look similar to the
following:

ENVI Tutorial: Basic Hyperspectral Analysis

8. Compare the spectral features of each spectrum and note unique characteristics that might allow
mineral identification.
9. You can compare spectral library signatures to the ROI mean signatures for calcite,
buddingtonite, kaolinite, and alunite. Right-click inside the plot window (in the ROI Statistics
Results dialog) and select File > Input Data > Spectral Library.
10. In the Spectral Library Input File dialog, click Open and select Spectral Library.
11. Navigate to Data\spec_lib\jpl_lib and select jpl1.sli. Click Open. Click OK in the
Spectral Library Input File dialog.
12. In the Input Spectral Library dialog, select one of the following:
CALCITE C-3D
BUDDINGTONITE FELDS TS-11A
KAOLINITE WELL ORDERED PS-1A
ALUNITE SO-4
13. In the Y Data Multiplier field of the Input Spectral Library dialog, enter 1000. Click OK. The
spectral library signature appears in the plot window.
14. Try comparing spectra from the USGS spectral library (usgs_min.sli) with image spectra
and the JPL spectral library.
15. When you have finished, close the ROI Statistics Results dialog. Keep the ROI Tool dialog open
for the next exercise.

ENVI Tutorial: Basic Hyperspectral Analysis

Discriminate Mineralogy
Design color images to discriminate mineralogy:
1. In the Available Bands List, select the RGB Color radio button. Select Band 183, Band 193, and
Band 207. Click Load RGB.
2. From the Display group menu bar, select Tools > Profiles > Z Profile (Spectrum). A Spectral
Profile plot window appears. Red, green, and blue lines mark the positions of the bands used to
make the RGB color-composite image.
3. In the ROI Tool dialog, select the Off radio button and browse spectra near your ROI locations.
4. Notice where the selected RGB bands fall with respect to spectral features in the previously
displayed mean spectra and how the spectral features affect the color observed in the image.
5. Click and drag the colored bars in the Spectral Profile to change them to the desired bands. One
way to enhance specific materials is by centering one color bar in an absorption feature and the
other two on opposite shoulders of the feature.
6. Right-click inside the Spectral Profile and select Load New RGB Combination to load the new
bands into the display group.
After inspecting a few sites, you should begin to understand how the color-composite colors
correspond with the spectral signature. For instance, the alunitic regions appear magenta in the
RGB composite because the green band is within the alunite absorption feature, giving a low
green value, while the red and blue bands have nearly equal reflectance. The combination of red
and blue results in a magenta color for pixels containing alunite.
Based on the above results, try these exercises:
7. Predict how certain spectra will look, given a particular pixels color in the RGB image.
8. Explain the colors of the training sites, in terms of their spectral features.
9. Design and test specific RGB band selections that maximize your ability to map certain minerals,
like kaolinite and calcite.

Close Plot Windows and ROI Controls


1. Close all open plot windows by selecting Window > Close All Plot Windows from the ENVI
main menu bar.
2. From the ROI Tool dialog menu bar, select File > Cancel.

ENVI Tutorial: Basic Hyperspectral Analysis

2D Scatter Plots
1. From the Display group menu bar, select Tools > 2D Scatter Plots. A Scatter Plot Band Choice
dialog appears.
2. Under Choose Band X, select Band 193. Under Choose Band Y, select Band 207. Click OK. A
Scatter Plot window appears with a plot of the x and y apparent reflectance values:

Density Slice the Scatter Plot


1. From the Scatter Plot menu bar, select Options > Density Slice to automatically density-slice the
scatter plot. The colors show the frequency of occurrence of specific apparent reflectance
combinations for the two plotted bands. Purple is the lowest frequency, progressing through the
colors blue, green, yellow, to red as the highest frequency of occurrence.
2. From the Scatter Plot menu bar, deselect Options > Density Slice to turn off the color slice.

Dancing Pixels
1. Click and drag inside the display group to show "dancing pixels" in the Scatter Plot. The red
pixels in the Scatter Plot correspond to those pixels within a 10 x 10 patch around the cursor in the
display group.
2. Try to predict the locations of certain image colors in the scatter plot, then check them. Notice the
shape of the red dancing pixels.
3. Click and drag the middle mouse button in the Scatter Plot to show dancing pixels in the display
group. The red pixels in the image correspond to those pixels within a 10 x 10 patch around the
cursor in the Scatter Plot. Note the spatial distribution and coherency of the selected pixels.

ENVI Tutorial: Basic Hyperspectral Analysis

4. Change the patch size in the Scatter Plot by selecting Options > Set Patch Size from the Scatter
Plot menu bar, and observe the difference.

Scatter Plots Linked to a Spectral Profile


1. From the Scatter Plot menu bar, select Options > Z Profile. A file selection dialog appears.
2. Select cup95_at.int and click OK. A blank Scatter Plot Profile window appears.
3. Right-click in the Scatter Plot to extract the spectrum for the corresponding pixel.
4. Compare spectra from the different parts of the Scatter Plot and note the spectra that appear at the
"points" of the plot versus the center of the plot.

Scatter Plot ROIs


The Scatter Plot can also be used as a quick classifier.
1. Draw an ROI inside the Scatter Plot by clicking and dragging to define a polygon.
2. Right-click to close the polygon. Image pixels with the two-band characteristics outlined by the
polygon are colored red in the display group.
3. You can start a new class by performing one of the following steps:
From the Scatter Plot menu bar, select Class and choose a different color.
OR,
From the Scatter Plot menu bar, select Class > New Class.
4. Draw another polygon ROI in the Scatter Plot. The corresponding pixels are highlighted in the
selected color in the display group.
5. You can clear (remove) a class by performing one of the following steps:
From the Scatter Plot menu bar, select Options > Clear Class.
OR,
Click the middle mouse button outside (below) the plot axes.
OR,
From the Scatter Plot menu bar, select Class > Items 1:20 > White. Draw a white polygon
around the highlighted region you want to clear and right-click to close the polygon. White acts as
an "eraser."
6. Use Scatter Plot to work backwards to see where certain pixels occur in the image.
7. You can convert classes to ROIs that act as training sets for classification using all of the bands
by selecting Options > Export Class or Export All from the Scatter Plot menu bar. ROIs
exported in this fashion appear in the ROI Tool dialog and are available for subsequent supervised
classification. You can convert them to a classification image by selecting Classification >
Create Class Image from the ENVI main menu bar.
8. From the Scatter Plot menu bar, select Options > Clear All to remove the ROIs from the Scatter
Plot and display group.

ENVI Tutorial: Basic Hyperspectral Analysis

Image ROIs
The Scatter Plot also functions as a simple classifier from the image.
1. From the Scatter Plot menu bar, select Options > Image ROI.
2. Draw some polygon ROIs in the display group. The ROIs are mapped to and highlighted in the
Scatter Plot with the selected color. All of the matching pixels in the image are inversely mapped
to the display group and highlighted in the same color, as though you had drawn the scatter plot
region yourself. This is the simplest form of two-band classification.
3. Note the correspondence between image color and scatter plot characteristics.

Scatter Plots and Spectral Mixing


Can you explain the overall diagonal shape of the data cloud in terms of spectral mixing? Where do the
purest pixels in the image fall in the scatter plot? Are there any secondary "projections" or "points" on
the scatter plot?
1. Choose some other band combinations to scatter plot by selecting Options > Change Bands from
the Scatter Plot menu bar. Try one pair of adjacent bands and other pairs that are spectrally
distinct.
2. How do the scatter plots change shape with different band combinations? Can you describe the nD "shape" of the data cloud?
3. When you are finished, select File > Exit from the ENVI main menu bar.

ENVI Tutorial: Basic Hyperspectral Analysis

References
Clark, R. N., G. A. Swayze, A. Gallagher, T. V. V. King, and W. M. Calvin, 1993, The U. S.
Geological Survey Digital Spectral Library: Version 1: 0.2 to 3.0 mm: U. S. Geological Survey, Open
File Report 93-592, 1340 p.
Clark, R. N., A. J. Gallagher, and G. A. Swayze, 1990, Material absorption band depth mapping of the
imaging spectrometer data using a complete band shape least-squares fit with library reference spectra:
in Proceedings of the Second Airborne Visible/Infrared Imaging Spectrometer (AVIRIS) Workshop, JPL
Publication 90-54, p. 176 - 186.
Clark, R.N., T. V. V. King, M. Klejwa, G. Swayze, and N. Vergo, 1990, High Spectral Resolution
Reflectance Spectroscopy of Minerals: J. Geophys Res. 95, 12653-12680.
Grove, C. I., S. J. Hook, and E. D. Paylor, 1992, Laboratory reflectance spectra of 160 minerals, 0.4 to
2.5 Micrometers: JPL Publication 92-2.
Kruse, F. A., A. B. Lefkoff, and J. B. Dietz, 1993, Expert System-Based Mineral Mapping in northern
Death Valley, California/Nevada using the Airborne Visible/Infrared Imaging Spectrometer (AVIRIS):
Remote Sensing of Environment, Special issue on AVIRIS, May-June 1993, v. 44, p. 309 - 336.
Kruse, F. A., and A. B. Lefkoff, 1993, Knowledge-based geologic mapping with imaging spectrometers:
Remote Sensing Reviews, Special Issue on NASA Innovative Research Program (IRP) results, v. 8, p. 3
- 28.

10

You might also like