Beruflich Dokumente
Kultur Dokumente
ENVI
Contents
Copyright 2011
All rights reserved.
E3De, ENVI and IDL are trademarks of Exelis, Inc. All other marks are the property of their
respective owners. 2011, Exelis Visual Information Solutions, Inc.
Contents
Contents
INTRODUCTION ........................................................................................................................................................... 6
WHAT IS ENVI? ........................................................................................................................................................ 7
ENVI + IDL, ENVI, and IDL .................................................................................................................................... 7
ENVI RESOURCES ..................................................................................................................................................... 7
DATA PREPROCESSING ...........................................................................................................................................10
WHAT YOU WILL LEARN IN THIS CHAPTER............................................................................................................ 11
CALIBRATION .......................................................................................................................................................... 11
ATMOSPHERIC AND SOLAR IRRADIANCE CURVE CORRECTION ............................................................................... 11
MODEL-BASED REFLECTANCE CONVERSION .......................................................................................................... 14
ARTIFACTS OF MODEL-BASED CONVERSIONS ......................................................................................................... 17
CHAPTER REVIEW ................................................................................................................................................... 20
PRINCIPAL COMPONENTS ANALYSIS .................................................................................................................21
WHAT YOU WILL LEARN IN THIS CHAPTER............................................................................................................ 22
INTRODUCTION ........................................................................................................................................................ 22
CHAPTER REVIEW ................................................................................................................................................... 26
EXAMINING SPECTRA AND USING SPECTRAL LIBRARIES ..........................................................................27
WHAT YOU WILL LEARN IN THIS CHAPTER............................................................................................................ 28
DATA EXPLORATION ............................................................................................................................................... 28
Visually Comparing Spectra ...................................................................................................................................30
WORKING WITH SPECTRAL LIBRARIES .................................................................................................................... 31
Creating Your Own Spectral Libraries ...................................................................................................................36
CHAPTER REVIEW ................................................................................................................................................... 36
WHOLE PIXEL ANALYSIS TECHNIQUES ............................................................................................................37
WHAT YOU WILL LEARN IN THIS CHAPTER............................................................................................................ 38
INTRODUCTION ........................................................................................................................................................ 38
SPECTRAL ANGLE MAPPER (SAM) CLASSIFICATION .............................................................................................. 38
MATCHING IMAGE SPECTRA TO REFERENCE SPECTRA ............................................................................................ 44
Continuum Removal ................................................................................................................................................45
Spectral Feature Fitting (SFF) ................................................................................................................................48
CHAPTER REVIEW ................................................................................................................................................... 57
IDENTIFYING DATA ENDMEMBERS ....................................................................................................................58
WHAT YOU WILL LEARN IN THIS CHAPTER............................................................................................................ 59
INTRODUCTION ........................................................................................................................................................ 59
Endmembers, Mixed Pixels, and Sub-Pixel Analysis...............................................................................................59
Finding Endmembers ..............................................................................................................................................59
Review of the Linear Unmixing Model ....................................................................................................................60
MINIMUM NOISE FRACTION (MNF) ........................................................................................................................ 60
PIXEL PURITY INDEX (PPI) ...................................................................................................................................... 65
For Future Reference ..............................................................................................................................................65
N-D VISUALIZER ..................................................................................................................................................... 68
SPECTRAL ANALYST ............................................................................................................................................... 74
CHAPTER REVIEW ................................................................................................................................................... 76
SUB-PIXEL ANALYSIS TECHNIQUES ....................................................................................................................77
WHAT YOU WILL LEARN IN THIS CHAPTER............................................................................................................ 78
INTRODUCTION ........................................................................................................................................................ 78
LINEAR SPECTRAL UNMIXING ................................................................................................................................. 78
Introduction
ENVI Resourse
Introduction
What is ENVI?
ENVI (the Environment for Visualizing Images) is the ideal software for the visualization,
analysis, and presentation of all types of digital imagery. ENVIs complete image-processing
package includes advanced, yet easy-to-use, spectral tools, geometric correction, terrain analysis,
radar analysis, raster and vector GIS capabilities, extensive support for images from a wide variety
of sources, and much more.
ENVI can be used to perform numerous image analysis techniques, including multispectral
classification, various types of spatial filtering, image registration, principal components
transformations, band ratios, and image statistics. ENVI also has a unique suite of advanced
spectral analysis tools designed specifically for working with hyperspectral data (although many
are also appropriate for multispectral analysis) and a complete set of tools for working with radar
data (both single band and fully polarimetric SAR). Furthermore, ENVI provides full access to the
programming language in which it was written: the Interactive Data Language (IDL) a powerful,
yet easy to use, fourth-generation language whose programs can easily be incorporated into ENVI.
ENVIs interactive analysis capabilities include:
Multiple dynamic overlay that allows you to easily compare images in multiple displays.
Real-time extraction and linked spatial/spectral profiling from multi-band and
hyperspectral data that provide you with new ways of looking at high-dimensional data.
Interactive tools to view and analyze vectors and GIS attributes.
Standard capabilities, such as contrast stretching and 2D scatter plots.
ENVI Resources
Exelis Visual Information Solutions has a team of Global Services Group (GSG) consultants who
provide custom software development; consulting services; and training to commercial, research,
and government markets. The GSG team can either help you define requirements and lead your
development cycle from prototyping to final installation, or they can join your project mid-stream
and provide expert assistance.
Each GSG team member offers expertise in areas such as image processing; data
analysis; visualization; software development; a broad range of scientific application
areas; and government civilian, defense, and intelligence community requirements. If
needed, some staff have the necessary security clearances to support classified projects.
The GSG team is experienced in extending ENVIs robust suite of user functions and
batch programming capabilities, and it has up-to-date knowledge on recent product
enhancements and future product direction. You can e-mail the Global Services Group
at sales@ittvis.com.
This is a training manual used to teach customers ENVI. It is designed to be a classroom
training aid. However, if you cannot attend a training course, this manual is the next best
tool for quickly learning and understanding ENVI.
We want you to learn ENVI and apply it successfully to your work. If you have any
suggestions for improvements or additions to this manual, please let us know.
Most chapters in this manual are self-contained. In most cases you can pick up the manual
in any particular functional area and start working with the exercise immediately.
Bold
All ENVI menu options, dialog buttons, dialog fields, other dialog
options, and values that you need to enter are bold.
Courier
Numbered Steps
Chapter 1:
Data Preprocessing
What You Will Learn In This Chapter ....................................................................................
Calibration.............................................................................................................................
Atmospheric and Solar Irradiance Curve Correction .............................................................
Model-Based Reflectance Conversion ..................................................................................
Artifacts of Model-Based Conversions ..................................................................................
Chapter Review ....................................................................................................................
ENVI Resourse
Chapter 1: Data Preprocessing
Exercise Data
You will use hyperspectral data sets from the Probe 1 sensor, collected over Santa Barbara, CA. Probe 1
is a full range sensor with 128 channels ranging from 0.4 m to 2.5 m. SBcoast_rad is a radiance
data set.
Calibration
Hyperspectral sensors should be spectrally and radiometrically calibrated before you analyze their data.
During laboratory experiments, researchers determine the center wavelengths for sensor channels, and
they measure the radiometric response. Based on these experiments, they derive the calibration factors
used to convert raw digital numbers (DNs) to radiance. Conversion to radiance or reflectance is
particularly important when comparing data sets. Some researchers analyze radiance data. However, many
applications require the use of reflectance data.
11
Chapter 1:
The Empirical Line technique also requires some detailed knowledge of the scene. In this instance, you
collect field or laboratory reflectance spectra for two or more known target areas in the image (usually
including a dark and a bright area). Select the targeted regions using ROIs. Calculate a linear regression
between the field or lab reflectance spectra and the data radiance spectra for the target areas. This
regression line, based upon the bright and dark targets, is used to predict the surface reflectance spectrum
for each pixel.
The Internal Average Reflectance (IAR) technique can be used when working in an area for which no
ground truth data exists. Calculate the average spectrum of the entire image, then divide this spectrum into
each pixel in the image to calculate a relative reflectance.
Atmospheric modeling is another common approach for applying atmospheric and solar corrections to
data sets, particularly for hyperspectral sensors. Exelis Visual Information Solutions sells a separate
atmospheric correction module called FLAASH (Fast Line-of-sight Atmospheric Analysis of Spectral
Hypercubes). Other vendors also offer atmospheric correction software, some of which can interface
directly with ENVI.
proper band combination for a true-color image, and it loads the image into a new display group.
5. Center the Zoom box over a wide beach area near the bottom of the image. This is a good candidate
for a flat field calibration target, since it is bright and spectrally homogenous.
12
ENVI Resourse
Chapter 1: Data Preprocessing
appears.
7. In the ROI Tool dialog, click the Zoom radio button.
8. Draw a polygon ROI inside of the sandy beach.
9. From the ENVI main menu bar, select Basic Tools
Preprocessing
Calibration Utilities
Bands List.
13. Right-click on Sbcoast_FF and select Load True Color to <new>.
14. From a Display group menu bar, select Tools
Link
appears.
15. In the Link Displays dialog, click the Dynamic Overlay toggle button to select Off.
16. Click OK.
17. From both Display group menu bars, select Tools
Profiles
Preprocessing
IAR Reflectance. The Calibration Input File dialog appears.
Calibration Utilities
2. Select SBcoast_rad, and click OK. The IARR Calibration Parameters dialog appears.
3. Enter SBcoast_IAR as the output filename, and click OK. After processing is complete, the
13
Chapter 1:
5. To link the IAR image with the radiance and flat field images, select Tools
6. In the Link Displays dialog, click the Dynamic Overlay toggle button to select Off.
7. From the Display #3 menu bar, select Tools
Profiles
window appears.
8. Compare spectral profiles from all three images and from several different land cover types.
Do the Flat Field and IAR corrections remove atmospheric effects and the shape of the solar
irradiance curve? What differences do you see between these two methods?
9. When you are finished, close all display groups and dialogs.
OK.
5. Click Output Reflectance File. The Select Output File dialog appears.
6.
14
ENVI Resourse
Chapter 1: Data Preprocessing
7. Make sure the Output Directory for FLAASH Files is also envihyper\hyperout.
8. In the Rootname for FLAASH Files field, enter SBcoast_ref. ENVI automatically appends an
underscore to the root name. The FLAASH output files will include a water vapor image, a cloud
classification image, a journal file, and an optional template file.
9. In the Lat fields, enter 34 24 36.0.
10. In the Lon fields, enter -119 48 0.0.
15
Chapter 1:
off, FLAASH requires large amounts of available disk space to create intermediate files. The
Output Scale Factor of 10,000 is typically used to scale the data to integer format. This maintains
accuracy and keeps file size down. You can toggle on Output Diagnostic Files to help if
problems occur.
24. Click Cancel to return to the main FLAASH dialog.
25. Click Apply in the FLAASH Atmospheric Correction Model Input Parameters dialog. The FLAASH
processing may take several minutes. When processing is complete, the FLAASH Atmospheric
Correction Results dialog appears with a summary of processing results. Also, three new images are
loaded into the Available Bands List:
Sbcoast_ref_water.dat
Sbcoast_ref_cloudmask.dat
Sbcoast_ref
26. In the Available Bands List, select Water column vapor and click Load Band. The water vapor
image is loaded to a new display group. High values for this image are typically found near water.
Ideally, you should not see much of the ground in this image. When you are finished, close this
display group.
27. In the Available Bands List, right-click Band 1 (under Sbcoast_ref_cloudmask.dat), and
select Load Band to New Display. The cloud mask image appears in a new display group.
28. Right click in the Image window displaying the cloud mask image, and select Cursor
Location/Value. Examine the various data values and their meanings. When you are finished, close
this display group.
29. In the Available Bands List, right-click on SBcoast_ref, and select Load True Color. A
31. Keep the display group and Spectral Profile window open for the next exercise.
32. Close the FLAASH Atmospheric Correction Model Input Parameters and FLAASH Atmospheric
16
ENVI Resourse
Chapter 1: Data Preprocessing
Channels 125 to 128 tend to be noisy due to low solar energy at these wavelengths, so you will not
include these bands. Additionally, band 99 contains an atmospheric CO2 absorption feature that is best
to exclude. Click OK.
11. In the EFFORT Input Parameters dialog, accept the default values for the remaining fields. Click the
17
Chapter 1:
13. Click OK. When processing is complete, an EFFORT Gain / Offset Results plot window appears, and
14. In the Available Bands List, right-click on SBcoast_effref and select Load True Color to
<new>.
15. From the Display #2 menu bar (EFFORT-corrected image), select Tools
Link
Link Displays.
Profiles
Z Profile
correction adequately remove artifacts and produce smoother spectra? Are there wavelengths that look
worse? Look especially at the longer wavelengths. Can you think of a way to improve the appearance
of the reflectance spectra at longer wavelengths?
19. Close the EFFORT Gain / Offset Results plot window.
This Santa Barbara scene includes a lot of water, which has very little reflectance at longer wavelengths.
When EFFORT calculates gains and offsets, the low signal there causes spurious features and the
reflectance spectra are not as smooth as they should be. You can improve the results by calculating
EFFORT gains and offsets just over land and applying them to the spatial and spectral data.
18
ENVI Resourse
Chapter 1: Data Preprocessing
21. Select SBcoast_ref, then click Spatial Subset. The Select Spatial Subset dialog appears.
22. Click Image. The Subset by Image dialog appears.
23. Change the Samples and Lines values to resize the box so it covers as much land and as little water as
Next, you will use Spectral Math to apply the EFFORT results to the FLAASH-corrected data.
19
Chapter 1:
27. From the ENVI main menu bar, select Basic Tools
appears.
28. In the Enter an expression field, type the following:
fix((s1*s2)+s3)
If you press Enter on your keyboard, you will not see an error message if you correctly typed the
expression.
29. Click OK. The Variables to Spectra Pairings dialog appears. The Available Spectra list shows the
The Spectra Math Input File dialog appears. Select SBcoast_ref and click OK.
31. Highlight S2, then highlight Gain in the Available Spectra list.
32. Highlight S3, then highlight Offset in the Available Spectra list.
33. Enter an output filename of SBcoast_effref. (You will overwrite the file you created in Step 11.)
34. Click OK. The resulting image is added to the Available Bands List.
35. Load SBcoast_effref to a new display group, and evaluate the results by looking at spectra of
Chapter Review
ENVI has several algorithms for atmospheric correction, including Empirical Line, Flat Field,
Internal Average Reflectance, and Dark Subtraction.
ENVI provides a model-based, atmospheric correction module called FLAASH.
ENVI provides an EFFORT Polishing tool that removes artifacts of the radiance-to-reflectance
conversion.
20
Chapter 2:
Principal Components
Analysis
What You Will Learn In This Chapter .................................................................................
Introduction ........................................................................................................................
Chapter Review .................................................................................................................
Chapter 2:
Introduction
Principal components analysis (PCA) is used in many branches of science, particularly for
analyzing data with many dimensions. This analysis is useful for enhancing information content,
segregating signal from noise, and reducing the dimensionality of data sets.
PCA is a mathematical technique that transforms a multivariate data set into a new coordinate
system. The axes, or principal components (PCs), of the new coordinate system are specific linear
combinations of the original variables. More importantly, the axes are uncorrelated. The first PC is
in the direction of the greatest variance in the dataset, the second PC is in the direction of the
second greatest variance in the data set, and so forth.
PCs of a multivariate data set are computed from the eigenvectors and eigenvalues of the
covariance matrix. An image is calculated for each PC. Because the PC rotation maximizes the
variance in the first few PC bands, these bands usually contain most of the coherent image
information and can be used to isolate features in the data. Often, higher-order PC images contain
only noise, and therefore, can be ignored.
dialog appears.
2. Navigate to envihyper\Landsat and select Salton_TM.dat . Click Open.
3. In the Available Bands List, select one band and click Load Band.
4. From the
5. Select Salton_TM.dat and click OK. The Forward PC Rotation Parameters dialog appears
(Figure 4).
6. You will generate statistics from the data and save them to a file. In the Output Stats
22
ENVI Resourse
Chapter 2: Principal Components Analysis
8. Leave the default values for all other fields. Click OK. When processing is complete, a PC
23
Chapter 2:
9. In the PC Eigenvalues plot, you can see that the first two to three components of the PCA
contain nearly all of the variance in the scene. In fact, the first PC alone accounts for nearly
90% of the variance. From this eigenvalue plot, you would expect that the last PC band does
not contain much signal.
10. In the Available Bands List, load an RGB composite of the first three PC bands in
salton_pca.dat
11. Images of the first three PC bands are sharp and spatially coherent, while the last three PC
bands primarily contain noise, making features difficult to find. The signal from the original
six-band TM data set could be compressed into just three PC bands that account for 98.8% of
the variance in the original data.
12. Load an RGB composite of the first three bands of Salton_TM.dat (the original image) into
Display #2.
Do you see some features more clearly in one image versus the other? What might account
for this difference?
dialog appears (Figure 6), showing plot and text information from the statistics file.
3. The plot displays the minimum, maximum, mean, and standard deviation for the original image
bands. Click Select Plot to view the standard deviation or eigenvalue plot.
24
ENVI Resourse
Chapter 2: Principal Components Analysis
4. The lower half of the dialog contains text statistics: mean, maximum, minimum, standard
deviation, correlation and covariance matrices, and the eigenvalues and eigenvectors for the
covariance matrix. Note that you can generate images of the covariance, correlation and
eigenvector matrices by selecting File Save Current Covariance to Image from the
statistics report dialog menu bar.
5. Examine the statistics report and plots, and the image of the covariance matrix. Of particular
interest after a PC transformation are the eigenvalues and eigenvectors of the covariance
matrix. The eigenvectors correspond to the PC axes and show the relative contributions of the
different original image bands to the final PC bands. The eigenvalues indicate the amount of
variance described by each PC band.
6. When you are finished examining the PC images and statistics, close all displays and plot
windows.
25
Chapter 2:
Chapter Review
PCA helps segregate image information from noise.
The higher-numbered PC bands contain mostly noise. So, the dimensionality of the PCtransformed data is reduced as you consider only the lower-numbered PC bands.
Because the PC axes are orthogonal, the PC bands do not contain redundant information
(they vary independently). Thus, the information content increases in an RGB composite of
the PC bands.
26
Chapter 3:
Chapter 3:
Data Exploration
This section of the course introduces you to ENVIs spectral analysis tools. While many of these
tools were originally designed for use with hyperspectral data, they often work quite well for
multispectral data. See ENVI Help for full documentation on spectral analysis tools.
Manual data exploration techniques such as extracting and collecting image spectra, or comparing
image spectra to known references, are important steps in image interpretation and information
extraction. ENVI provides a suite of tools specially designed to help work with image and library
spectra.
While learning about spectral analysis tools in the following exercises, you will often see the term
endmembers. These are spectrally unique materials that make up a scene. With each similarity
classifier, you can use endmembers identified from the spectra of pure pixels or from field or
laboratory spectra. ENVI provides several unique tools designed to help define accurate
endmember spectra from images. The following exercises use pure-pixel and field/laboratory
spectra as endmember spectra.
Exercise Data
Two separate data sets are provided in the following exercises. You can use one or the other,
depending on your intended application.
If you are primarily interested in geologic/mineral applictions, use the file cup95_at.int
(located in envihyper\cup95av). This file contains Airborne Visible/Infrared Imaging
Spectrometer (AVIRIS) data from Cuprite, Nevada, USA, collected in 1995 and spectrally
subsetted to 50 channels from 2.0-2.4 m. Also use the JPL Mineral Spectral Library, which has
approximately 300 mineral spectra measured over a wavelength range from 0.4 m to 2.5 m in
826 bands.
If you are primarily interested in vegetation studies, use the file dupont_rad.env (located in
envihyper\aisa\dupont). This file contains data collected by 3Di Technologies, Inc. for the
area of Dupont Experimental Farms agricultural research center near Chestertown, Maryland.
These data were acquired in August 1998 using the Airborne Imaging Spectrometer (AISA)
28
ENVI Resourse
Chapter 3: Examining Spectra and Using Spectral Libraries
instrument, which is a commercial hyperspectral pushbroom sensor that collected data from 0.43
m to 0.90 m in 34 spectral bands. Pixel size is 2.0 m.
In each exercise, options for Cuprite data are provided first, followed by the Dupont data options.
For simplicity, the figures refer to Cuprite data.
Profiles
Z Profile (Spectrum). A
automatically updates to show the spectra of the pixel highlighted by the crosshairs in the
Zoom window. The Spectral Profile window shows the selected pixels value for every
channel of data in this file. If you click outside of the Zoom box and drag it around the
Image window, the Zoom box follows the cursor, and the Spectral Profile plot window
updates continuously as the cursor moves.
5. Examine the Spectral Profile window. The red, green, and blue lines indicate the positions
of the currently displayed bands in the Image window (see Figure 7).
6. Right-click in the Spectral Profile plot window, and select Plot Key. This displays a key on
29
Chapter 3:
7. To zoom to a specific wavelength range, drag the middle mouse button to create a box that
encloses the zoom area. To reset the original zoom range, click the middle mouse button
inside the plot window.
8. Click the left mouse button inside the plot window to display the y data value at a particular
x position.
dialog appears.
3. Enter the following in the Name field:
30
ENVI Resourse
Chapter 3: Examining Spectra and Using Spectral Libraries
7. In the Pixel Locator dialog, enter the following pixel coordinates and click Apply:
Cuprite data: (502, 586). This is an area of red pixels in the Cuprite scene.
Dupont data: (276, 2114). This is an area of red pixels in the Dupont scene.
8. From the Spectral Profile menu bar, select Edit
Data Parameters.
9. In the Data Parameters dialog, enter Image-Red in the Name field (for both Cuprite and
Dupont data).
10. Right-click the Color box, select Items 1:20, and select Red (for both Cuprite and Dupont
data).
11. Click Apply, then Cancel in the Data Parameters dialog.
12. You can move spectral signatures between plot windows using drag-drop functionality with
plot legend names. In the #1 Spectral Profile dialog, use your left mouse button to click on the
plot key name, and then drag it to the Spectral Profile dialog and drop it. You should now see
two signatures in the Spectral Profile dialog.
13. Keep the Spectral Profile dialog open. You will compare these unknown spectra to those of
known materials in the next section. Close the Pixel Locator dialog.
31
Chapter 3:
spectra of well-characterized minerals and a few vegetation spectra, from a range of 0.4 m to 2.5
m. ENVI spectral libraries are stored in ENVIs image format, with each line of the image
corresponding to an individual spectrum and each sample of the image corresponding to an
individual spectral measurement at a specific wavelength (see ENVI Spectral Library Files in
ENVI Help for more information).
Spectral Libraries
Viewer. The Spectral Library Input File dialog appears.
2. Click Open
Spectral Library
Spectral Library.
OK. The Spectral Library Viewer dialog appears with a list of spectra.
32
ENVI Resourse
Chapter 3: Examining Spectra and Using Spectral Libraries
5. To visually compare these laboratory spectra with the unknown spectra from the image data,
you need to scale the laboratory spectra. From the Spectral Library Viewer dialog menu bar,
select Options Edit (x, y) Scale Factors. An Edit Display Scales dialog appears.
If you are using the Cuprite data, enter 400 in the Y Data Multiplier field. Leave the X
Multiplier field as 1.00000. Click OK. You can now view reflectance and absorption
features of the library spectra in the same y range as the spectral plots of the image data.
If you are using the Dupont data, you must specify both X and Y multipliers with the
AISA spectra. Enter 1000 in the X Data Multiplier field, and enter 6580 in the Y Data
Multiplier field. Click OK.
6. In the Spectral Library Viewer dialog, click any spectrum name. A new Spectral Library Plots
window appears.
7. Click the right mouse button in the Spectral Library Plots window and select Plot Key. This
encloses the zoom area. To reset the original zoom range, click the middle mouse button inside
the plot window. Note the differences in absorption and reflectance features of different
spectra. This particular spectral library spans 0.4 m to 2.5 m.
9. From the Spectral Library Plots menu bar, select Options
Clear Plot.
If you are using Cuprite data, plot the JPL library spectra for the minerals Alunite SO4A, Calcite C-3D, Chabazite TS-15A, Illite PS-11A, and Kaolinite Well Ordered
PS-1A.
If you are using Dupont data, scroll to the end of the AISA library spectra and plot
grass.spc, drygrass.spc, maplelea.spc, and cheatgra.spc. Scroll to the middle of the
spectra list, and plot Ferruginous Sandstone.
You will use some of these spectra in an upcoming SAM classification exercise.
33
Chapter 3:
10. At this point, you may have a cluttered desktop with many different ENVI windows open.
Minimize the display group windows, the Spectral Library Viewer dialog, and the Available
Bands List. Then, arrange the three plot windows so they are all visible.
11. From the Spectral Library Plots window:
Cuprite data: drag and drop the Alunite SO-4A label to the ENVI Plot Window
containing the Image-Purple unknown spectrum that was extracted from the AVIRIS
image. If you successfully drag and drop the spectrum, the cursor will look like the plot
in Figure 11.
Dupont data: drag the Ferruginous Sandstone label to the ENVI Plot Window
containing the Image-Green unknown spectrum.
Does the library spectrum look much like the unknown spectrum?
If you are dragging and dropping a spectrum into a plot window and the cursor label
disappears when the cursor is inside this plot window, there may be multiple plot windows
stacked on top of each other. ENVI automatically copies the spectrum into the top plot
window if that one was opened last; otherwise, it drops it into the bottom-most plot
window. As a workaround, either move the plot window that is receiving the spectrum so
that there are no plot windows beneath it, or find an area in the receiving plot window
where the cursor label returns before dropping it.
12. Repeat the previous step as follows:
Cuprite data: drag and drop the Kaolinite label to the Spectral Profile window
containing the Image-Red unknown spectrum.
Dupont data: drag and drop the grass.spc label to the Spectral Profile window
containing the Image-Red unknown spectrum.
34
ENVI Resourse
Chapter 3: Examining Spectra and Using Spectral Libraries
The color of the image pixels in the RGB composite corresponds to the relative magnitude
of the reflectance of the three bands chosen for display. Thus, the other brown pixels in the
Cuprite scene may also have kaolinite features, and the other red pixels in the Dupont scene
may also have vegetation features.
In the next chapter, you will use the unknown reference spectra again. In the following steps,
you will include the two spectra in the same Spectral Profile window and rename them based
on their similarity to the library spectra.
13. In the Spectral Profile window:
Cuprite data: right-click the Kaolinite label, and select Remove "Kaolinite"
Dupont data: right-click the grass.spc label, and select Remove "grass.spc"
14. Perform the following step:
Cuprite data: drag the Image-Purple label from the ENVI Plot Window to the Spectral
Profile window. From the Spectral Profile menu bar, select Edit Data Parameters.
In the Data Parameters dialog, select Image-Purple and change its Name to alunite.
Select Image-Red and change its Name to kaolinite. Your plot should look like Figure
13.
Dupont data: drag the Image-Green label from the ENVI Plot Window to the Spectral
Profile window. From the Spectral Profile menu bar, select Edit Data Parameters.
In the Data Parameters dialog, select Image-Green and change its Name to Fe ss.
Select Image-Red and change its Name to grass.
Click Apply, then Cancel in the Data Parameters dialog.
35
Chapter 3:
Save Plot As
chapter. Close the ENVI Plot Window and Spectral Library Plots window.
Chapter Review
Z Profiles are used to show the spectrum of an individual pixel.
Spectral libraries are an efficient way to catalog image, field, or laboratory spectra for
comparison with spectra from various sources.
Individual spectra can be plotted, saved, color-coded, and stacked for easy identification
and comparison.
36
ENVI Resourse
Chapter 4: Whole Pixel Analysis Techniques
Chapter 4:
37
Chapter 4:
Introduction
A wide variety of methods have been developed to help identify ground cover types in remote
sensing imagery. Multispectral techniques such as supervised classification produce a thematic
map of the input image by measuring the similarity of image spectra to known references. Results
from methods such as this are typically interpreted as whole pixel identification techniques because
they attempt to answer the question, Is a given material present in this image pixel? In addition to
the common classification algorithms, ENVI provides two additional whole pixel identification
techniques that are specially suited to hyperspectral imagery. These two techniques -- Spectral
Angle Mapper and Spectral Feature Fitting -- are based on entirely different principles and can
provide independent analyses of the same scene. Each is explored in detail in this chapter.
Exercise Data
You will use the same data sets as the previous chapter. In each exercise, options for Cuprite data
are provided first, followed by the Dupont data options. For simplicity, the figures refer to the
Cuprite data.
38
ENVI Resourse
Chapter 4: Whole Pixel Analysis Techniques
The color of the material is defined by the direction of the unit vectors. SAM uses only the
direction of the vectors and not the vector lengths. For this reason, SAM is insensitive to differing
amounts of illumination.
The SAM classifier generalizes this geometric interpretation in n-D space, where n is the number
of bands in the image. For each library spectrum selected during the analysis, the n-D spectral
angle (in radians) is determined for every pixel in the input image. A spectral angle image is output
for every library spectrum you select. These spectral angle images are referred to as rule images.
The smaller the angle, the more similar the data spectrum is to the library spectrum. When viewing
the resulting SAM rule images, darker pixels indicate that the pixel is spectrally similar to the
corresponding library spectrum.
If you are accustomed to viewing brighter pixels as the closer match, you can inverse the rule
images by selecting Tools Color Mapping Control RGB Image Planes from the Display
group menu bar. The RGB Channels dialog appears. Use the toggle buttons to switch to Inverse.
From the RGB Channels dialog menu bar, select Options Apply to refresh the screen.
SAM also outputs a classified image that assigns each pixel to a class (i.e., to one of the materials
represented by the selected library spectra). The classification chooses the library spectrum that
makes the smallest spectral angle with each pixel in the input image.
Mapping Methods
Angle Mapper. The Classification Input File dialog appears.
Spectral
39
Chapter 4:
features. Click Band 177 (2.0409 m), hold down the Shift key on your keyboard, and select
Band 217 (2.4394 m). Click Add Range, then OK.
6. (Cuprite data only): Click OK in the Classification Input File dialog. The Endmember
Collection:SAM dialog.
Cuprite data: alunite and kaolinite
Dupont data: Fe ss and grass
40
ENVI Resourse
Chapter 4: Whole Pixel Analysis Techniques
8. Select and plot the following from the Spectral Library Viewer:
10. (Dupont data only): You need to change the color of the library spectra to ensure that they are
different from the reference/image spectra (which are red and green); otherwise, some SAM
output classes will have the same color. From the Spectral Library Plots menu bar, select Edit
Data Parameters. The Data Parameters dialog appears. Change the colors of the library
spectra so they are different from the reference spectra in the Spectral Profile window. Click
Apply, then Cancel.
11. Drag the library spectra labels into the Endmember Collection:SAM dialog. You should see the
names of all five spectra (see Figure 17). ENVI automatically resamples the library spectra to
the wavelengths of the input data.
12. Confirm the correct spectral range and different class colors by clicking Plot in the Endmember
Collection:SAM dialog.
41
Chapter 4:
13. When you are finished examining spectra plots, close all plot windows.
Dragging spectra to the Endmember Collection dialog is not the only way to gather reference
spectra. From the Import menu, you can gather spectra all at once from a spectral library, an
ASCII file, statistics file, or ROI.
14. Click Apply in the Endmember Collection:SAM dialog. The Spectral Angle Mapper
used by the SAM classifier. Any image pixel whose SAM angle is larger than the threshold for
42
ENVI Resourse
Chapter 4: Whole Pixel Analysis Techniques
any of the selected library spectra will remain unclassified. Thus, the smaller the maximum
angle, the more stringent the classification becomes.
Note: You can click Preview to assess the classification. After assessing, you can change
the spectral angle to adjust the matching threshold.
18. Keep the default values for the remaining fields. Click OK to start the classification. When
processing is finished, leave the Endmember Collection dialog open. The SAM classification
image and rule images appear in the Available Bands List.
19. In the Available Bands List, right-click on Sam (cup95_at.int) or Sam (dupont_sm_rad.env),
Link
dialog appears.
21. In this step, you will link the RGB image (which should be already displayed from an earlier
exercise) with the SAM classification image. Click OK in the Link Displays dialog.
22. Click inside either Image window to toggle between the RGB image and SAM classification
image.
The colors of the classification image correspond to the colors of the library spectra shown
in the Endmember Spectra plot you created in Step 12. This plot can be used as a key to the
classification image.
23. From the Display #2 (SAM classification results) menu bar, select Tools
Color Mapping
Class Color Mapping. The Class Color Mapping dialog appears, which helps you identify
classification endmembers and their colors in the class image.
Optional: If some classes appear to cover too much area, you can run the SAM classifier
again using different spectral angles for different materials. Click Apply in the Endmember
Collection dialog. When the Spectral Angle Mapper Parameters dialog appears, select
Multiple Values. The Assign Maximum Angle (radians) dialog appears. Change the
spectral angle of various classes. You can quickly judge the new angles by clicking
Preview.
Rule images are extremely important in any interpretation of classified data. For the SAM
classifier, the rule images answer the question, What is the similarity between the image pixels
spectrum and the reference spectra?
24. In the Available Bands List, right-click the name of the alunite (Cuprite) or Fe ss (Dupont)
Rule image, and select Load Band to Current Display. This should replace the classification
result.
43
Chapter 4:
Dark pixels represent smaller spectral anglesspectra that are more similar to the reference
spectra.
25. The two displays should still be linked together. Click in one to see the other. To see Z Profiles
of dark pixels in the rule image, right click in Display #1 and select Z Profile (Spectrum).
Then move the zoom window for the Rule image display to dark areas and check the spectra in
the Spectral Profile plot. The spectra in the darker areas should have absorption features that
match alunite (Cuprite) or Fe ss (Dupont).
26. If you prefer to view the rule image with the brightest pixels representing the most similar
pixels, select Tools Color Mapping ENVI Color Tables from the Display #3 menu bar.
The ENVI Color Tables dialog appears. Reverse the two sliders so that the Stretch Bottom
slider is all the way to the right and the Stretch Top slider is all the way to the left. This is a
good tool to help you define a threshold value for good matches.
27. Leaving the Stretch Top slider all the way to the left, move the Stretch Bottom slider
increasingly to the left. Fewer and fewer pixels are highlighted until only the best matches are
bright.
28. From the Display #3 menu bar, select Tools
29. Close all display groups, but leave the Endmember Collection dialog open for Exercise #3.
44
ENVI Resourse
Chapter 4: Whole Pixel Analysis Techniques
Continuum Removal
To define a common baseline from which to measure absorption feature depth and position, you
can normalize each spectrum in the input reflectance image by comparing it to a continuum curve.
A continuum curve is a mathematical function formed by fitting a convex hull to the spectrum
(draw a curve that connects the peaks in the spectrum, as in Figure 18). Remove the continuum by
dividing it into the original spectrum. The general shape of the spectrum is removed, leaving the
absorption features.
The continuum-removed image spectra are equal to 1.0, where the continuum and the spectra
match and less than 1.0 where absorption features occur. The continuum-removed data are scaled
so that pixel values are between 0.0 to 1.0. Darker areas have larger absorption features than lighter
areas.
You can use Continuum Removal (to isolate absorption features) with other classifiers that do not
look at the overall shape of the spectrum, such as Spectral Angle Mapper. Linear Spectral
Unmixing and Matched Filtering use the overall shape of the spectrum, and hence, would not be
suitable for a continuum-removed image. If the continuum has been removed from reference
spectra, then the continuum must also be removed from the image-derived spectra. ENVIs
Spectral Feature Fitting (SFF) routine automatically looks for a continuum-removed library. If
none exists, ENVI will remove the continuum on the fly. For the other classifiers, you must
manually remove the continuum.
Figure 18: Reflectance spectrum (solid line) and its continuum curve (dotted line)
45
Chapter 4:
1. In the Available Bands List, select one of the following and click Load Band:
dialog appears.
3. Navigate to one of the following directories, and select a file:
Link
dialog appears.
6. Click the Dynamic Overlay toggle button to select Off. Click OK.
7. From both Display group menu bars, select Tools
Profiles
Z Profile (Spectrum).
it off.
9. From the #1 Spectral Profile menu bar, select Edit
dialog appears.
10. Click the Y-Axis radio button, and enter Range values of 0 to 500.
11. Click Apply, then Cancel.
12. From the #2 Spectral Profile menu bar, select Edit
dialog appears.
13. Click the Y-Axis radio button, and enter Range values of 0 to 1.
46
ENVI Resourse
Chapter 4: Whole Pixel Analysis Techniques
appears.
16. Enter one of the following pixel coordinates:
Figure 19: Spectrum of pixel (500, 580) in the original reflectance image (top) and continuum-removed
spectrum (bottom)
47
Chapter 4:
17. Close all dialogs, Spectral Profile windows, and the display group containing the RGB Image.
Keep open the display group containing the continuum-removed data for the next exercise.
Profiles
You will obtain best results if you narrow the spectral range to include only one important
absorption feature. If the spectral characteristics of the material are unknown, use a Z
Profile to determine the narrowest range. In the following steps, you will narrow the
spectral range to discriminate between alunite and kaolinite (Cuprite scene) or to
discriminate between bare soil and vegetation (Dupont scene) in the continuum-removed
data.
2. From the Display #2 menu bar, select Tools
appears.
48
ENVI Resourse
Chapter 4: Whole Pixel Analysis Techniques
Cuprite data: (300, 427). From field studies, alunite is known to occur in this area.
Notice that the main absorption feature from the continuum removed data is between
2.08 m and 2.25 m.
Dupont data: (594, 696). This is an area of iron-rich, red-colored soils. The soil
spectrum is relatively flat here.
4. Now enter the following pixel coordinates, and click Apply:
Cuprite data: (502, 586). From field studies, kaolinite is known to occur in this area,
which has a prominent absorption feature around 2.2 m. The major absorption feature
from the continuum-removed data is also between 2.08 m and 2.25 m. This spectral
range is good to use in SFF for discriminating between alunite and kaolinite.
Dupont data: (544, 715). This area contains a lot of vegetation, which has a prominent
absorption feature around 680 nm. The major absorption feature from the continuumremoved data is also between 540 nm and 750 nm. This spectral range is good to use in
SFF for discriminating between vegetation and soil.
5. Close the display group containing the continuum-removed data.
6. The Endmember Collection:SAM dialog should still be open from Exercise #1. Select the three
library spectra, one at a time, by clicking their number so the entire row is highlighted. Then,
click Delete. You wont use these in the SFF classification.
Cuprite data: Calcite C-3D, Chabazite TS-15A, Illite PS-11A, and Kaolinite Well
Ordered PS-1A
Dupont data: drygrass.spc, maplelea.spc, and cheatgra.spc
The Endmember Collection:SAM dialog should now just display the image spectra from
Exercise #1:
49
Chapter 4:
Spectral Feature
Fitting.
8. From the Endmember Collection menu bar, select File
Cuprite data: click Band 181 (2.0810 m), hold down the Shift key on your keyboard,
and select Band 198 (2.2506 m). Click Add Range, then OK.
Dupont data: click the band name corresponding to 542.0200 nm, hold down the Shift
key on your keyboard, and select the band name corresponding to 747.1700 nm. Click
Add Range, then OK.
13. Click OK in the Select Input File dialog.
50
ENVI Resourse
Chapter 4: Whole Pixel Analysis Techniques
14. In the Endmember Collection dialog, click Plot. The Endmember Collection Spectra plot
window appears, which provides a check of the spectral range that will be used.
15. In the Endmember Collection dialog, click Apply to begin the SFF classification. The Spectral
option you want for this exercise. With this option, ENVI creates a Scale and RMS image for
each endmember.
If you clicked the toggle button to select Output combined (Scale / RMS) Images, ENVI
would create a Fit image for each endmember. In most cases, a Fit image is very useful.
However, to understand how the SFF classifier works, you will examine Scale and RMS
images separately in this exercise, then calculate a Fit image from them.
17. Enter the following output filename:
51
Chapter 4:
Display:
Cuprite data: Scale (alunite)
Dupont data: Scale (Fe ss)
21. Examine the data values in both Scale images, using the Cursor Location/Value tool. High
pixel values in the Scale images indicate absorption features with depths that are similar to the
features in the library spectra.
22. Close both display groups.
23. In the Available Bands List, select the following image and click Load Band:
Display:
Cuprite data: RMS (alunite)
Dupont data: RMS (Fe ss)
25. Examine the RMS images for each endmember. These images should show some real
differences. Low RMS error values correspond to areas where the pixel spectra have shapes
similar to that of the endmember spectra.
Areas with low RMS error and high Scale values have good spectral fits. Because the fit is
a function of two different images, the 2D Scatter Plot tool will be useful for finding
regions where the spectral fit is good.
26. From the display group menu bar containing the RMS image for kaolinite (Cuprite) or grass
27. Under the Choose Band X column, select the RMS image for kaolinite (Cuprite) or grass
(Dupont).
28. Under the Choose Band Y column, select the Scale image for kaolinite (Cuprite) or grass
(Dupont).
52
ENVI Resourse
Chapter 4: Whole Pixel Analysis Techniques
53
Chapter 4:
Figure 23: Area with a small RMS value and high Scale value
The areas in the image corresponding to the pixels circled in the scatter plot are now
highlighted. These are the areas with good spectral fit to the chosen absorption feature in the
endmember spectrum.
31. Repeat this technique with the alunite (Cuprite) or Fe ss (Dupont) Scale and RMS images. Do
ENVI Resourse
Chapter 4: Whole Pixel Analysis Techniques
55
Chapter 4:
8. Click OK. When processing is complete, the Fit images appear in the Available Bands List
its data values. In a Fit image, bright pixels represent the best fit to the reference endmember
spectrum of kaolinite (or grass).
10. Display the SAM classification image (cupSAM or dupSAM) from Exercise #1 in a new
display group.
11. Link the two display groups, and find areas that the SAM classifier identified as kaolinite (or
grass). Does the corresponding Fit image show good correlation to those areas?
12. Use the Cursor/Location Value tool to explore the data values of the Fit image. You should see
that bright pixels in the Fit image have data values of 30 and higher for kaolinite in the Cuprite
scene (or 10 and higher for grass in the Dupont scene). Therefore, a fit value above 30 (or 10)
indicates that a pixel spectrum matches the kaolinite (or chlorophyll) feature well.
To isolate possible kaolinite (or healthy, green vegetation in the Dupont scene) from this Fit
image, you can generate a classification image that identifies pixels either as kaolinite (or
vegetation) or unclassified. Make your own rule that classifies any pixel with a Fit value
above 30 (or 10) as kaolinite (or healthy, green vegetation). Then, apply this rule to the Fit
image.
13. From the ENVI main menu bar, select Classification
Post Classification
Rule
(Dupont). Click OK. The Rule Image Classifier Tool dialog appears.
15. Uncheck the box next to alunite (or Fe ss), keeping only the kaolinite (or grass) band On.
16. Enter a Thresh value of 30 (or 10 for the Dupont scene) next to kaolinite (or grass).
17. Click Quick Apply.
56
ENVI Resourse
A new display group appears with the thresholded Fit image. Compare this image to the
SAM classification image. What is the difference between the two classifiers, as far as
kaolinite (or grass) is concerned?
18. Now experiment with the Rule Classifier for alunite (Cuprite) or Fe ss (Dupont).
19. When you are finished, close all files.
Chapter Review
At this point, you should feel comfortable:
Extracting a Z Profile from an image.
Creating new plot windows (blank and with plot data)
Copying spectra between plot windows using a drag-and-drop technique
Modifying plots to change colors, data ranges, etc.
Using SAM and SFF classifiers to help identify materials in an image based on
knowledge about absorption features.
57
Chapter 5:
Identifying Data
Endmembers
What You Will Learn In This Chapter .................................................................................
Introduction ........................................................................................................................
Minimum Noise Fraction (MNF) .........................................................................................
Pixel Purity Index (PPI) ......................................................................................................
n-D Visualizer ....................................................................................................................
Spectral Analyst .................................................................................................................
Chapter Review .................................................................................................................
ENVI Resourse
Chapter 5: Identifying Data Endmembers
Introduction
Endmembers, Mixed Pixels, and Sub-Pixel Analysis
Spectral mixing occurs when materials with different spectral properties exist within a single image
pixel. Because surfaces rarely contain large areas composed of a single material, spectral mixing
(or mixed pixels) is a common occurrence. In many cases, you can use a Linear Spectral Unmixing
model to calculate the abundance of individual materials within the mixed pixels, a method known
as sub-pixel analysis. ENVIs Linear Spectral Unmixing technique models the observed
(measured) image spectra as linear combinations of a set of endmember spectra, weighted by their
fractional abundances.
Endmembers are defined as materials that are spectrally unique in the wavelength bands used to
measure the image that is, endmember spectra cannot be reconstructed as a linear combination of
other image spectra. This type of sub-pixel analysis is extremely useful for many applications.
Finding Endmembers
Linear Spectral Unmixing is only valid when all endmembers are identified and used in the model.
Unfortunately, correctly identifying all of the endmembers in a hyperspectral image can be a
difficult task, particularly as the quality of hyperspectral sensors continues to improve and signalto-noise ratios increase. To aid in the identification process, ENVI provides a special suite of tools
which, together comprise a recommended processing path for hyperspectral data analysis. The
tools included in this processing path are the Minimum Noise Fraction (MNF), Pixel Purity Index
(PPI), and n-D Visualizer, each of which are explored in detail in this chapter.
MNF helps to determine the true or inherent dimensionality of the data (reducing the number of
bands) by separating information from noise. PPI identifies pixels that are spectrally the most pure
in the scene (meaning that they are mostly composed of one material). The n-D Visualizer is used
to separate the purest pixels into a set of endmembers.
59
Chapter 5:
Each endmember has a unique spectrum. In a linear mixing model, the mixed pixel spectrum is a
weighted average: Mixture = 0.25 * A + 0.25 * B + 0.5 * C.
Linear Spectral Unmixing returns a separate image for each defined endmember. The resulting
images report the percentage of different endmembers in each pixel.
In the following exercises, you will identify endmembers from pure pixels in the image, and use
them in the unmixing or other routines.
The process to identify endmembers from imagery is:
Separate noise from information and reduce the data set to its true dimensionality by
applying an MNF transform
Determine spectrally pure (extreme) pixels using the PPI routine on the MNF results
Create an ROI from the purest pixels
Use the n-D Visualizer to separate the purest pixels into different endmembers.
60
ENVI Resourse
Chapter 5: Identifying Data Endmembers
The first rotation uses the principal components of the noise covariance matrix to
decorrelate and rescale the noise in the data (a process known as noise whitening), resulting
in transformed data where the noise has unit variance and no band-to-band correlations.
The second rotation uses the principal components derived from the original image data
after they have been noise-whitened by the first rotation and rescaled by the noise standard
deviation. Since further spectral processing will occur, the inherent dimensionality of the
data is determined by examining the final eigenvalues and the associated images. You can
divide the data space into two parts: one part associated with large eigenvalues and coherent
eigenimages, and a complementary part with near-unity eigenvalues and noise-dominated
images. Using only the coherent portions separates the noise from the data, thus improving
spectral processing results.
You can also use the MNF transform to remove noise from data by performing a forward
transform, determining which bands contain the coherent images (by examining the images and
eigenvalues), and running an inverse MNF transform using a spectral subset to include only the
good bands, or smoothing the noisy bands before the inverse.
MNF bands with high variance have high eigenvalues and contain unique, spatially coherent
information. Conversely, MNF bands with low eigenvalues (especially those near unity) may be
discarded because they will not contain significant amounts of information that can be
distinguished from noise. However, rare materials that may be of inerest could be found in MNF
bands with low eigenvalues. Therefore the goal of the data analysis should be considered before
MNF bands are discarded. The inherent dimensionality of the data is determined by examination of
the eigenvalues as will be shown in the upcoming exercise. In subsequent processing only the MNF
bands with eigenvalues greater than one will be used.
Band.
61
Chapter 5:
instrument, statistics from an ROI or other user-defined statistics, or statistics calculated from the
entire data set.
4. From the ENVI main menu bar, select Transform
5. Select a file:
To estimate the noise statistics from the data, ENVI uses a shift difference technique. This
technique assumes that each pixel contains both signal and noise, but that adjacent pixels
within a homogeneous (or spectrally uniform) area contain the same signal. Thus, any
difference in pixel values between adjacent pixels in such an area are assumed to be due to
noise. The algorithm calculates the difference between a given pixel and the pixels adjacent
to it, to obtain noise values. Whenever possible, you should strongly consider choosing a
spatial subset that is spectrally uniform.
13. In the Select Spatial Subset dialog, click Image. The Subset by Image dialog appears.
14. Enter 20 in the Samples and Lines fields to make a 20 x 20 pixel box.
15. Hold down your middle mouse button, and move the red box to the following location:
62
ENVI Resourse
Chapter 5: Identifying Data Endmembers
Cuprite data: inside the uniformly white, oval-shaped feature in the lower-right edge of
the image. This is Stonewall Playa, a dry lake bed.
Dupont data: inside the uniformly white field near the bottom of the image.
and displays the MNF Eigenvalues plot window. The output only contains the number of bands
you selected for output. For example, if your input data contains 224 bands, but you selected 50
bands for output, your output only contains the first 50 calculated MNF bands from your input
file.
63
Chapter 5:
Notice how sharply defined the landscape is in MNF band 1 and how noisy it is in largernumbered MNF bands.
22. From the Display #1 menu bar, select Tools
dialog appears.
23. Accept the default selection (MNF Bands 1 through 41), and click OK to run the animation.
24. Change the Speed value to 3, to more effectively view the animation.
From the animation and from interpreting the MNF Eigenvalues plot, you should determine
that the first 25 MNF bands (in the Cuprite data) should be used to identify endmembers in
subsequent processing. For Dupont data, the first 28 MNF bands should be used.
25. Close the animation, the MNF Eigenvalues plot, and the display groups.
64
ENVI Resourse
Chapter 5: Identifying Data Endmembers
65
Chapter 5:
[FAST] Existing
dialog appears.
2. Open a pre-calculated PPI image:
window appears.
6. Click the middle mouse button several times in the Input Histogram window to slowly zoom in
66
ENVI Resourse
Chapter 5: Identifying Data Endmembers
7. Click the left mouse button in the left histogram to view the distribution of PPI values. You can
see that most of the pixels in the image were never identified as pure (they have PPI values of
0). As the PPI value increases, the number of pixels decreases. This indicates that most pixels
are probably not pure but contain more than one spectrally unique material.
appears.
2. From the ROI Tool dialog menu bar, select Options
5. Leave the default values for other fields, and click OK. An ENVI Question dialog appears,
showing you the number of pixels that fit the criterion you selected. The dialog asks if you
would like to make an ROI from the pixels found. Click Yes.
67
Chapter 5:
All pixels that were flagged 15 times (100 times for Dupont data) or more will be selected,
and an ENVI ROI will be created from them and added to the ROI Tool dialog. These are
the spectrally purest pixels in the image. The spectra that correspond to these ROI pixels
will be used as input into the n-D Visualizer where they will be separated into classes
corresponding to the spectral endmembers of the image. You can then use these
endmembers in image classification and mapping.
6. Keep the display group open for the next exercise.
n-D Visualizer
Exercise #4: n-D Visualizer
The n-D Visualizer is an interactive tool for selecting endmembers in n-D space where n is the
number of bands of interest. Like the 2D scatter plot, it can help identify pure pixels that
correspond to different image endmembers. Unlike the 2D scatter plot, however, the n-D Visualizer
can plot the image data in all available dimensions.
n-Dimensional Visualizer
with New Data. The n-D Visualizer Input File dialog appears.
Visualize
OK yet!
3. Click Spectral Subset. The File Spectral Subset dialog appears.
4. Select the first 25 bands of the MNF image (if you are using the Dupont data, select the first 28
bands). These encompass most of the variance in the original data set. Limiting the number of
bands improves the performance of the n-D Visualizer. Click OK.
5. Click OK in the n-D Visualizer Input File dialog. The n-D Visualizer and n-D Controls dialogs
appear.
6. In the n-D Controls dialog, select MNF bands 1 and 2 by clicking in the black boxes marked 1
and 2.
68
ENVI Resourse
Chapter 5: Identifying Data Endmembers
The resulting scatter plot shows pixels plotted against MNF bands 1 and 2. The center
cloud of pixels that you typically see (if a scatter plot were displayed directly from the
MNF data) are eliminated because you are using only those pixels in the ROI that were
given high PPI values (the pixels that corresponded to the outer-most portions of the data
cloud).
7. From the Display group menu bar, select Tools
69
Chapter 5:
The shape of the data clouds for both scatter plots is the same; however, the n-D Visualizer
plot window shows only the extreme pixels, or the corners. Can you see why pixels were
excluded from the n-D Visualizer, based on pixel purity? Why is this important?
9. Close the Scatter Plot window and the display group.
the shape of the data clouds in the n-D Visualizer. Examine some of the higher-order MNF
bands.
11. To rotate the pure pixels about these axes, click Start in the n-D Controls dialog. The n-D
Visualizer rotates the pixels through different projections in MNF space. You can continue to
select any number of bands.
12. Once you click Stop, you can rotate backward or forward one step at a time by clicking the
selecting Options 3-D: Drive Axes from the n-D Controls dialog menu bar. Then, manually
rotate the cloud using the left mouse button in the n-D Visualizer window.
The rotations seem different when you include more than three bands. With more than three
dimensions, the data points fold in upon themselves in the projection. This should
convince you that the data are truly high-dimensional and why 2D scatter plots are
inadequate for analyzing hyperspectral data.
Selecting Endmembers
14. Watch the n-D Visualizer for pixels that form a corner in the data cloud and remain together in
all projections. When you find such a corner, stop the animation by clicking Stop in the n-D
Control dialog.
If you selected only three bands, select Options from the n-D Controls dialog menu bar,
and make sure that 3-D: Drive Axes is deselected.
15. Click and drag your cursor inside the n-D Visualizer window to draw a red ROI polygon
around pixels and to create a new class. Right-click to close the polygon. This is how you
select, or paint, endmembers.
70
ENVI Resourse
Chapter 5: Identifying Data Endmembers
Figure 32: Drawing a polygon around a corner of pixels in the data cloud
16. Click Start again, and watch the same corner where you defined your ROI. You may see new
endmembers in this region as the data cloud rotates in different projections. Draw more
polygon ROIs around the corner as necessary to include more endmembers. You are currently
only defining one class.
17. If you no longer want to include certain endmembers that you previously identified, you can
erase them by selecting Class Items 1:20 White from the n-D Controls dialog menu bar.
Then, draw a polygon around those endmembers.
18. From the n-D Controls dialog menu bar, select Class
20. Select the reflectance file: cup95_at.int (or dupont_sm_rad.env). Click OK. A blank
corresponding spectrum in the n-D Profile. When you middle-click inside a group of
endmembers belonging to a certain class, the spectral profile shows the corresponding class
color.
22. Right-click once inside the n-D Profile. Then, right-click in the n-D Visualizer to collect
spectra in the n-D Profile. Each subsequent spectrum is retained in the n-D Profile without
71
Chapter 5:
erasing the previous spectrum. Click the middle mouse button in the n-D Visualizer to clear the
plot and to return to single-spectrum mode.
Collapsing Classes
Once you have identified a few endmembers, you may find it difficult to locate additional
endmembers, even after rotating the data clouds and viewing different 2D projections of the n-D
data.
To help solve this problem, you can collapse classes in ENVI by grouping the endmembers you
have already found into one group representing the background. Mixed features that were
previously hidden become visible, and you can select them by drawing ROIs in the n-D Visualizer.
23. After you have chosen a few obvious corners in the data cloud and verified that the pixels in the
classes remain together as the data cloud continues to rotate, select Options Collapse
Classes by Means from the n-D Controls dialog menu bar to hide the span of these classes.
The dimensionality of the data cloud defined by those classes is collapsed so that the means of
the selected classes occur at the same point in the data cloud.
A Collapse Class EigenValues plot also appears, indicating the remaining dimensionality
(which is one less than the number of remaining endmembers) of the transformed data, so
that you can see how many more classes may be defined.
You can uncollapse classes by selecting Options
dialog menu bar.
24. Define as many unique classes as you can, finding corners of the data cloud and recollapsing.
Some classes may contain only a few pixels. See Step 17 for instructions on removing a class.
25. You can view the mean spectrum in the original image of a class by selecting Options
Mean Class from the n-D Controls dialog menu bar. Select Mean All to view mean spectra of
all of the classes. Close the plot when you are finished looking at the class spectra.
Class Controls from the n-D Controls dialog menu bar. The n-D Class
Controls dialog appears.
This dialog lists the number of points in each defined class and the class color. You can
change the symbol, turn individual classes on and off, and select classes to collapse. You
can also plot the minimum, maximum, mean, and standard deviation spectra for a class, plot
the mean for a single class, and plot all the spectra within a class. Also, you can clear a
class and export a class to an ROI.
27. Experiment with the different functions available in the n-D Class Controls dialog, and close
72
ENVI Resourse
Chapter 5: Identifying Data Endmembers
Export All from the n-D Controls dialog menu bar. The ROIs are loaded into the ROI Tool
dialog.
29. In the ROI Tool dialog, delete the threshold region defined from the PPI by selecting Thresh
(cuppi.dat) (or Thres (duppi.dat)), then clicking Delete. This region was defined from the PPI
image to load to the n-D Visualizer. It is no longer needed because it has been divided into
smaller, unique endmember regions.
30. From the ENVI main menu bar, select File
dialog appears.
31. Select the original reflectance image, and click Open:
Band.
33. From the Display group menu bar, select Overlay
clicking Stats. The ROI Statistics Results dialog appears with information about the
endmember regions in plot and text format. Can you tell from the shape of the endmember
spectra which materials they correspond to?
38. Move the endmember spectra to their own plot window by right-clicking in the ROI Statistics
39. Leave open the display group, its associated ROI Tool dialog, and the ENVI Plot Window
containing the ROI means. Close all other display groups and plot windows.
73
Chapter 5:
Spectral Analyst
Although you have identified endmembers, you have not yet identified the materials that comprise
the endmembers. Identifying materials can often be a very difficult process, complicated by the fact
that an image-derived endmember may be a mixture of more than one material. ENVI provides a
tool called the Spectral Analyst to aid in the identification process.
The Spectral Analyst compares input spectra (such as the endmember spectra you identified in the
last exercise) to a spectral library of known materials. Several different comparison methods are
available for use in the Spectral Analyst, including Spectral Feature Fitting, Spectral Angle
Mapper, and Binary Encoding. You can also write your own algorithm or use a weighted
combination of the multiple algorithms.
The Spectral Analyst returns a score for each spectrum in the library. The highest scores are
returned for the library spectra that best match the input spectrum. If the Spectral Library does not
contain a spectrum for the material corresponding to the input spectrum, then the Spectral Analyst
returns low scores for every spectrum in the library.
The Spectral Analyst does not compare input spectra to combinations of spectra in the chosen
library. It only uses the individual library entries. Spectral libraries are not all-encompassing, and
many materials do not have distinctive absorption features in this particular part of the
electromagnetic spectrum. So, it is important to use common sense with your results and compare
the output of the Spectral Analyst to your knowledge of the image, the study area, and the contents
of the Spectral Library.
Click OK.
6. (Dupont data only): From the Spectral Analyst dialog menu bar, select Options
Edit (x,y)
Scale Factors. In the X Data Multiplier field, enter 0.001. Click OK.
74
ENVI Resourse
Chapter 5: Identifying Data Endmembers
7. Click Apply in the Spectral Analyst dialog. You must have the ENVI Plot Window containing
the ROI means (from the last exercise) open. The Spectral Analyst Input Spectrum dialog
appears.
8. Select the mean spectrum from your first ROI identified in the last exercise, and click OK. The
Known vs. Unkown plot appears with the library and unknown spectra plotted with the
continuum removed. The absorption features of interest should match fairly well.
Do the Spectral Analyst results provide enough information about the material this
endmember spectrum represents? If so, write down the material corresponding to this
endmember.
10. Click Apply again in the Spectral Analyst dialog, and repeat the last two steps with different
ROIs. If appropriate, write down the material corresponding to this endmember spectrum.
Can you think of reasons that the Spectral Analyst would give high scores for materials that
are not true matches to the endmember spectra? (Hint: Remember that we are working with
a spectral subset of a full scene.)
11. In the ROI Tool dialog, select an ROI for which the Spectral Analyst seemed to give a good
result. Click Edit, and change the name of that ROI to reflect the material that it probably
represents. Repeat for any ROIs for which the Spectral Analyst seemed to give good results.
12. When you are finished, save the endmember spectra by selecting File
Save Plot As
ASCII from the ROI Means plot window menu bar. The Output Plots to ASCII File dialog
appears.
13. Select the desired spectra, and enter an output filename of cup_em.txt (or dup_em.txt).
Potential Endmembers
75
Chapter Review
At this point, you should feel confident about interpreting:
Scatter plots in the context of a linear unmixing model
MNF-Space versus Reflectance-Space
The PPI histogram
The selection of potential endmembers using the n-D Visualizer
76
Chapter 6:
Sub-Pixel Analysis
Techniques
What You Will Learn In This Chapter .................................................................................
Introduction ........................................................................................................................
Linear Spectral Unmixing ...................................................................................................
Partial Unmixing using Matched Filtering ...........................................................................
Spectral Hourglass Wizard ................................................................................................
Chapter Review .................................................................................................................
Chapter 6:
Introduction
Once all of the image endmembers have been identified, you are ready to apply the unmixing
model to estimate sub-pixel abundances of each endmember in the scene. ENVI provides several
different ways to use the unmixing model. You can perform a complete linear unmixing with or
without a unit sum constraint, or you can compute a partial unmixing solution (known as Matched
Filtering), which results in abundance estimates for only selected endmembers without the need for
identifying all endmembers. This chapter provides an opportunity to explore both applications of
the unmixing model.
78
ENVI Resourse
Chapter 6: Sub-Pixel Analysis Techniques
image endmembers are unknown (or you wish to map only selected endmembers) you should use
other mapping methods such as Spectral Feature Fitting or Matched Filtering.
The result of the Linear Spectral Unmixing routine is a series of abundance images (one for each
endmember) and a RMS error image. Higher abundance (and higher errors) are represented by
brighter pixels.
Mapping Methods
Spectral Unmixing. The Unmixing Input File dialog appears.
Linear
OK.
5. Once the endmembers are loaded into the Endmember Collection dialog, click Plot to double-
check what endmember spectra will be used. Then click Apply. The Unmixing Parameters
dialog appears.
6. Enter an output filename of cupunm.dat (or dupunm.dat), and click OK. The resulting
Use spatial and spectral clues to evaluate the results of the unmixing. Explain the colors of
fractional endmembers in terms of mixing. Notice the occurrence of non-primary colors
(not RGB). Are all of the fractions feasible? Note areas where unreasonable results were
obtained (fractions greater than one or less than zero).
11. Display the RMS Error image. If you did a good job picking endmembers for the image, the
RMS Error image will not show distinct spatial patterns corresponding to real features that exist
on the ground.
79
Chapter 6:
12. When you are finished examining the unmixing results, close the Endmember Collection
dialog.
13. Using the information you wrote down during the Spectral Analyst exercise, determine which
of your endmember spectra you think corresponds to alunite (Cuprite data). Or, if you are using
Dupont data, determine which of your endmember spectra you think corresponds to healthy
vegetation, which the spectral library classified as maple leaves.
Then display the Rule image corresponding to your alunite (or maple leaves) ROI as a gray
scale image. You will compare this result with later analyses.
14. When you are finished, close all display groups and the Endmember Collection Spectra dialog.
Keep the Endmember Collection dialog open for the next exercise.
window appears.
2. Load the endmember spectra you saved in the previous chapter by selecting File
Input Data
ASCII from the ENVI Plot window menu bar. The Enter ASCII Plot Filename dialog
appears.
3. Navigate to your output directory and select cup_em.txt (or dup_em.txt). Click Open.
The endmember spectra are loaded into the ENVI Plot window.
80
ENVI Resourse
Chapter 6: Sub-Pixel Analysis Techniques
Matched Filtering.
5. Right-click in the ENVI Plot window, and select Plot Key to show the names of the
endmember spectra. Select several endmember spectra that you think were correctly identified,
and drag their labels into the white area of the Endmember Collection dialog.
6. Once the desired spectra appear in the Endmember Collection dialog, click Apply. The
filename of cupmf.dat (or dupmf.dat) and click OK. Leave the Endmember Collection dialog
open.
The Matched Filtering classifier produces an abundance image called MF Score, for each
selected endmember. The results appear in the Available Bands List.
8. Display an MF Score image in a new display group.
9. Using dynamic linking, compare the MF Score images to the Rule images from the previous
Linear Spectral Unmixing exercise. Which routine seems to show the best results? Are there
problems with false positives in the MF score images?
10. When you are finished, close all display groups.
dialog appears.
81
Chapter 6:
2. Navigate to your output directory, and select cupmnf.dat (or dupmnf.dat), and click
Open.
3. In the Available Bands List, select any MNF band, and click Load Band.
4. From the Endmember Collection dialog menu bar, select Algorithm
Mixture Tuned
MF.
5. The MTMF routine requires MNF-transformed data. From the Endmember Collection
6. Navigate to your output directory and select cupmnf.dat (or dupmnf.dat). Click OK.
The endmembers must be in the same MNF space as the input data set. Because the
endmembers are derived from image ROIs, the spectra can be brought into MNF space by
opening the ROI Tool dialog from an MNF image instead of the original data image, then
plotting the mean spectra for the ROIs.
ENVI also provides an alternative routine to convert the spectra into MNF Space, which
you can run by selecting Transforms MNF Rotation Apply Forward MNF to
Spectra. The statistics file output from the MNF routine should be used to transform the
spectra.
7. First, delete the reflectance spectral signatures in the Endmember Collection dialog by
dialog appears.
9. In the ROI Tool dialog, click Select All, then click Stats. An ROI Statistics Results dialog
appears with a plot of mean MNF spectra. Right-click in the plot window, and select Plot
Key to view their labels.
10. Drag selected MNF spectra into the Endmember Collection window. Select several
endmember spectra that you think were correctly identified using the Spectral Analyst.
Click Apply in the Endmember Collection dialog. The Mixture Tuned Matched Filter
Parameters dialog appears.
11. In the Output Stats Filename field, enter cupmtmf.sta (or dupmtmf.sta).
12. In the Output Filename field, enter cup_mtmf.dat (or dup_mtmf.dat). Click OK.
When processing is complete, MF Score and Infeasibility images for each endmember
appear in the Available Bands List.
13. Inspect several MF Score images. They should appear the same as those obtained from the
82
ENVI Resourse
Chapter 6: Sub-Pixel Analysis Techniques
Scatter plots of MF Score versus Infeasibility are used to determine pixels that contain large
amounts of the endmember of interest, those that contain little amounts, and those that give
false high-match scores.
14. From the Display group menu bar of an MF Score image, select Tools
2D Scatter Plots.
corresponding Infeasibility image for that same endmember. Click OK. A Scatter Plot
window appears.
Which area of the scatter plot shows pixels with a high abundance of a given endmember?
Notice the highly selective nature and few false positives resulting from MTMF.
There are several ways to present results. You can color pixels in the MF Score versus
Infeasibility plot, and export them to an ROI. You can do this for all endmembers of
interest, with each endmember having a different color or class. Alternatively, if levels of
relative abundance are important, you can color pixels with a high score red, then color
pixels with a moderate score a less hot color, then color pixels with a lower score a
relatively cool color. Then, export the various levels of abundance to ROIs by right-clicking
in the plot window and selecting Export All.
16. In the scatter plot, draw an ROI that encompasses good matches for the endmember. These
83
Chapter 6:
by selecting Options
appears.
19. Select cup95_at.int (or dupont_sm_rad.env), and click OK. The Scatter Plot
Export Class from the Scatter Plot Profile menu bar to create an ROI of
the endmember.
22. From the Scatter Plot menu bar, select File
Export the class to a new ROI. Repeat the process for several endmembers.
24. Overlay the ROIs on a single-band image of cup95_at.int (or
84
ENVI Resourse
Chapter 6: Sub-Pixel Analysis Techniques
Spatial/Spectral
Browsing
MNF
Spectral Data
Reduction
PPI
Spatial Data
Reduction
N-D Visualizer
Endmember
Extraction
Spectral
Analyst
Endmember
Identification
Map Distribution
+/- Abundance
The hourglass processing flow uses the spectrally over-determined nature of hyperspectral data to
find the most spectrally pure, or spectrally unique, pixels (endmembers) within the data set and to
map their locations and sub-pixel abundances. This processing flow begins with reflectance or
radiance input data. You can spectrally and spatially subset the data, visualize the data in n-D space
and cluster the purest pixels into endmembers, and optionally supply your own endmembers. You
can map the distribution and abundance of the endmembers, use ENVIs Spectral Analyst to
identify the endmembers, and review the mapping results.
Each step in the Spectral Hourglass Wizard executes a standalone ENVI function such as MNF,
PPI, and SAM classifiction. You have already performed each step in detail throughout the course,
but the Spectral Hourglass Wizard combines them all into a single process to help streamline the
process of selecting endmembers. The name of the corresponding ENVI function appears at the top
of the panel during each step. Results from specific steps are output to the Available Bands List.
Various plots appear throughout the processing flow to help assess results as you proceed.
85
Chapter 6:
Introduction
Input/Output
File Selection
Minimum Noise
Transf orm (MNF)
Data Dimensionality
Determination
NO
Derive Endmembers
f rom Data?
YES
Pixel Purity Index (PPI)
Input User-Supplied
Endmembers?
YES
Endmember Collection
NO
Mapping with SAM
Summary Report
Figure 35: Each step within the Spectral Mapping Wizard flow chart represents a panel in the Wizard
Wizard Basics
To successfully use the Spectral Mapping Wizard, you should become familiar with the basic
functions and concepts shown in Figure 36:
86
ENVI Resourse
Chapter 6: Sub-Pixel Analysis Techniques
Function
Title
Figure 36: The Spectral Mapping Wizard screen with the select input/output files panels displayed
Text in the top panel of the wizard provides background information and guidance for each
step. It is very important that you read this information before proceeding. Use the vertical
and horizontal scroll bars to view all of the text.
Enter and select the parameters for that step using the buttons and fields near the bottom of
the panel.
87
Chapter 6:
Use the Prev and Next buttons to step through the wizard.
Each processing step will execute when you click Next.
If the Next button is not available for selection, be sure that you set all of the necessary
parameters.
Click Prev to go back to a previous step to modify parameters and to run that step again.
The results of the processing steps appear in the Available Bands List.
You can examine the results of a function at any time.
Various plots display during processing, and you can save them by selecting File
Plot As in the plot window.
Save
To display only the title of each panel and not the text, right-click on the text and select
Display Title Only. To redisplay the text, right-click and select Display Full Text.
OK.
4. In the Select Input/Output Files panel, the Output Root Name defaults to the root name of
the selected input file. For example, if the input file is cup95_at.int, then the output
file for each process is cup95_at appended with a function-dependent suffix (for
example, cup95_at.mnf). Click Select Output Root Name and enter or choose a
different root name if desired.
5. Click Next. The Forward MNF Transform panel appears.
88
ENVI Resourse
Chapter 6: Sub-Pixel Analysis Techniques
you should use the default (based on the number of input bands) to preserve the full data
dimensionality. The Spectral Hourglass Wizard helps determine if all of the MNF bands are
required later, depending on the inherent data dimensionality revealed in the MNF process.
You can calculate noise statistics from the data based on a shift difference method that uses
local pixel variance to estimate noise. A virtual noise image is created by subtracting lineshifted and sample-shifted images from the original data and averaging and scaling these
two results. In Steps 7-11, you will select a small spatial subset of the data over a uniform
area to improve noise estimates in the noise statistics calculation.
7. Click Shift Difference Spatial Subset. A Select Spatial Subset dialog appears.
8. Click Image. A Subset by Image dialog appears.
9. Change the Samples and Lines values to 20.
10. Put your cusor inside the red zoom box and drag it to the solid white area in the bottom-
right of the image, so that the zoom box fully contains the uniform, white pixels. Click OK.
11. Click OK in the Select Spatial Subset dialog.
12. Click Next in the Forward MNF Transform panel of the wizard. The View MNF Results
panel appears, and progress windows display the processing status. After the processing is
complete, the View MNF Results panel and an MNF Eigenvalues plot window appear.
The MNF Eigenvalues plot shows the eigenvalue (y-axis) for each MNF-transformed band
(an eigenvalue number, shown in the x-axis). Larger eigenvalues indicate higher data
variance in the transformed band and may help indicate data dimensionality. When the
eigenvalues approach 1, only noise is left in the transformed band, as the noise floor has
been scaled to unity in each output MNF band.
13. Click Load MNF Result to ENVI Display to display an RGB image of the first three MNF
bands. Use this image to quickly locate dominant spectral materials, which are displayed in
bright, pure colors. Or, select Load Animation of MNF Bands to load the MNF result as a
gray scale animation.
14. After displaying and analyzing the MNF result, click Next in the wizard. The Determine
Data Dimensionality
Data dimensionality indicates the number of intrinsic endmembers that the data set contains, since
each linearly independent component adds another dimension to a spectral dataset through mixing.
You can determine the data dimensionality in the MNF Eigenvalues plot by finding where the
slope of the eigenvalue curve breaks and the values fall to 1.
Or, you can let the wizard estimate data dimensionality using a spatial coherence measure:
15. Click Calculate Dimensionality. A processing status dialog appears, followed by a Spatial
Coherence Threshold plot, which shows the wizard's best guess for the number of non-noise
MNF bands.
89
Chapter 6:
Threshold plot, then click Next in the wizard. The Derive or Select Endmembers panel
appears.
18. Otherwise, manually change the threshold level by clicking and dragging the horizontal red
threshold line on the Spatial Coherence Threshold plot to a new level. Click OK. You can
also click Cancel in the Spatial Coherence Threshold plot and enter a new Data
Dimensionality value in the Determine Data Dimensionality panel. Click Calculate
Dimensionality and repeat the steps above.
toggle button to Yes and click Next. The Pixel Purity Index panel appears.
The PPI is computed by repeatedly projecting n-D scatter plots on a random unit vector.
The wizard records the extreme pixels in each projection and notes the total number of
times each pixel is marked as extreme. The PPI Threshold Value is used to define how
many pixels are marked as extreme at the ends of the projected vector. The threshold value
should be approximately 2-3 times the noise level in the data (which is 1 when using MNFtransformed data). Larger thresholds cause the PPI to find more extreme pixels, but they are
less likely to be pure endmembers.
The PPI is highly CPU-intensive and can take a long time to run, with the size of the data
cube and the number of iterations being the main controlling factors. Reducing the Number
of PPI Iterations can also save time; however, a minimum of 5,000 iterations is usually
required to produce useful results. The PPI Maximum Memory use value must
correspond to a value smaller than your available system memory (RAM).
20. Click Next. The Calculating Pixel Purity Index panel appears, and progress windows
increase the Number of PPI Iterations if the plot has not flattened. While it is difficult or
impossible to precisely say how many iterations are enough, you can never run too many
iterations. Having many iterations (20,000 for example) gives a PPI result with an increased
dynamic range and thus the ability to find subtle, poorly expressed endmembers that might
be undetected if fewer iterations were completed.
22. When the iterations are complete, a PPI image is created in which the value of each pixel
corresponds to the number of times that pixel was recorded as extreme. Bright pixels in the
PPI image generally are image endmembers. This image is listed in the Available Bands
90
ENVI Resourse
Chapter 6: Sub-Pixel Analysis Techniques
List. The pixels with the highest values are input into the n-D Visualizer for the clustering
process that develops individual endmember spectra.
The PPI image is an important intermediate product in the spectral hourglass process. It
identifies and locates the purest pixels in the scene (often less than 1% of the total number
of pixels). By understanding this small collection of the purest pixels, you can have a full
understanding of all the pixels in the image via spectral mixture models. Furthermore, the
PPI image maps type localities and sites that should be visited for ground truth collection
and spectral measurements in the field.
23. In the Examine PPI Results panel, you can leave the default value of 10,000 for Maximum
PPI Pixels to use in the n-D Visualizer, or you can experiment with modifying the value.
Smaller numbers animate faster and show only the purest pixels; larger numbers give a
better overall picture of the scatter plot, but they animate more slowly and may hinder the
selection of vertices. The wizard automatically applies a threshold to the PPI image to
obtain the best PPI pixels without exceeding the selected maximum. You can return to this
page and change the PPI maximum threshold so you can view both the overall scatter plot
and only the purest pixels.
24. Click Next in the Examine PPI Results panel to proceed to the n-Dimensional Visualizer
panel of the wizard. The n-D Visualizer and n-D Controls dialogs appear.
26. Refer to the wizard text for information and instructions for retrieving endmembers from
Analyst in the n-Dimensional Visualizer panel of the wizard. See the "Spectral Analyst"
section of this training guide for details on using the Spectral Analyst.
30. Click Next. The User Supplied Endmembers panels appear.
31. To use endmembers from the image, click the User supplied Endmembers toggle button
to select No, and click Next. The Mapping Methods panel appears.
Performing Classification
32. In the Mapping Methods panel, choose SAM.
The SAM method produces a classified image based on the value you specify for SAM
Maximum Angle. Decreasing this threshold usually results in fewer matching pixels (better
matches to the reference spectrum). Increasing this threshold may result in a more spatially
coherent image; however, the overall pixel matches will not be as good as for the lower
threshold.
33. Click Next. Progress windows display the processing status. The Calculate Mapping
Methods panel briefly appears. Then, the Investigate SAM Results panel appears.
The output from SAM is a classified image and a set of rule images (one per endmember).
The pixel values of the rule images represent the spectral angle in radians from the
Spectral Analysis With ENVI
91
Chapter 6:
reference spectrum for each class. Lower spectral angles represent better matches to the
endmember spectra. Areas that satisfied the selected radian threshold criteria are carried
over as classified areas into the classified image.
34. Click Load SAM Class Result to examine the SAM classification image. If the image does
not show spatially coherent classes, then the classification does not match the target spectra
or what you know about the target. In this case, you should review the SAM rule images.
35. Highlight the name of an image in the SAM Rule Images list and click Load SAM Rule
Image, or double-click the image name in the SAM Rule Images list. Follow the wizard
instructions for examining SAM rule image results.
36. In the Investigate SAM Results panel, click Next. A Spectral Hourglass Wizard Summary
Report appears.
37. This is the final panel of the Spectral Hourglass Wizard. The summary lists the processing
steps you performed and a list of the output files created. Save the summary by selecting
File Save Text to ASCII from the Spectral Hourglass Wizard Summary Report menu
bar.
38. Compare the results with those obtained from the first SAM exercise. Then close all open
Chapter Review
A recommended processing path for sub-pixel analysis of hyperspectral data is:
MNF Transform to decorrelate and determine the dimensionality of the data
PPI to identify the purest pixels
n-D Visualizer to segregate spectral endmembers
Spectral Analyst to help identify and name unknown spectra
Full or partial unmixing algorithms to map endmember abundances.
You should understand the following concepts:
Linear Spectral Unmixing requires all endmembers to be identified correctly
Unrealistic abundances or pixel sums that are much greater than unity are indications that
the chosen endmembers are not completely correct
Matched Filtering is a partial linear unmixing algorithm that does not require knowledge
about all endmembers
If MNF-transformed data are available, then you should use the MTMF classifier because
its infeasibility measure helps to more accurately interpret the MF Score
92
Chapter 6:
Georeferencing and
Mosaicking
OPTIONAL
ENVI Resourse
Chapter 6: Georeferencing and Mosaicking
Introduction
Some satellite and airborne data sets come with associated Input Geometry (IGM) files that contain
map locations for every pixel. Using IGM files to georeference imagery is a very accurate method
of georeferencing data because it places every pixel at its exact map location, while avoiding the
use of ground control points (GCPs) to warp imagery. The map information is stored in two bands:
one for x coordinates (longitude or northing) and one for y coordinates (latitude or easting).
The IGM file is used to create a geographic lookup table (GLT) file that contains information about
which original pixel occupies which output pixel in the final product. The GLT file can be used to
georectify any band or derived product through a lookup table. The GLT file contains integer pixel
locations, which are sign-coded to indicate if a certain output pixel is real or a nearest-neighbor
infill pixel. The GLT file is a georeferenced product with a fixed pixel size projected into a rotated
UTM system. It uses one-based coordinates, where the upper-left pixel is located at (1,1).
You can georeference your data directly from an IGM file or from a GLT file. When you
georeference from an IGM file, the GLT file is built on the fly.
Because the sizes of georeferenced images are often inflated by adding pixels around the images
(and these pixels must be masked in processing), a recommended method is to perform data
processing first, then georeference the derived products.
Exercise Data
You will open two 3-band Probe-1 images from Wyoming and use their associated IGM files to
georeference the images.
appears.
2. Navigate to envihyper\Probe, and use the Ctrl key to select Line3.img and Line
5.img, and their associated IGM files, Line3igm.bil and Line5igm.bil. Click Open.
3. In the Available Bands List, right-click Line3.img and select Load True Color.
4. Right-click on IGM input X map under Line3igm.bil, and select Load Band to New
Display.
95
5. Right-click on IGM input Y map under Line3igm.bil, and select Load Band to New
Display.
6. Use the Cursor Location/Value tool to explore the data values in the IGM images. The data
values in the X Map image are UTM meters Easting, and the data values for the Y Map image
are UTM meters Northing.
7. Close the two IGM display groups when you are finished.
8. From the ENVI main menu bar, toolbox write Georeference from Input Geometry
selec
1983.
14. In both Zone fields, enter 13. Click OK. The Build Geometry Lookup File Parameters dialog
appears.
15. Keep the default value for Output Pixel Size.
16. You will be creating a mosaic later, so change the Output Rotation angle to 0. The default
output rotation angle is used to minimize the output file size. If you set the rotation angle to 0,
then north will be up in the output image. If you set it to another angle, then north will be at an
angle instead of up. The rotation angle is stored in the ENVI header and is used when
overlaying grids, so they will appear at an angle.
17. In the Enter Output GLT Filename field, enter Line3glt.
18. In the Output Georef Filename field, enter Line3geo.
19. Let the Georeference Background Value default to 0.
20. Click OK. ENVI builds the GLT file and georeferences the input data file. Both results appear
96
ENVI Resourse
Chapter 6: Georeferencing and Mosaicking
21. Display GLT Sample Lookup and display Line3glt, and select Load Band to New
Display.
22. Use the Cursor /Value tool to explore this image. Data values in this band refer to the original
sample number. A positive data value indicates that the pixel is an actual image pixel, located
in its proper position. A negative data value indicates that the pixel is a nearest-neighbor infill
pixel, placed to fill an undersampled image gap. A value of 0 indicates that no input pixel
corresponds to the output pixel. Similarly, data values in the GLT Line Lookup band refer to
the original line number.
23. In the Available Bands List, right-click Line3geo and select Load True Color to
<current>.
24. Use the Cursor Location/Value tool to confirm that the georeferenced image contains
geographic coordinates.
25. Repeat Steps 8-24 using the other flight line, Line5.img. Be sure to use different names for
the output. In the Enter Output GLT Filename field, enter Line5glt. In the Output
Georef Filename field, enter Line5geo.
Using a Super GLT file for georeferencing provides a more robust resampling method. A
radial resampling method is used to derive the output image using a specified kernel size.
Each output pixel is calculated by weighting all the pixels in the kernel by the inverse of
their radial distance to the center of the output pixel. You specify the kernel size and
minimum number of pixels used in the resampling. This is a much slower process than
regular GLT functions.
26. Close all display groups when finished.
dialog appears.
4. Enter 0 for Data Value to Ignore.
5. Keep the Feathering Distance value of 0.
97
dialog appears.
8. Repeat Steps 4-7, and click OK. The two color images should appear in the Mosaic dialog
(Figure 37).
9. From the Mosaic dialog menu bar, select File
appears.
10. Enter an output filename of WY_mosaic.
11. Accept the default values for all other fields, and click OK.
12. In the Available Bands List, right-click WY_mosaic, and select Load True Color. Inspect the
mosaicked image.
If the two images dont properly align, two methods to improve accuracy may be necessary.
The provider of the IGM files may need to adjust the bore sight angles. These are pitch,
roll, and heading offsets for the Inertial Measurement Unit data used to make IGM files. Or,
if topographic relief variations are a factor, a digital elevation model (DEM) may have to be
incorporated into the process.
98
ENVI Resourse
Chapter 6: Georeferencing and Mosaicking
99