0% found this document useful (0 votes)
13 views1,272 pages

Rec Cite9

Uploaded by

yachiyodjibouti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1,272 pages

Rec Cite9

Uploaded by

yachiyodjibouti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1272

ENVI User’s

Guide

ENVI Version 4.7 & 4.7 SP1


December, 2009 Edition
Copyright © ITT Visual Information Solutions
All Rights Reserved

20USR471DOC
Restricted Rights Notice
The IDL®, IDL Advanced Math and Stats™, ENVI®, ENVI Zoom™, and ENVI® EX software programs and the accompanying procedures, functions,
and documentation described herein are sold under license agreement. Their use, duplication, and disclosure are subject to the restrictions stated in the
license agreement. ITT Visual Information Solutions reserves the right to make changes to this document at any time and without notice.
Limitation of Warranty
ITT Visual Information Solutions makes no warranties, either express or implied, as to any matter not expressly set forth in the license agreement,
including without limitation the condition of the software, merchantability, or fitness for any particular purpose.
ITT Visual Information Solutions shall not be liable for any direct, consequential, or other damages suffered by the Licensee or any others resulting
from use of the software packages or their documentation.
Permission to Reproduce this Manual
If you are a licensed user of these products, ITT Visual Information Solutions grants you a limited, nontransferable license to reproduce this particular
document provided such copies are for your use only and are not sold or distributed to third parties. All such copies must contain the title page and this
notice page in their entirety.
Export Control Information
This software and associated documentation are subject to U.S. export controls including the United States Export Administration Regulations. The
recipient is responsible for ensuring compliance with all applicable U.S. export control laws and regulations. These laws include restrictions on
destinations, end users, and end use.
Acknowledgments
ENVI® and IDL® are registered trademarks of ITT Corporation, registered in the United States Patent and Trademark Office. ION™, ION Script™,
ION Java™, and ENVI Zoom™ are trademarks of ITT Visual Information Solutions.
ESRI®, ArcGIS®, ArcView®, and ArcInfo® are registered trademarks of ESRI.
Portions of this work are Copyright © 2009 ESRI. All rights reserved.
PowerPoint® and Windows® are registered trademarks of Microsoft Corporation in the United States and/or other countries.
Macintosh® is a registered trademark of Apple Inc., registered in the U.S. and other countries.
UNIX® is a registered trademark of The Open Group.
Adobe Illustrator® and Adobe PDF® Print Engine are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States
and/or other countries.
Numerical Recipes™ is a trademark of Numerical Recipes Software. Numerical Recipes routines are used by permission.
GRG2™ is a trademark of Windward Technologies, Inc. The GRG2 software for nonlinear optimization is used by permission.
NCSA Hierarchical Data Format (HDF) Software Library and Utilities. Copyright © 1988-2001, The Board of Trustees of the University of Illinois. All
rights reserved.
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities. Copyright © 1998-2002, by the Board of Trustees of the University of
Illinois. All rights reserved.
CDF Library. Copyright © 2002, National Space Science Data Center, NASA/Goddard Space Flight Center.
NetCDF Library. Copyright © 1993-1999, University Corporation for Atmospheric Research/Unidata.
HDF EOS Library. Copyright © 1996, Hughes and Applied Research Corporation.
SMACC. Copyright © 2000-2004, Spectral Sciences, Inc. and ITT Visual Information Solutions. All rights reserved.
This software is based in part on the work of the Independent JPEG Group.
Portions of this software are copyrighted by DataDirect Technologies, © 1991-2003.
BandMax®. Copyright © 2003, The Galileo Group Inc.
Portions of this computer program are copyright © 1995-2008 Celartem, Inc., doing business as LizardTech. All rights reserved. MrSID is protected by
U.S. Patent No. 5,710,835. Foreign Patents Pending.
Portions of this software were developed using Unisearch’s Kakadu software, for which ITT has a commercial license. Kakadu Software. Copyright ©
2001. The University of New South Wales, UNSW, Sydney NSW 2052, Australia, and Unisearch Ltd, Australia.
This product includes software developed by the Apache Software Foundation (www.apache.org/).
MODTRAN is licensed from the United States of America under U.S. Patent No. 5,315,513 and U.S. Patent No. 5,884,226.
QUAC and FLAASH are licensed from Spectral Sciences, Inc. under U.S. Patent No. 6,909,815 and U.S. Patent No. 7,046,859 B2.
Portions of this software are copyrighted by Merge Technologies Incorporated.
Support Vector Machine (SVM) is based on the LIBSVM library written by Chih-Chung Chang and Chih-Jen Lin (www.csie.ntu.edu.tw/~cjlin/libsvm),
adapted by ITT Visual Information Solutions for remote sensing image supervised classification purposes.
IDL Wavelet Toolkit Copyright © 2002, Christopher Torrence.
IMSL is a trademark of Visual Numerics, Inc. Copyright © 1970-2006 by Visual Numerics, Inc. All Rights Reserved.
Other trademarks and registered trademarks are the property of the respective trademark holders.
Contents
Chapter 1
Interactive Displays .............................................................................. 11
Display Group Menu Bar Options ................................................................................... 13
Managing Files from the Display Group ......................................................................... 14
Saving Images from Displays .......................................................................................... 15
Printing ............................................................................................................................ 22
Exporting Images to ArcMap .......................................................................................... 23
Creating QuickMaps ........................................................................................................ 24
Overlays ........................................................................................................................... 29
Annotating Images and Plots ........................................................................................... 31
Overlaying Classes .......................................................................................................... 44
Plotting Contour Lines .................................................................................................... 50
Interactive Density Slicing .............................................................................................. 58
Adding Grid Lines ........................................................................................................... 63
Creating Regions of Interest ............................................................................................ 69

ENVI User’s Guide 3


4

Overlaying Vectors .......................................................................................................... 70


Contrast Stretching and Quick Filtering .......................................................................... 76
Applying Display Filters .................................................................................................. 77
Applying Default (Quick) Stretches ................................................................................ 78
Matching Histograms ....................................................................................................... 79
Using Interactive Stretching ............................................................................................ 80
Display Linking and Dynamic Overlays .......................................................................... 91
Interactive Profiles and Spectral Plots ............................................................................. 97
Using Interactive Plot Functions .................................................................................... 106
Extracting Polarization Signatures ................................................................................. 119
Color Mapping ............................................................................................................... 120
Locating Cursor and Pixel Positions .............................................................................. 125
Quickly Calculating Basic Statistics .............................................................................. 126
Collecting Points ............................................................................................................ 127
Building Masks .............................................................................................................. 132
Measurement Tool ......................................................................................................... 133
Using the Line of Sight Calculator ................................................................................ 134
Using the Spatial Pixel Editor ........................................................................................ 136
Using the Spectral Pixel Editor ...................................................................................... 139
Creating Animations ...................................................................................................... 140
Using 2D Scatter Plots ................................................................................................... 145
Three-Dimensional Surface Views ................................................................................ 156
Using Window Options from the Display Group .......................................................... 157

Chapter 2
File Management ................................................................................ 159
The File Menu ................................................................................................................ 160
Opening Image Files and Vector Files ........................................................................... 161
Opening Remote Files .................................................................................................... 162
Opening External Files .................................................................................................. 163
Opening Previous Files .................................................................................................. 192
Starting ENVI Zoom ...................................................................................................... 193
Editing ENVI Headers ................................................................................................... 194
Generating Test Data ..................................................................................................... 210
Using the Data Viewer ................................................................................................... 212
Subsetting Data .............................................................................................................. 215

Contents ENVI User’s Guide


5

Saving Files ................................................................................................................... 226


Working with IDL ......................................................................................................... 234
Tape Utilities ................................................................................................................. 235
Using the Scan Directory List ....................................................................................... 254
Working With Files and Scripts .................................................................................... 259
Logging Processing Information ................................................................................... 260
ENVI Preferences .......................................................................................................... 261

Chapter 3
Basic Tools .......................................................................................... 263
The Basic Tools Menu .................................................................................................. 264
Resizing Data (Spatial/Spectral) ................................................................................... 265
Subsetting Data via ROIs .............................................................................................. 266
Rotating Images ............................................................................................................. 267
Layer Stacking ............................................................................................................... 269
Converting Data (BSQ, BIL, BIP) ................................................................................ 271
Stretching Data .............................................................................................................. 272
Statistics ......................................................................................................................... 274
Spatial Statistics ............................................................................................................ 283
Change Detection Analysis ........................................................................................... 294
Measurement Tool ......................................................................................................... 303
Band Math ..................................................................................................................... 306
Spectral Math ................................................................................................................ 320
Segmenting Images ....................................................................................................... 321
Defining ROIs ............................................................................................................... 323
Mosaicking Images ........................................................................................................ 348
Creating Masks .............................................................................................................. 349
Preprocessing Utilities ................................................................................................... 357

Chapter 4
Classification Tools ............................................................................. 399
The Classification Menu ............................................................................................... 400
Supervised Classification .............................................................................................. 401
Unsupervised Classification .......................................................................................... 425
Decision Tree Classifier ................................................................................................ 430
Collecting Endmember Spectra ..................................................................................... 439
Creating Class Images from ROIs ................................................................................. 456

ENVI User’s Guide Contents


6

Post Classification .......................................................................................................... 457

Chapter 5
Transform Tools .................................................................................. 491
The Transform Menu ..................................................................................................... 492
Image Sharpening .......................................................................................................... 493
Calculating Band Ratios ................................................................................................ 501
Principal Component Analysis ...................................................................................... 504
Independent Components Analysis ................................................................................ 509
Minimum Noise Fraction Transform ............................................................................. 516
Color Transforms ........................................................................................................... 527
Applying Decorrelation Stretch ..................................................................................... 531
Applying Photographic Stretch ...................................................................................... 532
Applying Saturation Stretch ........................................................................................... 533
Creating Synthetic Color Images ................................................................................... 534
Calculating Vegetation Indices ...................................................................................... 535

Chapter 6
Filter Tools ........................................................................................... 539
The Filter Menu ............................................................................................................. 540
Using Convolution and Morphology Filters .................................................................. 541
Using Texture Filters ..................................................................................................... 548
Using Adaptive Filters ................................................................................................... 553
Using Frequency Filters (FFTs) ..................................................................................... 561

Chapter 7
Spectral Tools ..................................................................................... 567
The Spectral Menu ......................................................................................................... 569
SPEAR Tools ................................................................................................................. 570
THOR Workflows .......................................................................................................... 653
Target Detection Wizard ................................................................................................ 723
Spectral Libraries ........................................................................................................... 739
Spectral Slices ................................................................................................................ 746
MNF Rotation ................................................................................................................ 748
Pixel Purity Index .......................................................................................................... 749
The n-D Visualizer ......................................................................................................... 754
Mapping Methods .......................................................................................................... 771

Contents ENVI User’s Guide


7

Spectral Tools References ............................................................................................. 794


Vegetation Analysis ...................................................................................................... 799
Vegetation Suppression ................................................................................................. 812
Finding Targets with BandMax ..................................................................................... 814
RX Anomaly Detection ................................................................................................. 827
Spectral Hourglass Wizard ............................................................................................ 829
Spectral Analyst ............................................................................................................ 845
Multi Range SFF ........................................................................................................... 851
Extracting Endmembers with SMACC ......................................................................... 853
Spectral Math ................................................................................................................ 857
Resampling Spectral Data Files .................................................................................... 863
Gram-Schmidt Spectral Sharpening .............................................................................. 864
PC Spectral Sharpening ................................................................................................. 865
CN Spectral Sharpening ................................................................................................ 866
EFFORT Polishing ........................................................................................................ 867
Generating Image Cubes ............................................................................................... 872
Preprocessing Utilities ................................................................................................... 874

Chapter 8
Map Tools ............................................................................................. 875
The Map Menu .............................................................................................................. 876
Registration ................................................................................................................... 877
Orthorectification .......................................................................................................... 911
Image Mosaicking ......................................................................................................... 919
Georeferencing from Input Geometry ........................................................................... 934
Georeferencing SPOT Data ........................................................................................... 943
Georeferencing SeaWiFS Data ..................................................................................... 946
Georeferencing ASTER Data ........................................................................................ 949
Georeferencing AVHRR Data ....................................................................................... 952
Georeferencing ENVISAT ............................................................................................ 956
Georeferencing MODIS ................................................................................................ 957
Georeferencing COSMO-SkyMed Data ....................................................................... 967
Georeferencing RADARSAT ........................................................................................ 969
Building RPCs ............................................................................................................... 972
Selecting Map Projection Types .................................................................................... 990
Building Customized Map Projections .......................................................................... 992

ENVI User’s Guide Contents


8

Converting Map Projections .......................................................................................... 996


Layer Stacking ............................................................................................................... 998
Converting Map Coordinates ......................................................................................... 999
Converting ASCII Coordinates .................................................................................... 1001
Merging Old Projection Files ....................................................................................... 1002
Using GPS-Link ........................................................................................................... 1003
Importing ASCII GPS Points ....................................................................................... 1006

Chapter 9
Vector Tools ...................................................................................... 1009
The Vector Menu ......................................................................................................... 1010
Opening Vector Files ................................................................................................... 1011
The Available Vectors List .......................................................................................... 1012
Working with Vectors .................................................................................................. 1013
Creating Vector Layers ................................................................................................ 1038
Creating World Boundary Layers ................................................................................ 1040
Extracting Linear Features with Intelligent Digitizer .................................................. 1043
Converting Raster Images ............................................................................................ 1056
Converting Classification Images ................................................................................ 1057
Rasterizing Point Data ................................................................................................. 1058
Converting ROIs to DXF Files .................................................................................... 1060
Converting Annotation Files to DXF Files .................................................................. 1061
Converting EVFs to DXF Files .................................................................................... 1062

Chapter 10
Topographic Tools ............................................................................ 1063
The Topographic Menu ................................................................................................ 1064
Opening Topographic Files .......................................................................................... 1065
Using Topographic Modeling ...................................................................................... 1066
Extracting Topographic Features ................................................................................. 1070
Extracting Digital Elevation Model Data .................................................................... 1073
Creating Hill Shade Images ......................................................................................... 1074
Replacing Bad Values .................................................................................................. 1077
Rasterizing Point Data ................................................................................................. 1078
Converting Vector Topo Maps into Raster DEMs ...................................................... 1079
Using 3D SurfaceView ................................................................................................ 1081

Contents ENVI User’s Guide


9

Chapter 11
Radar Tools ........................................................................................ 1099
The Radar Menu .......................................................................................................... 1100
Opening and Preparing Radar Files ............................................................................. 1101
Calibrating Radar Files ................................................................................................ 1103
Removing Antenna Gain Variations ........................................................................... 1105
Resampling to Ground Ranges .................................................................................... 1107
Generating Incidence Angle Images ........................................................................... 1109
Adaptive Filters ........................................................................................................... 1110
Texture Filters ............................................................................................................. 1111
Creating Synthetic Color Images ................................................................................ 1112
Using Polarimetric Tools ............................................................................................. 1113
Using TOPSAR Tools ................................................................................................. 1140

Appendix A
ENVI Preference Settings ................................................................. 1143
Configuration Parameter Descriptions ........................................................................ 1144
Editing System Graphics Colors ................................................................................. 1163
Editing System Color Tables ....................................................................................... 1165
Installing Other TrueType Fonts with ENVI .............................................................. 1169
Modifying IDL CPU Parameters ................................................................................. 1171

Appendix B
ENVI ASCII File Formats ................................................................... 1175
ENVI ASCII Files ....................................................................................................... 1176

Appendix C
ENVI Spectral Libraries .................................................................... 1183
ENVI Spectral Library Files ........................................................................................ 1184
USGS Spectral Library (Minerals) .............................................................................. 1185
USGS Spectral Library (Vegetation) .......................................................................... 1186
Additional Vegetation Libraries .................................................................................. 1187
JPL Spectral Library .................................................................................................... 1188
IGCP264 Spectral Library ........................................................................................... 1189
JHU Spectral Library ................................................................................................... 1192

ENVI User’s Guide Contents


10

Appendix D
ENVI Map Projections ...................................................................... 1197
Introduction .................................................................................................................. 1198
Map Projections ........................................................................................................... 1199
Non-Standard Projections ............................................................................................ 1206

Appendix E
Vegetation Indices ............................................................................ 1211
Understanding Vegetation and Its Reflectance Properties ........................................... 1212
Vegetation Indices ....................................................................................................... 1221

Index .................................................................................................. 1247

Contents ENVI User’s Guide


Chapter 1
Interactive Displays

This chapter describes the components of ENVI’s interactive displays, including display group
windows, vector windows, and plot windows. It covers the following topics:

Display Group Menu Bar Options . . . . . . . . 13 Overlaying Vectors . . . . . . . . . . . . . . . . . . . 70


Managing Files from the Display Group . . . 14 Contrast Stretching and Quick Filtering . . . 76
Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Using Interactive Stretching . . . . . . . . . . . . 80
Exporting Images to ArcMap . . . . . . . . . . . 23 Display Linking and Dynamic Overlays . . 91
Creating QuickMaps . . . . . . . . . . . . . . . . . . 24 Interactive Profiles and Spectral Plots . . . . 97
Overlays . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Extracting Polarization Signatures . . . . . . 119
Annotating Images and Plots . . . . . . . . . . . . 31 Color Mapping . . . . . . . . . . . . . . . . . . . . . 120
Overlaying Classes . . . . . . . . . . . . . . . . . . . 44 Locating Cursor and Pixel Positions . . . . 125
Plotting Contour Lines . . . . . . . . . . . . . . . . 50 Quickly Calculating Basic Statistics . . . . 126
Interactive Density Slicing . . . . . . . . . . . . . 58 Collecting Points . . . . . . . . . . . . . . . . . . . 127
Adding Grid Lines . . . . . . . . . . . . . . . . . . . . 63 Using the Line of Sight Calculator . . . . . . 134
Creating Regions of Interest . . . . . . . . . . . . 69 Using the Spatial Pixel Editor . . . . . . . . . 136

ENVI User’s Guide 11


12 Chapter 1: Interactive Displays

Using the Spectral Pixel Editor . . . . . . . . 139


Creating Animations . . . . . . . . . . . . . . . . 140
Using 2D Scatter Plots . . . . . . . . . . . . . . . 145
Three-Dimensional Surface Views . . . . . . 156
Using Window Options from the Display
Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

ENVI User’s Guide


Chapter 1: Interactive Displays 13

Display Group Menu Bar Options


The Display group menu bar has the following options:
• File
• Overlay
• Enhance
• Tools
• Window
See Display Groups in Getting Started with ENVI for an overview.
Functions include linking Image windows; producing x,y,z (spectral), and arbitrary
profiles; contrast stretching; color mapping; ROI selection, cursor position and
values, 2D scatter plots, surface plotting (perspectives and draping), and polarization
signatures. Additional functions include various overlays including annotation, pixel-
based and georeferenced grid lines, image contouring, and vector layers; image
animation, changing display group characteristics; printing, and creating output
images (PostScript, Image [RGB], BMP, HDF, JPEG, JPEG2000, PICT, SRF, TIFF,
or XWD formats).

ENVI User’s Guide Display Group Menu Bar Options


14 Chapter 1: Interactive Displays

Managing Files from the Display Group


The Display group menu bar provides the following options in the File menu to
manage your display:
• Create New Vector Layer: See “Creating Vector Layers” on page 1038 for
details.
• Save As Display Group: See Saving Display Groups in Getting Started with
ENVI for details.
• Restore Display Group: See Restoring Saved Display Groups in Getting
Started with ENVI for details.
• Save Image As: See “Saving Images from Displays” on page 15 for details.
• Save Zoom As: See “Saving Images from Displays” on page 15 for details.
• Print: See “Printing” on page 22 for details.
• Export Image to ArcMap: See “Exporting Images to ArcMap” on page 23
for details.
• QuickMap: See “Creating QuickMaps” on page 24 for details.
• Preferences: See Setting Preferences for an Individual Display Group in
Getting Started with ENVI for details.

Managing Files from the Display Group ENVI User’s Guide


Chapter 1: Interactive Displays 15

Saving Images from Displays


You can save ENVI images in display groups, plots, or Vector windows to PostScript
files, image files, or directly to printers. You can optionally include all overlays
(annotation, grid lines, vectors, and so forth) in the output.

Saving to PostScript Files


Use ENVI’s PostScript output to scale an image, to burn in graphic overlays, to
output an Encapsulated PostScript file, and to select from other output options.
1. Select one of the following:
• From the Display group menu bar, select File → Save Image
As → Postscript File.
• From the plot window menu bar, select File → Save Plot
As → PostScript.
• From the Vector window menu bar, select File → Save Plot
As → PostScript.
The Output Display to PostScript File dialog appears for images, or the Output
Plot to PostScript File dialog appears for plots and vectors. In these dialogs
you modify the output of images, plots, and vectors. The output page is shown
schematically as a draw window in the upper-right hand corner of the dialog.
2. Modify the output parameters as described in the following sections.
3. Enter the output filename.
4. Click OK. If the parameter settings result in multiple page output, ENVI uses
the filename as a root filename and appends numbers designating the position
of the multiple pages in the composite image. For example, an image with 6
pages (3 columns by 2 rows), using the file root name test creates the output
files test_11, test_12, test_21, test_22, test_31, and test_32,
where the first appended number indicates the column, and the second
appended number indicates the row.

ENVI User’s Guide Saving Images from Displays


16 Chapter 1: Interactive Displays

Figure 1-1: Output Display to PostScript File Dialog

Setting Page Size and Image Scaling


Set the output page size and image placement in either inches or centimeters (defined
by the Page Units preference). Precision scaling and multiple page output is available
when using PostScript output. You can scale any ENVI image to a specific map scale;
the image size values change automatically based on the image pixel size. If the
resulting image is larger than the size defined in the Page fields, ENVI automatically
determines the number of pages required to output the image and shows the pages in
the draw window in the upper-right hand corner of the dialog. Multiple page images
cannot be repositioned with respect to the page layout specified by ENVI.
1. In the Output Display/Plot to PostScript File dialog, set the page size by
entering the dimensions in the Page field.

Saving Images from Displays ENVI User’s Guide


Chapter 1: Interactive Displays 17

2. Set the output image size on the page by entering the values into the xsize and
ysize fields. To maintain the relative aspect between x and y when one
dimension changes, select the Aspect check box.
3. Set the position of the image origin on the page (with respect to the lower left
corner) using the xoff and yoff parameters. An outline of the image showing its
relative size and position on the page appears within the draw window in the
upper-right of the dialog.
• To position the image on the output page, left-click inside the image
outline in the draw window and drag the image to a new position.
• To center the image outline on the page, right-click anywhere on the output
page.
4. Click the toggle button to select Landscape or Portrait as the page
orientation.
5. To scale an image to a specified map scale, enter the value in the Map Scale 1
field. The xsize and ysize values change automatically based on the image
pixel size (a default size of 30 meters is assumed if no pixel size is present in
the header).
6. Enable or disable color with the Color check box.
7. To create Encapsulated PostScript output, select the Encapsulate check box.
8. To select the number of output bits for the PostScript image, use the Bits drop-
down list.

Setting Graphics Overlay Options


You can permanently incorporate graphics options (annotations, grid lines, ROIs,
vectors, and so forth) in the saved PostScript file. ENVI automatically selects all
currently displayed valid ENVI graphics objects when the Output Display/Plot to
PostScript File dialog appears. ENVI automatically places a border on the output
image if you select grid lines. The grid text-labels are placed exterior to the image.
The grid must have been previously displayed and configured on the image by
selecting the Grid Lines overlay option (see “Adding Grid Lines” on page 63).
1. In the Output Display/Plot to PostScript File dialog, click Change Graphic
Overlay Selections. The Change Graphics Overlay Options dialog appears
with a list of the currently displayed graphics objects.
2. To remove a graphics overlay, select its name in the Currently Selected
Options list to automatically delete it.

ENVI User’s Guide Saving Images from Displays


18 Chapter 1: Interactive Displays

3. To add graphics overlays, click Add Graphics Option and select the desired
option. With the exception of annotation, these overlays must be currently
displayed on the image or plot.
4. To add an annotation file that is not currently displayed to the graphics overlay,
click Add Graphics Option and select Additional Annotation File. Select
the annotation filename.
5. Click OK. The Output Display/Plot to PostScript File dialog appears.
Note
To clip all graphics at the edge of the page when multiple pages of output are
generated, select the Clip Graphics check box.

Subsetting and Resizing Output Images


To perform Spatial Subsetting on the output image, click Spatial Subset.
To resize the image, enter a resize factor (less than 1 for subsampling) in the Input
Image Resize Factor field.

Applying Masks
To apply Masking on the image, click Select Mask.

Saving to Image Files


ENVI has many image output options for the Image and Zoom windows, such as
output to an ENVI format image file, and output to BMP, HDF, JPEG, JPEG 2000,
PICT, PNG, SRF, TIFF (including GeoTIFF), and XWD files. ENVI can also output
to various image processing format files including ERDAS (.lan), ER Mapper, PCI
(.pix), and ArcView® (.bil) files.
Converting Image window displays into generic image files is limited to data that fit
entirely into system memory with the exception of TIFF, HDF, and BMP format
images.
1. Select one of the following:
• From the Display group menu bar, select File → Save Image
As → Image File.
• From the Display group menu bar, select File → Save Zoom As →
Image.
• Right-click in the display group and select Save Image As.

Saving Images from Displays ENVI User’s Guide


Chapter 1: Interactive Displays 19

• Right-click in the display group and select Save Zoom As.


• From the plot window menu bar, select File → Save Plot As → Image
File.
The Output Display to Image File dialog appears for images, the Output Zoom
to Image File dialog appears for the zoom image, or the Output Plot to Image
File dialog appears for plots and vectors. In these dialogs you select the type of
output file, set the graphics overlay selections, select a spatial subset, resize the
image, and change the border size. See the following sections for setting the
output display parameters in the dialog.
2. Modify the output parameters as described in the following sections.
3. Select output to File or Memory.
4. Click OK.

Selecting Output File Types and Resolutions


ENVI’s output to image file supports many different output file types (listed above).
Each file type has a selection of available output formats. These output formats
(resolutions) include 8-bit gray scale, 8-bit with an associated color table, and 24-bit
BSQ, BIL, and BIP formats.
1. In the Output Display/Zoom/Plot to Image File dialog, select the output file
type from the Output File Type drop-down list.
Note
When you output a georeferenced image to a JPEG file, ENVI creates an
associated .jgw file to contain the TIFF World File information. When you
open a JPEG file (using File → Open External File → Generic File
Formats → JPEG from the ENVI main menu bar) that has a .jgw file
associated with it, ENVI reads the map information from .jgw file.

2. Select the output format and resolution using the Resolution drop-down list.

ENVI User’s Guide Saving Images from Displays


20 Chapter 1: Interactive Displays

Setting Graphics Overlay Options


You can permanently incorporate graphics options (annotations, grid lines, ROIs,
vectors, and so forth) in the output image file. All currently displayed valid ENVI
graphics objects are automatically selected when the Output to Image File dialog
appears. A border is automatically placed on the output image if grid lines are
selected. The grid text-labels are placed exterior to the image. Note the grid must
have been previously displayed and configured on the image using the Grid Lines
option on the Image window menu bar (see “Adding Grid Lines” on page 63).
1. Click Change Graphic Overlay Selections. The Change Graphics Overlay
Options dialog appears with a list of the currently displayed graphics objects.
2. Change the graphic overlay selections using the following options:
• To remove a graphics overlay, select its name in the Currently Selected
Options list.
• To add graphics overlays, select the overlay using the Add Graphics
Option drop-down button (except for annotation, these overlays must be
displayed on the image or plot).
• To add an annotation file that is not currently displayed to the graphics
overlay, select Additional Annotation File from the Add Graphics
Option drop-down button and select the annotation filename.
3. Click OK. The Output to Image File dialog appears.

Changing Border Sizes and Colors


This feature is not available from the Output Zoom to Image File dialog.
To change the border size or color on the output image:
1. Click Change Image Border Size. The Change Image Border Size dialog
appears.
2. Enter the border sizes in the top, right, bottom, and left fields.
3. To change the border color, click Border Color and select the desired color
from the color menus, or enter the RGB values in the fields provided.
4. Click OK. The Output Display/Zoom/Plot to Image File dialog appears.

Saving Images from Displays ENVI User’s Guide


Chapter 1: Interactive Displays 21

Subsetting Output Images


In the Output Display/Zoom/Plot to Image File dialog, you can select a spatial subset
or specify a resize factor.
• To perform Spatial Subsetting on the image to output, click Spatial Subset.
• To resize the input image, enter a resize factor (less than 1 for subsampling) in
the Input Image Resize Factor field.
• In the Output Plot to Image File dialog, you have the option of specifying the
Output xsize and ysize of the image. The default xsize and ysize values are the
size of the plot window.
• The output size of the image, in pixels, is shown in the Output Image Size
field.

Applying Masks
To apply Masking on the image, click Select Mask.

ENVI User’s Guide Saving Images from Displays


22 Chapter 1: Interactive Displays

Printing
You can send output of display groups, plot windows, and Vector windows directly to
system printers. You can send output to any of your system printers or plotters
through your native system printer dialog.
For steps on how to print, see Printing in ENVI in Getting Started with ENVI.

Setting Graphics Overlay Options


You can permanently incorporate graphics options (annotations, grid lines, ROIs,
vectors, and so forth) in the print. All currently displayed valid ENVI graphics
objects are automatically selected when the Output Display to Printer dialog appears.
ENVI automatically places a border on the output image if grid lines are selected.
The grid text-labels are placed exterior to the image. The grid must have been
previously displayed and configured on the image using the Display group menu bar
Grid Lines option (see “Adding Grid Lines” on page 63).
1. In the Output Display to Printer dialog, click Change Graphic Overlay
Selections. The Change Graphics Overlay Options dialog appears with a list of
the currently displayed graphics objects.
2. Change the graphic overlay selections using the following options:
• To remove a graphics overlay, select its name in the Currently Selected
Options list.
• To add graphics overlays, select the overlay using the Add Graphics
Option drop-down button (exception for annotation, these overlays must
be displayed on the image or plot).
• To add an annotation file that is not currently displayed to the graphics
overlay, select Additional Annotation File from the Add Graphics
Option drop-down button and select the annotation filename.
3. Click OK. The Output Display to Printer dialog appears.

Printing ENVI User’s Guide


Chapter 1: Interactive Displays 23

Exporting Images to ArcMap


To open data in ArcMap™ software, you must have ArcMap version 9.2 or higher
installed and licensed on your system.
Use File → Export Image to ArcMap from the display group menu bar to export
the image in the display group to ArcMap software, including any associated display
enhancements and annotations. This menu option is only available on Windows 32-
bit platforms or when running ENVI in 32-bit mode on Windows. When you select
this option, ENVI converts the full extent of the image in the display group (including
display enhancements, annotation, contrast stretches, etc.) to a three-band GeoTIFF
file and saves it in the location you specify as the Temp Directory of your ENVI
System Preferences. ArcMap software then displays this image.
If you have one or more instances of ArcMap software already running, an ArcMap
Instances dialog appears. Select an instance to display your dataset, or start a new
instance of ArcMap software. Click OK.
If ArcMap software is not already running, ENVI will initiate it for you. The dataset
will display in ArcMap software and will be added as a new layer to the ArcMap
table of contents.

ENVI User’s Guide Exporting Images to ArcMap


24 Chapter 1: Interactive Displays

Creating QuickMaps
Use the QuickMap feature to simplify the process of creating a map product in
ENVI. You can quickly add grid lines, scale bars, titles, north arrows, declination
diagrams, and logos to your image to make a quick output map. When the parameters
are set, you can save the settings as a QuickMap template that you can use on other
images. After the output map is created, you can make additional changes with the
interactive overlay capabilities (for example, annotation) found in the Display group
menu bar, and you can output the map to PostScript or to a standard printer.
The following figure shows an example QuickMap display.

Figure 1-2: A QuickMap Image

Creating QuickMaps ENVI User’s Guide


Chapter 1: Interactive Displays 25

Note
Extremely small images may result in QuickMap displays too small to
accommodate multiple annotation objects.

1. From the Available Bands List, display a georeferenced image.


2. From the Display group menu bar, select File → QuickMap → New
QuickMap. The QuickMap Default Layout dialog appears.
3. Enter the page size, select Portrait or Landscape page orientation, and enter
your output map scale. To change the map scale, enter a new value in the Scale
field, or use the increase/decrease buttons.
4. Click OK. The QuickMap Image Selection window appears.
5. Select from the following options to select the image subset to use in the
QuickMap:
• Resize and move the red box outline (drag from a corner to resize, click
and drag the middle of the box to move).
• Enter x and y sizes, in inches, in the Image Size fields, or use the
increase/decrease buttons to select dimensions.
• Click Spatial Subset. For subsetting details, see “Spectral Subsetting” on
page 220.
Note
The output image size set by the red box cannot be larger than what fits on
the selected page size at the selected map scale.

6. Click OK.

ENVI User’s Guide Creating QuickMaps


26 Chapter 1: Interactive Displays

The QuickMap Parameters dialog appears.

Figure 1-3: QuickMap Parameters Dialog

Setting QuickMap Parameters


1. In the QuickMap Parameters dialog, select from the following options:
• To add a title to the top of the map, type the text in the Main Title field.
• To add text to the lower left or lower right corners of the map, type the text
into the corresponding fields.
• To automatically load the map projection information from the ENVI
header into either the Lower Left or Lower Right fields, right-click in the
field and select Load Projection Info.

Creating QuickMaps ENVI User’s Guide


Chapter 1: Interactive Displays 27

• To change the font used for any title, select a new font from the
corresponding drop-down button and enter the point size. For more
information on fonts, see “Installing Other TrueType Fonts with ENVI” on
page 1169.
• To set the justification for any title, select from the corresponding drop-
down button. Center is the default.
• To change the grid line parameters (thickness, style, color, and so forth),
click Additional Properties.
• To add scale bars and grid lines, leave the corresponding check boxes
selected and edit the parameters as needed.
• To add a logo and adjust its placement, click Edit Logo Files and
Placements. Locate the file containing the logo (the file must contain three
bands of byte data: red, green, and blue). Use the QuickMap Logo File
Parameters dialog to change the logo size and position. Click OK to return
to the QuickMap Parameters dialog.
• To add a North arrow, leave the corresponding check box selected and
select an arrow type from the North Arrow Type drop-down button.
• To add a declination diagram, click Declination Values. In the Declination
Diagram Values dialog, enter the values and click OK.
• To return to the QuickMap Image Selection window and edit the image
subset or map scale, click Change Mapping Parameters.
2. In the QuickMap Parameters dialog, click Apply. ENVI automatically adds a
virtual border to the QuickMap image, places your selected titles and
annotation onto the image, and produces a map, which displays as a new
display group. The QuickMap Parameters dialog remains open.
Note
If you added a logo, it appears as a red box with an RGB label on the map,
but appears correctly when printed.

3. Use the QuickMap Parameters dialog to edit the map. Click Apply to view the
changes.
Note
To edit the borders, add more annotation or overlay elements, or edit the
existing map elements, use ENVI interactive display functions.

ENVI User’s Guide Creating QuickMaps


28 Chapter 1: Interactive Displays

Printing QuickMaps
1. From the QuickMap Image window menu bar, select File → Print. The ENVI
QuickMap Print dialog displays.
2. Choose Output QuickMap to Printer or Standard Printing.
3. Click OK. The Output QuickMap printing scales the output correctly for the
parameters that you entered at the start of QuickMap. Standard printing does
not take into consideration the page size and map scale you entered when you
created the QuickMap.
If you selected a large page size during QuickMap setup, you might first test the
output on a small scale by using the standard printing option, then use the QuickMap
printing option to print to a larger page.

Additional QuickMap Output Options


To output the map directly to an image or PostScript file, select the corresponding
command from the File menu in the map Image window as described later in this
chapter.

QuickMap Templates
After creating a QuickMap, you can save the parameters in a template file to use on
other georeferenced images of the same dimension and pixel size.
In the QuickMap Parameters dialog, click Save Template, enter a filename (ENVI
adds a .qm extension), and click OK.
To open and apply an existing map template, from the georeferenced image, select
File → QuickMap → from Previous Template or click Restore Template in the
QuickMap Parameters dialog, then click Apply to apply the QuickMap to the image.
To edit template parameters, see “Setting QuickMap Parameters” on page 26.

Creating QuickMaps ENVI User’s Guide


Chapter 1: Interactive Displays 29

Overlays
Use the options from the Display group Overlay menu to add the following to your
image:
• Annotations using text, polygons, symbols, and so forth. See “Annotating
Images and Plots” on page 31.
• Classifications. See “Overlaying Classes” on page 44.
• Contour lines. See “Plotting Contour Lines” on page 50.
• Density slices. See “Interactive Density Slicing” on page 58.
• Grid lines. See “Adding Grid Lines” on page 63 for details.
• Regions of interest. See “Creating Regions of Interest” on page 69.
• Vector overlays. See “Overlaying Vectors” on page 70.
Use can also use ENVI’s QuickMap feature to quickly overlay grid lines, titles,
declination diagrams, North arrows, and borders on georeferenced images. For
details, see “Creating QuickMaps” on page 24.

Showing and Hiding Overlay Dialogs and Layers


When working with overlays (annotation, ROIs, contours, grid lines, density slices,
and vector layers), you can hide the control dialog (for example, the ROI Tool dialog,
the Density Slice dialog, and so forth) without erasing the corresponding overlays
from your image. When the dialog is hidden, you can hide the associated layers
without erasing them.

Hiding Overlay Dialogs


To remove the overlay control dialog from the screen or hide it without erasing
overlays from your image, select one of the following options:
• In the active overlay dialog, select Options → Hide Window.
• In the Window Finder, double-click on the window name.

Showing Hidden Overlay Dialogs


To unhide the overlay control dialog, select one of the following options:
• In the Window Finder, click on the window name.
• From the Display group menu bar, select Overlay → overlay_type.

ENVI User’s Guide Overlays


30 Chapter 1: Interactive Displays

Hiding and Showing Layers


When an overlay control dialog is hidden, you can show or hide the displayed layers:
• To hide layers, select Overlay → overlay_type Hide Layer. All of the layers
of the selected overlay type are hidden.
• To unhide layers, select Overlay → overlay_type Show Layer.

Overlays ENVI User’s Guide


Chapter 1: Interactive Displays 31

Annotating Images and Plots


You can annotate images and plots with text, symbols, polygons, lines, polylines,
shapes, map information, gray scale or color bars. For classification images, you can
also add class keys. For display groups, you can place annotations in the Image
window, the Scroll window, the Zoom window, or in the virtual borders.
Annotation options are similar for images, plots or, surface views. You can save
annotations to files and include them in output options.
Tip
You can also use the QuickMap tool to overlay grid lines, titles, declination
diagrams, North arrows, and borders on georeferenced images. See “Creating
QuickMaps” on page 24.

You can append a virtual border to an image and place any type of annotation object
in the border. If you want to use virtual borders, append the border to the image
before annotating the image, as described in the next section.

Setting Virtual Display Borders


1. From the Display group menu bar select Overlay → Annotation. The
Annotation dialog appears.
2. From the Annotation dialog menu bar, select Options → Set Display
Borders. The Display Borders dialog appears.
3. Enter the border width (in pixels) for the left, top, right, and bottom image
border in the fields with the same relative position.
4. Click Border and select the border color. The image is re-displayed with the
designated virtual border.
Tip
You can also add virtual borders through the preference settings for a display group.
See Setting Preferences for an Individual Display Group in Getting Started with
ENVI.

ENVI User’s Guide Annotating Images and Plots


32 Chapter 1: Interactive Displays

Adding Annotations
1. Select one of the following options:
• From the Display group menu bar select Overlay → Annotation.
• From any plot window menu bar, select Options → Annotation.
• From the Vector window menu bar, select Options → Annotate Plot.
The Annotation dialog appears. The current annotation mode displays in the
dialog title bar (for example, Annotation: Text). To hide the Annotation dialog
at any time without erasing your annotations, see “Showing and Hiding
Overlay Dialogs and Layers” on page 29.
2. If you are adding the annotation to a display group, select the Window you
want to use for adding the annotation. The choices are Image, Scroll, and
Zoom. To disable annotation mode, select Off.
3. From the Annotation dialog menu bar, select Object → annotation_type.
Where annotation_type is one of the following:
• Text: (default) Type the text in the field provided mid-dialog. Left-click on
the image or plot to place the text.
• Symbol: The available symbols display for the Misc font. Left-click to
select the desired symbol, which ENVI highlights in red. Left-click on the
image or plot to place the symbol. Additional symbols are available when
you select Special or Math from the Font drop-down button.
• Rectangle: Left-click and drag on the image or plot to draw the rectangle
or middle-click to draw a square.
• Ellipse: Left-click and drag on the image or plot to draw the ellipse or
middle-click to draw a circle.
• Polygon: Left-click on the image or plot to add polygon vertices. Right-
click to complete the polygon.
• Polyline: Left-click on the image or plot to add polyline vertices. Right-
click to complete the polyline.
• Arrow: Left-click and drag on the image or plot to draw the arrow.
• Scale Bar: For data that is not georeferenced, the Input Display Pixel Size
dialog appears for you to enter an x,y pixel value and units. When the
value is set (or if the data was already georeferenced), left-click in the
display or plot window to place the scale bar.

Annotating Images and Plots ENVI User’s Guide


Chapter 1: Interactive Displays 33

• Color Ramp: Left-click in the display or plot to place a gray scale wedge
or color table. The color table or wedge represents the currently applied
ENVI color table. For a gray scale image the color ramp is a gray scale
wedge from the minimum gray scale value to the maximum gray scale
value. For a color image, the color ramp shows the distribution of the
selected color palette.
• Declination: Left-click in the display or plot to place the declination
diagram. The declination diagram includes any combination of arrows
pointing to true North (shown with a star), grid North (shown with GN),
and magnetic North (shown with MN).
• Map Key: Left-click in the display or plot to place a map key that consists
of colored squares and corresponding labels for each map item or class in a
classification image. You can define map keys interactively. ENVI
automatically creates them as class keys for classification images. Vector
keys are automatically created for vector layers in the appropriate colors
with the layer names as labels. Vector keys show the vector symbol used
for points, a line for polylines, and a square outline for polygons. To define
or change items in the map key, see “Editing Map Key Items” on page 38.
• Image: Left-click in the display or plot to place other images, such as
imported logos or subsampled images, inside the current image or plot.
ENVI keeps a copy of the image in memory so it is best not to use large
images. Note that this is not the same as mosaicking.
• Plot: Click Select New Plot to select the plot from the Select Plot Window
dialog. Left-click and drag in the display or plot to place the selected plot
overlay. If annotating multiple plots, use a test image to annotate and
output multiple plots on a single page. From the ENVI main menu bar,
select File → Generate Test Data and create a blank white image (see
“Generating Test Data” on page 210 for further details). The plot colors
are automatically reversed to black on white for output.
Annotation type parameter settings in the Annotation dialog vary depending on
the type you select. See “Changing Annotation Characteristics” on page 35 for
parameter descriptions.
Mouse button functions vary for annotation mode. See “Annotation Mouse
Button Functions” on page 34 for details.
4. Use the colored diamond-shaped handle to move the annotation to another
location as needed.
5. Right-click to accept the annotation placement.

ENVI User’s Guide Annotating Images and Plots


34 Chapter 1: Interactive Displays

Annotation Mouse Button Functions


When working with annotations in display group windows, normal mouse operations
in the window you select for annotation are disabled, but normal mouse operations
still apply in all other windows. To temporarily suspended annotation, select the Off
radio button in the Annotation dialog, to return to normal mouse operations.

Mouse
Function
Button

Left Click to place the annotation on the image or plot.


For polygons or polylines: Click to add vertices. Optionally, click
and drag to draw a line or polygon.
For rectangles or ellipses: Click and drag to draw a rectangle or
ellipse.
Click and drag the diamond-shaped handle to move the annotation.
Select Object → Select/Edit from the Annotation dialog menu bar,
then click and drag to draw a selection box around the annotation.
Middle For rectangles or ellipses: Click and drag to draw a square or circle.
Click on an annotation that has not been accepted (set in place) to
delete it.
For polygons or polylines: Click to delete the last vertex added
(repeat to delete all vertices, one at a time).
Right Click to accept the annotation placement.
For polygons: Click once to close the polygon, then right-click a
second time to set the placement.
For polylines: Click once to set the last vertex, then right-click a
second time to set the placement of the polyline.

Table 1-1: Mouse Button Functions – Annotation Mode

Annotating Images and Plots ENVI User’s Guide


Chapter 1: Interactive Displays 35

Changing Annotation Characteristics


Before you right-click to accept an annotation, you can use the parameters in the
Annotation dialog to set values that define the appearance of the annotation. The
following is an alphabetical list of all Annotation dialog parameters. The parameters
that appear on the Annotation dialog vary depending on the type of annotation you
select.

Field Description

Align Sets left/right/middle alignment for text annotations.


Background Sets the background color for the annotation. The default is
Off (no background color).
Calculate For color ramp annotations, opens the Select Band for Color
Min/Max Ramp min/max dialog, where you select the band to use for
calculating values.
Change Scale For scale bar annotation, opens the Scale Bars Distance Titles
Bar Titles dialog, where you change the titles that display in the scale bar
for kilometers, miles, meters. and feet. To permanently change
scale bar titles for all annotations, see “Additional Preference
Settings” on page 1162.
Color Sets the color for text, lines, fill, and so forth. The default is
white.
Edit Map Key For map key annotations, opens the Map Key Object
Items Definition dialog, which allows you to select the key items to
annotate, and to set the appearance of those annotations.
Fill Sets the fill style (solid, dashed, and so forth) for rectangle,
ellipse, and polygon annotations.
Font Sets the font for text, scale bar, delineation, color ramp, and
map key annotations. Use with the Size field.
Grid North Sets the angle of the grid North arrow for declination
diagrams, in degrees. The North arrows are not drawn to scale,
so the arrows appear separated.

Table 1-2: Annotation Dialog Parameter Descriptions

ENVI User’s Guide Annotating Images and Plots


36 Chapter 1: Interactive Displays

Field Description
Head Angle Sets the angle of the lines on the arrow head for arrow
annotations, in degrees. The smaller the angle, the narrower
the arrow head.
Head Size Sets the size of the arrow head for arrow annotations.
Height Sets the height of the scale bar, in pixels.
Inc Sets the number of increments shown on the scale bar or on
the color ramp. Use with the Sub Inc field.
Len Sets the length of the color ramp.
Length Sets the length of the scale bar, in scale bar units, or the or
length of the declination diagram, in pixels.
Line Style Sets the line style (solid, dotted, and so forth) for rectangle,
ellipse, polygon, and polyline annotations.
Magnetic North Sets the angle of the magnetic North arrow for declination
diagrams, in degrees. The North arrows are not drawn to scale,
so the arrows appear separated.
Max Sets the label for the maximum value to display on the color
ramp. Use with the Min field.
Min Sets the label for the minimum value to display on the color
ramp. Use with the Max field.
Orien Sets the orientation angle for the annotation. Enter the value of
the angle in degrees (counterclockwise, with respect to the
horizontal [0 degrees]).
Plot xsize Sets the x size for plot annotations, in pixels.
Plot ysize Sets the y size for plot annotations, in pixels.
Precision Sets the number of significant figures for the precision label in
the color ramp. For example, 0.25 is a precision of 2, and .03 is
a precision of 1. ENVI places the labels at the bottom of
horizontal ramps and to the right of vertical ramps.

Table 1-2: Annotation Dialog Parameter Descriptions (Continued)

Annotating Images and Plots ENVI User’s Guide


Chapter 1: Interactive Displays 37

Field Description
Ramp Sets the color ramp orientation either horizontally or
vertically.
For horizontal selections: Horz → shows low values to high
values left to right; Horz ← shows high to low left to right.
For vertical selections: Vert ← shows high values to low values
bottom to top; Vert → shows low to high bottom to top.
Reset Items For map key annotations, provides options to reset the
parameters to either the default classification or the default
vector window.
Rotation Sets the orientation of the rectangle, ellipse, polygon, or
polyline annotations.
Scale Sets the scale type(s) to include in the scale bar. Select any
combination of kilometers, miles, meters, and feet by selecting
the scale type, then toggling the button next to the drop-down
list to On (include in the scale bar) or Off (to not include).
Select New For image annotation, opens the Annotation Image Input
Image Bands dialog, where you can select the bands to include.
Select New Plot For plot annotations, opens the Select Plot Window dialog,
where you can select the plot to use.
Size Sets the pixel size of the font specified in the Font field. The
default is 12.
Spc Sets the line spacing for rectangle, ellipse, polygon, polyline,
and arrow annotations.
Sub Inc Sets the number of sub-increments within the main increment
shown on the scale bar. Use with the Inc field.
symbols Symbol selection field. Click Font, then select Misc, Special,
or Math to see all available symbols.

Table 1-2: Annotation Dialog Parameter Descriptions (Continued)

ENVI User’s Guide Annotating Images and Plots


38 Chapter 1: Interactive Displays

Field Description

text_field Entry field for text. Changes to text characteristics do not


appear in text field. To see the changes, click in the display or
plot to add the annotation, but do not set the annotation
placement until you are satisfied with the appearance of the
text.
Thick Sets the thickness of the text, lines, and so forth used in
annotations. The default is 1.
True North Sets the angle of the true North arrow for declination
diagrams, in degrees. The North arrows are not drawn to scale,
so the arrows appear separated.
Width Sets the width of the color ramp.
xsize Sets the x size for rectangle and ellipse annotations, in pixels.
ysize Sets the y size for rectangle and ellipse annotations, in pixels.

Table 1-2: Annotation Dialog Parameter Descriptions (Continued)

Editing Map Key Items


1. In the Annotation dialog, click Edit Map Key Items to define or change items
in the map key. The Map Key Object Definition dialog appears.

Annotating Images and Plots ENVI User’s Guide


Chapter 1: Interactive Displays 39

Figure 1-4: Edit Map Key Dialog

2. Select from the list of key items.


• To add additional items to the list, click Add Item.
• To delete an item, select the item to delete and click Delete Item.
• To change the name of the item, enter the new name in the Name field.
• To define the color of the box, click the color button and select a color.
• To add additional colors, enter the DN values in the R, G, and B, fields for
red, green, and blue respectively. The newly defined color appears as black
in the image but is correct upon output.
• To change the fill type in the box, use the Fill drop-down list.
• To control the fill type, use the Orien and Spc fields.
• For vector keys, an Object Type drop-down list is included and has
polygon, polyline, and point selections.
• For a vector polygon item, use the Fill drop-down list and Orien and
Space fields to select the polygon fill type.

ENVI User’s Guide Annotating Images and Plots


40 Chapter 1: Interactive Displays

• For a vector polyline item, use the Line Style drop-down list to select
different line styles.
• For a vector point item, use the Symbol drop-down list to select the
symbol type to show in the key.
3. To change other parameters within the Annotation dialog, use the following:
• To set a background color, click Background and select a color.
• To change the text font for the key, the size, and the thickness of the letters,
select Object → Text.
• To change class colors, see “Mapping Class Colors” on page 123.

Figure 1-5: Vector Key Annotation

Saving Map Key Annotation


1. In the Map Key Object Definition dialog, click Save. The Save Map Key to
File dialog appears.
2. Enter an output filename.
3. Click OK. ENVI writes the key to a file. For consistency, save map key files
with the file extension .key.

Restoring Saved Map Key Files


1. In the Map Key Object Definition dialog, click Restore. The Enter Map Key
Definitions Filename dialog appears.
2. Select the input file and click Open.

Annotating Images and Plots ENVI User’s Guide


Chapter 1: Interactive Displays 41

Editing Annotations
You can move and change the attributes of annotation objects that are fixed in the
image.
1. From the Annotation dialog menu bar, select Object → Selection/Edit.
2. Select Options → Show Object Corners.
3. Left-click and drag to draw a box around the corner of the object in order to
select it.
4. Left-click on the handle and drag the object to a new location.
5. Change the object’s attributes by entering the new parameters in the
Annotation dialog.
Selection options are:
• To select multiple objects at once, left-click and drag a box around the objects.
• When more than one object is selected, the previously selected objects remain
active.
• When many objects are selected, using a handle to move one moves them all;
changing attributes change all the selected objects’ attributes.
• To edit selected vector objects (rectangle, ellipse, polygon, polyline, arrow),
left-click on a vertex and drag it to the desired location.
• To deselect an object, middle-click on the handle of the object.
• To deselect multiple objects, middle-click and drag to draw a box around the
objects.
• To deselect all of the annotation objects within an image, right-click within the
image.
• To select only those objects and deselect any previously active objects, right-
click and drag to draw a box around objects.
Additional options are available for selected annotation objects under the Selected
menu.

ENVI User’s Guide Annotating Images and Plots


42 Chapter 1: Interactive Displays

Annotation Options
In the Annotation dialog, use the Selected or Options menus to access annotation
options. Options available when working with annotation objects include undoing the
last action, joining polygons, swapping the positions of overlapping objects,
duplicating or deleting annotation objects, adding virtual borders to an image, turning
annotation mirroring on and off, and showing or hiding annotation object corners.
The options available from the Annotation dialog Selected menu are:
• Select All: Select all annotation objects.
• Join: Join the overlapping parts of two polygons.
• Swap: Bring an underlying object to the top.
• Duplicate: Duplicate existing annotation objects so you do not have to re-
create them.
• Delete: Delete all of the annotation objects within the image.
• Undo: Undo the last change made.
The options available from the Annotation dialog Options menu are:
• Turn Mirror On: Mirrors shapes and polygons around the center of the
image. Use mirroring with rectangles, ellipses, polygons, and polylines only. It
is intended designed for building custom filters for FFT filtering (see
“Defining FFT Filters” on page 562).
• Turn Mirror Off: Disable mirroring.
• Show Object Corners: Shows object corners. Use object corners to make it
easier to include corners in the selection box while in Selection mode. ENVI
can show object corners around all annotation objects except the vectors
(rectangle, ellipse, polygon, polyline, and arrow). It plots corners as small
asterisks around the annotation object.
• Hide Object Corners: Hide object corners.

Changing Snap Factors


In the Annotation dialog, set the snap factor to use for placing your annotations. The
snap factor causes any annotation located within the specified snap distance (in
pixels) to snap to the same pixel location. A snap factor of 1 (the default) specifies
placing the causes annotation exactly at the selected location.
1. In the Annotation dialog, select Options → Set Snap Value.

Annotating Images and Plots ENVI User’s Guide


Chapter 1: Interactive Displays 43

2. In the Set Snap Value dialog, use the increase/decrease buttons to select a value
or enter the value in the Snap field.
3. Click OK.

Managing Annotation Files


Use the File menu in the Annotation dialog to save and restore annotation files, and to
burn annotations into an image or plot.

Saving Annotations to Files


1. In the Annotation dialog menu bar, select File → Save Annotation. The
Output Annotation Filename dialog appears.
2. Enter the output filename in the field.
3. Select OK to save the annotation to an output file. ENVI saves annotation files
with the extension .ann, unless you specify a different extension.

Burning Annotation into Images and Plots


To burn the annotation into an image or plot when it has been placed:
1. In the Annotation dialog menu bar, select the Off radio button.
2. Select one of the following:
• For images: From the Display group menu bar, select File → Save Image
As → Postscript File.
• For plots: From the plot window menu bar, select File → Save Plot As →
PostScript.

Restoring Saved Annotation Files


1. From the Annotation dialog menu bar, select File → Restore Annotation. The
Enter Annotation Filename dialog appears with all .ann files listed by default.
2. Select the appropriate annotation file for ENVI to load and display.
3. Click Open.

ENVI User’s Guide Annotating Images and Plots


44 Chapter 1: Interactive Displays

Overlaying Classes
Use Classification to overlay classes on a gray scale or color image in a display
group; to control which classes display; to collect statistics; to edit the class colors
and names; to merge classes; and to edit classes by adding, deleting, or moving pixels
between classes.
Note
You must generate a classification image before using this function (see
“Classification Tools” on page 399).

1. From the Display group menu bar, select Overlay → Classification. The Input
File dialog appears. Select the classification file and click OK. The Interactive
Class Tool dialog appears, listing all the classes and class colors and names.
The active class displays at the top of the dialog. The Active Class is the class
to which to apply any operations, such as statistics or editing. To hide the
Interactive Class Tool dialog at any time without erasing your classes, see
“Showing and Hiding Overlay Dialogs and Layers” on page 29.

Figure 1-6: Interactive Class Tool Dialog

Overlaying Classes ENVI User’s Guide


Chapter 1: Interactive Displays 45

2. Select from the following options to edit and apply classes to your image.
• To change the active class, click the color box next to the class name.
• To display a class on the image select the On check box next to the class
name. You can display any number of classes at once.
• To display a single class and hide all other classes, double left-click on the
color box next to the class to display.
• To hide the currently displayed class and display all the other classes,
double left-click on the current class again.
• To hide all the classes, right-click on any color box.
• To display all the classes when all classes are hidden, right-click on any
color box.

Editing Classes
Use the Edit menu in the Interactive Class Tool dialog to edit classes by adding,
deleting, or moving pixels between classes and by drawing polygons, rectangles, or
ellipses.
Tip
Save your changes often by selecting File → Save. This way, if you make a mistake
you do not have to re-create everything.

When you are editing classes, make sure the active class is the class you want to edit.
Mouse button functions differ from the normal display mode when you use edit
mode. To return the mouse button functions to normal display mode, select Edit →
Mode: No Editing, or select Off from the Edit Window radio buttons.

Drawing Polygons to Add Pixels


To draw polygons in the selected image and add pixels from the polygon to the
selected class:
1. From the Interactive Class Tool dialog menu bar, select Edit → Mode:
Polygon Add to Class.
2. If you are editing a class, choose which window to draw in by selecting Image,
Scroll, or Zoom from the Edit Window radio buttons.
3. Select the class to which to add pixels from the color boxes.

ENVI User’s Guide Overlaying Classes


46 Chapter 1: Interactive Displays

4. Left-click to draw a polygon on the image. To close the polygon, right-click.


To accept the polygon, right-click again.
The new pixels change to the active class color. When moving pixels into another
class, you do not see changes to the new class color until you turn the class on.

Drawing Polygons to Delete Pixels


To delete pixels from the active class by drawing polygons:
1. From the Interactive Class Tool dialog menu bar, select Edit → Mode:
Polygon Delete from Class.
2. From the Interactive Class Tool dialog menu bar, select Edit → Set delete
class value.
3. In the dialog, select a class to which to assign the deleted pixels.
4. Draw polygons on the image to remove those pixels from the active class.

Setting Polygon Colors


The drawing color is the color to use to outline your polygon while drawing. It is not
the color the polygon is filled with when it is set. The fill color is the color defined for
the class.
To set the drawing color of a polygon:
1. From the Interactive Class Tool dialog menu bar, select Edit → Set polygon
draw color. The Set Polygon Draw Color dialog displays.
2. Click Polygon Color and select a color.
3. Click OK.

Selecting Polygon Types


To select what type of polygon you draw, select Edit → Polygon Type: polygon_type
from the Interactive Class Tool dialog menu bar.

Saving Changes
To save changes, select File → Save from the Interactive Class Tool dialog menu bar.

Overlaying Classes ENVI User’s Guide


Chapter 1: Interactive Displays 47

Undoing Class Changes


To undo all unsaved changes:
1. From the Interactive Class Tool dialog menu bar. select Edit → Undo
Changes.
2. In the question dialog, click Yes.

Class Options
Use the Interactive Class Tool Options menu to obtain statistics for classes and to
change class colors and names.

Viewing Class Distributions


To produce a report showing the number of pixels and percentage of pixels in each
class, select Options → Class distribution from the Interactive Class Tool menu bar.
ENVI processes the report and displays it in the Classification Distribution window.
ENVI automatically updates the report as pixels are added or removed from classes
during editing.

Editing Class Names and Colors


To change class colors and/or class names, select Options → Edit class
colors/names from the Interactive Class Tool menu bar. The Class Color Map
Editing dialog appears. See “Mapping Class Colors” on page 123.

Merging Classes
To merge one or more classes into a selected base class:
1. From the Interactive Class Tool dialog menu bar, select Options → Merge
classes. The Interactive Merge Classes dialog appears.
2. Select the Base Class name.
3. Select the names of the Classes to Merge into the Base Class.
4. Click OK. The next time you open the Class Distributions dialog, it is updated.

Plotting Mean Spectra


1. Select one of the following from the Interactive Class Tool dialog menu bar:
• To plot a mean spectrum for the active class, select Options → Mean for
active class.

ENVI User’s Guide Overlaying Classes


48 Chapter 1: Interactive Displays

• To plot the mean spectrum for all classes, select Options → Mean for all
classes.
2. If the Input File Associated with Classification Image dialog appears; select
the input file to calculate the statistics from and click OK. This dialog appears
only if an input file was set previously when using another Interactive Class
Tool dialog menu option.
ENVI computes the statistics and displays the mean spectra in a Class Means
plot window.

Plotting Statistics
1. Select one of the following from the Interactive Class Tool dialog menu bar:
• To plot the statistics for the active class, select Options → Stats for active
class.
• To plot the statistics for all classes, select Options → Stats for all classes.
2. If the Input File Associated with Classification Image dialog appears, select
the input file to calculate the statistics from. The dialog appears only if an input
file has not been set previously.
3. ENVI computes the statistics and displays a Class Statistics Results window.
The mean spectrum is in white, the +/- one standard deviation is in green, and
the minimum and maximum spectra are in red.
Tip
To get a text report and more detailed statistics for your classes, select
Classification → Post Classification → Class Statistics from the ENVI main
menu bar.

Changing the Statistics File


To change the statistics data file associated with the statistics:
1. From the Interactive Class Tool menu bar, select Options → Associated stats
data file. The Input File Associated with Classification Image dialog appears.
2. Select the filename.
3. Click OK.

Overlaying Classes ENVI User’s Guide


Chapter 1: Interactive Displays 49

Setting Class Transparency


To set a class transparency factor that allows the underlying image to show through
the overlying classes perform the following steps.
This option is only available in 24-bit color mode.
1. From the Interactive Class Tool menu bar, select Options → Class
Transparency. The Class Tool Transparency dialog appears.
2. Enter a transparency factor. A transparency factor of 0 allows no underlying
image to show through the classes; the classes are opaque. A transparency
factor of 100 shows only the underlying image with no overlying classes. A
transparency factor of 50 shows half underlying image and half overlying
classes.
3. Click OK.

Saving Classification Images


1. From the Interactive Class Tool dialog menu bar, select File → Save Changes
to File.
Note
Selecting Yes in the next step writes over the existing classification file.

2. In the ENVI Question dialog, click Yes. ENVI overwrites the current file with
the new classification image.

Saving Classification Displays as Images


To output the image with the classes overlaid, select File → Save Image As →
output_type from the Display group menu bar.

Printing Classification Displays


To print the image with the classes overlaid, select File → Print from the Display
group menu bar. Only the classes that are enabled appear in the output.
The classification overlay is included in the Graphics Overlay Selections list of the
Change Graphics Overlay Options dialog as <Displayed Class Overlay>. For more
information, see “Setting Graphics Overlay Options” on page 22.

ENVI User’s Guide Overlaying Classes


50 Chapter 1: Interactive Displays

Plotting Contour Lines


Use the Contour Lines option to overlay contour lines on an image. You can
generate contour lines from a displayed image or from a different image. For
example, you can extract contour lines from a digital elevation model and overlay
them on another co-registered image in a display group.

Figure 1-7: Contour Lines Overlay

1. From the Display group menu bar, select Overlay → Contour Lines. The
Input Contour Band dialog appears.
2. Select the band from which to generate the contours. Only bands that are the
same size as the displayed image are available. The Contour Plot dialog
appears, listing eight default contour levels in the Defined Contour Levels
area. ENVI defines these levels using a minimum and maximum data value,
calculated using the Scroll window. The Min and Max fields show the levels.

Plotting Contour Lines ENVI User’s Guide


Chapter 1: Interactive Displays 51

To hide or show the Contour Plot dialog at any time without erasing your
contours, see “Showing and Hiding Overlay Dialogs and Layers” on page 29.
3. Enter the minimum and maximum values in the appropriate fields. Click Reset
to return the range to its initial values.
4. By default, ENVI plots the contours in the Image, Scroll, and Zoom windows.
To plot the contours in fewer windows, clear the appropriate Window check
boxes at the bottom of the dialog. The check boxes that remain selected
indicate in which window to draw the contour.
5. Click Apply to plot the contours.

Plotting Contours from Another Image


The displayed image does not necessarily have to be the image from which contour
lines are calculated. You can use a separate image (for example, a DEM) to calculate
contours, and you can overlay them on the original image. This procedure only works
if the two images have the same x,y dimensions. The following example illustrates
the use of a DEM to generate contour lines for an image:
1. Open both the image and the DEM. ENVI lists both images in the Available
Bands List.
2. Display the image.
3. From the Display group menu bar, select Overlay → Contour Lines. The
Contour Band Choice dialog appears.
4. Select the DEM and click OK. The Contour Plot dialog appears.
5. Click Apply to apply the default contour lines calculated from the DEM.
To change the image on which the contour lines are based, select Options → Change
Contour Band from the Contour Plot dialog menu bar. The Contour Band Choice
dialog appears. Select a different image and click OK.

Editing Contour Levels


1. In the Contour Plot dialog, select a specific contour in the Defined Contours
Levels list.

ENVI User’s Guide Plotting Contour Lines


52 Chapter 1: Interactive Displays

Figure 1-8: Display Contour Plot Dialog

2. Click Edit Level.


3. Change the value to contour in the Level field.
4. Assign a Label to plot with the contour.
5. Specify the color for the selected contour, the line style, and the thickness by
choosing the parameter and changing the value.
6. Click OK to make the changes to the levels in the Defined Contour Levels
list.
7. Click Apply to replot the contours on the image.
To add new levels or set default levels, see “Contour Level Options” on page 53.

Removing Levels
To remove a level from the Defined Contours List:
1. Select a specific contour level.
2. Click Delete Level.
3. Click Apply to replot the contours.

Plotting Contour Lines ENVI User’s Guide


Chapter 1: Interactive Displays 53

Clearing Levels
To clear all the levels from the Defined Contours List in the Contour Plot dialog,
click Clear Levels.

Contour Level Options


Use the Options menu in the Contour Plot dialog to add new levels, set default levels,
and change the contour band.

Adding Contour Levels


1. From the Contour Plot dialog menu bar, select Options → Add New Levels.
The Add Contour Levels dialog appears.

Figure 1-9: Add Contour Levels Dialog

2. Enter an individual contour or ranges of contours in the Level Start field.


3. Enter the increment between contours in the Level Inc field.
4. Specify the number of contours in the # of Levels field (do not use negative
numbers).
5. To change the thickness, use the Thick field.
6. To change the line style, select from the Style drop-down list.
7. To change the color, click the color button and select a color.

ENVI User’s Guide Plotting Contour Lines


54 Chapter 1: Interactive Displays

8. Click the toggle button to select Use same color for each level (plot all
contours in the same color) or Increment colors for each level (plot each
contour level in a different color). The different colors of contour levels follow
the list of graphic colors.
9. Click OK to enter the new contours into the Defined Contour Levels list.
10. Click Apply to plot the contours to the display group.

Labeling Contour Overlays


You can label all of the contour lines overlaid on a DEM with the following:
1. From the DEM Display group menu bar, select Overlay → Contour Lines.
The Contour Plot dialog appears.
2. From the Contour Plot dialog menu bar, select Options → Label Contours
with Level Value.
3. Click Apply. ENVI labels each contour with its elevation value and adds the
labels to the display group.

Removing Contour Labels


Note
This action clears the labels associated with the contours. You cannot undo this
action.

1. From the Contour Plot dialog menu bar, select Options → Reset Contour
Labels.
2. Click Apply.

Selecting a New Contour Band


Specify a new band from which to generate levels by selecting the Change Contour
Band option:
1. From the Contour Plot dialog menu bar, select Options → Change Contour
Band. The Contour Band Choice dialog appears.
2. Select the file or band name from which to generate the new levels.
3. Click OK.

Plotting Contour Lines ENVI User’s Guide


Chapter 1: Interactive Displays 55

Setting the Number of Default Levels


1. From the Contour Plot dialog menu bar, select Options → Set Number of
Default Levels. The Set Number of Defaults dialog appears.
2. Enter the number of default contour levels.
3. Click OK.

Applying Default Levels (Single Color)


Use Apply Default Levels (Same Color) to reset the Defined Contour Levels list to
the default levels determined by the Min and Max values and the number of default
levels. When you select this option, all levels are plotted in a single color.
1. From the Contour Plot dialog menu bar, select Options → Apply Default
Levels (Same Color).
2. Click Apply to plot the contours.

Applying Default Levels (Multi Colors)


Use Apply Default Levels (Multi Color) to reset the Defined Contour Levels list to
the default levels determined by the Min and Max values and the number of default
levels. When you select this option, the contours are plotted in a range of colors:
1. From the Contour Plot dialog menu bar, select Options → Apply Default
Levels (Multi Color).
2. Click Apply to plot the contours.

Managing Contour Files


Use the File menu to save defined contour levels, to restore previously saved levels,
to export the contours to ENVI vector files (.evf), and to close the dialog.

Saving Contour Levels to Files


1. From the Contour Plot dialog menu bar, select File → Save Levels. The Save
Contour Levels to File dialog appears.
2. Enter an output filename with the default filename extension of .lev for
consistency.
3. Click OK.

ENVI User’s Guide Plotting Contour Lines


56 Chapter 1: Interactive Displays

Restoring Saved Contour Levels


1. From the Contour Plot dialog menu bar, select File → Restore Levels. The
Enter Contour Levels Filename dialog appears, with all files with the .lev
extension listed by default.
2. Select the filename and click Open.

Exporting Contours to ENVI Vector Files


When exporting contour lines to an EVF file, you can export the elevation values and
the contour labels as attributes. As attributes, they appear in the Layer Attributes table
for the EVF file.
1. From the Contour Plot dialog menu bar, select File → Output Contours to
EVFs. The Output Contours to EVF Parameters dialog appears.
2. Select Yes or No from the Separate Layer for each Level? toggle button.
3. Select Yes or No from the Output Elevation as Attribute? toggle button.
ENVI creates double-precision output for elevation values.
4. Select Yes or No from the Output Labels as Attribute? toggle button. ENVI
creates text output for labels.
5. Change the Output Layer name if needed.
6. Select output to File or Memory.
7. Click OK. ENVI adds the resulting output to the Available Vectors List.
Note
If your file is larger than the tile size, it is subsampled to fit within a single tile (see
“Image Tile Size” on page 1161). For example, if your image is 2048 x 2048 pixels
and the tile size is set to 1 MB, that image is subsampled to 1024 x 1024 pixels and
the contours are calculated then output. Therefore, the resolution of the output EVF
may not be the same as the contour overlay.

Creating QuickMaps from Contoured Images


To create a QuickMap from an image overlaid with contours, first save the image as
an ENVI default image:
1. From the Display group menu bar, select File → Save Image As → Image
File. The Output Display to Image File dialog appears.
2. Ensure ENVI is the Output File Type in drop-down list.

Plotting Contour Lines ENVI User’s Guide


Chapter 1: Interactive Displays 57

3. Adjust other parameters as needed. See “Saving to Image Files” on page 18 for
details.
4. Open the image in a new display group. It should contain the contours.
5. From the Display group menu bar, select File → QuickMap → New
QuickMap or from Previous Template. This QuickMap now contains the
contour overlays. This suggested workaround may not produce the best results
in all situations. During the vector-to-raster conversion (saving the contours to
the image), the vectors are pixelized and will affect the quality of the
QuickMap. See “Creating QuickMaps” on page 24 for more information.

ENVI User’s Guide Plotting Contour Lines


58 Chapter 1: Interactive Displays

Interactive Density Slicing


Use Density Slice to select data ranges and colors for highlighting areas in a gray
scale image. You can use data ranges in the density slice coloring that are from the
displayed image or from another image of the same size.
1. Select one of the following:
• From the Display group menu bar, select Overlay → Density Slice.
or
• From the Display group menu bar, select Tools → Color Mapping →
Density Slice.
The Density Slice Band Choice dialog appears. It lists all of the bands that
have the same spatial size as the image in the display group.
2. Select the name of the band to use for the density slice data ranges. The
Density Slice dialog appears with eight default ranges listed under Defined
Density Slice Ranges. ENVI defines the ranges using a minimum and
maximum data value calculated from the Scroll window. The values show in
the Min and Max fields.
To hide or show the Density Slice dialog at any time without erasing your color
tables, see “Showing and Hiding Overlay Dialogs and Layers” on page 29.

Interactive Density Slicing ENVI User’s Guide


Chapter 1: Interactive Displays 59

Figure 1-10: Density Slice Dialog

3. Enter the minimum and maximum values in the appropriate fields to change
the density slice range. To reset the data range to the initial values, click Reset.
4. Select whether to apply the density slice colors to the Image window, Scroll
window, or both windows by selecting the desired check boxes next to
Windows at the bottom of the dialog.
5. Click Apply to apply the selected ranges and colors to the image.
• To remove a range from the list, select the data range and click Delete
Range.
• To clear the list of density slice ranges, click Clear Ranges.

Editing Data Ranges


To change the range values or color of a density slice:
1. In the Density Slice dialog, highlight a data range and click Edit Range. The
Edit Density Slice Range dialog appears. The dialog choices are different
depending on whether you are using a 24-bit or 8-bit display.

ENVI User’s Guide Interactive Density Slicing


60 Chapter 1: Interactive Displays

2. Select one of the following options:


• If you have an 8-bit display, enter the minimum and maximum values and
click the Color button and select a color.
• If you have a 24-bit display, select RGB, HLS, or HSV as your color
system from drop-down list. Use the Red, Green, Blue fields to set your
own color definitions.
3. Click OK to make the changes to the range in the Defined Density Slice
Ranges list.
4. Click Apply to apply the new ranges and colors to the image.

Density Slice Options


Use the Options menu to add new ranges, set default ranges, and set the number of
default ranges to use.

Adding Ranges
To add new ranges to the list in the Density Slice dialog:
1. From the Density Slice dialog menu bar, select Options → Add New Ranges.
The Add Density Slice Ranges dialog appears.
2. Enter the Range Start value, Range End, and # of Ranges in the appropriate
fields.
3. Choose the starting color from color button. The colors of multiple ranges
follow the list of graphics colors.
4. Click OK. The Density Slice dialog appears. ENVI lists the ranges in the
dialog, and you can edit them.
5. Click Apply to apply the density slicing colors to the image.

Changing Bands
1. From the Density Slice dialog menu bar, select Options → Change Density
Slice Band. The Density Slice Band Choice dialog appears.
2. Change the band used for the density slice data ranges by selecting the
bandname.
3. Click OK. ENVI applies the new density slice coloring.

Interactive Density Slicing ENVI User’s Guide


Chapter 1: Interactive Displays 61

Setting Defaults
1. From the Density Slice dialog menu bar, select Options → Set Number of
Default Ranges. The Set Number of Ranges dialog appears.
2. Enter the number of default density slice ranges.
3. Click OK.

Resetting Defaults
To reset the Defined Density Slice Ranges list to the default ranges and colors
determined by the Min and Max values and number of set default ranges:
1. From the Density Slice dialog menu bar, select Options → Apply Default
Ranges.
2. Click Apply to apply these ranges and colors to the display.

Managing Density Slice Files


Use the File menu to save density slices, restore density slices, export density slice
ranges to vector files, or export density slice ranges to a class image.

Saving Density Slices


To save the current list of density slice ranges and colors to a file:
1. From the Density Slice dialog menu bar, select File → Save Ranges. The
Density Slice Ranges dialog appears.
2. Enter an output filename with a default extension of .dsr for consistency.
3. Click OK.

Restoring Saved Density Slices


To restore previously saved density slice ranges and colors:
1. From the Density Slice dialog menu bar, select File → Restore Ranges. The
Enter Density Slice Range File dialog appears.
2. Select the input file and click Open.

ENVI User’s Guide Interactive Density Slicing


62 Chapter 1: Interactive Displays

Exporting Density Slice Ranges to a Vector File


To export density slice ranges to an ENVI vector file (.evf):
1. From the Density Slice dialog menu bar, select File → Output Ranges to
EVFs. The Output Ranges to EVFs dialog appears. This dialog contains the
following items.
2. Select one or more a density slice ranges to export to a vector file from the
Select Ranges for EVFs list.
3. Click the Output toggle button to specify to export the ranges as a Single
Layer, or as One Layer per Range (separate layers one per range).
4. Select output to File or Memory.
5. Click OK.

Exporting Density Slice Ranges to a Class Image


To export density slice ranges to an ENVI classification image (class image):
1. From the Density Slice dialog menu bar, select File → Output Ranges to
Class Image. The Output Ranges to Class Image dialog appears.
2. Select output to File or Memory.
3. Click OK.

Creating QuickMaps from Density-Sliced Images


To create a QuickMap from an image overlaid with a density slice, first save the
image as an ENVI default image:
1. From the Display group menu bar, select File → Save Image As → Image
File. The Output Display to Image File dialog appears.
2. Ensure ENVI is the Output File Type in drop-down list.
3. Adjust other parameters as needed. See “Saving to Image Files” on page 18 for
details.
4. Open the image in a new display group. It should contain the density slice.
5. From the Display group menu bar, select File → QuickMap → New
QuickMap or from Previous Template. This QuickMap now contains the
density slice. See “Creating QuickMaps” on page 24 for more information.

Interactive Density Slicing ENVI User’s Guide


Chapter 1: Interactive Displays 63

Adding Grid Lines


Use Grid Lines to overlay one or more grids on an image. You can use grids that are
pixel-based or map-coordinate and/or latitude/longitude based (for georeferenced
images). Each image display can have its own set of grids, which display in the
Image, Scroll, and Zoom windows.
Tip
Use ENVI’s QuickMap feature to quickly overlay grid lines, titles, declination
diagrams, North arrows, and borders on georeferenced images. For details, see
“Creating QuickMaps” on page 24.

ENVI User’s Guide Adding Grid Lines


64 Chapter 1: Interactive Displays

Figure 1-11: A Pixel-based Image Grid

Adding Grid Lines ENVI User’s Guide


Chapter 1: Interactive Displays 65

Figure 1-12: Multiple Grid (Pixel, Map, Geographic) Coordinates on a


Georeferenced Image

Pixel-Based Image Grids


Images that have not been referenced to map coordinates can only have pixel-based
grids. In this case, the grid spacing is specified in pixels (from (1, 1) in the upper-left
corner) and the grid lines are labeled with the pixel coordinates.

ENVI User’s Guide Adding Grid Lines


66 Chapter 1: Interactive Displays

Georeferenced Image Grids


Georeferenced images have grids that are based on map coordinates or geographic
coordinates (latitude/longitude). ENVI assumes the image is already in the
appropriate map projection before displaying the grid. The grid spacing is specified
in projection units (normally meters), based on the reference pixel given in the image
header file. The grid coordinates are labeled with the appropriate map coordinates.

Overlaying Grid Lines


1. From the Display group menu bar, select Overlay → Grid Lines. The Grid
Line Parameters dialog appears and the image is re-displayed with a virtual
border if one is not already applied.
2. Select the desired check boxes next to the Window field at the bottom of the
dialog to plot the grid lines in the Image window and/or the Scroll window.
3. To select the grids to display, click the On/Off toggle buttons next to the labels
Pixel Grid, Map Grid, and Geographic Grid.
If the image is not georeferenced, then the Map and Geographic coordinate
grids are not available. If your image is georeferenced, both the Map and
Geographic grids are turned on initially.
To hide or show the Grid Line Parameters dialog without erasing your classes,
see “Showing and Hiding Overlay Dialogs and Layers” on page 29.

Setting Pixel and Map Grid Spacing


Grid spacing is in number of pixels for pixel-based grids and in meters for map
coordinate grids.
In the Grid Line Parameters dialog, enter values in Grid Spacing fields.

Setting Geographic Grid Spacing


1. In the Grid Line Parameters dialog, click DMS ↔ DD to change between
degrees-minutes-seconds and decimal-degrees for the geographic grids.
2. In the Spacing fields, enter the spacing in degrees-minutes-seconds or
decimal-degrees.
3. Click Apply to plot the grids on the image.

Adding Grid Lines ENVI User’s Guide


Chapter 1: Interactive Displays 67

Grid Line Options


Use the Options menu in the Grid Line Parameters dialog to change the
characteristics of all three grids and to change the display borders.

Changing Borders
To change the display borders size and color:
1. From the Grid Line Parameters dialog menu bar, select Options → Set
Display Borders.
2. Enter the border size for the left, top, right and bottom in pixels.
3. To select the border color, click Border Color.

Editing Grid Characteristics


To change colors, label size and font, and other grid characteristics:
1. From the Grid Line Parameters dialog menu bar, select Options → Edit
Pixel/Map/Geographic Grid Attributes. The Edit Map Attributes dialog
appears.
2. To enable and disable the plotting of the specific grid elements on the
displayed image, toggle the On/Off toggle buttons next to each element name.
3. To plot grid labels outside the image in the virtual border, enable Labels.
ENVI also places ticks along the edges of the image adjacent to the labels.
4. To change the color, click the color button.
5. To change the thickness of the label, enter a value in the Thick field.
6. To change the font of the labels, click Font and select a font. For more
information on fonts, see “Installing Other TrueType Fonts with ENVI” on
page 1169.
7. To change the size, enter a value in the Charsize field.
8. To control the distance of the labels from the edge of the image for each grid
type, use the Dist parameter. Larger numbers are farther from the edge.
9. The X-axis Labels and Y-axis Labels toggle buttons toggle between
horizontal (H) or vertical (V) display of labels for both the x and y grid axes
independently.
10. To plot x and y grid lines, enable the Lines option.
11. To draw a Neat Line box around the image, enable the Box option.

ENVI User’s Guide Adding Grid Lines


68 Chapter 1: Interactive Displays

12. To plot tick marks at each grid intersection, enable Corners.


13. To set the line type for the grid and box lines (solid, dotted, dashed, and so
forth), select from the Style menu.
14. To set the thickness of the items, enter the value in the Thick field.
15. Click OK when the grid line attributes are set.
16. Click Apply to plot the grid lines on the image.

Managing Grid Files


Use the File menu to save and restore grid setups.

Saving Grid Parameters


To save the grid parameter settings to a file:
1. From the Grid Line Parameters dialog menu bar, select File → Save Setup.
The Output Grid Parameters dialog appears.
2. Enter an output filename. Save grid setup files with the file extension .grd for
consistency; however, you may specify another extension.
3. Click OK.

Restoring Saved Grid Setups


1. From the Grid Line Parameters dialog menu bar, select File → Restore Setup.
The file selection window appears with all .grd files listed by default.
2. Select the grid file.
3. Click OK.

Saving Grid Lines


See “Saving Images from Displays” on page 15 for instructions to burn Grid Lines
into images. The virtual border is automatically added to the image and the grid
labels are burned in around the outside of the image.

Adding Grid Lines ENVI User’s Guide


Chapter 1: Interactive Displays 69

Creating Regions of Interest


Use Region of Interest to access common ROI functions such as defining, saving,
restoring, deleting, exporting, and reconciling ROIs. Also use it to create
classification images from ROIs or to convert image values to ROIs.
See “Defining ROIs” on page 323 for details.

ENVI User’s Guide Creating Regions of Interest


70 Chapter 1: Interactive Displays

Overlaying Vectors
Use ENVI Vector Tools to view vector data such as USGS Digital Line Graphs
(DLG), USGS DLGs in Spatial Data Transfer Standard (SDTS) format, DXF files,
ARC/INFO Interchange files, and shapefiles. ENVI provides two ways of displaying
and working with vectors:
• Using the menu selections in the display group and the Vector Parameters
dialog (Figure 1-13).

Figure 1-13: Image Display Group (left) and Vector Parameters Dialog (right)

Overlaying Vectors ENVI User’s Guide


Chapter 1: Interactive Displays 71

• Using the vectors by themselves in a Vector window with the same menu bar
as the Vector Parameters dialog and using the right-click menu selections (see
“Working with Vectors” on page 1013 for details).
The method for overlaying vectors onto an image display is discussed in the sections
that follow.
Tip
The Mouse Button Descriptions window is useful when working with vectors
because it provides information about the function of each mouse button at any
given cursor location.

Use Vectors to overlay vector layers on an image, to control the appearance of the
vectors, and to interact with the vector attributes. You can also use ENVI’s interactive
vector functions to edit and query attributes associated with shapefiles and to create
your own vector files and attributes.

Opening Vector Layers


Each image display can have its own vectors, which display in the Image, Scroll,
and/or Zoom windows.
• To read vector data from disk files, see Opening Vector Files in Getting
Started with ENVI.
• To read USGS DLG files from tape, see “Reading USGS DLG Tapes” on
page 241.
• To open vector layers from the Available Vectors List, see The Available
Vectors List in Getting Started with ENVI.

Working with Vector Layers


From the Display group menu bar, select Overlay → Vectors to bring up the Vector
Parameters dialog. When vectors are overlaid on an image display, you can plot them
in the Image window and/or Scroll and Zoom windows. You can use the Vector
Parameters dialog to:
• Control the appearance of vector layers
• Add new vectors
• Export vector layer coordinates for use in image-to-map registration
• View, edit, and query vector attributes.

ENVI User’s Guide Overlaying Vectors


72 Chapter 1: Interactive Displays

Vector data often consist of multiple layers of vector data.


For example, the following figure shows that the available vector layers include
Roads and Trails, Hydrography, Pipe & Trans Lines, and Railroads.

Figure 1-14: Vector Parameters Dialog

Selecting Display Group Windows for Vectors


When you overlay vectors on an image, you can plot them in the Image window,
Zoom window, and/or Scroll window. You can also edit existing vectors or add new
vectors in any of the three display group windows.
• To select which window to use for editing or adding vectors, select the
Window radio button at the top of the Vector Parameters dialog for the desired
display group window.
• To select the display group windows to plot the vectors in, select from the
Image, Scroll, or Zoom check boxes at the bottom of the Vector Parameters
dialog.
Warning
Do not attempt to edit the same vector layer in two separate display groups at the
same time. If you are editing a vector layer, it is strongly recommended that you not
display the layer in any other display groups during the editing process. If you edit a
vector layer in two display groups at once, your data will be corrupted.

Overlaying Vectors ENVI User’s Guide


Chapter 1: Interactive Displays 73

Using Vector Options in the Right-Click Menu


Display group windows with vector overlays have many options which you can
access by right-clicking in the display group window chosen for the overlay (Image,
Scroll, or Zoom). The options available in the right-click menu changes depending on
the cursor mode selected (see “Controlling Cursor Modes” on page 1016 for more
information).

Figure 1-15: Image Window with Vector Overlay Right-Click Menu

If you have many display groups open and the Vector Parameters dialog associated
with the current display group is hidden behind other windows, you can use the
display group right-click menu to find its Vector Parameters dialog and bring it to the
front.
To do this, right-click anywhere in the display group and select <Find Vector
Parameters>.

Using the Available Vectors List


The Available Vector Layers list in the Vector Parameters dialog contains the vector
layers currently available for display. Use the Available Vector Layers list to interact
with all of your individual vector layers. If your overlaid vectors display in a Vector

ENVI User’s Guide Overlaying Vectors


74 Chapter 1: Interactive Displays

window, the active/available layers are viewable under the Vector window right-click
menu.
Selecting the Active Vector Layer
The active vector layer is the layer to which all editing or queries are performed.
To select the active vector layer from the Image window, right-click inside the Image
window and select which layer is active by choosing Select Active Layer →
layer_name.
To select the active vector layer from the Vector Parameter dialog, select the layer
name in the Available Vector Layers list to make it the active layer.

Figure 1-16: Right-Click Menu for Active Layer

Showing and Hiding Layers


In the Vector Parameters dialog, an asterisk next to a layer name indicates that the
layer is On, which means it is plotted when you click Apply. If an asterisk is not next
to a layer name, then the layer is Off. The default for each layer is On.
To show or hide vector layers, double-left-click on the layer name in the Available
Vector Layer list.

Overlaying Vectors ENVI User’s Guide


Chapter 1: Interactive Displays 75

You can optionally use a right-click menu to turn layers on and off:
1. Right-click on the layer name in the Available Vector Layers list, select
Select Active Layer, and click on a layer to make it the active layer.
2. Right-click again and select the Active Layer Off/On.

Setting the Current Layer Color


The color shown next to Current Layer in the Vector Parameters dialog is the color
of the currently selected layer. Use the color button to change the color.
To apply the selected color to the selected vector, click Apply.
If your vectors display in a Vector window, use Edit → Edit Layer Properties to
change the color (see “Changing Vector Layer Display Properties” on page 1016).

Setting the Current Highlight Color


The color shown in Current Highlight box is the color to use to highlight a vector
when it is selected in a vector attributes table (see “Vector Attributes” on page 1029).
Use the color button to change the color.

Exporting Vector Coordinates


To export the current vector cursor coordinates to the image-to-map registration
function, click Export in the Vector Parameters dialog. The Export button only
works if the image is registered to a map.

ENVI User’s Guide Overlaying Vectors


76 Chapter 1: Interactive Displays

Contrast Stretching and Quick Filtering


Use the Enhance menu tools to perform quick contrast stretches, to perform
interactive contrast stretching using histograms and to apply quick filter
enhancements to displayed data. These enhancements are not applied to the data files.
Use contrast stretching to adjust the color or gray scale range of a selected image so it
fills the computer display’s dynamic range and improves the contrast in the image.
Available stretching options allow you to do this using both linear and non-linear
methods.
When an image is first displayed, default stretch is determined in one of three ways:
• An ENVI lookup table (LUT) is automatically applied to the data if a LUT was
saved previously (see “Saving Stretch LUTs” on page 89).
• If a LUT does not exist for the displayed bands, the default stretch defined in
the .hdr file is used (see The ENVI Header Format in Getting Started with
ENVI).
• If no default stretch is defined in the .hdr file, ENVI uses the Display Default
Stretch preference.
ENVI provides both default quick stretching and interactive stretching.

Contrast Stretching and Quick Filtering ENVI User’s Guide


Chapter 1: Interactive Displays 77

Applying Display Filters


Select from several filter options that use sharpening, smoothing, and median filters.
These filters are applied to the displayed data only and can quickly enhance the
displayed data.
For more filtering functions and information, see “Filter Tools” on page 539.
From the Display group menu bar, select Enhance → Filter → filter_type, where
filter_type is one of the following:
• Sharpen [#]: Where [#x#] is the kernel center value. The sharpening filters
perform a high pass convolution on the data in the display group. ENVI offers
three types of sharpening filters, each one with a differing amount of data add-
back: [18]=90%, [14]=75%, [10]=50%. The sharpening filters with higher
kernel center values have a larger amount of the original data added back to the
filtered image.
When using the sharpening filters with unsigned integer data, the result may
not properly display due to the underflow of negative numbers. To avoid this,
use Filter → Convolutions and Morphology from the ENVI main menu bar
instead.
• Smooth [#x#]: Where [#x#] is the kernel center value. The smoothing filters
perform a low pass convolution on the data in the display group. Two
smoothing filters are available, with kernel sizes of 3x3 and 5x5. The larger
kernel size results in more smoothing.
• Median [#x#]: Where [#x#] is the kernel center value. The median filters
replace the center pixel value with the median value in the kernel. Two median
filters are available, with kernel sizes of 3x3 and 5x5. These filters can help
reduce salt and pepper type noise or speckle.

ENVI User’s Guide Applying Display Filters


78 Chapter 1: Interactive Displays

Applying Default (Quick) Stretches


Select from several default stretching options that use the data from the Image
window [Image], the Scroll window subsampled data [Scroll], or the Zoom window
data [Zoom].
You can also apply quick stretches from within the Interactive Contrast Stretching
dialog (see “Stretch Types” on page 82.)
From the Display group menu bar, select Enhance → stretch_type, where
stretch_type is one of the following:
• Linear: Uses the data minimum and maximum to perform a linear contrast
stretch (no clipping). This is particularly useful for displaying images with
only a few data values, where clipping might saturate all of the values.
• Linear 0-255: This stretch does not stretch the data, but instead it displays the
actual DN values of the pixels as computer screen display values that range
from 0 to 255, where 0 indicates no brightness and 255 indicates maximum
brightness.
When you use the Linear 0-255 stretch, you will most likely produce an image
that does not have many gray levels or colors because the data was not
stretched to fill the display’s dynamic range.
• Linear 2%: Applies a linear method with a 2% clip on both ends of the
displayed data.
• Gaussian: Applies a Gaussian method with a mean of DN 127 and the data
values at ± 3 standard deviations set to 255 and 0, respectively.
• Equalization: Applies a histogram equalization method to the displayed data.
• Square Root: Takes the square root of the input histogram then applies a linear
stretch.

Applying Default (Quick) Stretches ENVI User’s Guide


Chapter 1: Interactive Displays 79

Matching Histograms
Use Histogram Matching to automatically match the histogram of one displayed
image to another displayed image. This function makes the brightness distribution of
the two images as close as possible. The resulting histogram of the display where the
function was started is changed to match the current (source) histogram of the
selected image display. The histogram source is selected as the input histogram. You
can use this feature on both gray scale and color images.
To perform Histogram Matching, you must have at least two images displayed.
1. From the Display group menu bar of the histogram that you want to change,
select Enhance → Histogram Matching. The Histogram Matching Input
Parameters dialog appears.
2. In the Match To list, select the display number of the image with the
histogram you want to match to.
3. Under Input Histogram, select the source of the input histogram by selecting
the appropriate toggle button: Image, Scroll (subsampled data), Zoom, Band
(all pixels), or a ROI (region of interest).
4. Click OK. The display stretch changes to match the selected histogram.
Note
To see how the histogram matched, select Enhance → Interactive
Stretching in the image where you applied the histogram match.

The resulting dialog shows two histograms in the Output Histogram plot: the
imported histogram in red and the matched output histogram in white.

ENVI User’s Guide Matching Histograms


80 Chapter 1: Interactive Displays

Using Interactive Stretching


Use Interactive Stretching to stretch your image data by interacting with
histograms.
1. Select one of the following:
• From the Display group menu bar, select Enhance → Interactive
Stretching.
• In the display group, right-click and select Interactive Stretching.
An Input and an Output histogram appear in the Interactive Contrast Stretching
dialog. They show the current input data and applied stretch respectively. Two
vertical dotted lines mark the current minimum and maximum values of the
stretch.
For color images, the histogram color matches the color of the selected band
(the red band displays by default). The bottom of the Interactive Histogram
window shows the stretch type and the histogram source. To view the
histogram for the green or blue bands of a color image, select the G or B radio
button.
2. You can choose to have stretching or histogram changes applied to your
images automatically, by selecting Options → Auto Apply. To have changes
applied to your image only when you click Apply, deselect the Auto Apply by
selecting Options → Auto Apply and toggling the feature off.
See “Setting Stretch Parameters” for details on how to set the stretch parameters.

Viewing Data Details


To view the current DN, and the number of pixels, percentage, and cumulative
percent of pixels for that specific DN, left-click and hold the mouse button within the
histogram and drag the resulting white crosshair cursor.

Setting Stretch Parameters


Use the Options menu and interactive mouse functions to set preferences for your
stretch and to view details in the Interactive Histogram window.

Using Interactive Stretching ENVI User’s Guide


Chapter 1: Interactive Displays 81

Changing Min/Max Stretch Values


To change the minimum and maximum stretch values, click on either of the dotted
stretch bars and drag them to a new location, or enter the values in the fields at the top
of the dialog.
Tip
When specifying the minimum and maximum parameters in the fields, enter either
the actual values you want (for example, 37 for the minimum and 68 for the
maximum) or a percentage of the data (for example, 2% for the minimum and 98%
for the maximum). You can set the histogram values outside the data range but the
stretch values can only fall within the values shown on the input histogram.

When the values are entered, the output histogram updates to reflect the changes
made to the input histogram and shows the distribution of the data with the new
stretch applied.

Figure 1-17: Interactive Contrast Stretching Dialog.

ENVI User’s Guide Using Interactive Stretching


82 Chapter 1: Interactive Displays

Locking Stretch Bars


1. To lock the distance between the minimum and maximum stretch bars, select
Options → Stretch Bars: Locked from the Interactive Contrast Stretching
dialog menu bar. The distance between the stretch bars is locked and you can
move the two bars as one.
2. To unlock the bars, select Options → Stretch Bars:Unlocked.

Stretch Types
Use the Stretch_Type menu in the Interactive Contrast Stretching dialog to select
from a list of all available types of interactive stretches.
For information about interacting with the Interactive Histogram window, see
“Plotting Histograms in an ENVI Plot Window” on page 89).

Applying Linear Contrast Stretches


Linear contrast stretching is the default interactive stretch. A linear stretch sets a
minimum and maximum input value to 0 and 255 respectively and all other values in
between are linearly aligned to intermediate output values.
1. From the Interactive Contrast Stretching dialog menu bar, select
Stretch_Type → Linear Contrast Stretch.
2. To determine the minimum and maximum input value, left-click and move the
vertical bars (dotted white lines) on the input histogram to the desired location,
or set the minimum and maximum input values by entering the DN values or a
percentage of the data (for example, 5% for minimum and 95% for maximum)
in the Stretch fields.
Note
For information about interacting with the Interactive Histogram window,
see “Plotting Histograms in an ENVI Plot Window” on page 89.

3. Click Apply to apply the stretch to the displayed data. To re-display the
original stretch select Options → Reset Stretch.
The selected stretch can also be permanently applied to the displayed image as
described in “Converting Stretched Data” on page 89.

Using Interactive Stretching ENVI User’s Guide


Chapter 1: Interactive Displays 83

Applying Piecewise Linear Contrast Stretches


You can interactively define a piecewise linear contrast stretch by using the mouse to
position points in the input histogram. Linear segments connect the points to provide
linear stretching between them.
1. From the Interactive Contrast Stretching dialog menu bar, select
Stretch_Type → Piecewise Linear. A transfer function is plotted on the input
histogram.
2. Middle-click anywhere in the Input Histogram plot to add a node to the
transfer function. Line segments are plotted to connect the endpoints to the
plotted node symbol.
• To move the position of a point, left-click on the symbol and drag it to a
new position.
• To delete points, right-click on the symbol.
• To enter input and output values manually, select Options → Edit
Piecewise Linear.
3. The resulting histogram is plotted in the output display. The output histogram
shows the distribution of data with the new stretch applied.
4. Click Apply to apply the stretch to the displayed data.

Applying Gaussian Contrast Stretches


The default Gaussian stretch is centered at a mean DN of 127 with the data values ± 3
standard deviations set to 0 and 255.
1. From the Interactive Contrast Stretching dialog menu bar, select
Stretch_Type → Gaussian.
2. Enter minimum and maximum values for the stretch. The output histogram
shows the selected Gaussian function as a red curve. The stretched data
distribution is shown superimposed in white on the red Gaussian function. To
enter the number of standard deviations manually, select Options → Set
Gaussian Stdv.
3. Click Apply to apply the stretch to the displayed data.

ENVI User’s Guide Using Interactive Stretching


84 Chapter 1: Interactive Displays

Applying Histogram Equalization Contrast Stretches


To automatically scale the data to equalize the number of DNs in each histogram bin:
1. From the Interactive Contrast Stretching dialog menu bar, select
Stretch_Type → Equalization. The input histogram shows the unmodified
data distribution. The output histogram shows the equalization function as a
red curve, and the stretched data distribution is shown superimposed in white.
2. Click Apply to apply the stretch to the displayed data.

Applying Square Root Contrast Stretches


To take a square root of the input histogram then apply a linear stretch:
1. From the Interactive Contrast Stretching dialog menu bar, select
Stretch_Type → Square Root. The input histogram shows the unmodified
data distribution. The output histogram shows the square root function as a red
curve, and the stretched data distribution is shown superimposed in white.
2. Click Apply to apply the stretch to the displayed data.

Applying Arbitrary Contrast Stretching and Histogram


Matching
Use Arbitrary to draw any shape histogram on top of the Output Histogram or
match a histogram from another image.
1. From the Interactive Contrast Stretching dialog menu bar, select
Stretch_Type → Arbitrary. The Input Histogram shows the unmodified
data distribution.
2. Left-click to draw segments of the output histogram in the Output Histogram
window. The arbitrary histogram appears in green. To erase the histogram,
middle-click.
3. Right-click to accept the output histogram and match the data statistics to the
drawing. The output histogram shows your histogram in red and the matched
data function as a white curve.
4. Click Apply to apply the stretch to the displayed data.

Using Interactive Stretching ENVI User’s Guide


Chapter 1: Interactive Displays 85

Matching Histograms
Also use the Arbitrary Contrast Stretching function to match a histogram from one
image to the histogram of another.
1. Grab either the input or output histogram from one plot by left-clicking on the
Input Histogram or Output Histogram label at the top of the plot.
2. Drag the name into the other output histogram and release the button. The
imported histogram is plotted in red and the output histogram is stretched to
match the imported histogram.
3. Click Apply to apply the stretch to the displayed data.

Defining Lookup Tables


A user-defined lookup table (LUT) stretches each input DN to an output value. You
can restore the lookup table (see “Restoring Stretch LUTs” on page 90) or define it
interactively.
1. From the Interactive Contrast Stretching dialog menu bar, select
Stretch_Type → User Defined LUT.
2. From the Interactive Contrast Stretching dialog menu bar, select
Options → Edit User Defined LUT. The Contrast Stretching dialog appears
with list of the input DN values and their corresponding output stretch values
in the Edit User Defined LUT list. These values reflect the current stretch.

ENVI User’s Guide Using Interactive Stretching


86 Chapter 1: Interactive Displays

Figure 1-18: Edit User-Defined LUT dialog

3. Select the value to edit.


4. When it appears in the Edit Selected Item field, enter the value and press
Enter. To reset the lookup table to the values it had when the function was
initiated, click Reset.
5. Click OK.
6. Click Apply to apply the stretch to the displayed data.

Defining Histogram Source Information


You can extract input histogram information from the Image window, from the Scroll
window (subsampled), from the Zoom window, from the entire image band (all pixels
of the data), or from a user-defined region of interest (ROI).
From the Interactive Contrast Stretching dialog menu bar, select
Histogram_Source → input_data_source.
The output histogram, and thus the resulting stretch, changes based upon the source
of the input histogram.

Using Interactive Stretching ENVI User’s Guide


Chapter 1: Interactive Displays 87

Using Zoom Window Data


When the Zoom window is the data input source, you can choose from the following
additional options:
• To view histograms for different portions of the image, move the Zoom box in
the Image window.
• To view histograms for the Zoom window in real time, left-click and drag the
Zoom box in the Image window to a new location. The input and output
histograms are automatically updated as the box moves. Changing the size of
the Zoom box changes the pixels displayed, which also changes the
histograms.

Setting Histogram Parameters


Use the Histogram Parameters dialog and interactive mouse functions to set
preferences for your histograms.

Changing Histogram Vertical Scale


To change the vertical scale of the histograms, middle-click at the desired
maximum y value anywhere within the plot to scale.
To reset the vertical scale to the original y value, middle-click below the x axis of the
plot to reset.

Changing Histogram Min/Max


You can change the input histogram minimum and maximum values. You can select
values either inside or outside the actual data range. Any subsequent clipping using
histogram percentages will consider the histogram using the new minimum and
maximum data values.
1. From the Interactive Histogram window menu bar, select
Options → Histogram Parameters. The Histogram Parameters dialog
appears.
2. Enter minimum and maximum values for the histogram.
3. Press Enter. To restore the original range, click Reset Histogram.

Setting the Number of Bins


1. From the Interactive Histogram window dialog menu bar, select Options →
Histogram Parameters. The Histogram Parameters dialog appears.

ENVI User’s Guide Using Interactive Stretching


88 Chapter 1: Interactive Displays

2. In the Maximum Bins field, enter the maximum limit for the number of bins
used in the histogram.

Using the Same Range with New Data


To set your preference for whether the range you entered is retained when new data is
loaded, select Options → Auto Reset Histogram On or Auto Reset Histogram Off.
Optionally, in the Interactive Histogram window, select Options → Histogram
Parameters. The Histogram Parameters dialog appears, then click the Auto Reset
Histogram toggle button to select Yes or No.

Interactive Stretching Options


Options when working with interactive stretching include setting the floating-point
precision, resetting the stretch parameters to the original settings, and applying
stretches.

Setting Floating-Point Precision


If your data is floating-point, you can set the number of significant digits to display:
1. From the Interactive Histogram window menu bar, select Options → Set
Floating Point Precision.
2. Enter the number of digits of precision.
3. Click OK.

Resetting Stretches
To reset the stretch to what it was initially, select Options → Reset Stretch from the
Interactive Histogram window menu bar.

Applying Stretches
If you selected Options → Auto Apply: Off from the Interactive Histogram window
menu bar, click Apply to apply the stretch parameters.
You can also set the default Interactive Stretch Auto Apply preference

Managing Interactive Stretches


Use the File menu in the Interactive Histogram window to output histograms, save
and restore LUTs, convert stretched data, and to plot histograms in a plot window.

Using Interactive Stretching ENVI User’s Guide


Chapter 1: Interactive Displays 89

Converting Stretched Data


Use Export Stretch to convert data from one type to any other ENVI-supported data
type (for example, byte to floating-point, integer to byte, and so forth) and to save the
displayed data (with the current stretch applied) as an output file.
1. From the Interactive Histogram window menu bar, select File → Export
Stretch. The Export Stretch Parameters dialog appears.
2. Select an optional spatial subset and click OK. For subsetting details, see
“Spatial Subsetting” on page 215.
3. Select the output data type from the Output Data Type drop-down list.
4. Enter the output data range (minimum and maximum) in the appropriate fields.
5. Select output to File or Memory.
6. Click OK.

Plotting Histograms in an ENVI Plot Window


Use this procedure to plot a histogram in a new plot window. When the histogram is
plotted in a new window, you can apply ENVI’s interactive plot functions, such as
saving and annotation (see “Using Interactive Plot Functions” on page 106 for
instructions).
1. From the ENVI main menu bar, select Window → Start New Plot Window.
2. Left-click and drag the Input Histogram or Output Histogram text label at
the top of the plot into the new plot window.

Saving Histograms
Standard ENVI output options include Image, PostScript, BMP, HDF, JPEG, PICT,
SRF, TIFF, and XWD formats.
From the Interactive Contrast Stretching dialog menu bar, select File → Save Plot
As → PostScript or Image File. To print the Interactive Histogram window, select
File → Print.
The interaction is similar to that for saving plots, but no annotation is allowed. For
details, see “Saving Images from Displays” on page 15.

Saving Stretch LUTs


You can save stretch lookup tables (LUTs) to either an ASCII format file or an ENVI
format file.

ENVI User’s Guide Using Interactive Stretching


90 Chapter 1: Interactive Displays

To save an LUT, select File → Save Stretch to LUT → ASCII LUT or ENVI
Default LUT from the Interactive Contrast Stretching dialog menu bar.
• ASCII LUT saves the lookup table to a file as a single column of ASCII data
with the parameters Binsize and Data Min at the top of the file. The first value
in the data column corresponds to the LUT value for the input data minimum.
The next value is the LUT value for the input data minimum plus the binsize
and the remaining values in the column are saved in the same manner up to the
input data maximum value.
• ENVI Default LUT saves the LUT to an ENVI binary format file. This file is
automatically named with the input filename and an .lut extension and saved
in the same directory as the input file (or in the alternate header directory).
When the data band displays in ENVI, this LUT is automatically used as the
default stretch.

Restoring Stretch LUTs


1. To restore a previously saved LUT, select File → Restore LUT Stretch from
the Interactive Contrast Stretching dialog menu bar.
2. If no default .lut file exists for the band displayed, select either an ENVI
binary LUT file or an ASCII LUT file containing one column of LUT data
when the Input File dialog appears.
If no Binsize or Data Min parameters are contained in the file, ENVI assumes
that the binsize equals one and the data minimum is zero.

Using Interactive Stretching ENVI User’s Guide


Chapter 1: Interactive Displays 91

Display Linking and Dynamic Overlays


Use image linking and dynamic overlays to overlay portions of multiple images
simultaneously (or flicker images) and to perform identical operations on multiple
images from within a single Image window.

Linking Displays
Use Link to link and unlink images. When you link images, actions such as moving
the Zoom box in the Image window, the Image box in the Scroll window, changing
the zoom factor, or resizing one Image window are mirrored in all other linked Image
windows. Linking images works automatically in the following situations:
• One image is a spatial subset of the other and the xstart and ystart fields in the
header files are accurately set (if the subset was produced in ENVI, these
settings are done automatically).
• If the images are both georeferenced in the same projection and have identical
pixel sizes.
• If both images are already exactly co-registered (that is, same pixel size,
orientation, and identical map coverage on the ground).
The link offset can be manually set to overcome these limitations if the images have
identical pixel sizes and are in a similar projection.
To use the link function, you must have at least two Image windows open. The Link
option is not available when only one image displays.
1. From the Display group menu bar, select Tools → Link → Link Displays.
The Link Displays dialog appears.
2. Select from the list of available displays by using the toggle button for each
available display to select Yes or No.
3. Specify the link pixel for each image by specifying the Link xoff (x offset) and
yoff (y offset) parameters in pixels measured from the upper-left (1,1) corner
of each image.
4. Select the base image for the link by choosing the appropriate display from the
Link Size/Position drop-down list.
5. Toggle the Dynamic Overlay to On or Off for your linked images. When
Dynamic Overlay is On, left-clicking in one display overlays the image from
the linked display.

ENVI User’s Guide Display Linking and Dynamic Overlays


92 Chapter 1: Interactive Displays

6. You can set the Transparency level of the overlay in the Link Displays dialog
from 0 to 100%. In this case, 0% results in the second display completely
masking the display in which the mouse button was clicked, and 100% results
in a completely transparent overlay. A transparency factor of 50 shows half
underlying image and half dynamic overlay.
7. Click OK. ENVI sizes and positions all other images to correspond to the base
image.
If you already have images linked and want to link another image, open the Link
Displays dialog and select Yes for that display using the toggle button.
To remove a single Image window from the link, select Tools → Link → Unlink
Display in that Image window. The other windows remain linked.

Working with Multiple Dynamic Overlays


Use Dynamic Overlays for real-time overlay and toggling (flickering) of multiple
gray scale or color images. By default, dynamic overlays are activated automatically
when two or more windows are first linked. Multiple overlays are simultaneously
active in all linked Image windows and in each Zoom window.
Dynamic overlays do not work with Geographic Link or with an image that is
georeferenced with non-zero rotation.

Display Linking and Dynamic Overlays ENVI User’s Guide


Chapter 1: Interactive Displays 93

Figure 1-19: Example of Dynamic Overlays

The following steps show how to use dynamic overlays.


1. From the Display group menu bar, select Tools → Link → Link Displays.
The Link Displays dialog appears.
2. The displays to link are toggle-selected in this dialog. Click OK to apply the
link.
3. When the displays are linked, you can use the Dynamic Overlay option to
select On and Off using the following Display group menu bar selections:
• Tools → Link → Dynamic Overlay On
• Tools → Link → Dynamic Overlay Off

ENVI User’s Guide Display Linking and Dynamic Overlays


94 Chapter 1: Interactive Displays

4. Select from the following options. See “Mouse Button Functions with
Dynamic Overlays On” and “Mouse Button Functions with Dynamic Overlays
Off” on page 95 for additional information.
• To show a second linked image (the overlay) in the first image (the base),
left-click in any of the linked images.
• To cause the multiple overlays to cycle, successively displaying each
linked image as an overlay on the base image, left-click and hold the
mouse button and simultaneously middle-click. You can also cycle through
all the linked images by left-clicking and holding the mouse button and
pressing the n key on your keyboard.
• To move the overlays around inside a specific image and compare the two
images, left-click and hold the mouse button and move the cursor in the
image.
• To change the size of the overlay, middle-click, drag the corner of the
overlay, and release the mouse button. After resizing, left-click to
reposition the overlay.
• To do a quick comparison of the images (flicker) by repeatedly left-
clicking and releasing to activate the overlay effect. Select Tools →
Link → Dynamic Overlay Off from the Display group menu bar to
disable the flickering feature.
• When displays are linked, you can reposition the Zoom window by left-
clicking and dragging when the cursor is within the Zoom box in the
Image window.
• To save to memory the image displayed in the Image window with the
dynamic overlay shown, press the p key on your keyboard while left-
clicking and holding the mouse button. ENVI adds the resulting output to
the Available Bands List.

Display Linking and Dynamic Overlays ENVI User’s Guide


Chapter 1: Interactive Displays 95

Mouse Button Functions with Dynamic Overlays On


The following are the mouse button functions for linked images when dynamic
overlay is on.

Mouse Button Function

Left Click and drag the overlay (see the left mouse button
description for Zoom box functions in the following table for
an exception).
Middle Resize the overlay.
Right Click to display the right-click menu.
Left + Middle Cycle multiple overlays.

Table 1-3: Mouse Button Functions – Linked Images with Dynamic Overlays

Mouse Button Functions with Dynamic Overlays Off


The following are the mouse button functions for linked images when dynamic
overlay is off.

Mouse Button Function

Left Clicking and dragging inside the Zoom box causes


repositioning of the selected Zoom window. The portion
of the image displayed in the Zoom window is updated
when released.
Middle Position the current pixel at the center of the Zoom
window.
Right Click to display the right-click menu.

Table 1-4: Mouse Button Functions – Linked Images without Dynamic


Overlays

ENVI User’s Guide Display Linking and Dynamic Overlays


96 Chapter 1: Interactive Displays

Linking Multi-Resolution Georeferenced Images


Use Geographic Link to link display groups and Vector windows containing
georeferenced data. When linked, all displayed georeferenced images and Vector
windows update to the current cursor map location when you move the cursor. This
function works regardless of the projection, pixel size, and rotation factor of each
dataset.
Geographic Link does not provide any on-the-fly reprojection, resampling, or
dynamic overlay. To reproject and resample datasets to the same projection and
resolution, see “Layer Stacking” on page 269.
To create a geographic link:
1. Select either:
• From the Display group menu bar, select Tools → Link → Geographic
Link.
• Right-click in the Display group and select Geographic Link.
The Geographic Link dialog displays.
2. Select the displays to link and click the associated toggle buttons to On to link
the displays.
3. Click OK. When you move the cursor in one georeferenced Image or Vector
window, the cursor in all other georeferenced images and vector windows will
move to the same map location.
To turn a geographic link off:
1. From the Display group menu bar, select Tools → Link → Geographic Link.
The Geographic Link dialog displays.
2. Click the toggle buttons beside the display names to select Off for the displays
to unlink.
3. Click OK.

Display Linking and Dynamic Overlays ENVI User’s Guide


Chapter 1: Interactive Displays 97

Interactive Profiles and Spectral Plots


ENVI allows extraction of horizontal (x), vertical (y), spectral (z for individual
pixels), and arbitrary profiles.
The profiles display in separate plot windows. You can have the X, Y, and Z Profiles
active simultaneously. Use the mouse to move a crosshair and select the profiles
interactively. The profiles are ENVI plots and have associated controls and options
described in detail in “Using Interactive Plot Functions” on page 106.
ENVI’s Z Profile capabilities provide integral spectrum analysis. You can extract
spectra from any multispectral dataset including MSS, TM, GEOSCAN (24 bands),
GERIS (63 bands), and AVIRIS (224 bands).
Tip
To show the entire data range, enable the Auto Scale Y-Axis on when plotting
profiles (select Options → Auto Scale Y-Axis On).

Extracting X and Y (Horizontal and Vertical) Profiles


The x profile is automatically extracted for pixels that fall along the horizontal cursor
line, while a y profile is extracted for pixels that fall along the vertical cursor line.
If a color composite image displays, x and y profiles are plotted for all three images
in their corresponding colors (RGB). If only one band displays, the profile of that
band is plotted in white. A vertical line marks the current line or sample location of
the crosshair in the x or y profile respectively.
1. From the Display group menu bar, select Tools → Profiles → X Profile or
Y Profile.
A crosshair appears in the Image and Zoom windows at the current pixel and a
plot window appears with a profile for the current horizontal or vertical
crosshair.
2. Left-click on another pixel to extract a new profile. The horizontal, vertical,
and spectral profiles are updated continuously as the current pixel location is
moved.
To activate continuous real-time browsing, middle-click and drag the Zoom
box in the Image window to the desired location.

ENVI User’s Guide Interactive Profiles and Spectral Plots


98 Chapter 1: Interactive Displays

Figure 1-20: x and y Profiles

3. When the x or y profile is extracted, left-click and hold the mouse button in the
profile plot and drag the cursor to mark the current position on the profile with
crosshair cursor in the image. The Zoom box crosshair concurrently tracks the
location in the profile on the Scroll, Main and Zoom window and the Main and
Zoom images are updated to match the position of the cursor along the profile.

Extracting Z Profiles
Use ENVI’s Z Profiles to interactively plot the spectrum (all bands) for the pixel
under the cursor. You can extract spectra from any multispectral dataset including
MSS, TM, and higher spectral dimension data such as GEOSCAN (24 bands),
GERIS (63 bands), and AVIRIS (224 bands).
Vertical Plot bars in the Z Profile window show which band or RGB bands are
currently displayed in the window. You can interactively change the bands shown in
the window by moving the plot bars to new band positions.
For datasets with fewer than approximately 50 spectral bands, the extraction and
plotting of spectra are fast enough that you can use a BSQ data file. For higher
spectral dimension datasets such as hyperspectral data, using a BIL or BIP file allows
real-time extraction of spectra (see “Converting Data (BSQ, BIL, BIP)” on page 271).

Interactive Profiles and Spectral Plots ENVI User’s Guide


Chapter 1: Interactive Displays 99

Note
It is recommended to use the BIL data format for hyperspectral datasets because it
produces a response similar to the BIP data for spectral plotting and browsing, yet it
is much faster than BIP format for image display.

1. Select one of the following:


• From the Display group menu bar, select Tools → Profiles → Z Profile
(Spectrum).
• In the display group, right-click and select Z Profile (Spectrum).
2. Select a pixel in either the Image window or the Zoom window to plot the
corresponding spectrum in the plot window. A vertical line (plot bar) on the
plot marks the wavelength position of the currently displayed band. If a color
composite image displays, three colored lines appear, one for each displayed
band in the band’s respective color (RGB).
When plotting spectral profiles, ENVI does not interpolate across non-
continguous bands. Select a plot symbol (Edit → Data Parameters) in order
to view non-contiguous points.

Figure 1-21: z (spectral) Profile Plots (left) Landsat Thematic Mapper (Right)
AVIRIS

ENVI User’s Guide Interactive Profiles and Spectral Plots


100 Chapter 1: Interactive Displays

Note
When working with complex data types, a Z Profile reports different values than the
Cursor Location/Value tool. This is because Z Profiles cannot plot both real and
imaginary numbers, as with the Cursor Location/Value tool. Z Profiles show the log
of the absolute data values. To show only the real part of an image without taking
the log, you must write out the real portion of the image as a separate dataset.

Changing the Displayed Bands


Use this procedure to change the currently displayed bands in the window.
1. Change the plot bars to the desired bands by left-clicking and dragging the plot
bars.
2. Double-left-click within the Z Profile plot window to load the new bands into
the window.

Browsing Spectra
To perform spectral browsing, middle-click in the Zoom box, then left-click and drag
the box across the image.

Plotting Average Spectra


Use this procedure to plot an average spectrum calculated from a box of pixels
around the cursor.
1. From the Spectral Profile plot window menu bar, select Options → Set Z
Profile Avg window.
2. Enter the box size, in pixels, in the Window Size fields.
The average box size can also be set in the ENVI file header (see “Changing Z Plot
Information” on page 206).

Plotting Multiple Spectra


To plot multiple Z Profiles (spectra) over each other in the Spectral Profile plot
window, select Options → Collect Spectra from the Spectral Profile plot window
menu bar.
See “Using Interactive Plot Functions” on page 106 for a description of the other plot
options.

Interactive Profiles and Spectral Plots ENVI User’s Guide


Chapter 1: Interactive Displays 101

Extracting Additional Z Profiles


You can extract the Z Profile for the pixel under the cursor from an additional file and
plot it in a new plot window. After an additional Z Profile input file is selected, the
spectra are plotted as you are spectral browsing in the window just like the data Z
Profile. See “Extracting Z Profiles” on page 98 for details about Z Profile
interactions.
1. From the Display group menu bar, select Tools → Profiles → Additional Z
Profile.
2. Select the input filename for the additional Z Profile.
3. Select a pixel in either the Image window or the Zoom window to plot the
spectrum for the additional file in a new plot window.
Note
You can set an additional Z Profile filename in the header file so that every
time the Z Profile function is started, both the data Z Profile and additional Z
Profile are plotted. The two plot windows appear with one on top of the other
so you will have to move one window.

Creating Arbitrary Profiles (Transects)


Use this procedure to specify or create transects along which to draw arbitrary
profiles on the Image, Scroll, or Zoom windows. Multiple, simultaneous arbitrary
profiles are supported. The arbitrary profiles are numbered and color coded on the
display.
1. From the Display group menu bar, select Tools → Profiles → Arbitrary
Profile (Transect). The Spatial Profile Tool dialog appear.
2. Select the Image, Scroll, or Zoom radio button to designate which window to
extract the profile from.
3. Left-click in the image to start the transect in the selected window.
4. Left-click again at each new vertex of the profile.
To start over, middle-click to delete the entire transect prior to completion.

ENVI User’s Guide Interactive Profiles and Spectral Plots


102 Chapter 1: Interactive Displays

5. Right-click to select the final vertex and complete the transect. A handle (color
diamond shape) is placed on the drawn transect.
• To move the transect, left-click and drag the handle.
• To delete the transect, middle-click.
6. To extract and display the profile in a plot window, right-click.
If the transect is extracted from a three band color composite image, then three
profiles display in the plot window. The red band profile is a solid line, the
green band profile is a dotted line, and the blue band profile is a dash-dot line.
7. Left-click in the profile plot window and move the cursor to mark the current
position on the profile with a crosshair cursor in the image.
The Zoom box concurrently tracks the location in the profile on the Scroll,
Image, and Zoom windows, and the Image and Zoom images are updated to
match the position of the cursor along the profile.
8. To define another arbitrary profile, left-click in the Image, Scroll, or Zoom
window again to define the new vertices. The new profile is drawn and plotted
in a new color in a new plot window.

Saving Transects to an Annotation Files


Use this procedure to save arbitrary profile lines drawn on the image to an annotation
file.
1. From the Spatial Profile Tool dialog menu bar, select File → Save
Annotation. The Input File dialog appears.
2. Select a filename.
3. Click OK.

Saving Spatial Profile Information to an ASCII File


You can save all of the information associated with each spatial profile to an ASCII
file. To save the points of the transect from a specified spatial profile to an ASCII data
file, perform the following steps:
1. In the Extracted Profiles section of the Spatial Profile Tool dialog, select the
spatial profile whose transect points you want to save to an ASCII file.
2. From the Spatial Profile Tool dialog menu bar, select File → Save Transect
Points to ASCII. The Save Transect Points to ASCII dialog appears.
3. Select the bands to save in the Select Bands to Save list.

Interactive Profiles and Spectral Plots ENVI User’s Guide


Chapter 1: Interactive Displays 103

4. Enter the name of the output file for the transect points and their related band
profile values.
5. Click OK to save the transect points to the specified ASCII file. The resulting
text file contains the following columns:
• Point: The index number describing the location of the point within the
transect.
• X and Y: The point location in pixel values.
• Euclidian Distance: This value describes the length of a straight line
between a transect point and the transect origin. For a straight transect line,
this value and the Cumulative Distance value are the same.
• Cumulative Distance: This value describes the total length of the transect
up to the point specified. For a straight transect line, this value and the
Euclidian Distance value are the same.
• Band n: These columns contain the pixel values at each point in the
transect for each band selected.
If the image contains georeferencing information, the text file also includes the
following projection columns:
• Map X and Map Y: The point location in map projection units.
• Latitude and Longitude: The point location in geographic latitude and
longitude coordinates in decimal degrees.
• The rest of the columns contain the pixel values at each point in the
transect for each band selected.

Activating the Measurement Tool


1. From the Spatial Profile Tool dialog menu bar, select Options →
Measurement Report. The Profile Measurement Report dialog appears with a
list of the distances between the vertices and the total distance when the profile
is completed.
2. Choose from options in the Units, Area, and Options menus in the Profile
Measurement Report dialog to change the units to use to report the distances
and areas, or select whether to report the segment distances or the point
coordinates. See “Reporting ROI Measurements” on page 333 for more details.
3. From the Profile Measurement Report dialog menu bar, select File → Save
Points to ASCII to save the measurement information to a file.

ENVI User’s Guide Interactive Profiles and Spectral Plots


104 Chapter 1: Interactive Displays

Creating a Transect from Polyline Vectors


You can use polyline vectors from the Available Vectors List with the Spatial Profile
tool. Polygon and point vectors are not accepted. To create a transect from vectors
opened in ENVI, do the following.
1. In the Spatial Profile Tool, select Options → Create Transect from Vector.
The Import Vector Layers dialog appears. This dialog contains the following
items:
2. Select one or more vector layers to select them for import.
3. Click OK. ENVI converts the polylines individually into a transect. The
transects produce spatial profiles listed in the Extracted Profiles section of the
Spatial Profile Tool. The resulting spatial profiles display individually in new
plot windows.

Creating a Transect from Map-Based or Pixel-Based Endpoints


In addition to selecting transect endpoints by clicking on the image, you can specify
the starting and ending points of a transect using fields in a dialog. If your image data
does not contain any associated map information, the endpoints are specified as
paired x and y pixel locations. If the image data contains map information, the
endpoints are specified based on map (UTM, geographic, or other projection)
locations.
To create a transect from endpoints using the Spatial Profile Tool, perform the
following steps:
1. From the Spatial Profile Tool menu bar, select Options → Create Transect
from Endpoints.
If your image has no associated map information, the Enter Transect Endpoints
dialog appears with the following items:
• Start X: The x pixel location for the starting point of the transect.
• Start Y: The y pixel location for the starting point of the transect.
• End X: The x pixel location for the ending point of the transect.
• End Y: The y pixel location for the ending point of the transect.
If there is map information associated with your image, a different Enter
Transect Endpoints dialog appears with the following sections:
• Data Points: Provides the endpoints as map-based (with map projection
coordinates) or pixel-based (with pixel locations). Selecting the pixel-

Interactive Profiles and Spectral Plots ENVI User’s Guide


Chapter 1: Interactive Displays 105

based option initiates the Enter Transect Endpoints dialog. When map
information is available for the image, the default setting is map-based.
• First Map Coordinate: The starting geographic or map-based coordinate
of the transect.
• Second Map Coordinate: The ending geographic or map-based
coordinate of the transect.
2. Click OK. The transect produces a spatial profile that is listed in the Extracted
Profiles section of the Spatial Profile Tool dialog. The resulting spatial profile
displays in a new plot window.

Creating a Transect from ASCII Files


The Spatial Profile Tool can also accept and use transect data from an ASCII data file.
1. From the Spatial Profile Tool dialog menu bar, select Options → Create
Transect from ASCII Data.
2. Use the Enter ASCII Points Filename dialog to open an ASCII data file. The
Input ASCII File dialog appears.
3. Use the Input ASCII File dialog to specify the parameters of the input ASCII
file.
If you are creating a transect from an ASCII file previously saved using the
File → Save Transect Points to ASCII option in the Spatial Profile Tool, see
“Saving Spatial Profile Information to an ASCII File” on page 102 for more
information on the format of this file.
4. Click OK. The transect produces a spatial profile, which is listed in the
Extracted Profiles section of the Spatial Profile Tool. The resulting spatial
profile displays in a new plot window.

ENVI User’s Guide Interactive Profiles and Spectral Plots


106 Chapter 1: Interactive Displays

Using Interactive Plot Functions


Plot windows in general provide several interactive analysis capabilities including
moving plots between windows, data input and output, plot output, editing,
annotation, and other options.
For a description of mouse button functions for plot windows, see Plot Window
Mouse Button Functions in Getting Started with ENVI.

Displaying an X-Y Cursor


To display an X-Y line-cursor, click and hold the left mouse button within the plot.
The line cursor snaps to the closest data point when multiple plots display. The x and
y values of the point are listed in the lower left corner of the plot in the color
corresponding to the selected dataset.
To continuously display the line-cursor, data marker, and data values, move the cursor
while holding down the left mouse button.

Displaying Plot Data Labels


To toggle data labels on and off, right-click in the plot and select Plot Key.
To edit the plot data label see “Editing Y Plot Data Values” on page 113.
To delete a plot from the plot window, right-click on that data label and select
Remove plot name. You cannot delete the plot for the active cursor; for example, the
X Profile, the Y Profile or the Z Profile in their respective windows.

Moving Plots to Another Plot Window


To move plot labels and their associated data plots from one plot window to another,
left-click and drag the plot label into a different plot window.

Rescaling Plots (Magnify)


To rescale the x and y plot ranges within the plot:
1. Select the new region to display within the plot window by clicking and
holding the middle mouse button at one corner of a box to define the
magnification region.
To reset the profile to each of the previous regions, middle-click within the plot
to back-step through the previous scalings.

Using Interactive Plot Functions ENVI User’s Guide


Chapter 1: Interactive Displays 107

2. Drag the corner to define the box, then release the mouse button to redraw the
enlarged profile subset.

Figure 1-22: Magnify Box in Horizontal Profile

3. To set the y plot range to encompass the full range of all plotted data, middle-
click to the left of the plot frame.

Plot Window Right-Click Menu


Use the plot window right-click menu to access plot options such as turning the plot
key on or off, stacking and unstacking plots, scaling the plot range, and to clearing the
plot window.
For detailed descriptions of the menu options, see “Plot Window Options” on
page 113.

Importing Plot Data


Use the File menu in a plot window to input into the window. Data input formats
include ASCII and ENVI spectral library.

ENVI User’s Guide Using Interactive Plot Functions


108 Chapter 1: Interactive Displays

Importing ASCII Spectra Data


Use this procedure to load ASCII data or other (x,y) data to plot in a plot window.
ENVI reads ASCII data that has multiple columns separated by commas or white
space. Lines beginning with text or semicolons at the top of the file are ignored.
1. From the plot window menu bar, select File → Input Data → ASCII. The
ASCII Plot Filename dialog appears.
2. Select a filename and click Open. The Input ASCII File dialog appears.
3. To select the x values to read into the plot window, enter the number of the
column containing the x values into the X Axis Column field (usually column
1).
4. To select the y values to read into the plot window, select one or more columns
in the Select Y Axis Columns list.
5. To apply a scale factor to each y value, enter the multiplicative factor into the Y
Scale Factor field.

Figure 1-23: Input ASCII File Dialog

6. Click OK to load the spectrum or other (x,y) plot into the plot window. When
loaded, all of the other plot options are available.

Using Interactive Plot Functions ENVI User’s Guide


Chapter 1: Interactive Displays 109

Importing Spectral Library Data


1. From the plot window menu bar, select File → Input Data → Spectral
Library. The Input File dialog appears.
2. Select the name of a currently-open spectral library file or a new file.
3. Click OK. The Input Spectral Library dialog appears.
4. Select spectra by selecting the spectrum names.

Figure 1-24: Input Spectral Library Dialog

5. Click OK. ENVI loads the spectra into the plot window.

ENVI User’s Guide Using Interactive Plot Functions


110 Chapter 1: Interactive Displays

Editing in Plot Windows


Use the Edit menu to control data and plot parameters and to edit plot data. Data
parameters control the line types, colors, and other attributes of plotted data. Plot
parameters control the axes, titles, and data ranges plotted.

Editing Data Parameters


1. In the plot window, select Edit → Data Parameters. The Data Parameters
dialog appears
2. Select the name of the plot to edit and select from the following options. To
change the name of the data label, type the new name in the Name field and
press Enter.

Figure 1-25: Data Parameters Dialog

3. To change the color of the plotted line, use the color button.
4. To select the style of the line (for example, dotted, dashed, solid), choose from
Line Style drop-down list.
5. To set the thickness of the line, use the Thick field to adjust the value or enter
a new value.
6. To set the number of points to average in the x direction (smoothing) when
plotting the data, enter the value in the Nsum field and press Enter.
7. To select the symbol type, select from the Symbol drop-down list.

Using Interactive Plot Functions ENVI User’s Guide


Chapter 1: Interactive Displays 111

8. To control the size of the displayed symbols, use the SymSize field.
9. To display the line along with the selected symbols or display only the
symbols, use the toggle button Symbol & Line or Symbol Only.
10. Click Apply.

Editing Plot Parameters


1. From the plot window menu bar, select Edit → Plot Parameters. The Plot
Parameters dialog appears.

Figure 1-26: Plot Parameters Dialog

Modifications applied with the Plot Parameters dialog only appear in the plot
window when the Plot Parameters dialog is open. If you close the Plot
Parameters dialog, the plot parameters return to their default values.

ENVI User’s Guide Using Interactive Plot Functions


112 Chapter 1: Interactive Displays

2. To change the plot title, edit it in the Plot Title field.


3. To change the foreground and background colors use the Foreground and
Background color buttons.
4. To change the font used for plot labels, select from the Font drop-down button.
For more information on fonts, see “Installing Other TrueType Fonts with
ENVI” on page 1169.
5. To change the character size used for plot labels in the Charsize field.
6. To allow masking of y values outside the specified ranges (useful for masking
bad data points), enter values in the Min Val and Max Val fields at the bottom
of the dialog. Data values less than the entered minimum value and greater
than the entered maximum value are not plotted.
7. To set parameters for the x or y-axis, select the X-Axis or Y-Axis radio button.
Choose from the following options:
• To change the title of the axis, enter the title in the Axis Title field and
press Enter.
• To change the thickness, enter a new value (1 is normal thickness) in the
Thick field.
• To position the minimum and maximum values of the full data range
exactly at the ends of the axis, select the Style Exact check box.
• To offset the values slightly offset from the ends of the axis, select the
Style Extend check box.
• To disable the selected axis entirely, select the Style Off check box.
• To disable the top x axis or the right y axis, depending on which axis is
selected, select the Style No Box check box.
• To change the axis data range to display, type in the respective minimum
and maximum into the Range and To fields and press Enter. (For spectral
plots, the plot range for the y axis can also be set in the header file Z Plot
Range parameter. See “Changing Z Plot Information” on page 206).
• To plot the tick marks on the inside or outside of the axis, click the Tick
Style In or Out radio button.
• To plot a continuous line across the entire plot at the location of each major
tick mark click the Tick Style Grid radio button.
• To disable the tick marks entirely, click Tick Style Off.

Using Interactive Plot Functions ENVI User’s Guide


Chapter 1: Interactive Displays 113

• To change the length of the major tick marks when they are present, enter a
value between 0 and 0.5 in the Tick Length field, and the number of minor
tick marks in the Minor Ticks field. Lengths are measured as a ratio of the
axis length normalized to 1.0. For example, a length of 0.02 results in ticks
that are 2% of the length of the entire axis. A length of 0.5 results in lines
drawn across 50% of the plot that meet in the middle (the equivalent of the
grid option).
• Select either Auto or Fixed next to the label Tick Marks. The Auto option
places a predetermined number of major and minor ticks on the axis.
Major tick marks are labeled. The Fixed option allows you to enter the
axis parameters. This includes the starting and ending major ticks, the tick
increment between the major ticks, and the number of minor ticks between
major ticks.
• To control the size of the margins around the plot axes, enter the margin
size (in characters) in the Left Margin and Right Margin (for the x axis)
and the Bottom Margin and Top Margin (for the y axis) fields.
8. Click Apply.

Editing Y Plot Data Values


1. From the plot window menu bar, select Edit → Data Values. The Select
Which Plot to Edit dialog appears.
2. Select the name of the plot data to edit. The Edit Plot dialog appears,
containing a list of all x and y values as Xloc (x-value):yvalue, click the
y-value to edit. It appears in the Edit Selected Item fields.
3. Change the y-value to the value and press Enter to change that value in the
list.
4. Click OK. ENVI updates the plot with the new values.

Plot Window Options


Use the Options menu to create new plot windows, annotate plots, stack the data
plots, apply automatic scaling to the y-axis, clearing the plot window, and reset the
plot data range.

Creating New Plot Windows


To create a new, blank plot window, see Opening New Plot Windows in Getting
Started with ENVI.

ENVI User’s Guide Using Interactive Plot Functions


114 Chapter 1: Interactive Displays

Displaying Plot Keys


To turn plot key labels on or off, select Options → Plot Key from the plot window
menu bar or Plot Key from the right-click menu.

Stacking Plot Data


To offset all plots within the window so there are no overlapping data plots, select
Options → Stack Data from the plot window menu bar.
Setting Stack Offset
To set the amount of offset between each stacked plot:
1. From the plot window menu bar, select Options → Set Stack Offset.
2. Enter the value, in percent of data range, in the Plot Stack Offset field.
3. Click OK.
Unstacking Plot Data
To replot the data without stacking, select Options → Unstack Data from the plot
window menu bar. Unstack Data appears in the Options menu only if the data has
been stacked.

Displaying Profiles of Entire Bands


To show the x or y profile for the entire band instead of just the part of the band that
displays in the Image window, select Options → Profile: Full Band from the plot
window menu bar.
To show the x or y profile only for the part of the band that displays in the Image
window, select Options → Profile: Image Window.

Automatically Scaling the Y-Axis


To automatically rescale the y-axis to the data minimum and maximum when adding
or updating plots, select Options → Auto Scale Y-Axis On.
To leave the current y-axis range set, select Options → Auto Scale Y-Axis Off. If
auto scaling is Off and a plot is added outside the y-axis range set, that plot is not
visible until the y-axis is rescaled.

Clearing Plots
The Clear Plot selection appears under the Options menu in plot windows if they
were created using ENVI spectral library functions or using New Window.

Using Interactive Plot Functions ENVI User’s Guide


Chapter 1: Interactive Displays 115

To clear all of the displayed plots within one of these windows, select Options →
Clear Plot.
Profiles cannot be cleared because they contain the profile for the current pixel.

Resetting Plot Ranges


To reset the x and y plot axes to their default data ranges or minimum and maximum
values, select Options → Reset Range or middle-click to the left of the y-axis. This
option always resets the range to its original values even if it was reset using the Plot
Parameters option or using the middle mouse button to zoom into a part of the plot.

Plotting an Average Z Profile Spectrum


The Set Z Profile Avg Window selection appears under the Options menu in Z
Profile windows. Use it to plot an average spectrum calculated using a box around the
cursor:
1. From the Spectral Profile plot window menu bar, select Options → Set Z
Profile Avg Window.
2. Enter the box size, in pixels, in the Window Size fields.
The average box size can also be set in the ENVI file header (see “Changing Z Plot
Information” on page 206).

Collecting and Replacing Spectra


To plot multiple Z Profile spectra, select Options → Collect Spectra from the
Spectral Profile plot window menu bar.
To replace the current Z Profile with the new profile spectrum, select Options →
Replace Spectrum.

Additional Functions in Plot Windows


Select from the following additional plot functions. These functions are accessed
through the plot window Plot_Function menu.
• To plot the band number (or other index number) on the x axis, select
Plot_Function → X Axis:Index.
• For plots of images with wavelengths in the image header, plot the wavelength
on the x axis, select Plot_Function → X Axis:Wavelength.

ENVI User’s Guide Using Interactive Plot Functions


116 Chapter 1: Interactive Displays

• For plots of images with wavelengths in the image header, plot the wave
number (1/wavelength) on the x axis, select Plot_Function → X
Axis:1/Wavelength.
• To replot the data displayed in the window with its continuum removed, select
Plot_Function → Continuum Removed. The continuum is the convex hull
that fits over the data and is divided into the original data values to produce the
continuum removed values (see “Using Continuum Removal” on page 785 for
details). The continuum is calculated using the first and last data points
displayed in the plot, so for plots that have been zoomed, the continuum is
calculated based on the displayed data range only.
• To replot the data displayed in the plot window as binary encoded plots (0s and
1s), select Plot_Function → Binary Encoding. Binary encoding replots the
data as a spectrum of 0s and 1s. It calculates the mean of the data and encodes
each value as a 0 if it is less than or equal to the mean and as a 1 if it is greater
than the mean (see “Applying Binary Encoding Classification” on page 416 for
details).
• To replot the original data values, select Plot_Function → Normal.
You can add your own IDL plot function to this menu by entering the name of the
function into the useradd.txt file in the ENVI menu subdirectory (see “Plot
Functions” in the ENVI Programmer’s Guide) and adding a .pro or .sav file
containing the function code to the ENVI save_add subdirectory.

Saving Plot Data


Use the File menu in plot windows to save plot data. You can save plot images or
output data to ASCII files, spectral libraries, IDL variables, PostScript files, and
image files.

Saving Plot Data to ASCII Files


1. From the plot window menu bar, select File → Save Plot As → ASCII. The
Output Plots to ASCII File dialog appears.
2. Select the data to save by selecting the plot names in the Select Plots to
Output list.
3. Set the numeric precision for the x and y output ASCII variables.
4. Click the toggle button to select whether to save floating-point data in
Scientific or Normal format.

Using Interactive Plot Functions ENVI User’s Guide


Chapter 1: Interactive Displays 117

5. Enter the output name in the Enter Output Filename field.


6. Click OK.

Saving Plot Data to Spectral Libraries


Use this procedure to build an ENVI spectral library file (spectral library image) from
profiles and spectral plots.
1. From the plot window menu bar, select File → Save Plot As → Spectral
Library. The Output Plots to Spectral Library dialog appears.
2. Choose the spectra by selecting the spectrum name.
3. Select output to File or Memory.
4. Click OK.

Exporting Plot Data to the IDL Command Line


If the ENVI command line is not visible in the IDL window, select Window →
Command Input in the IDL window.
1. From the plot window menu bar, select File → Save Plot As → IDL Variable.
The Export Plots to IDL Variable dialog appears.
2. Select the Plots to Export by selecting the plot names.
3. Select one of the following options:
• In the New Variable Name dialog, enter the name of an undefined IDL
variable.
• If previous variables are defined, select the name of a variable to receive
the report from the displayed list.
4. Press Enter. The exported data is available to use at the ENVI command line.
If data from more than one plot is exported to a single variable, the data is
exported into a 2D array that contains the x and y values for each plot. The first
row, array [∗,0], contains the x values for the first plot, the second row, array
[∗,1], contains the y values for the first plot, the third row, array [∗,2], contains
the x values for the second plot, and so forth.

ENVI User’s Guide Using Interactive Plot Functions


118 Chapter 1: Interactive Displays

Saving Plots to Files and Printers


To save a plot and any associated annotation as a PostScript or other image format
file, select File → Save Plot As → PostScript or Image File from the plot window
menu bar.
To print the plot, select File → Print.
For details, see “Saving Images from Displays” on page 15.

Using Interactive Plot Functions ENVI User’s Guide


Chapter 1: Interactive Displays 119

Extracting Polarization Signatures


To extract and display polarization signatures from the current pixel for quad-
polarized radar data (AIRSAR and SIR-C), see “Using Polarimetric Tools” on
page 1113.

Figure 1-27: Current Pixel Polarization Signature

ENVI User’s Guide Extracting Polarization Signatures


120 Chapter 1: Interactive Displays

Color Mapping
Use Color Mapping to apply color tables to images, to create interactive density
sliced images, to control the RGB image planes, and to change classification color
mapping.
You can save a color image displayed using any method described in this section to
an RGB color image. See “Saving to Image Files” on page 18.

Applying ENVI Color Tables and Density Slices


Use ENVI Color Tables to apply linear contrast stretching and standard color tables
(density slices) to gray scale images.
To make your own color tables, see “Editing System Color Tables” on page 1165.
1. From the Display group menu bar, select Tools → Color Mapping → ENVI
Color Tables. The ENVI Color Tables dialog appears, where you may adjust
the screen color tables using the default color tables.

Figure 1-28: ENVI Color Tables Dialog

The dialog contains a gray scale wedge (or color wedge if a color table is
applied) and two sliders to control the contrast stretch. It also has two menus,
File and Options.

Color Mapping ENVI User’s Guide


Chapter 1: Interactive Displays 121

2. Select one of the following options from the ENVI Color Tables dialog menu
bar:
• To have any color table changes applied to your images automatically,
select Options → Auto Apply: On.
• To have changes applied manually, select Options → Auto Apply: Off.
After making changes, select Options → Apply. The Auto Apply option
is automatically set in 8-bit mode.
3. Move the Stretch Bottom and Stretch Top sliders to control the minimum and
maximum values to display. Moving the Stretch Bottom slider to the right
causes bright areas of the image to become darker, while moving the Stretch
Top slider to the left causes dark areas of the image to become brighter. To
invert the stretch move the Stretch Bottom slider all the way to the right and
the Stretch Top slider all the way to the left.
If Auto Apply is on, the new contrast stretch is applied to the image
immediately.
4. Apply a selected color table automatically to the current image by selecting the
color table name. ENVI provides a number of pre-saved color tables. The B-W
linear table provides a gray scale image. The RAINBOW color table provides
a cool-to-hot density slice. Other color table options allow you to apply their
preferred color scheme.
To reset the original color tables and stretch, select Options → Reset Color
Table.

Saving Color Tables to ASCII Files


1. From the ENVI Color Tables dialog menu bar, select File → Save Color Table
to ASCII.
2. Enter a filename.
3. Click OK.

Using Interactive Density Slicing


Use Density Slice to select data ranges and colors for highlighting areas in your gray
scale image. You can use the data ranges in the density slice coloring from the
displayed image or from another image of the same size. For details, see “Interactive
Density Slicing” on page 58.

ENVI User’s Guide Color Mapping


122 Chapter 1: Interactive Displays

Controlling RGB Image Planes


Use Control RGB Image Planes to control the individual color planes (or channels)
of an RGB or gray scale image. An RGB image uses the red, green, and blue guns of
the display device to form a color additive representation of color. A gray scale image
is a special case, where all three guns are assigned the same value for each pixel.
1. From the Display group menu bar, select Tools → Color
Mapping → Control RGB Image Planes. The RGB Channels dialog
appears. When first started, all three image color channels are turned on.
2. Select one or more of the left toggle buttons to disable/enable individual color
planes. The button name changes to reflect the color plane setting (On or Off).
• To invert the current stretch (a low-to-high stretch becomes a high-to-low
stretch and vice versa), select one or more of the right toggle buttons. The
button name changes to reflect the color plane setting (Normal or
Inverse).
• To apply RGB Channel functions to all of the color planes simultaneously,
select Options → Turn All Channels Off/On or Invert All Channels
from the RGB Channels dialog menu bar.
Note that the color planes remain as set prior to exit.
Tip
For 24-bit color displays, color changes are not automatically applied. Select
Options → Apply from the RGB Channels dialog menu bar when a 24-bit color
display is in use to display the color changes.

Figure 1-29: RGB Channels Dialog

Color Mapping ENVI User’s Guide


Chapter 1: Interactive Displays 123

Mapping Class Colors


Use Class Color Mapping to change classification image colors and class names for
individual classes. You can save the changes to the header file.
Tip
For class color changes to appear correctly on output, you must save the class color
changes.

1. From the Display group menu bar, select Tools → Color Mapping → Class
Color Mapping.
If your classification is overlaid on a base image, you can access class color
mapping from the Interactive Class Tool dialog by selecting Options → Edit
class colors/names (see “Overlaying Classes” on page 44).
The Class Color Mapping dialog appears.

Figure 1-30: Class Color Mapping Dialog

ENVI User’s Guide Color Mapping


124 Chapter 1: Interactive Displays

2. In the Selected Classes list, select the name of the class to change.
3. In the Class Name field, change the name.
4. Select the color system RGB, HSV, or HLS from the drop-down list (see
“Color Transforms” on page 527 for information about color spaces).
5. Select one of the following options to set the values of the class colors:
• Select a color by clicking Color.
• Move the three sliders (0-255 for the three colors in RGB) or click the
increase/decrease buttons to change the values or enter new values into the
fields and press Enter.
6. From the Class Color Mapping dialog menu bar, select Options → Save
Changes to save the changed classification names and colors to the classified
image header file.
To reset the original class colors and names, select Options → Reset Color
Mapping.
Color changes on 24-bit color displays, are not automatically applied. Instead,
select Options → Apply.

Color Mapping ENVI User’s Guide


Chapter 1: Interactive Displays 125

Locating Cursor and Pixel Positions


Use Cursor Location/Value in any display group to display the sample
(horizontal, x) and line (vertical, y) coordinates, the data value of the pixel under the
cursor, and the geographic coordinates (for georeferenced data) of the pixel under the
cursor. For details, see Displaying Cursor Location/Value in Getting Started with
ENVI.
Use Pixel Locator to manually enter a sample and line location for positioning the
cursor at the center of the Zoom window. If the image contains georeferenced data,
you can optionally locate pixels using map coordinates. For details, see Displaying
Pixel Location in Getting Started with ENVI.

ENVI User’s Guide Locating Cursor and Pixel Positions


126 Chapter 1: Interactive Displays

Quickly Calculating Basic Statistics


You can quickly calculate basic statistics (minimum, maximum, mean, standard
deviation) and histograms for a band, a file, or a displayed image. To quickly
calculate basic statistics, right-click on a band or filename in the Available Bands List
and select Quick Stats. A Statistics Results dialog for the selected image, file, or
band opens, showing the histogram plot for the image, file, or band and calculations
for the minimum, maximum, mean, and standard deviation of the data. For more
information about the Statistics Results dialog, see “Viewing Statistics Reports” on
page 278.
To quickly access basic and histogram statistics from the Available Bands List,
perform the following steps:
1. Right-click on a band or filename in the Available Bands List.
2. Select Quick Stats from the menu. The Statistics Results dialog for the band
or file appears.
• If you right-click on a band and initiate the menu for the statistics
calculation, the Statistics Results dialog contains the results for that band.
• If you highlight a filename and initiate the statistics calculation, the
Statistics Results dialog shows the results for all bands of the file.
To quickly access statistics from a display group, perform the following steps:
1. Right-click in one of the display group windows (Image, Scroll, or Zoom) and
select Quick Stats. The Statistics Results dialog for the image appears.
If you initiate the statistics calculation from a gray scale display group, the
Statistics Results dialog contains the results for the band displayed.
If you initiate the statistics calculation from an RGB display group, the Statistics
Results dialog shows the results for the three bands starting with the lowest band
number.

Quickly Calculating Basic Statistics ENVI User’s Guide


Chapter 1: Interactive Displays 127

Collecting Points
Use Point Collection to collect points (both pixel locations and map locations) from
display groups. The points display in the ENVI Point Collection table. You can save
points from various display groups in a single table and export them to the Ground
Control Points (GCP) List, save them to ASCII or ENVI vector files (EVFs), and
restore them from ASCII files.
1. Select one of the following:
• From the Display group menu bar, select Tools → Point Collection.
• From the ENVI main menu bar, select Window → Point Collection.
The ENVI Point Collection table appears. To hide or show the ENVI Point
Collection table, see “Showing and Hiding Overlay Dialogs and Layers” on
page 29.

Click on a
column heading
to resort the
table.

Figure 1-31: ENVI Point Collection Table

2. Middle-click in the Image window or the Zoom window to collect the point
under the cursor. The pixel locations appear in the ENVI Point Collection
table. If the data is georeferenced, map and geographic locations appear as
well.

ENVI User’s Guide Collecting Points


128 Chapter 1: Interactive Displays

3. To add a description of the point in the ENVI Point Collection table, left-click
on the Attribute Description cell and type a description. Do not use spaces in
the description text. Left-click on the cell to accept the description text.

Changing the Table Sort Order


To sort the points in the table by a particular value, select the column heading of the
value. To sort the points inversely by the same value, select the column name again.
The table is automatically updated.
To reset the table to the original order, select Options → Reset Listing Order from
the ENVI Point Collection table menu bar.

Changing Numeric Precision


To change the numeric precision of the data points:
1. From the ENVI Point Collection table menu bar, select Options → Set Report
Precision. The Set Report Precision dialog appears.
2. Enter the number of significant figures shown after the decimal point in the
fields.
To change the report of latitude and longitude values between degrees,
minutes, seconds (DMS) and decimal degrees (DD), click the Lat/Lon Report
toggle button.

ENVI Point Collection Options


• To go to the location of a point, select the point number (gray buttons, far left
column) and click Goto. The Zoom window for the display containing the data
moves so that it is centered over the selected pixel.
• To export map locations to the Ground Control Points Selection dialog, select
the point number (far left column) and click Export.
• To delete a point, select the point number (far left column) and click Delete.
• To delete all the points, click Delete All.

Importing Points from ASCII Files


To import points from an ASCII file into the ENVI Point Collection table:
1. From the ENVI Point Collection table menu bar, select File → Import Points
from ASCII. The Enter ASCII Points Filename dialog appears.

Collecting Points ENVI User’s Guide


Chapter 1: Interactive Displays 129

2. Select the input filename and click Open. The Input ASCII File dialog
appears.
3. Select which columns of data contain the Image X and Y pixel locations, the
Map X and Y values and the Lat/Long values.
4. Select the projection type if you have map values.
5. From the Associated Image drop-down list, select the display group number
associated with the imported points. If no display is associated with the points,
select None.
6. Click OK. The points appear in the point collection dialog.

Saving Points to ASCII Files


To save points to an ASCII file:
1. From the ENVI Point Collection table menu bar, select File → Save Points
As → ASCII. The Save Image Points to ASCII dialog appears.
2. Enter an output filename.
3. Click OK. If points from more than one projection are contained in the ENVI
Point Collection table, ENVI creates multiple ASCII output files with _1, _2,
and so forth appended to the filename.
If the ENVI Point Collection table’s Attribute Description column contains a
description for each point, which ENVI saves in the ASCII file. If the column
is empty for some points, but contains a value for other points, ENVI adds a
value of undefined for the attribute descriptions that are empty when it saves
the file.

Saving Points to Vector Files


To save points to an ENVI vector file:
1. From the ENVI Point Collection table menu bar, select File → Save Points
As → EVF Layer.
2. Enter a layer name and an output filename.
3. Click OK. ENVI adds the resulting output to the Available Vectors List.
You can load these points on the image display or in a vector window and add
attributes (see “Vector Attributes” on page 1029).

ENVI User’s Guide Collecting Points


130 Chapter 1: Interactive Displays

If the ENVI Point Collection table’s Attribute Description column contains a


description for each point, which ENVI saves in the vector file. If the column
is empty for some points, but contains a value for other points, ENVI adds a
value of undefined for the attribute descriptions that are empty when it saves
the file.

Saving Points to 3D Shapefiles


The ENVI Point Collection tool has the ability to save points containing elevation
data to an ArcView® 3D shapefile format.
You can save point collections as 3D point shapefiles, a 3D polyline shapefile, or a
3D polygon shapefile. This is particularly useful if the collected points are for a
single feature, such as a collection of 3D points for a road. You can save these points
as a 3D polyline shapefile.
To use this feature, open an existing ENVI Point Collection table, or collect 3D points
from a pair of stereo images or from an epipolar image pair (see the DEM Extraction
User’s Guide for information about this feature).
To save points to a 3D shapefile:
1. From the ENVI Point Collection table menu bar, select File → Save Points
As → 3D Shapefile. The Output Points to Shapefile dialog appears.

Collecting Points ENVI User’s Guide


Chapter 1: Interactive Displays 131

Figure 1-32: Saving as 3D Point Shapefile (left), and 3D Polyline Shapefile


(right)

2. Select the Shape Type to use when saving the points by selecting the radio
button of the desired type: PointZ, PolylineZ, or PolygonZ.
3. If either PolylineZ or PolygonZ are chosen, the Record Description field
appears. This is an optional field for entering a descriptive phrase about the
point collection. The string entered in this text field is saved in the 3D
shapefile’s record description attribute when the file is saved.
For PointZ, the record descriptions are taken for each point from the Attribute
Description column of the ENVI Point Collection table.
4. Enter an output filename.
5. Click OK. When 3D shapefiles are read into ENVI, the elevation appears as an
attribute.
If the ENVI Point Collection table’s Attribute Description column contains a
description for each point, which ENVI saves in the shapefile. If the column is
empty for some points, but contains a value for other points, ENVI adds a
value of undefined for the attribute descriptions that are empty when it saves
the file.

ENVI User’s Guide Collecting Points


132 Chapter 1: Interactive Displays

Building Masks
Use Build Masks to create image masks from specific data values (including the data
ignore value), ranges of values, finite or infinite values, ROIs, ENVI vector files
(EVFs), and annotation files. See “Building Masks” on page 350.

Building Masks ENVI User’s Guide


Chapter 1: Interactive Displays 133

Measurement Tool
Use Measurement Tool to get a report on the distance between points in a polygon
or polyline, and to get perimeter and area measurements for polygons, rectangles, and
ellipses. For details, see “Measurement Tool” on page 303.
To measure ROIs while using the ROI function, see “Reporting ROI Measurements”
on page 333.

ENVI User’s Guide Measurement Tool


134 Chapter 1: Interactive Displays

Using the Line of Sight Calculator


Use the Line of Sight Calculator to calculate which pixels can be seen from a specific
pixel within any file that has an associated DEM. The pixels that can be seen are
output as an ROI.
1. From the Display group menu bar, select Tools → Line of Sight Calculator.
The Line of Sight calculator dialog appears. The current pixel location is listed
in the Sample and Line fields.

Figure 1-33: Line of Sight Calculator Dialog

2. In Zoom window, select a pixel or enter the Sample and Line coordinates of
the pixel for which you want the line of sight calculated.
• To select a different pixel, use the solid black arrow buttons to move the
Zoom window crosshairs in single pixel increments in the corresponding
direction.
• To designate whether or not to apply x and y offsets for data that has
offsets, select Options → Use Image Offset: Yes or No from the Line of
Sight calculator dialog menu bar.
• To select pixels for georeferenced images, see “Selecting Pixels for
Georeferenced Images” on page 135).
3. Click Apply. The Select Line of Sight Input DEM Band dialog appears.

Using the Line of Sight Calculator ENVI User’s Guide


Chapter 1: Interactive Displays 135

4. Select the file that contains the DEM that is associated with the displayed
image.
5. Click OK. The Line of Sight Parameters dialog appears.

Figure 1-34: Line of Sight Parameters Dialog.

6. Enter the maximum distance (in meters) for the line of sight calculation. To
designate an elevation above the pixel, enter the value in the same units as the
DEM.
7. Click OK. ENVI creates an ROI that shows which pixels can be seen from the
designated pixel. ENVI labels the ROI LOS in the ROI Tool dialog and
overlays the ROI on your image.

Selecting Pixels for Georeferenced Images


1. From the Line of Sight Calculator menu bar, select Options → Map
Coordinates.
2. Enter the map coordinates into the E and N fields, respectively.
• To enter the coordinates in latitude and longitude, click the toggle button
next to the map projection name and enter the values into the Lat and
Long fields. Use negative (-) longitude for the western hemisphere and
negative (-) latitude for the southern hemisphere.
• To change the latitude and longitude values between degrees, minutes,
seconds, and decimal degrees, click DMS / DDEG.
• To return to map projection coordinates, click the toggle button. The
corresponding map projection coordinates are calculated automatically.

ENVI User’s Guide Using the Line of Sight Calculator


136 Chapter 1: Interactive Displays

Using the Spatial Pixel Editor


Use Spatial Pixel Editor on ENVI format files to display pixel values in a table and
to interactively change the values of problem pixels. You can replace individual pixel
values or entire lines or columns by entering a different value or data mean, or if you
use the averages of surrounding pixels, lines, or columns. You can save changes to the
disk file.
From the Display group menu bar, select Tools → Spatial Pixel Editor.
The Spatial Pixel Editor dialog appears with the pixel values for the Zoom window
shown in a table. The sample and line numbers are shown around the top and side of
the table. The location of the pixel highlighted in the table is shown by a green box in
the Zoom window.

Figure 1-35: Spatial Pixel Editor Dialog

Using the Spatial Pixel Editor ENVI User’s Guide


Chapter 1: Interactive Displays 137

Selecting Pixels
To select pixels and display their values in the Spatial Pixel Editor table, left-click in
the Image window and drag the Zoom box, or middle-click on a pixel to center the
Zoom window over it.

Changing Pixel Values


Select from the following options in the Spatial Pixel Editor dialog menu bar to
change pixel values:
• To enter a new value for a single pixel, select the pixel value in the table, use
the backspace key to erase the current value, enter the value, and press Enter.
• To replace the value of a single pixel with the average of the four or eight
surrounding pixels, select the pixel value in the table and select
Options → Replace cell with 4 pixel average or Replace cell with 8 pixel
average.
• To enter a new value for a group of pixels:
A. Select the pixel values in the table by clicking and dragging or by selecting
a column or line number.
B. Select Options → Replace selected cells with value. Enter the value.
C. Click OK.
• To replace the value of a group of pixels with the group mean, select the pixel
values in the table by clicking and dragging or by selecting a column or line
number and select Options → Replace selected cells with mean.
• To replace a column or line (across the whole image) with the average of
surrounding columns or lines, select the column or line number around the
table and select Options → Replace selected column/line with average.
• To designate the number of columns or lines surrounding the selected pixel to
use in calculating the average:
A. Select Options → Set # of lines for averaging.
B. Enter the number of columns or lines to use on each side of the selected
one to calculate the average.

ENVI User’s Guide Using the Spatial Pixel Editor


138 Chapter 1: Interactive Displays

Undoing Changes
To undo all changes in pixel values, select Options → Undo all changes from the
Spatial Pixel Editor dialog menu bar.

Saving Pixels to Files


Save the pixel value changes to a file by selecting File → Save changes to file from
the Spatial Pixel Editor dialog menu bar.

Using the Spatial Pixel Editor ENVI User’s Guide


Chapter 1: Interactive Displays 139

Using the Spectral Pixel Editor


Use Spectral Pixel Editor to replace the current pixel across all spectral bands in
multispectral and hyperspectral data. You can replace pixels with an average of
surrounding pixels or with another spectrum entered through a plot window.
1. From the Display group menu bar, select Tools → Spectral Pixel Editor. An
empty plot window appears.
2. From the Spectral Pixel Editor plot window menu bar, select from the
following options.
• To plot the current spectrum, select Edit → Extract Current Spectrum.
• To plot an average spectrum calculated from the 8 (4 or 2) pixels
surrounding the current pixel, select Edit → Extract 8 (4 or 2) pixel
average.
• To input a spectrum from an ASCII file or spectral library, select
File → Input.
• To import a spectrum from another window, click on the plot label name
and drag it into the Pixel Editor Spectrum plot window.
• To choose which spectrum to substitute for the current pixel’s spectrum,
select Edit → Substitute Spectrum. This last step physically replaces the
current spectrum values in the data file.

ENVI User’s Guide Using the Spectral Pixel Editor


140 Chapter 1: Interactive Displays

Creating Animations
Use Animation to create a movie out of images from one or more open files.
Animation is performed in gray scale only.

Selecting Bands for Animation


1. From the Display group menu bar, select Tools → Animation. The Animation
Input Parameters dialog appears.
2. Select the bands to include in the animation and perform optional Spatial
Subsetting, then click OK.

Figure 1-36: Animation Input Parameters Dialog

3. Set the size of the animation window by entering values in the Window Size
fields. The selected images are automatically resized to the selected window
size. Reducing either the spatial subset to animate and/or the size of the
animation window enhances the speed of the animation.

Creating Animations ENVI User’s Guide


Chapter 1: Interactive Displays 141

4. Select a resampling method by selecting Aggregate or Nearest Neighbor.


Nearest neighbor resampling uses the nearest pixel value in the animation
window and aggregate averages all the pixel values that contribute to the
output animation pixel. For example, if your animation window size is half the
size of the image, the nearest neighbor method will use every other pixel and
every other line to create the image in the animation window and the aggregate
method will average four pixels to create the output image.
5. Click OK to start the animation. When the animation is activated, the
individual selected bands are automatically subset, resampled, and loaded into
the Animation widow. A status bar appears as each image is processed.
After all of the selected images are loaded, the animation starts automatically. Each
selected band displays sequentially.

ENVI User’s Guide Creating Animations


142 Chapter 1: Interactive Displays

Controlling Animation Characteristics


After the animation is loaded, you can specify the animation characteristics.

Figure 1-37: Animation Window Menu Bar and Controls

The following table describes the available options in the Animation window:

Option Description
To set the animation speed, enter a number from 0 to 100 into
the Speed field, or use the arrow buttons to set the speed.

Table 1-5: Animation Window Controls

Creating Animations ENVI User’s Guide


Chapter 1: Interactive Displays 143

Option Description

To turn the real-time frame number slider on and off, select


Options → Update Slider:On/Off from the Animation menu
bar.
Click to display the animation from the highest frame to
lowest.
Click to display the animation from lowest frame to the
highest.
Click to display the animation from the lowest frame to the
highest frame and back again.
Click to pause the animation at the current frame.

Table 1-5: Animation Window Controls

Saving Animations
You can save an animation as an MPEG (Moving Picture Experts Group) file.
Saving an animation as an MPEG file requires a special license. For more
information, contact your ENVI sales representative or Technical Support.
1. From the Animation menu bar, select File → Save Animation as MPEG. The
Output Sequence to MPEG Parameters dialog appears.

ENVI User’s Guide Creating Animations


144 Chapter 1: Interactive Displays

Figure 1-38: Output Sequence to MPEG Parameters DIalog

2. From the MPEG Frame Rate drop-down list, select a frame rate in frames per
second.
3. In the MPEG Quality field, enter a compression quality value between 0 and
100, or use the increase/decrease buttons to set the value.
The compression is a lossy compression where 0 is lowest quality and 100 is
highest quality (no compression). Entering a compression quality factor less
than 100 decreases the amount of disk space to use to store the MPEG output.
4. A duplication factor helps to make the MPEG output appear smoother. To
duplicate frames in the MPEG output, enter a Duplicate frames number.
5. Enter an output filename.
6. Click OK.

Creating Animations ENVI User’s Guide


Chapter 1: Interactive Displays 145

Using 2D Scatter Plots


Use 2D Scatter Plots to interactively classify two bands of image data. If desired,
you can have multiple scatter plots active simultaneously. Two-dimensional scatter
plots use only the data in the Image window so quick interactive response is provided.
You can select ROIs in the scatter plots and save them for use in other full band
processing techniques. Dancing pixels show how the distribution of pixels under a
box changes as you move it interactively in both the scatter plot and image. You can
also show the density distribution of the scatter plot.
To compare the DNs in two selected bands as both a scatter plot and in terms of their
spatial distribution in the image, proceed with the steps in the following sections.

Selecting Bands for Scatter Plots


1. From the Display group menu bar, select Tools → 2D Scatter Plots. The
Scatter Plot Band Choice dialog appears.
2. Choose the x and y axes for the scatter plot by selecting the desired bands in
the Choose Band X and Choose Band Y columns.
3. Click OK to extract the 2D scatter plot from the two selected bands.

Figure 1-39: Scatter Plot Band Choice Dialog

ENVI User’s Guide Using 2D Scatter Plots


146 Chapter 1: Interactive Displays

Depending upon the size of the image, there may be a brief delay while the DN
values are extracted and tabulated. As soon as the scatter plot appears, the interactive
scatter plot function is available for use.

Resizing Scatter Plot Windows


To resize a scatter plot window, grab the corner of the window and drag to the desired
size.
Note
Resizing the window requires more memory and may not be as efficient.

To reset the window to the default size, select Options → Reset Size from the Scatter
Plot window menu bar.

Viewing Pixel Distribution of Scatter Plots


Use dancing pixels to interactively view, in the Image window, the distribution of
points under a box drawn in the scatter plot. As the cursor moves, the spatial
distribution of the corresponding pixels on the image changes accordingly.
1. From the Scatter Plot window menu bar, select Options → Scatter: Dance.
2. Place the cursor anywhere inside the scatter plot and middle-click to plot a
colored box on the scatter plot. Simultaneously, all pixels on the image that fall
within the DN range of those selected in the scatter plot box are plotted in
color in the Image window.

Using 2D Scatter Plots ENVI User’s Guide


Chapter 1: Interactive Displays 147

Figure 1-40: Selecting Pixels to Highlight in the Image Window

3. Press and hold the middle mouse button while moving the cursor in the scatter
plot to cause real-time dancing pixels to appear in the Image window.

Viewing Pixel Distribution of Images


Use Scatter Plot dancing pixels to interactively view, in the scatter plot, the
distribution of the points that are in highlighted in the Image window.
1. From the Scatter Plot window menu bar, select Options → Image: Dance.
2. Place the cursor anywhere inside the Image window and left-click while the
scatter plot displays to mark pixels in color on the scatter plot.
This shows the DN distribution of pixels falling within a spatial box the same
size as that used in the scatter plot (see “Setting Patch Sizes” on page 153).
The box is not plotted on the Image window because of speed considerations.
3. Press and hold the left mouse button while moving the cursor in the Image
window to highlight the pixels in the scatter plot in real time as dancing pixels.

ENVI User’s Guide Using 2D Scatter Plots


148 Chapter 1: Interactive Displays

Figure 1-41: Dancing Pixels Displayed in the Plot Window

Zooming in Scatter Plots


To zoom in on an area within a scatter plot:
1. From the Scatter Plot window menu bar, select Options → Scatter: Zoom.
2. In the Scatter plot window, middle-click and drag the box outline that appears.
Note
To return to normal viewing, middle-click in the Scatter plot window.

Displaying Scatter Plot Density Distribution


Many image pixels can have the same DN values within bands and will lie in the
same place in the scatter plot. The scatter plot density distribution is color coded
using a rainbow color table from purple to red with purple indicating low density.
To show the density distribution of the scatter plot, select Options → Density On or
Off. If a Z Profile is associated with the scatter plot, the density distribution is shown
by right-clicking outside the plot axes.

Using 2D Scatter Plots ENVI User’s Guide


Chapter 1: Interactive Displays 149

Changing the Density Distribution Color Table


To change the color table to use to define the density distribution colors:
1. From the Scatter Plot window menu bar, select Options → Select Density
Lookup. The Select Density Lookup dialog appears.
2. Select the color table name. ENVI automatically applies the selected color
table.
3. Designate the number value of the color to use to represent the lowest values in
the scatter plot (color tables have 256 values) in the Scaling Floor field.
For color tables that have black on the lower end, setting a higher color value
to represent the lowest density points in the scatter plot applies more visible
colors (instead of black) to those points so that all points in the scatter plot are
visible.

Drawing ROIs on Scatter Plots


You can draw ROIs in the scatter plot to provide an interactive classification method.

Drawing a Single ROI


1. In the Scatter plot window, left-click at the vertices of a polygon enclosing the
desired region.
2. Right-click to close the polygon and complete the selection. When the region
is closed, all pixels in the image that fall within the DN range of those selected
in the scatter plot are highlighted in color in the Image window.

Drawing Multiple ROIs or Classes


1. From the Scatter plot window menu bar, select Class → Items N:M for a color
list from which to select another color.
2. Draw another ROI as described in the previous procedure. The corresponding
pixels in the image are highlighted in the new color.

Editing Classes
To remove pixels from an existing class:
1. From the Scatter plot window menu bar, select Class → White.
2. Draw a polygon around the pixels to remove them. The deleted pixels return to
white.

ENVI User’s Guide Using 2D Scatter Plots


150 Chapter 1: Interactive Displays

Changing Class Colors


Use the Class menu to change the color of the scatter plot highlighting. You can
define multiple ROIs or classes by selecting a new color for each class. The currently
selected class corresponds with the color selected under the Class menu.

Deleting Classes
To completely delete the selected class polygon, middle-click outside the scatter plot
axes.

Options in Scatter Plot Windows


Use the Options menu on the Scatter plot menu bar to choose functions that control
the operation of the 2D scatter plots. Options include controlling the image mode,
clearing and exporting classes, calculating mean spectra, linking the scatter plot with
a Z Profile window, changing the patch size used for extracting dancing pixels, and
changing the band selections.

Using 2D Scatter Plots ENVI User’s Guide


Chapter 1: Interactive Displays 151

2D Scatter Plot Right-Click Menu


Many options in the scatter plots can also be accessed by right-clicking in the scatter
plot.

Figure 1-42: Scatter Plot Right-Click Menu

Viewing Dancing Pixels


As described in “Viewing Pixel Distribution of Images” on page 147, you may link
mouse movement in the Image window to concurrent plotting of corresponding pixels
as dancing pixels in the scatter plot for the selected patch size.
From the Scatter plot window menu bar, select Options → Image Dance.

Drawing ROIs in Images


Use the Image ROI option to draw ROIs in the display group, as described in
“Drawing ROIs” on page 323. The ROI pixels are highlighted in the scatter plot and
all pixels with similar spectral characteristics in the two selected bands are plotted in
color as an overlay on the displayed image.
From the Scatter plot window menu bar, select Options → Image ROI.

ENVI User’s Guide Using 2D Scatter Plots


152 Chapter 1: Interactive Displays

Turning Off Scatter Plot Mouse Functions


To disable the scatter plot mouse button functions in the display group and return
them to their standard functions, select Options → Off from the Scatter plot window
menu bar.

Clearing Classes
To remove the ROIs and associated Image window highlighted pixels from the scatter
plot and Image window for the selected class color, select Options → Clear Class
from the Scatter plot window menu bar.
To remove all the ROIs and associated Image window highlighted pixels from the
scatter plot and Image window for all the classes, select Options → Clear All.

Exporting Classes
Use Exporting Classes to export the highlighted Image window pixels for the
selected class color or for all of the classes to an ENVI ROI. You can use the exported
ROI in other ENVI functions.
To export a selected class, select Options → Export Class from the Scatter plot
window menu bar. If the ROI Controls window is on the screen, the region is listed as
a Scatter Plot Import. The class color and number of pixels in the region is also
listed.
The ROIs are retained in memory even when the ROI Controls window is not on
screen. The Scatter Plot Import region is listed in the ROI window the next time it is
started.
To export the highlighted Image window pixels for all of the classes, select
Options → Export All from the Scatter plot window menu bar.

Calculating Mean Spectra


To calculate the mean spectrum for the selected class or for all the defined classes:
1. From the Scatter plot window menu bar, select Options → Mean Class or
Options → Mean All. The Input File Associated with 2D Scatter Plot dialog
appears.
2. Select the corresponding input file.
3. Click OK. ENVI calculates the mean spectra and displays it in a plot window.
If a Z Profile window associated with the scatter plot is open, the same data is
automatically to use to calculate the mean spectra.

Using 2D Scatter Plots ENVI User’s Guide


Chapter 1: Interactive Displays 153

Attaching Z Profiles
To associate a Z Profile window (spectral plot) with the scatter plot:
1. From the Scatter plot window menu bar, select Options → Z Profile. The
Input File Associated with 2D Scatter Plot dialog appears.
2. Select the corresponding input file.
3. Right-click inside the scatter plot to display the spectrum for the point nearest
the cursor.
See “Extracting Z Profiles” on page 98 for details.

Setting Patch Sizes


The patch size is the size of the box used for the dancing pixels options.
1. From the Scatter plot window menu bar, select Options → Set Patch Size.
The Scatter Plot Patch Size dialog appears.
2. Enter the number of pixels to use for the size of the patch (a square box). For
example, a patch size of 10 refers to a 10 x 10 pixel box in either the Image or
the scatter plot.
3. Click OK.

Setting Axis Ranges


Use Set X/Y Axis Ranges to change the pixel value range of the x or y axes.
1. From the Scatter plot window menu bar, select Options → Set X/Y Axis
Ranges. The Set Scatter Plot Axis Ranges dialog appears.
2. In the Xrange and Yrange fields, enter the pixel value range. To return the
range values to the original minimum and maximum values, click Reset
Ranges.
3. Click OK. The scatter plot is rescaled to the new axes ranges.
Tip
To reset the axis ranges to the original minimum and maximum values, select
Options → Reset Range in the Scatter plot window.

ENVI User’s Guide Using 2D Scatter Plots


154 Chapter 1: Interactive Displays

Resetting the Plot Window Size


If you resized the Scatter plot window, select Options → Reset Size from the Scatter
plot window menu bar to reset it to the default size. The default window size provides
the most efficient interaction.

Changing Bands
Use Change Bands to change the bands used in the scatter plot and to plot previously
defined classes on the new scatter plot. The corresponding Image window pixels are
highlighted.
1. From the Scatter plot window menu bar, select Options → Change Bands.
The Scatter Plot Band Choice dialog appears.
2. Choose new X and Y axes for the scatter plot by selecting the desired bands as
described in “Selecting Bands for Scatter Plots” on page 145.

Managing Scatter Plots


Use the File menu on the Scatter plot window menu bar to activate functions that
control the input and output of the scatter plots. Functions include creating an output
scatter plot, importing saved ROIs, and canceling the scatter plot function.

Starting New Scatter Plots


To start an additional scatter plot window that uses different bands:
1. Select one of the following options:
• From the Scatter plot window menu bar, select File → New Scatter Plot.
• From the Display group menu bar, select Tools → 2D Scatter Plot.
The Scatter Plot Band Choice dialog appears.
2. Select the X and Y bands.
3. Click OK. A new Scatter plot window appears in addition to the initial scatter
plot.

Creating Scatter Plot Output


You can save Scatter plot windows as PostScript files or image files (RGB binary
file): BMP, HDF, JPEG, PICT, SRF, TIFF, or XWD files.
To save a scatter plot, select File → Save Plot As → PostScript or Image File from
the Scatter plot window menu bar.

Using 2D Scatter Plots ENVI User’s Guide


Chapter 1: Interactive Displays 155

For details, see “Saving Images from Displays” on page 15.

Importing ROIs to Scatter Plots


To import previously saved ROIs to the scatter plot:
1. From the Scatter Plot window menu bar, select File → Import ROIs. The
Import ROIs to Scatter Plot dialog appears.
2. Select from the list of existing ROIs. The ROIs selected are plotted in the
Image window and the corresponding points are highlighted in the scatter plot.
Additional pixels that fall within the same scatter plot regions are highlighted
in the Image window.

ENVI User’s Guide Using 2D Scatter Plots


156 Chapter 1: Interactive Displays

Three-Dimensional Surface Views


Use ENVI’s 3D SurfaceView™ to fly-through your three-dimensional datasets. For
details, see “Using 3D SurfaceView” on page 1081.

Three-Dimensional Surface Views ENVI User’s Guide


Chapter 1: Interactive Displays 157

Using Window Options from the Display


Group
The Display group menu bar provides the following options in the Window menu to
manage your display:
• Start New Display Window: See Opening New Display Groups in Getting
Started with ENVI.
• Close All Display Windows: See Closing Display Groups in Getting Started
with ENVI.
• Maximize Open Displays: See Maximizing Open Displays in Getting Started
with ENVI.
• Cursor Location/Value: See Displaying Cursor/Location Value in Getting
Started with ENVI.
• Display Information: See Showing Display Group Information in Getting
Started with ENVI.
• Mouse Button Descriptions: See ENVI Mouse Buttons in Getting Started
with ENVI.

ENVI User’s Guide Using Window Options from the Display Group
158 Chapter 1: Interactive Displays

Using Window Options from the Display Group ENVI User’s Guide
Chapter 2
File Management

This chapter covers the following topics:

The File Menu . . . . . . . . . . . . . . . . . . . . . . 160 Subsetting Data . . . . . . . . . . . . . . . . . . . . 215


Opening Image Files and Vector Files . . . . 161 Saving Files . . . . . . . . . . . . . . . . . . . . . . . 226
Opening Remote Files . . . . . . . . . . . . . . . . 162 Working with IDL . . . . . . . . . . . . . . . . . . 234
Opening External Files . . . . . . . . . . . . . . . 163 Tape Utilities . . . . . . . . . . . . . . . . . . . . . . 235
Opening Previous Files . . . . . . . . . . . . . . . 192 Using the Scan Directory List . . . . . . . . . 254
Starting ENVI Zoom . . . . . . . . . . . . . . . . . 193 Working With Files and Scripts . . . . . . . . 259
Editing ENVI Headers . . . . . . . . . . . . . . . . 194 Logging Processing Information . . . . . . . 260
Generating Test Data . . . . . . . . . . . . . . . . . 210 ENVI Preferences . . . . . . . . . . . . . . . . . . . 261
Using the Data Viewer . . . . . . . . . . . . . . . . 212

ENVI User’s Guide 159


160 Chapter 2: File Management

The File Menu


The File menu on the ENVI main menu bar provides options to read files into ENVI,
set preferences, and to exit ENVI and other file and program management functions.
Some of the functions from the File menu are described in this chapter while others
are described in the Getting Started with ENVI guide.

The File Menu ENVI User’s Guide


Chapter 2: File Management 161

Opening Image Files and Vector Files


Use Open Image File to open ENVI image files (flat binary files, described in
“ENVI ASCII File Formats” on page 1175) or other binary image files of known
format. See Opening Image Files in ENVI in Getting Started with ENVI for steps.
Use Open Vector File from either the ENVI main menu bar or the Available Vectors
List to open vector files. See Opening Vector Files in Getting Started with ENVI for
steps.

ENVI User’s Guide Opening Image Files and Vector Files


162 Chapter 2: File Management

Opening Remote Files


Use File → Open Remote File or File → Remote Connection Manager to access
data from OGC servers, JPEG 2000 servers, and geodatabases. See Opening Remote
Datasets in Getting Started with ENVI for steps.

Opening Remote Files ENVI User’s Guide


Chapter 2: File Management 163

Opening External Files


1. From the ENVI main menu bar, select File → Open External File →
file_type → file_format.
where:
file_type is the type of external file (for example, Landsat)
file_format is the format of the external file (for example, HDF)
The Enter file_type Filenames dialog appears.
2. Select a file to open.
3. Click Open.
When you select the input file, ENVI reads the image and sets the sensor type in the
header file. ENVI also automatically extracts the necessary header information,
including the associated georeferencing information, and places the image bands in
the Available Bands List. In cases where ENVI extracts additional information, this is
noted in the file format descriptions in the following sections. In some cases, ENVI
creates a meta file (a single file containing all of the bands), which is also added to
the Available Bands List. Details on the Available Bands List are in Displaying
Images in Getting Started with ENVI. For information about meta files, see Saving as
ENVI Meta Files in Getting Started with ENVI.
The following sections discuss the file type and file format options available from
File → Open External File. File types and file formats are shown in bold text. If
there are exceptions to opening a particular file format, they are noted along with the
format type.

Opening Landsat Files


From the ENVI main menu bar, select File → Open External File → Landsat and
select one of the following options:
• FAST: Reads Landsat TM and Landsat 7 ETM+ data in FAST format. For
Landsat 7 FAST files, ENVI extracts the data acquisition date, the gains and
bias factors, and the sun elevation and azimuth. ENVI creates a meta file, and
assigns wavelengths to the bands based on the sensor type. In the Enter
Filenames dialog, select one of the following metadata files:
header.dat: Landsat FAST data
*_hpn.fst: Landsat 7 FAST panchromatic data, band 8
*_hrf.fst: Landsat 7 FAST VNIR/SWIR reflectance data, bands 1-5 and 7

ENVI User’s Guide Opening External Files


164 Chapter 2: File Management

*_.htm.fst: Landsat 7 FAST thermal data, bands 61-62


• GeoTIFF: Reads Landsat GeoTIFF files. In the Enter Filenames dialog, select
a .TIF file.
• GeoTIFF with Metadata: Reads Landsat MSS, TM and ETM+ metadata files
from the Global Land Cover Facility (GLCF) or from the U.S. Geological
Survey (USGS). The metadata files provide information needed to open the
associated imagery. In the Enter Landsat Metadata Filenames dialog, select
a.met file for GLCF Landsat data or a.txt file for USGS Landsat data.
• HDF: Reads Landsat data in Hierarchical Data Format (HDF). For Landsat 7
HDF files, ENVI extracts the data acquisition date, the gains and bias factors,
and the sun elevation and azimuth. ENVI creates a meta file, and assigns
wavelengths to the bands based on the sensor type. In the Enter Filenames
dialog, select the *_HDF* file.
• NLAPS: Reads Landsat MSS, TM, and ETM+ data in NLAPS format. ENVI
automatically extracts any UTM georeferencing information and creates a
meta file. In the Enter Filenames dialog, select a .h* metadata file, which will
open all of the image files in the current directory.
• MRLC: ENVI extracts the necessary header information, including the
associated georeferencing data, and UTM georeferencing information. ENVI
also creates a meta file. In the Enter Filenames dialog, select one of the TM
(.dda) image files. If you select one of the spectral files when opening an
MRLC format file, ENVI opens the spectral data. Conversely, if you select the
DEM file, ENVI opens the DEM file.
• ACRES CCRS: Reads Landsat Australian Centre for Remote Sensing CCRS.
In the Enter Filenames dialog, select the Imag_xx.dat file.
• ESA CEOS: Reads Landsat European Space Agency. ENVI also creates a
meta file, and assigns wavelengths to the bands based on the sensor type. The
files must follow the naming convention of dat_xx.xxx and lea_xx.xxx.
ENVI also creates a meta file. ENVI assigns wavelengths to the bands based
on the sensor type.

Opening SPOT Files


From the ENVI main menu bar, select File → Open External File → SPOT and
select one of the following options:
• SPOT: Reads SPOT 1A, 2A, and 1B data.

Opening External Files ENVI User’s Guide


Chapter 2: File Management 165

• GeoSPOT: Reads the primary format for SPOT data. ArcView® raster image
files have a similar format specification. The GeoSPOT format is described in
detail in documentation available from SPOT Image. While the GeoSPOT
format provides for a wide variety of both raster and vector data, ENVI
currently supports only GeoSPOT raster images, which have the .bil file
extension and an associated header file with the extension .hdr.
• ACRES SPOT: Reads SPOT Australian Centre for Remote Sensing CCRS
and SPIM. In the Enter Filenames dialog, select the Imag_xx.dat file.
• SPOT vegetation: Reads SPOT vegetation data. ENVI also creates a meta file.
In the Enter Filenames dialog, select the .hdf file.
• SPOT DIMAP: Reads SPOT DIMAP data. ENVI extracts the necessary
header information, including georeferencing information, band wavelengths,
gains, and offsets. If the data is multispectral SPOT, ENVI automatically
displays a color infrared image. In the Enter Filenames dialog, select any
.dim. It may take a long time to parse the header information from the
metadata.dim file. It is quicker to open the TIFF image file using File →
Open Image File directly if you do not plan to georeference the data. If you
plan to georeference the SPOT data using ENVI, you must read the data using
File → Open External File → Spot → DIMAP because the header
information is needed (see “Georeferencing SPOT Data” on page 944).

Opening IKONOS Files


Wavelength and FWHM (full width at half maximum) information published for
IKONOS files is automatically assigned to the data only when you access these files
through File → Open External File → IKONOS.
From the ENVI main menu bar, select File → Open External File → IKONOS and
select one of the following options:
• GeoTIFF: Reads IKONOS GeoTIFF data.
• NITF: Reads IKONOS NITF data if you have an ENVI NITF/NSIF Module
license (see the NITF User’s Guide for details). ENVI also supports reading
and displaying TFRD-format files through an additional module. Contact ITT
Visual Information Solutions to purchase a license for the NITF and/or TFRD
modules.
• Open with RPC Positioning: Reads IKONOS data and derives rational
polynomial coefficient (RPC)-based geolocation information for individual
pixels in an IKONOS image. A file containing the image RPC is required. This
method does not change the appearance of the image; it only calculates a

ENVI User’s Guide Opening External Files


166 Chapter 2: File Management

geolocation for each individual pixel. This georeferencing method is less


computationally- and disk-space intensive than a full orthorectification process
performed on the imagery; however, the full orthorectification process
provides greater accuracy. To automatically assign an RPC file to use as a
pseudo projection for a specific image, see “Emulating an RPC or RSM
Projection” on page 201.

Opening QuickBird Files


Wavelength and FWHM (full width at half maximum) information published for
QuickBird files is automatically assigned to the data only when these files are
accessed in ENVI through the File → Open External File → QuickBird option.
From the ENVI main menu bar, select File → Open External File → QuickBird
and select one of the following options:
• GeoTIFF: Reads QuickBird GeoTIFF data.
• NITF: Reads QuickBird NITF data if you have an ENVI NITF/NSIF Module
license (see the NITF User’s Guide for details). ENVI also supports reading
and displaying TFRD-format files through an additional module. Contact ITT
Visual Information Solutions to purchase a license for the NITF and/or TFRD
modules.
• Open with RPC Positioning: Reads QuickBird data and derives rational
polynomial coefficient (RPC)-based geolocation information for individual
pixels in a QuickBird image. A file containing the image RPC is required. This
method does not change the appearance of the image; it only calculates a
geolocation for each individual pixel. This georeferencing method is less
computationally- and disk-space intensive than a full orthorectification process
performed on the imagery; however, the full orthorectification process
provides greater accuracy. To automatically assign an RPC file to use as a
pseudo projection for a specific image, see “Emulating an RPC or RSM
Projection” on page 201.
• Mosaic Tiled QuickBird Product: Reads QuickBird mosaic tiled data,
described in the following section.

Opening QuickBird Mosaic Tiled Files


Large QuickBird datasets are split into tiles. A QuickBird tile file (.til) is usually
provided as a descriptive header for these tiles. The tile file contains information
about the number of tiles, the name of each tile, and their spatial relationship to one
another. ENVI uses this file to access the tiles and automatically create a virtual

Opening External Files ENVI User’s Guide


Chapter 2: File Management 167

mosaic of the entire dataset. You can use the resulting dataset as a single entity within
ENVI.
• File → Open External File → QuickBird → Mosaic Tiled QuickBird
Product
• File → Open Image File
• Basic Tools → Mosaicking → Tiled QuickBird Product
• Map → Mosaicking → Tiled QuickBird Product
The resulting mosaic of the entire dataset appears in the Available Bands List.
When using the Mosaic Tiled QuickBird Product option, individual tiles do not
appear in the Available Bands List. To open an individual tile in the Available Bands
List, use one of the non-mosaicking options in the File → Open External File →
QuickBird option.
If the QuickBird data tiles contain map information, ENVI reads in this map
information and applies it to the virtual mosaic. If map information is not provided
with the QuickBird data tiles, ENVI attempts to find geographic coordinates in the
tile file to calculate a warp that it can apply to the virtual mosaic. If no map
information exists in the tile file, ENVI attempts to read in the appropriate RPC
model and use it to emulate map information.

Opening WorldView Files


Wavelength and FWHM (full width at half maximum) information published for
WorldView-1 and WorldView-2 files is automatically assigned to the data only when
these files are accessed in ENVI through the File → Open External File →
WorldView option.
From the ENVI main menu bar, select File → Open External File → WorldView
and select one of the following options:
• GeoTIFF: Reads WorldView-1 and WorldView-2 GeoTIFF data.
• NITF: Reads WorldView-1 and WorldView-2 NITF data if you have an ENVI
NITF/NSIF Module license (see the NITF User’s Guide for details). ENVI
also supports reading and displaying TFRD-format files through an additional
module. Contact ITT Visual Information Solutions to purchase a license for the
NITF and/or TFRD modules.
• Open with RPC Positioning: Reads WorldView-1 and WorldView-2 data and
derives rational polynomial coefficient (RPC)-based geolocation information
for individual pixels in a WorldView image. A file containing the image RPC is

ENVI User’s Guide Opening External Files


168 Chapter 2: File Management

required. This method does not change the appearance of the image; it only
calculates a geolocation for each individual pixel. This georeferencing method
is less computationally- and disk-space intensive than a full orthorectification
process performed on the imagery; however, the full orthorectification process
provides greater accuracy. To automatically assign an RPC file to use as a
pseudo projection for a specific image, see “Emulating an RPC or RSM
Projection” on page 201.
• Mosaic Tiled WorldView Product: Reads WorldView-1 and WorldView-2
mosaic tiled data, described in the following section.

Opening WorldView Mosaic Tiled Files


Large WorldView-1 and WorldView-2 datasets are split into tiles. A WorldView tile
file (.til) is usually provided as a descriptive header for these tiles. The tile file
contains information about the number of tiles, the name of each tile, and their spatial
relationship to one another. ENVI uses this file to access the tiles and automatically
create a virtual mosaic of the entire dataset. You can use the resulting dataset as a
single entity within ENVI.
• File → Open External File → WorldView → Mosaic Tiled WorldView
Product
• File → Open Image File
• Basic Tools → Mosaicking → Tiled WorldView Product
• Map → Mosaicking → Tiled WorldView Product
The resulting mosaic of the entire dataset appears in the Available Bands List.
When using the Mosaic Tiled WorldView Product option, individual tiles do not
appear in the Available Bands List. To open an individual tile in the Available Bands
List, use one of the non-mosaicking options in the File → Open External File →
WorldView option.
If the WorldView data tiles contain map information, ENVI reads in this map
information and applies it to the virtual mosaic. If map information is not provided
with the WorldView data tiles, ENVI attempts to find geographic coordinates in the
tile file to calculate a warp that it can apply to the virtual mosaic. If no map
information exists in the tile file, ENVI attempts to read in the appropriate RPC
model and use it to emulate map information.

Opening External Files ENVI User’s Guide


Chapter 2: File Management 169

Opening OrbView-3 Files


From the ENVI main menu bar, select File → Open External File → OrbView-3
and select one of the following options:
• GeoTIFF: Reads OrbView-3 GeoTIFF data.
• NITF: Reads OrbView-3 NITF data if you have an ENVI NITF/NSIF Module
license (see the NITF User’s Guide for details). ENVI also supports reading
and displaying TFRD-format files through an additional module. Contact ITT
Visual Information Solutions to purchase a license for the NITF and/or TFRD
modules.
• Open with RPC Positioning: Reads OrbView-3 data and derives rational
polynomial coefficient (RPC)-based geolocation information for individual
pixels in an OrbView-3 image. A file containing the image RPC is required.
This method does not change the appearance of the image; it only calculates a
geolocation for each individual pixel. This georeferencing method is less
computationally- and disk-space intensive than a full orthorectification process
performed on the imagery; however, the full orthorectification process
provides greater accuracy. To automatically assign an RPC file to use as a
pseudo projection for a specific image, see “Emulating an RPC or RSM
Projection” on page 201.

Opening GeoEye-1 Files


From the ENVI main menu bar, select File → Open External File → GeoEye-1 and
select one of the following options:
• GeoTIFF: Reads GeoEye-1 GeoTIFF data.
• NITF: Reads GeoEye-1 NITF data if you have an ENVI NITF/NSIF Module
license (see the NITF User’s Guide for details). ENVI also supports reading
and displaying TFRD-format files through an additional module. Contact ITT
Visual Information Solutions to purchase a license for the NITF and/or TFRD
modules.
• Open with RPC Positioning: Reads GeoEye-1 data and derives rational
polynomial coefficient (RPC)-based geolocation information for individual
pixels in an GeoEye-1 image. A .pvl file containing the image RPC is
required. This method does not change the appearance of the image; it only
calculates a geolocation for each individual pixel. This georeferencing method
is less computationally- and disk-space intensive than a full orthorectification
process performed on the imagery; however, the full orthorectification process

ENVI User’s Guide Opening External Files


170 Chapter 2: File Management

provides greater accuracy. To automatically assign an RPC file to use as a


pseudo projection for a specific image, see “Emulating an RPC or RSM
Projection” on page 201.

Opening IRS Files


From the ENVI main menu bar, select File → Open External File → IRS and select
one of the following options:
• FAST: Reads IRS-1 data in FAST format.ENVI also creates a meta file. ENVI
assigns wavelengths to the bands based on the sensor type. In the Enter
Filenames dialog, select the header.dat file to read. The filenames must
follow the naming convention header.dat and bandx.dat, where x = band
number or x = p for panchromatic.
• Super Structured: Reads IRS Super Structured format. For multiple band
images where each band is stored in a separate file, ENVI creates a meta file.
In the Enter Filenames dialog, select the leader file (LEADER* or b00.led).
ENVI also extracts including wavelength information.
Note
Georeferencing information is not provided in IRS Super Structured format.

Opening AVHRR Files


Note
ENVI only supports AVHRR KLMN/Level 1B formatted files that are produced
and distributed by NOAA.

ENVI can read AVHRR files that do not have TBM or ARS headers. It can also read
AVHRR data files produced by the Quorum receiving station.
Although you can read data from the Quorum receiving station, it lacks the required
header information that enables you to calibrate or georeference the data.
From the ENVI main menu bar, select File → Open External File → AVHRR and
select one of the following options:
• KLMN 1B: To open AVHRR data from the Quorum receiving station, select
File → Open External File → AVHRR → Quorum from the ENVI main
menu bar. ENVI reads 10-bit packed format as integer data, uncompressed
formats as integer data, and 8-bit format as byte data. To use the embedded

Opening External Files ENVI User’s Guide


Chapter 2: File Management 171

information to georeference the data see “Georeferencing AVHRR Data” on


page 953.
• Sharp: Reads European Space Agency format AVHRR data. European Space
Agency SHARP data contains 5 AVHRR bands plus supplementary
information. ENVI reads the five AVHRR data bands, and reads the
supplementary information as three additional bands. The additional bands are
0-1 raster (mask) images of the latitude/longitude grid, coastlines, and state
boundaries.

Importing TerraScan AVHRR Data


ENVI cannot directly read AVHRR data in TerraScan data format (TDF), but it is
possible to convert the data to ASCII in TerraScan, then import the band-by-band
data into ENVI. While this is a time-consuming process, it is currently the only
means to import TerraScan data in ENVI. The following sample shows the first five
lines of a TerraScan file that was output to ASCII format:
1 1 -14.51 -29.9 -12.09 -22.93 106.471
1 2 -16.43 -29.9 -12.43 -23.24 106.4297
1 3 -16.43 -30.17 -12.26 -22.78 106.3883
1 4 -14.51 -30.62 -11.41 -22.78 106.3469
1 5 -13.9 -30.9 -11.75 -22.78 106.3055

The first column is the x position and the second column is the y position. The
remaining columns are the bands of data. Column 3 is band 1, column 4 is band 2,
column 5 is band 3, column 6 is band 4, and column 7 is band 5. You can delimit the
file by space, comma, or tab. The file can also contain any optional header
information, provided that the header is commented out with a semicolon.
Following are the steps to import a TerraScan ASCII file into ENVI.
1. From the ENVI main menu bar, select Topographic → Rasterize Point Data.
The Enter ASCII Grid Points Filename dialog appears.
2. Select an ASCII output file from TerraScan, and click Open. The Input
Irregular Grid Points dialog appears. Verify that your file is shown as the
proper input file.
3. Set the X position column to 1, and set the Y position column to 2.
4. Set the Z data value column to 3. For a TerraScan ASCII file, the Z data
value column corresponds to the band of data.
5. Select an input projection. See “Selecting Map Projection Types” on page 990
for more information.
6. Click OK. The Gridding Output Parameters dialog appears.

ENVI User’s Guide Opening External Files


172 Chapter 2: File Management

7. Select an output projection. See “Selecting Map Projection Types” on


page 990 for more information.
8. Use the X/Y Pixel Size and the Output X/Y Size fields to map coordinate or
latitude/longitude information for the upper-left coordinate, pixel size, and
output image size.
9. Use the choices in the Options drop-down button to manage the output
projection and map extent settings.
10. Select the type of interpolation by clicking the Interpolation toggle button.
The choices are: Linear (quintic polynomial) or Quintic (smooth quintic
polynomial).
11. Select whether or not to extrapolate edges by clicking the Extrapolate Edges
toggle button.
If you select Yes, ENVI uses quintic extrapolation.
12. Select the Output Data Type from the drop-down list.
13. Select output to File or Memory. If you output to a file, you may find it helpful
to name each file after the band number, such as “Band 1.”
14. Click OK. ENVI adds the resulting output to the Available Bands List.
15. Repeat all of the above steps for each band of data. In step 4, each time you
specify the Z column of data, choose the next column number in the sequence.
16. When all of the bands appear in the Available Bands List, you can combine
them into one file. From the ENVI main menu bar, select File → Save File
As → ENVI Standard. The New File Builder dialog appears.
17. Click Import File. The Create New File Input File dialog appears.
18. Click the Select By toggle button to select Band.
19. Select all of the bands you want to combine, and click OK.
20. In the New File Builder dialog, click Reorder Bands. Click and drag each
band into the appropriate position (with Band 1 at the top of the list).
21. Name the output file and click OK. The new multi-band image appears in the
Available Bands List.

Opening External Files ENVI User’s Guide


Chapter 2: File Management 173

Opening SeaWiFS Files


From the ENVI main menu bar, select File → Open External File → SeaWiFS and
select one of the following options:
• HDF: Reads OrbImage-distributed CEOS LAC 1B, LAC 2A, LAC 2B.
• CEOS: Reads HDF Level 1A and 1B, and NASA/Goddard-distributed
SeaWiFS HDF format data.

Opening EOS Files


From the ENVI main menu bar, select File → Open External File → EOS and
select one of the following options:
• ASTER: Reads EOS ASTER Level 1A, Level 1B, and Level 2 files, and DEM
Level 3 files. You can optionally use File → Open External File →
Thermal → ASTER. ENVI also automatically extracts and applies calibration
information from HDF attributes. For ASTER Level 1B data, the byte scaled
radiance data is converted into floating-point radiance units. For ASTER
Level 1A data, a complete calibration to radiance is performed. The units of
the output ASTER radiance are W/m2/sr/μm. You can disable applying
calibration information with the Auto-Correct ASTER/MODIS preference.
• MODIS: Reads MODIS Level 1B, 2, 3, or 4 files (MODIS products MOD02-
MOD44 and MYD02-MYD44). The gains and offsets are also extracted from
the HDF metadata. These values are automatically applied when ENVI
converts the 16-bit data in the input file to calibrated floating-point data. The
resulting emissive and reflectance data are unitless. The units of the radiance
data are W/m2/μm/sr. You can disable applying gains and offsets information
with the Auto-Correct ASTER/MODIS preference.
Note
For EOS MODIS Level 1B files, values greater than 32767 (which indicate
invalid data) are replaced by -1 when applying the gains and offsets. The data
ignore value in the ENVI header is also set to -1.

ENVI User’s Guide Opening External Files


174 Chapter 2: File Management

Note
To open MODIS products M*D08*, M*D27HV, M*D27W, M*D43B1,
M*D43B1C, M*D43B2, M*D43B2C, M*D43B3, M*D43B3C, M*D43C2,
M*DATML2, use File → Open External File → Generic Formats →
HDF.

Opening EROS A Files


From the ENVI main menu bar, select File → Open External File → EROS A and
select one of the following options:
• Level 1A: Reads ImageSat International EROS A Level 1A files. In the Enter
Filenames dialog, select the .1A file.
• Level 1B (GeoTIFF): Reads ImageSat International EROS A Level 1B files.
In the Enter Filenames dialog, select the .1A file.

Opening ENVISAT Files


From the ENVI main menu bar, select File → Open External File → ENVISAT and
select one of the following options:
• AATSR: Reads ENVISAT AATSR Level 1B and Level 2 files. ENVI also
places the image data and any ancillary image bands in the Available Bands
List and groups them into appropriate meta files.
• ASAR: Reads ENVISAT ASAR Level 1B files.
• MERIS: Reads ENVISAT MERIS level 1B and level 2 files. ENVI also places
any ancillary image bands in the Available Bands List and groups them into
appropriate meta files. ENVI applies gains and offsets to ENVISAT/MERIS
Level-2 geophysical (non-reflectance) products, so you do not need to apply
them to these products.

Opening ADS40 Files


ADS40 is an Airborne Digital Sensor developed by Leica Geosystems. It can acquire
panchromatic or multispectral imagery.
The following ancillary files are required for ENVI to automatically compute rational
polynomial coefficient (RPC) map information so that the data are georeferenced and
ready for orthorectification or DEM extraction. Be sure to put these ancillary files in
the same directory as the image file (TIFF format):

Opening External Files ENVI User’s Guide


Chapter 2: File Management 175

• ADS header file (*.ads)


• Camera calibration file (*.cam)
• Meta information support file in Socet Support File Format (*.sup)
• Orientation data file (*.odf)
• Orientation data file after bundle adjustment (*.adj)
The *.ads, *.cam, and *.sup files must exist, and either *.odf or *.adj must
exist. If both of the latter exist, then the *.adj file is used over the *.odf file
because the *.adj file is assumed to be more accurate.
From the ENVI main menu bar, select File → Open External File → ADS40.
After you select an ADS40 file, it appears in the Available Bands List with a Map
Info icon to indicate it has automatically been georeferenced. You can now
orthorectify the ADS40 data or extract a DEM from an ADS40 stereo pair. If any of
the required ancillary files are missing, ENVI opens the ADS40 file as a regular TIFF
file and does not calculate RPC map information.

Opening ALOS Files


From the ENVI main menu bar, select File → Open External File → ALOS and
select one of the following options:
• PRISM: Reads Panchromatic Remote sensing Instrument for Stereo Mapping
(PRISM) Level 1A files (one file per CCD unit), Level 1B1 files (one file per
CCD unit), and Level 1B2 files (georeferenced, geocoded).
• Open PRISM with RPC Positioning: reads PRISM data and derives rational
polynomial coefficient (RPC)-based geolocation information for individual
pixels. A separate file (RPC*) that contains the RPCs is required. Opening with
RPC positioning does not change the appearance of the image; it only
calculates a geolocation for each individual pixel. This method is less
computationally and disk-space intensive than a full orthorectification process
performed on the imagery; however, the full orthorectification process
provides greater accuracy (see “Orthorectify Using RPCs” on page 911). To
automatically assign an RPC file to use as a pseudo projection for a specific
image, see “Emulating an RPC or RSM Projection” on page 201. RPCs are
also used to extract DEMs from stereo image pairs. See the DEM Extraction
User’s Guide for details.
• AVNIR-2: Reads Advanced Visible Near-Infrared Radiometer (AVNIR)-2
data:

ENVI User’s Guide Opening External Files


176 Chapter 2: File Management

• Level 1A: Raw, uncorrected data


• Level 1B1: Radiometrically corrected data
• Level 1B2: Georeferenced data (R: georeferenced, G: geocoded, D: Rough
DEM correction)
• PALSAR: Reads Phased Array type L-band Synthetic Aperture Radar
(PALSAR) data.

Opening CARTOSAT-1 Files


From the ENVI main menu bar, select File → Open External File →
CARTOSAT-1 and select one of the following options:
• GeoTIFF: Reads CARTOSAT-1 GeoTIFF data.
• Open with RPC Positioning: Reads CARTOSAT-1 data and derives rational
polynomial coefficient (RPC)-based geolocation information for individual
pixels in a CARTOSAT-1 image. The file PRODUCT_RPC.TXT, which contains
the RPCs is required. If ENVI cannot find the file, it prompts you for file
selection. Opening with RPC positioning does not change the appearance of
the image; it only calculates a geolocation for each individual pixel. This
method is less computationally- and disk-space intensive than a full
orthorectification process performed on the imagery; however, the full
orthorectification process provides greater accuracy (see “Orthorectify Using
RPCs” on page 911). To automatically assign an RPC file to use as a pseudo
projection for a specific image, see “Emulating an RPC or RSM Projection” on
page 201. RPCs are also used to extract DEMs from stereo image pairs. See
the DEM Extraction User’s Guide for details.

Opening ATSR Files


From the Rutherford Appleton Laboratory (RAL) SADIST-2 processing software for
the ATSR-1 and ATSR-2 instruments, ENVI reads the gridded brightness
temperature/reflectance (GBT), the gridded browse (GBROWSE), and the gridded
sea surface temperature (GSST) data. ENVI automatically opens all the image
product contents within the file.
From the ENVI main menu bar, select File → Open External File → ATSR.
All the image products within the selected file are opened and appear in the Available
Bands List. For forward view and nadir view images, the band names contain FV or
NV respectively. The band names also supply the image units.

Opening External Files ENVI User’s Guide


Chapter 2: File Management 177

Opening DMSP (NOAA) Files


To open a NOAA DMSP (OLS format only) file in ENVI, select File → Open
External File → DMSP (NOAA) from the ENVI main menu bar.

Opening FORMOSAT-2 Files


From the ENVI main menu bar, select File → Open External File →
FORMOSAT-2. The Enter FORMOSAT2 Files dialog appears. Select a DIMAP
(.dim) file, and click OK.

Opening KOMPSAT-2 Files


From the ENVI main menu bar, select File → Open External File → KOMPSAT-2.
The Enter KOMPSAT-2 Filenames dialog appears. Select a KOMPSAT-2 Level 1G or
Level 1R file in TIFF or GeoTIFF format, and click Open.
Panchromatic files appear as single bands in the Available Bands List. Multispectral
data are distributed as individual TIFF/GeoTIFF files, one for each band, for a total of
four files. If all of the multispectral files are in the same directory and you select any
one of them to display, ENVI reads all of the bands into a single metafile in the
Available Bands List.

Opening RapidEye Files


ENVI reads and displays RapidEye Level-1B (Basic) and Level-3A (Ortho) data. It is
recommended that you not change the original filenames of your data files; otherwise
ENVI may not read the RapidEye data properly.
A Level-1B scene consists of five co-registered NITF 2.0 files (one for each band)
with associated rational polynomial coefficients (RPCs). To open Level-1B data, you
have three options:
• From the ENVI main menu bar or Available Bands List menu bar, select
File → Open Image File. The Enter Data Filenames dialog appears. Select a
RapidEye metadata file (.xml), and click Open. ENVI loads all five bands of
Level-1B data into the Available Bands List and displays the wavelength
information for each band. By reading the XML metadata file, ENVI has the
band and wavelength information needed to display a true-color image by
default when you click Load RGB in the Available Bands List.

ENVI User’s Guide Opening External Files


178 Chapter 2: File Management

• From the ENVI main menu bar, select File → Open External File →
RapidEye. The Enter RapidEye XML Filenames dialog appears. Select a
RapidEye metadata file (.xml), and click Open.
• From the ENVI main menu bar, select File → Open External File →
Military → NITF → NITF and select one or more NITF files (.ntf) for the
bands you want to open. Use the Shift key to select more than one file.
Level-3A images are distributed as GeoTIFF files with associated metadata. Each
GeoTIFF file contains five bands of data. To open Level-3A data, you have two
options:
• From the ENVI main menu bar or Available Bands List menu bar, select
File → Open Image File. The Enter Data Filenames dialog appears. Select a
RapidEye metadata file (.xml), and click Open. ENVI loads all five bands of
data into the Available Bands List and displays the wavelength information for
each band. By reading the XML metadata file, ENVI has the band and
wavelength information needed to display a true-color image by default when
you click Load RGB in the Available Bands List.
• From the ENVI main menu bar, select File → Open External File →
RapidEye. The Enter RapidEye XML Filenames dialog appears. Select a
RapidEye metadata file (.xml), and click Open.
• From the ENVI main menu bar, select File → Open External File → Generic
Formats → TIFF/GeoTIFF. The Enter TIFF/GeoTIFF Filenames dialog
appears. Select a GeoTIFF file (.tif) and click Open. ENVI loads the five
bands of RapidEye data into the Available Bands List.
The XML files that come with Level-1B and Level-3A data are required if you want
to send RapidEye data from ENVI to ENVI Zoom (using the File → Launch ENVI
Zoom menu option).

Opening Thermal Files


From the ENVI main menu bar, select File → Open External File → Thermal and
select one of the following options:
• TIMS: Reads data from the NASA Thermal Infrared Multispectral Scanner.
The bands appear in the Available Bands List. ENVI assumes the data has 6
bands, 638 pixels, plus a 60 byte offset at the beginning of each line, and is in
BIL storage order. Default wavelengths are entered into the header, and you
can edit them as needed.
• ASTER: Reads ASTER Level 1A and Level 1B files. You can optionally use
File → Open External File → EOS → ASTER.

Opening External Files ENVI User’s Guide


Chapter 2: File Management 179

• ENVISAT-AATSR: Reads ENVISAT AATSR Level 1B files. ENVI also


places the image data and any ancillary image bands in the Available Bands
List and groups them into appropriate meta files.
• MASTER: Reads MODIS/ASTER airborne simulator (MASTER) files. ENVI
extracts wavelengths and also automatically applies the scale factor values to
scale the data to radiance units.
Note
To access other HDF files, select File → Open External File → Remote
Sensing Formats → HDF from the ENVI main menu bar (see “Opening
HDF Files” on page 189).

Opening Radar Files


From the ENVI main menu bar, select File → Open External File → Radar or
Radar → Open/Prepare Radar File to select one of the following data types.
When displaying an image with a complex data type, ENVI displays the natural log
of the magnitude of the complex pixel values.
Note
To open SIR-C or AIRSAR files, see “Using Polarimetric Tools” on page 1113.

• ALOS-PALSAR: Reads Phased Array type L-band Synthetic Aperture Radar


(PALSAR) data.
• COSMO-SkyMed: Reads COSMO-SkyMed data in HDF5 format. ENVI
supports the following COSMO-SkyMed products:
Level-1A Single look, complex, slant range (SCS)
Level-1B Detected Ground Multilook (DGM)
Level-1C Geocoded Ellipsoid Corrected (GEC)
You can also use the Radar → COSMO-SkyMed → Open COSMO-
SkyMed File menu option to open COSMO-SkyMed data.
• ENVISAT-ASAR: Reads ENVISAT ASAR Level 1B files. ENVI
automatically extracts the header information, including any georeferencing
information.
• ERS: Reads ERS-1 and ERS-2 format data.
• JERS: Reads ERS-1 and ERS-2 format data.

ENVI User’s Guide Opening External Files


180 Chapter 2: File Management

• RADARSAT: Reads ERS-1 and ERS-2 format data from RADARSAT. ENVI
automatically extracts the needed header information (including UTM
georeferencing information) from the data file, leader file, and/or trailer file.
See “Opening Integer Format RADARSAT-1 Data” and “For Byte Scaling” on
page 180 for additional details.
• TOPSAR: Reads raw TOPSAR (AIRSAR Integrated Processor Data) format
data files (Cvv, Incidence Angle, Correlation Image, or the DEM). To read all
of the TOPSAR files and automatically convert them to physical units, see
“Converting TOPSAR Data” on page 1140. To synthesize AIRSAR images,
see “Synthesizing AIRSAR and SIR-C Data” on page 1102. You can also open
TOPSAR files using the Radar → TOPSAR Tools → Open TOPSAR File
menu option.
Opening Integer Format RADARSAT-1 Data
When the RADARSAT File Import dialog appears, select Import Data Type →
Unsigned Integer.
ENVI adds the image band to the Available Bands List.
For Byte Scaling
1. When the RADARSAT File Import dialog appears, select Import Data
Type → Scale to Byte.
2. Enter the scaling minimum and maximum data values or keep the default
values. The Min and Max values are automatically entered as the 2% points
from the histogram in the CEOS header if it is found. If the CEOS header is
not available you must enter these values.
3. Click OK to start the data reading. ENVI adds the image band to the Available
Bands List.
Complex RADARSAT-1 data are read into ENVI as follows:
• Raw data product: Two bands of byte data, one each for the Z and I Stokes
parameters.
• SLC data product: Two bands of signed integer, one each for the Q and I
Stokes parameters.

Opening External Files ENVI User’s Guide


Chapter 2: File Management 181

Opening Military Files


From the ENVI main menu bar, select File → Open External File → Military and
select one of the following options:
• ADRG: Reads ARC Digitized Raster Graphics format from the Defense
Mapping Agency. In the Enter Filenames dialog, select the .img file. The
header information is read from the .gen file, including any georeferencing
information, and the image bands are entered into the Available Bands List.
Currently, ENVI does not read the associated legend images and does not
support the georeferencing. Additionally, the Scroll window is generated from
the ADRG overview image for speed considerations.
• CADRG — Reads Defense Mapping Agency Compressed ARC Digitized
Raster Graphics files. In the Enter Filenames dialog, select the A.toc file. A
list of the frame files displays. To open individual frame files, use the File →
Open External File → Military → NITF → NITF option from the ENVI
main menu bar (you must have an ENVI NITF/NSIF Module license).
• CIB — Reads Defense Mapping Agency Controlled Image Base files. In the
Enter Filenames dialog, select the A.toc file. A list of the frame files displays.
To open individual frame files, use the File → Open External File →
Military → NITF → NITF option from the ENVI main menu bar (you must
have an ENVI NITF/NSIF Module license).
• NITF: Reads NITF data. If you have an ENVI NITF/NSIF Module license, see
the NITF User’s Guide for details. ENVI also supports reading and displaying
TFRD-format files through an additional module. Contact ITT Visual
Information Solutions to purchase a license for the TFRD module.

Opening Digital Elevation Files


From the ENVI main menu bar, select File → Open External File → Digital
Elevation and select one of the following options.
You can also select these options from the Topographic → Open Topographic File
menu from the ENVI main menu bar.
• DTED: Reads Digital Terrain Elevation Data. In the Enter Filenames dialog,
select an input file. ENVI opens single DTED files and converts them to ENVI
image files. When multiple DTED files are available, ENVI automatically
mosaics them into one ENVI image file. To open more than one DTED file,
click Input Additional File and select the new file in the Enter Filenames
dialog; to automatically mosaic the DTED files into one image based on their

ENVI User’s Guide Opening External Files


182 Chapter 2: File Management

geographic coordinates, click Yes in the Mosaic Files? button. Select output to
File or Memory. A new file and standard ENVI header file are created from
the information in the embedded header.
Note
If you do not select mosaicking and output is to File, each DEM is converted
to its own image. In this case, enter a filename without an extension. The
output file for each separate image is automatically assigned a numerical
extension (for example, _1 for the first file, _2 for the second file, and so
forth).

• DEM: Reads United States Geological Survey Digital Elevation Model data.
You can also use File → Open External File → USGS → SDTS DEM to
open these files. In the Enter Filenames dialog, select an input file. ENVI
opens single USGS DEMs and converts them to ENVI image files. When
multiple DEMs are available, ENVI automatically mosaics them into one
ENVI image file. To open more than one DEM file, click Input Additional
File and select the new file in the Enter Filenames dialog; to automatically
mosaic the DEM files into one image based on their geographic coordinates,
click Yes in the Mosaic Files? button. Select output to File or Memory. A new
file and standard ENVI header file are created from the information in the
embedded header. (See the previous Note.)
Note
If your DEM data are in ASCII format, follow the steps in “Importing ASCII
DEMs” on page 1059.

• USGS SDTS DEM: Reads Spatial Data Transfer Standard Digital Elevation
Model data. You can also use the ENVI main menu bar option File → Open
External File → USGS → SDTS DEM to open these files. In the Enter
Filenames dialog, select an input file (typically the xxxxCATD.DDF file). To
open more than one DEM file, click Input Additional File and select the new
file in the Enter Filenames dialog. Select output to File or Memory. A new file
and standard ENVI header file are created from the information in the
embedded header. (See the previous Note.)
• SRTM DEM: Reads Shuttle Radar Topography Mission data. ENVI opens
single SRTM DEM files (.hgt) as ENVI image files; when multiple DEMs
are available, ENVI automatically mosaics them into one ENVI image file. In
the Enter Filenames dialog, select the desired input filename. If the file
contains missing data points, you are prompted to correct the missing values. If
you click Yes to replace missing values, the -32768 values (which indicate

Opening External Files ENVI User’s Guide


Chapter 2: File Management 183

missing data) are replaced by values interpolated from valid neighboring


pixels. Select a new output filename, or output to memory. ENVI retains the
original input file and creates a new file containing the interpolated data points.
Tip
To georeference DEMs, use ENVI’s registration function to warp the DEM to a
specified projection using the corner coordinates and given pixel size (see “Image-
to-Map Ground Control Points” on page 887).

Opening USGS Files


From the ENVI main menu bar, select File → Open External File → USGS and
select one of the following options:
• DRG: Reads USGS Digital Raster Graphic data.
• DOQ: Reads USGS Digital Orthophoto Quadrangle data.
• DEM: Reads USGS Digital Elevation Model data. You can optionally use
File → Open External File → Digital Elevation → USGS DEM to open this
format. See “Opening Digital Elevation Files” on page 181.
• SDTS DEM: Reads USGS Spatial Data Transfer Standard. You can optionally
use File → Open External File → Digital Elevation → USGS SDTS DEM.
See “Opening Digital Elevation Files” on page 181.

Opening LAS Format LIDAR Files


ENVI allows you to read and convert LAS format LIDAR data with the .las
extension into ENVI raster or ENVI vector (.evf) files.

Viewing the LAS LIDAR File Header


The header associated with the LAS LIDAR file is accessible as a viewable text file.
From the ENVI main menu bar, select File → Open External File → LAS
LIDAR → View LAS Header.
The header file dialog is non-editable, but you save it as a text file which is printable.
If the LAS LIDAR file has geospatial data associated with the file, the information
appears below the Projection Information heading in the LAS header.

Converting LAS LIDAR Data


1. From the ENVI main menu bar, select File → Open External File → LAS
LIDAR → Convert LAS Data. The Enter LAS Filenames dialog appears.

ENVI User’s Guide Opening External Files


184 Chapter 2: File Management

2. Select the file with the .las extension and click Open. The Output Lidar
Parameters dialog appears.
3. Select an option for the data conversion from the Output Format drop-down
list:
• ENVI Raster File (default): Rasterizes the LAS data, creating output in a
standard ENVI image file where the pixel values correspond to surface
height or intensity. The converted data format results in an ENVI format
file.
• ENVI Vector File: Creates an ENVI vector file (.evf) in which each
vector point record corresponds to an (x,y) pair of the LIDAR data with the
elevation, intensity, and return number stored as corresponding attributes.
Each point is converted to a vector item and the options for model type,
output images, interpolation, pixel size, and output data type are
desensitized.
4. If you selected ENVI Raster File, select one of the following from the Model
Type drop-down list:
• Last Return (default): Also known as the bare Earth model, the last return
corresponds to a pulse return from the last (lowest) surface to return a
pulse. This can include solid materials, such as bare Earth, that are under
semi-transparent vegetation. Solid objects such as buildings that do not
have any transparency are also returned.
• Full Feature: This model returns an average value of all the returns at a
given (x,y) location.
• First Return: Also known as the first pulse return, this model corresponds
to a pulse return from the first (highest) surface. This model can include
returns from the top of any semi-solid object, such as vegetation.
5. Select the output image type from the Output Image(s) drop-down list. If your
Output Format setting is ENVI Vector File, then both elevation and intensity
are saved as attributes to the vector file. The following options are available:
• Elevation and Intensity (default): The output file contains a digital
elevation model (DEM) of the surface height, and an intensity image.
• Elevation: The output file contains only the DEM of the return height.
• Intensity: The output file contains only the intensity image.
6. To determine the data projection saved in the DEM or vector file, click Select
Output Image Projection. This option is available only if the LAS file has

Opening External Files ENVI User’s Guide


Chapter 2: File Management 185

associated geospatial information. The default settings shown are the


projection information of the input LAS data file.
In the list of projection types, click on the name of a projection to select it (see
“Selecting Map Projection Types” on page 990 for details about the settings)
or, to build a customized map projection, click New and follow the steps for
“Building Customized Map Projections” on page 992.
7. Enter the X Pixel Size and Y Pixel Size in the data in the specified projection
units. This setting is required if you selected ENVI Raster File for the output
format. The default values are set to 5.0.
If projection information exists for the data file, then the units are the same as
the units of the chosen projection. If no projection information exists, then the
units are the same as the stored units of the data (unknown, meters, feet, and so
forth).
Be sure the values in the X Pixel Size and Y Pixel Size fields use the specified
Units.
8. If the output format is ENVI Raster File Interpolation specify the
interpolation to use to create a regular grid of interpolated Z values, using
IDL’s TRIGRID function. The choices are:
• Linear (default): Creates a regular grid of linear interpolated Z values.
• Quintic: Creates a smooth interpolation performed using quintic
polynomials. If the Extrapolate Edges parameter is set to Yes, the
Interpolation parameter automatically defaults to Quintic and cannot be
changed (linear interpolation does not extrapolate to the edges).
9. If the output format is ENVI Raster File, click the Extrapolate Edges toggle
button to Yes to extrapolate the boundary node indices within the geographic
bounding box defining the dataset. The default is No.
10. Use the Background Value field to assign the Z value to pixels outside of the
calculated triangles. This setting is required if you selected ENVI Raster File
for the output format. The default is 0.0000.
11. Choose one of the following ENVI data types from the Output Data Type
drop-down list: Byte, Integer (default), Unsigned Int, Long Integer,
Unsigned Long, Floating Point, Double Precision, 64-bit Integer, Unsigned
64-bit. This setting is required if you selected ENVI Raster File for the output
format. Select Floating Point, or Double Precision for highest data fidelity.
12. Select output to File or Memory.
13. Click OK. ENVI converts the data and adds it to the Available Bands List.

ENVI User’s Guide Opening External Files


186 Chapter 2: File Management

Opening Image Processing Files


To open an IP Software format, select File → Open External File → IP Software
and select one of the following options:
• ArcView Raster (.bil): Reads ArcView® raster format files that have the.bil
file extension and an associated header file with the extension .hdr. ENVI
extracts the header information, including the UTM and State Plane projection
georeferencing information.
A free plug-in to ArcGIS® software is available on the ITT Visual Information
Solutions download website, www.ittvis.com/download/. This plug-in
allows ArcGIS software to directly read the ESRI® Raster format files.
• ERDAS IMAGINE: Reads 2 GB or smaller files stored in ERDAS 8.x
IMAGINE file format. ENVI also supports ERDAS .img one band
classification files. The class name and color lookup tables for this band are
parsed from the file’s header. ENVI does not support compressed ERDAS 8.x
(.img) files or 1-bit, 2-bit, 4-bit, or signed byte data. For additional
information, see “Opening Large IMAGINE 8.x Files” on page 187 and
“Displaying IMAGINE Files With Pyramid Layers” on page 187.
Note
Because ERDAS’ tiling scheme is not optimized for ENVI, loading large
ERDAS files is extremely slow. It is recommended that you convert to a
standard flat file in ERDAS before using ENVI.

• ER Mapper: Reads ER Mapper unsigned integer data, but does not read
signed 8-bit or ER Mapper algorithm files. In the Enter Filenames dialog,
select the data header file (.ers). ENVI extracts the header information,
including the UTM (unrotated) georeferencing information.
• ECW: Reads Enhanced Compressed Wavelet format. For Windows, the ECW
reader only work in 32-bit mode. If you have a 64-bit Windows PC, run ENVI
in 32-bit mode by selecting Start → Program Files → ENVI x.x → 32-bit →
ENVI or ENVI + IDL.
• PCI (.pix): Reads files stored in the PCI database file format. You cannot use
this option to directly read PCI files that contain multiple data types or that are
in file interleave format.
• ESRI® GRID: Reads ESRI GRID data format files on Windows platforms
only. ENVI will open an ESRI GRID file and display projection information

Opening External Files ENVI User’s Guide


Chapter 2: File Management 187

when the file contains a supported ESRI geographic coordinate system code or
ESRI projected coordinate system code or ESRI datum code.
The ability to read GRID datasets is only available if you have a licensed
version of ArcView® software or ArcGIS® version 8.x (or later) installed on
your system. If you have ArcView or ArcGIS 8.x software installed but not
licensed, do not attempt to read ESRI GRID datasets with ENVI. Doing so
may cause ENVI to exit immediately.
You can only read ESRI GRID files in Windows 32-bit mode. If you have a 64-
bit Windows PC, run ENVI in 32-bit mode by selecting Start → Program
Files → ENVI x.x → 32-bit → ENVI or ENVI + IDL.
In the Select Grid to Open dialog, select the GRID (single band data) or GRID
Stack 7.x (multiband data) dataset to open. Highlight the GRID or GRID
Stack, then click OK.
An ESRI GRID or ESRI GRID Stack is stored in a directory, not a file. When
you open a GRID directory in ENVI, it is opened as single band data. When a
GRID Stack directory is opened, it appears in the Available Bands List as an
image with multiple bands.

Opening Large IMAGINE 8.x Files


ERDAS IMAGINE 8.x image files larger than 2 GB use a raster spill file to store the
data from large datasets. That is, images larger than 2 GB are defined by two files:
header information is stored in the .img file, and the image data is stored in a second
file with the same root name using an .ige extension. To open these larger datasets
in ENVI, choose one of the following methods.
• From the ENVI main menu bar, select File → Open Image File to open the
Enter Data Filenames dialog. Navigate to the IMAGINE 8.x file. You can
choose either the .img or the .ige file, and click Open.
• From the ENVI main menu bar, select File → Open External File → IP
Software → ERDAS IMAGINE to open the Enter ERDAS IMAGINE
Filenames dialog. Navigate to the .img or .ige file and click Open.
ENVI automatically extracts the header information (including the associated
georeferencing information) and adds the image bands to the Available Bands List.

Displaying IMAGINE Files With Pyramid Layers


Many large ERDAS IMAGINE files contain reduced resolution copies of the dataset,
called pyramid layers. The pyramid layers are contained either in the IMAGINE
(.img) file, or in a separate file using an .rrd extension. These pyramid layers are

ENVI User’s Guide Opening External Files


188 Chapter 2: File Management

used to speed image display by reducing the resampling required when displaying
large portions of an image at low resolution. The Scroll window is accelerated by
reading data from the pyramid layers, if present.

Opening Generic Image Format Files


ENVI reads generic image format data including ASCII, BMP, HDF, JPEG,
JPEG2000, MrSID, PDS, PICT, PNG, SRF, TIFF/GeoTIFF, and XWD. The files,
with the exception of TIFF and BMP files, are converted to ENVI format files. TIFF
and BMP files are kept in their native formats. See “Opening Standard Format Image
Files” on page 188 and “Opening TIFF Files” on page 190 for details. If the Open
Applicable Files to Memory preference is set, generic image format files are
automatically placed in memory.
Converting generic image files to ENVI format is limited to images that fit entirely
into system memory with the exception of TIFF, HDF, and BMP format images.

Opening Standard Format Image Files


This option opens files stored in standard image file formats, including BMP, JPEG,
JPEG2000, PICT, PNG, SRF, and XWD.
1. From the ENVI main menu bar, select File → Open External File → Generic
Formats → file_type. The Enter Filenames dialog appears.
2. Select a file to convert to RGB format. You can convert files read them into
memory, or you can output to a disk file.
If the Open Applicable Files to Memory preference is set to No, the External
File Conversion dialog appears.
If you open a JPEG file that was created from a georeferenced image, the file
may have an associated .jgw file. If a .jgw file is present, ENVI reads the map
information from it.
3. If the External File Conversion dialog appears, select output to File or
Memory.
4. Click OK. If you select output to File, ENVI creates a new file and standard
ENVI header file from the information in the embedded header. The bands
from the converted file are added to the Available Bands List.

Opening ASCII Files as Image Files


You can open an ASCII file as an image. ENVI reads each ASCII value as a pixel DN
value. The ASCII values must be separated by white spaces or commas. Lines at the

Opening External Files ENVI User’s Guide


Chapter 2: File Management 189

top of the file that have non-numeric characters or that start with a semicolon are
skipped. The image data in the file must be in the format of an image array. The
number of samples is determined by the number of values in a line, and the number of
lines is determined by the number of lines in the file.
1. From the ENVI main menu bar, select File → Open External File → Generic
Formats → ASCII. The Enter Filenames dialog appears.
2. Select an ASCII file. The number of samples and lines (columns and rows) are
automatically determined. The Input File dialog appears.
3. Select BSQ, BIL, or BIP from the Interleave drop-down list.
4. From the Data Type drop-down list, select the correct data type.
5. Enter the number of input bands by using the arrow buttons next to Number of
Bands or by typing a number into the box.
6. Click OK. The bands are read into memory and entered into the Available
Bands List.
To import a DEM that is in ASCII format, follow the steps in “Importing ASCII
DEMs” on page 1059.

Opening HDF Files


Supported HDF files include raster format, images stored in 3D scientific data
format, and plots stored in 1D scientific data format. The HDF plot files are read
directly into a plot window.
1. From the ENVI main menu bar, select File → Open External File → Generic
Formats → HDF. The Enter Filenames dialog appears.
2. Select the input file. The Enter HDF Filenames dialog appears.
3. Select the files to read.
4. Click OK. ENVI reads all the selected 1D HDF files directly into a plot
window and adds any selected 2D and 3D files to the Available Bands List. If a
3D data file is selected, the Data Set Storage Order dialog appears. Select the
HDF data storage order by clicking on BSQ (band sequential), BIL (band
interleaved by line) or BIP (band interleaved by pixel).

Opening MrSID Files


This option opens MrSID (Multi-Resolution Seamless Image Database) compressed
format single-band or three-band files on Windows platforms only. The MrSID
format is a wavelet compressed, multi-resolution raster image format that may be

ENVI User’s Guide Opening External Files


190 Chapter 2: File Management

viewed without ever being fully decompressed. The memory requirements and time
delays associated with opening a full image into memory are avoided and, regardless
of size, you can view an image quickly.
Note
For Windows, the MrSID reader only works in 32-bit mode. If you have a 64-bit
Windows PC, run ENVI in 32-bit mode by selecting Start → Program Files →
ENVI x.x → 32-bit → ENVI or ENVI + IDL.

1. From the ENVI main menu bar, select one of the following:
• File → Open External File → Generic Formats → MrSID
• File → Open Image File
2. In the Enter Filenames dialog, select the MrSID compressed file to read. ENVI
automatically extracts the needed header information, including any
georeferencing information, and adds the image bands to the Available Bands
List.

Opening PDS Files


ENVI reads uncompressed PDS (Planetary Data System) format only with attached
and detached PDS data product labels. ENVI does not support VAX floating-point
(complex, double, or real) data.
1. From the ENVI main menu bar, select File → Open External File → Generic
Formats → PDS. The Enter Filenames dialog appears.
2. Select the desired .img input file. ENVI automatically extracts the needed
header information and adds the image bands to the Available Bands List.

Opening TIFF Files


ENVI supports the following TIFF files: TIFF world files (.tfw), GeoTIFF, 1-bit,
4-bit, 8-bit, 16-bit signed and unsigned integer, 24-bit, 32-bit signed and unsigned
long integer, and 32-bit floating-point.
1. From the ENVI main menu bar, select File → Open External File → Generic
Formats → TIFF/GeoTIFF.
2. In the Enter Filenames dialog, select a TIFF file to input. If you have a .tfw
associated with your TIFF file, follow these additional steps:
A. When the TIFF World File Input Projection dialog appears, select the
desired input projection and enter the zone number (see “Selecting Map
Projection Types” on page 990).

Opening External Files ENVI User’s Guide


Chapter 2: File Management 191

B. Click OK. If you have a GeoTIFF file and a TIFF world file, all projection
information is read directly from the GeoTIFF file. ENVI adds the bands
to the Available Bands List.

ENVI User’s Guide Opening External Files


192 Chapter 2: File Management

Opening Previous Files


Use Open Previous File to view and select from a list of the last 25 files that were
opened in ENVI. See Opening Previously Opened Files in Getting Started with ENVI
for steps.

Opening Previous Files ENVI User’s Guide


Chapter 2: File Management 193

Starting ENVI Zoom


Use Launch ENVI Zoom to start the ENVI Zoom application. See the ENVI Zoom
User’s Guide for complete information on how to use ENVI Zoom.

ENVI User’s Guide Starting ENVI Zoom


194 Chapter 2: File Management

Editing ENVI Headers


Use Edit ENVI Header to edit existing header files. See Editing Header Files in
Getting Started with ENVI for steps to open the Header Info dialog and edit required
header information. See the next section for details about editing optional header
information.

Entering Optional Header Information


ENVI headers may have associated ancillary information (band names, spectral
library names, wavelengths, bad bands list, FWHM) depending on the image data
type.
In the Header Info dialog, click Edit Attributes and select the desired option to edit
optional header information.

Figure 2-1: Header Info Dialog – Edit Attributes Options

Editing ENVI Headers ENVI User’s Guide


Chapter 2: File Management 195

Editing Band Names or Spectral Library Names


You can edit the default names of bands or spectral libraries. The dialog to perform
either of these functions is similar, so both are described here.

Figure 2-2: Edit Bad Bands List Values Dialog

1. In the Header Info dialog, click Edit Attributes and select either:
• Band Names: The Edit Band Name values dialog appears.
• Spectral Library Names: The Edit Spectral Library Names values dialog
appears.
2. Select the band name or spectral library name to change in the list. The name
appears in the Edit Selected Item field.
3. Type the new name and press Enter.
4. Click OK.
Importing Header Data from ASCII Files
In some header editing dialogs you can import data from an ASCII file.
1. Click Import ASCII. The Enter ASCII Filename dialog appears.
2. Open the ASCII file. The Input ASCII File dialog appears with first few values
from the ASCII file listed. If you are editing band or spectral library names, the
information from the ASCII file appears at the top of the Edit Band Name or
Edit Spectral Library Names dialogs.

ENVI User’s Guide Editing ENVI Headers


196 Chapter 2: File Management

The number of rows of the ASCII file must match the number of bands in the
image file. The ASCII file may have one or more columns of ASCII data;
however, the file used to import band names can only contain strings.
3. If available, in the Wavelength Column field enter the number of the ASCII
column that contains the wavelengths.
To scale the wavelength values on-the-fly, enter a multiplicative scale factor in
the Multiply Factor field. For example, to multiply the imported wavelength
values by 100, enter 100.
4. If available, in the FWHM Column field enter the number of the ASCII
column that contains the band width information (used in spectral resampling).
The ASCII file can also contain a Bad Bands List column. The Bad Bands
List column specifies a good band with a 1 and bad band with a 0.
5. If available, in the Data Gain Column field enter the column number of the
ASCII file that represents the gain.
6. If available, in the Data Offsets Column field enter the column number of the
ASCII file that represents the offsets.
7. If available, enter the number of the ASCII column that contains the Bad
Bands List.
8. Click OK.
9. Click OK in the Header Info dialog to write all of the changes to the header
file.

Editing ENVI Headers ENVI User’s Guide


Chapter 2: File Management 197

Figure 2-3: Input ASCII File Dialog

Setting Default Bands to Load


You can identify bands to automatically load into the a new display group when you
open the file. You can select either a gray scale image or a color image.
1. In the Header Info dialog, click Edit Attributes and select Default Bands to
Load. The Default Bands to Load dialog appears with a list of all the bands in
the file.
2. Select the band names to load in the red (R), green (G), and blue (B) options.
• If you select only one band, it is loaded as a gray scale image.
• Click Reset to clear the bands.
3. Click OK. The Header Info dialog appears. When you open the file, ENVI
automatically loads the bands into a new display group.

ENVI User’s Guide Editing ENVI Headers


198 Chapter 2: File Management

Editing Wavelengths or FWHM


1. In the Header Info dialog, click Edit Attributes and select either:
• Wavelengths: The Edit Wavelength values dialog appears.
• FWHM: The Edit FWHM values dialog appears.
2. Select the value to change in the list. The value appears in the Edit Selected
Item field.
3. Type the new value and press Enter.
4. In the Wavelength/FWHM Units drop-down list, select the units to use with
your wavelength and FWHM values. The wavelength units are used to scale
correctly between different wavelength units in ENVI’s Endmember
Collection dialog. For more information, see “Collecting Endmember
Spectra” on page 439.
5. Click OK.

Selecting Bad Bands


Use Bad Bands List to select bands to exclude from plotting or optionally omit
during processing. The Bad Bands list is often used to omit the water vapor bands in
hyperspectral datasets.

Figure 2-4: Edit Bad Bands List Values Dialog

Editing ENVI Headers ENVI User’s Guide


Chapter 2: File Management 199

1. In the Header Info dialog, click Edit Attributes and select Bad Bands List.
The Edit Bad Bands List values dialog appears.
2. All bands in the list are highlighted by default as good. Deselect any desired
bands in order to designate them as bad bands.
To designate a range of bands, enter the beginning and ending band numbers in
the fields next to the Add Range button. Click Add Range.
3. Click OK.

Entering Gains and Offsets


Use Gains and Offsets to enter values to use as default values in the Basic Tools →
Preprocessing → General Purpose Utilities → Apply Gain and Offset function.
For more information, see “Applying Gain and Offset” on page 375.
1. In the Header Info dialog, click Edit Attributes and select either:
• Gains
• Offsets
2. Click on the value to change in the list. The name appears in the Edit Selected
Item field.
3. Type the new name and press Enter.
4. Click OK.

Entering Map Information for Georeferenced Files


Map information is associated with georeferenced files. In ENVI, the term
georeferenced refers to images that are geometrically corrected (that is, rectified)
such that they conform to a known projection. To establish the georeferenced data
coordinate system, you must know the sample and line coordinates of one pixel (the
reference pixel), the pixel size, the map projection, and map coordinates of this pixel.
In ENVI, pixel values always refer to the upper-left corner of the pixel. Map
coordinates also typically refer to the upper-left corner of the pixel. However, if you
want the map coordinate to reference the middle of the pixel, add 0.5 to the image
coordinate of the reference pixel specified in the Map Info field of the header (for
example, x = 1.5, y = 1.5 would make the map coordinates refer to the center of the
pixel).
1. In the Header Info dialog, click Edit Attributes and select Map Info.

ENVI User’s Guide Editing ENVI Headers


200 Chapter 2: File Management

2. In the Edit Map Information dialog, enter the reference pixel coordinates in the
Image Coordinate of Tie Points X and Y fields and the pixel size in the Pixel
Size and Rotation X and Y fields. Be sure to enter the pixel size in the units
appropriate for your selected projection.
3. If North is not up in the image, enter a rotation angle in degrees in the Map
Rotation field. Measure the angle in a clockwise direction where zero degrees
is straight up (see “Overlaying Grid Lines” on page 66).
4. Select the map projection by clicking on Change Proj and selecting the
appropriate projection from the list of projections (see “Selecting Map
Projection Types” on page 990).

Figure 2-5: Edit Map Information Dialog

5. Enter the coordinates of the reference pixel in the appropriate fields.


The corresponding latitude and longitude are automatically calculated. To view
the coordinates, click on the arrow toggle button for Proj.

Editing ENVI Headers ENVI User’s Guide


Chapter 2: File Management 201

6. Click OK. The Header Info dialog appears.


Tip
Certain EOS products such as ASTER and MODIS HDF files contain global and
local metadata that contain a wealth of map information. However, ENVI may not
automatically read all of it. You may need to manually enter some of this
information into the Edit Map Information dialog. For example, ASTER AST05
products contain the following tags, which you can use to enter map information:
MAPPROJECTIONNAME, PROJECTIONPARAMETERS, UTMZONECODE,
SCENEFOURCORNERS, and SCENEORIENTATIONANGLE.

Emulating an RPC or RSM Projection


If your file has associated rational polynomial coefficient (RPC) or replacement
sensor model (RSM) information, use this method to automatically derive RPC- or
RSM-based geolocation information for individual pixels in an image. A file
containing RPC or RSM information is required. The geolocation is calculated
individually for each pixel, allowing ENVI to emulate a pseudo projection from the
provided RPC or RSM model. This method does not change the appearance of the
image; it only calculates the correct geolocation for each individual pixel.
This method is less computationally- and disk-space intensive than a full
orthorectification process performed on the imagery; however, the full
orthorectification process provides greater accuracy.
1. In the Header Info dialog, click Edit Attributes and select RPC or RSM
Projection Emulation. If ENVI cannot find associated RPC or RSM
information, an error dialog appears, prompting you to select a file containing
RPC coefficients. RSM coefficients cannot be imported from an external file.
The RPC Projection Emulation dialog appears when ENVI determines the file
contains RPCs, and the RSM Projection Emulation dialog appears when ENVI
determines the file contains RSM information.
2. Select one of the following options:
• Edit existing RPC/RSM projection emulation: Edit the RPC or RSM
information in the file. If you select this option and click OK, the
RPC/RSM Parameters dialog appears. Proceed to step 3.
• Clear existing RPC/RSM projection emulation: This option removes
RPC or RSM information from the file. Selecting this option and clicking
OK returns you to the Header Info dialog.

ENVI User’s Guide Editing ENVI Headers


202 Chapter 2: File Management

3. In the RPC or RSM Parameters dialog, click the RPC or RSM Projection
Emulation Enabled toggle button, and select On (to enable the projection) or
Off (to use the native map information, if any).
Use the Select Projection section of the RPC or RSM Parameters dialog if you
need to modify the projection used to report the resulting geolocation
information. Different parameters are available depending on the selected
projection type.
• To build a customized map projection, click New and follow the
instructions under “Building Customized Map Projections” on page 992.
• To change the datum for a projection type, click Datum and select a datum
from the list in the Select Geographic Datum dialog.
• If you select UTM, click the N or S toggle button to indicate if the selected
latitude is north (N) or south (S) of the equator. Enter a zone, or click Set
Zone and enter the latitude and longitude values to automatically calculate
the zone.
• If you select a State Plane projection, enter the zone or click Set Zone and
select the zone name from the list.
Both NOS and USGS zone numbers are shown next to the zone name.
• To designate the units for a projection type, click Units and select a unit
type from the drop-down list.
4. Click OK. The Header Info dialog appears.

Associating a DEM to a File


You can associate a DEM (Digital Elevation Model) with an image via the ENVI
header file. This allows you to retain the association between the two files in a
persistent manner. You can also end the association by editing the ENVI header file to
remove the reference to the DEM file.
Note
When you choose a DEM band, ENVI does not ensure the DEM is complimentary
to the image; that is, it does not check to verify that both are georeferenced and
cover the same area.

ENVI automatically adds a geoid offset and assumes that the DEM is in meters
above sea level, even for fixed-level DEMs.

Editing ENVI Headers ENVI User’s Guide


Chapter 2: File Management 203

1. In the Header Info dialog, click Edit Attributes and select Associate DEM
File. The Select DEM to associate with this file dialog appears. If an
association already exists, the Associate DEM with File dialog appears. Select
either:
• Edit existing DEM file association: The Select DEM Band to Associate
With This File dialog appears. The existing associated band is highlighted
by default. Edit the DEM file association by selecting another band to
associate. Click OK.
• Clear existing DEM file association: The Associate DEM with File
dialog closes, the association no longer exists, and the Header Info dialog
appears.
2. If the association of a DEM with this image is new, select a band as the
associated DEM.
3. Click OK.
When you select a DEM association, two fields (Table 2-1) are written to the
ENVI header file.

Field Description
dem file = /path/file Path and Filename of selected DEM file.
dem band = 2 Index (starting at 1) of selected DEM band
The dem band is not written if the DEM file contains a
single band, or if the first band of an image was chosen. In
these cases, the dem band value defaults to 0.
Note - Neither field is written if an in-memory band is selected as the associated
DEM band. In this case, the DEM association exists for the current ENVI session
only; it does not persist for subsequent sessions.

Table 2-1: Associated DEM Header Fields

When you open an image which has an associated DEM, ENVI adds both the image
and the DEM to the Available Bands List. If ENVI cannot find the associated file,
ENVI displays an error message and adds only the base image to the Available Bands
List.
This DEM association also affects the following functions in ENVI.

ENVI User’s Guide Editing ENVI Headers


204 Chapter 2: File Management

• Cursor Location/Value Tool: The DEM value for a given pixel displays next to
the data value for areas where the DEM and the image share common
geographic coordinates; for example, Data:11 (DEM=1280). The DEM
value is not shown if either the image or the DEM are not georeferenced.
• 3D SurfaceView: ENVI uses the associated DEM file as the default and does
not prompted you to select a DEM for the surface.
• RPC or RSM Projection Emulation: If an image displays using RPC or RSM
projection emulation and it has an associated DEM, ENVI uses the DEM to
refine the RPC or RSM solution, which improves its positional accuracy.
For RPC or RSM Projection Emulation, the DEM must contain map
information covering the area for the RPC or RSM image; otherwise, ENVI
uses the default elevation.
• RPC or RSM Orthorectification: If an image being orthorectified has an
associated DEM file, then ENVI uses it as the default elevation input to the
orthorectification process. You can change this default designation at any time,
if desired.

Entering Geographic Corners for Non-Georeferenced Files


If your file is not georeferenced but does include geographic information for the four
corner points of the image, use this procedure to place that information in the ENVI
header file. Currently, ENVI uses the first geographic point to place a flag on the geo-
browser showing the location of the file (see “Opening Files with the Geo-Browser”
on page 256). ENVI uses the four corner points to calculate an affine map
transformation for the image, indicated by the word “pseudo” under the Map Info
icon in the Available Bands List (see “Affine Map Transformations” on page 1206 for
more information).
1. In the Header Info dialog, click Edit Attributes and select Geographic
Corners.
2. In the Geographic Point # fields, enter between one and four pixel locations
and their corresponding latitudes and longitudes.
In ENVI, pixel values always refer to the upper-left corner of the pixel. Map
coordinates also typically refer to the upper-left corner of the pixel. However,
if you want the map coordinate to reference the middle of the pixel, add 0.5 to
the image coordinate of the reference pixel specified in the Map Info field of
the header (for example, x = 1.5, y = 1.5 would make the map coordinates refer
to the center of the pixel).
3. Click OK. The Header Info dialog appears.

Editing ENVI Headers ENVI User’s Guide


Chapter 2: File Management 205

Entering Pixel Sizes for Non-Georeferenced Files


1. In the Header Info dialog, click Edit Attributes and select Pixel Sizes.
2. Enter the X and Y pixel sizes into the appropriate fields and select the desired
units from the Units drop-down list.
3. Click OK. The Header Info dialog appears.

Editing Classification Information


The File Type must be set to Classification for this selection to be available.
1. In the Header Info dialog, click Edit Attributes and select Classification Info.
The Classification Info dialog appears.
2. Enter the number of classes.
3. Click OK. The Class Color Map Editing dialog appears.

Figure 2-6: Class Color Map Editing Dialog

ENVI User’s Guide Editing ENVI Headers


206 Chapter 2: File Management

4. Select the class name of the region to change from the list Selected Classes.
• To change a selected class name, edit it in the Class Name text field. The
header file does not allow class names that include commas.
• To change the class color in the RGB color space (0-255 for the three
colors), move the three sliders for Red, Green, or Blue.
• To reset the original class colors and names, click Reset.
• To change the class colors in the HSV or HLS color spaces, select the
appropriate system from the System drop-down list. Move the Hue,
Saturation, Value or Hue, Lightness, Saturation sliders to the desired
values.
5. Click OK. On 24-bit color displays, ENVI does not automatically apply the
color changes. Instead, for 24-bit hardware, apply color changes to the image
by clicking Apply Changes, which appears only when 24-bit color is
available.

Changing Z Plot Information


Use Z Plot Information to change Z profiles, set axes titles, set a Z Plot box size, or
specify an additional Z profile filename.
1. In the Header Info dialog, click Edit Attributes and select Z Plot
Information. The Edit Z Plot Information dialog appears.
2. Enter the minimum range value in the left and maximum value in the Z Plot
Range fields.
3. Enter the desired axes titles in the X Axis Title and Y Axis Title fields.
4. To specify the size (in pixels) of the box used to calculate an average spectrum,
enter the parameters into the Z Plot Average Box fields.
5. To specify an additional filename from which to extract Z profiles, click
Default Additional Z Profiles. The Default Additional Z Profiles dialog
appears.
6. Click Add New File.
7. Select the desired filename and click OK. The filename appears in the list.
To remove a filename from the list, select the filename and click Remove
Selected File.
8. Click OK, then click OK again.

Editing ENVI Headers ENVI User’s Guide


Chapter 2: File Management 207

Entering a Reflectance Scale Factor


Use Reflectance Scale Factor to enter a reflectance scale factor that is used in
ENVI’s Endmember Collection to correctly scale library data or other reflectance
data to match the image data. If one of the files used in the Endmember Collection
does not have a reflectance scale factor defined, then no scaling is done.
1. In the Header Info dialog, click Edit Attributes and select Reflectance Scale
Factor.
2. Enter the value that, when divided into your data, would scale it from 0 to 1.
For example, if the value of 10,000 in your data represents a reflectance value
of 1.0, enter a reflectance scale factor of 10,000.
3. Click OK. The Header Info dialog appears.

Entering a Data Value to Ignore


This parameter is currently used only for ENVI programming. See
“ENVI_FILE_QUERY” in the ENVI Reference Guide for details.

Entering Sensor Types


1. In the Header Info dialog, click Edit Attributes and select Sensor Type.
2. From the list, select a sensor type.

Setting the Default Stretch


Use Default Stretch to set the default stretch to use when displaying a band from the
file.
1. In the Header Info dialog, click Edit Attributes and select Default Stretch.
2. From the Default Stretch menu, select the stretch type. Your choices include:
linear, linear range, gaussian, equalize, square root, or none.
Some of the stretches require you to enter additional information:
• For the % Linear stretch, enter the percentage of the data to clip (for
example. 5%).
• For Linear Range stretching, enter the minimum and maximum DN
values to use in the stretch.
• For Gaussian stretching, enter the number of standard deviations to use in
the stretch.

ENVI User’s Guide Editing ENVI Headers


208 Chapter 2: File Management

3. Click OK. ENVI saves the stretch setting in the .hdr file. Whenever you
display this image, this stretch setting overrides the global default stretch given
in the envi.cfg file.
Note
If Default Stretch is set to None, ENVI uses the Display Default Stretch
preference setting.

Using the Complex Lookup Function


For complex data types, use Complex Lookup Function to determine which image
to display.
1. In the Header Info dialog, click Edit Attributes and select Complex Lookup
Function. The Complex Data Lookup Function dialog appears.
2. Select the desired lookup function from the drop-down list:
• Real (real portion of number)
• Imaginary (imaginary portion)
• Power (ln(magnitude)) (default)
• Magnitude (square root of sum of the squares of the real and imaginary)
• Phase (arc tangent of imaginary divided by real).

Setting Row Offsets


Use Major/Minor Frame Offsets to set the number of extra bytes to skip at the
beginning and ending of lines and bands. An offset is non-image data that you want to
skip, and it comes before and/or after a frame. A minor frame is 1D, and a major
frame is 2D.
See Table 2-2 for definitions of major and minor frames for the various file formats.
1. In the Header Info dialog, click Edit Attributes and select Major/Minor
Frame Offsets.
2. In the Major/Minor Frame Offsets dialog, enter the number of prefix and suffix
bytes to skip per major or minor frame by clicking on the arrow buttons or by
typing into the fields.
The following table contains major and minor definitions for the file formats in
ENVI.

Editing ENVI Headers ENVI User’s Guide


Chapter 2: File Management 209

File Format Minor Frame Major Frame

BSQ # of samples (line) # of samples by # of lines (band)


BIL # of samples (line) # of samples by # of bands
BIP # of bands (spectrum) # of bands by # of samples

Table 2-2: Major and Minor Frame Definitions

3. Click OK.

ENVI User’s Guide Editing ENVI Headers


210 Chapter 2: File Management

Generating Test Data


Use Generate Test Data to create a variety of test images that may be useful for
demonstrating or testing ENVI features. These include constant value images,
horizontal and vertical ramps, random number images using both uniform and normal
distributions, and images generated using a Gaussian Point Spread function.
1. From the ENVI main menu bar, select File → Generate Test Data. The
Generate Image Parameters dialog appears.

Figure 2-7: Generate Image Parameters Dialog

2. Select the output image type from the Output Image Value drop-down list:
• Constant: Generates an image with a constant value for every pixel. Enter
the desired DN value in the Value text box.
• Horiz Ramp or Vert Ramp: Generates an image with either a horizontal
or vertical linear ramp. Enter the desired minimum and maximum ramp
values in the Min Value and Max Value fields.

Generating Test Data ENVI User’s Guide


Chapter 2: File Management 211

• Random (uniform) or Random (normal): Random (normal) returns an


image with normally-distributed random numbers. Random (uniform)
returns an image with uniformly-distributed random numbers. Enter the
minimum and maximum values to occur in the image in Min Value and
Max Value fields. Enter a Seed value to initialize the random number
generator. If you do not enter a seed value, ENVI uses the system clock for
initialization.
• Gaussian PSF: Generates a Gaussian image. Enter the minimum and
maximum values to occur in the number of output Samples, Lines, and
Bands in the corresponding fields.
3. Select the Output Data Type from the drop-down list.
4. Select output to File or Memory.
5. Click OK. A status box appears while the image is being processed. ENVI
adds the new image to the Available Bands List when processing is complete.

ENVI User’s Guide Generating Test Data


212 Chapter 2: File Management

Using the Data Viewer


Use the Data Viewer to examine data files at the byte level, which allows you to view
file structure, identify unknown file types, and determine the offset to data when an
embedded image header is present in the data.
1. From the ENVI main menu bar, select File → Data Viewer. The Data Viewer
Input File dialog appears.
2. Select a file. The Data Viewer dialog appears, displaying the filename and
number of total bytes in the title bar and the actual data values (in hexadecimal
format, by default).
• The first column lists the byte count (the starting byte of the listed row).
• The next 16 columns (for hexadecimal and byte data) list the values for 16
bytes of data.
• The final column lists the ASCII equivalent of the values.
Note
If the data does not have any embedded ASCII characters, the ASCII
equivalents are random. If there is embedded ASCII data, the data is readable
as text.

Using the Data Viewer ENVI User’s Guide


Chapter 2: File Management 213

Figure 2-8: Data Viewer Dialog

3. To select the starting byte to view from the file, enter the byte number in the
File Offset Byte(s) field.
4. To move the data view forward or backward one page respectively, click the
Next Page and Prev Page buttons.
5. If you suspect that the data may be in something other than byte format, select
View_Format from the Data Viewer menu bar and select a data format
(Hexadecimal, Byte, Unsigned Integer, Integer, Long Integer, Unsigned
Long Integer, or Floating Point). The number of columns of data values and
the representation of the listed data change accordingly.
6. To open and view a different file, select File → Open New File from the Data
Viewer menu bar.
7. To exit the data viewer, select File → Cancel from the Data Viewer menu bar.

ENVI User’s Guide Using the Data Viewer


214 Chapter 2: File Management

8. To evaluate the swapping of bytes between Intel and IEEE formats for data
types with more than one byte per value (integer, long integer, and floating
point), select Byte_Swap from the Data Viewer menu bar and select one of the
following:
• None: No swapping
• Short Word: Swapping two bytes for an integer
• Long Word: Swapping byte pairs for long integer and floating-point data

Using the Data Viewer ENVI User’s Guide


Chapter 2: File Management 215

Subsetting Data
Many ENVI tools allow you to subset your data before processing. From the Input
File dialog (described in The Input File Dialog in Getting Started with ENVI), you
can perform spatial, spectral, or statistics subsetting, and, in some cases, mask the
input data.

Spatial Subsetting
Use spatial subsetting to limit applying a function to a spatial subset of the image.
You can select spatial subsets by using the following methods:
• Entering samples and line values
• Selecting interactively from the image
• Entering map coordinates
• Using the same spatial subset that was previously used on another file
• Using the image shown in the meta scroll window
• Using the bounding box around a region of interest

ENVI User’s Guide Subsetting Data


216 Chapter 2: File Management

The options in the Spatial Subset dialog vary depending on whether the current data
is sample-line-based or georeferenced. Additionally, if the same image is open in
more than one display group, you can specify which display number to apply the
subset to.

Figure 2-9: Spatial Subset Dialog for a Georeferenced Image

Subsetting by Samples/Lines
The size of the original dataset and the size of the currently-selected subset appear
below the fields.
To subset by samples and lines:
1. In the Select Spatial Subset dialog, select the image to subset by from the
Subset by Image drop-down list.
2. Enter the starting and ending values of the Samples and/or Lines into the
appropriate fields, or enter the desired number of lines or pixels in the NS or
NL fields.
3. Click OK.

Subsetting Data ENVI User’s Guide


Chapter 2: File Management 217

Subsetting by Images
To select the spatial subset interactively from the image:
1. In the Select Spatial Subset dialog, select the image to subset by from the
Subset by Image drop-down list, then click Image. The Subset by Image
dialog appears. A subsampled version of the selected image band is displayed.
A box on the image outlines the currently selected subset.

Figure 2-10: Subset by Image Dialog

2. To change the subset size or location, select from the following options:
• In the Subset by Image dialog, click and grab on one of the corners of the
box and drag to the desired location.
• To move the box around the image, click on the box and drag it to the
desired location.
• Change the values in the Samples or Lines fields.
3. Click OK. The starting and ending sample and line coordinates appear in the
text boxes labeled Samples and Lines.

ENVI User’s Guide Subsetting Data


218 Chapter 2: File Management

Subsetting by Map Coordinates


For georeferenced images, you may select the subset by map coordinates or
latitude/longitude coordinates:
1. In the Select Spatial Subset dialog, click Map. The Spatial Subset By Map
Coordinates dialog appears. It is divided into two sections: one for the upper-
left map coordinate and the other for the lower-right coordinate.
2. Enter the upper-left coordinate and lower-right coordinate (the corners) of the
subset into the corresponding fields. The default values displayed are the
upper-left and lower-right coordinates of the full image.
3. Use the arrow toggle buttons to select the subset by latitude and longitude
values for each coordinate.
To change the map projection of the coordinates, click the corresponding
Change Proj button and follow the instructions in “Selecting Map Projection
Types” on page 990.
4. Click OK.

Figure 2-11: Spatial Subset by Map Coordinates Dialog

Subsetting Data ENVI User’s Guide


Chapter 2: File Management 219

Subsetting Using Another File’s Subset


There are two options for subsetting a file based on the subset area of a previously
subset image: use the first option to subset your image based on a subset of an image
that was originally the same size as the one you are subsetting; use the second to
subset your image based on an image of the same or smaller size that was previously
subset by map or pixel values.
Using the Subset of an Image of the Same Size
To use the same spatial subset previously entered for a file with the same spatial size,
click Previous in the Input File dialog or the Select Spatial Subset dialog.
Using the Subset of an Image of the Same or Smaller Size
1. In the Select Spatial Subset dialog, click File. The Input File dialog displays.
2. Select the previously subset file (which must have originally been the same
size as or smaller than the current file). The input file is subset based on the
subset parameters of the file you select.

Subsetting Using ROIs


To make previously saved ROIs available for selection in the Subset Image by
ROI/EVF Extent dialog, click Open in the Select Spatial Subset dialog, select ROI
File or EVF File, and choose the desired file in the subsequent Input File dialog.
To subset a file using the bounding box (i.e., the area encompassing an ROI or group
of ROIs) follow these steps:
1. In the Select Spatial Subset dialog, click ROI/EVF. The Subset Image by
ROI/EVF Extent dialog displays.

ENVI User’s Guide Subsetting Data


220 Chapter 2: File Management

Figure 2-12: Subset Image by ROI/EVF Extent Dialog

2. Select the ROI(s).


3. Click OK. The file is subset to the area encompassing the selected ROI(s).

Subsetting by Scroll Window


To subset a file based on the image currently shown in the meta zoomed scroll
window for the selected file, click Scroll in the Select Spatial Subset dialog. The
starting and ending values are set to include only the Scroll window subset.
Subsetting by Scroll window is only available if the Scroll window displaying the
selected file is in meta zoom mode. If the file is displayed in multiple meta zoomed
Scroll windows, the subset of the first window is used.

Spectral Subsetting
Use spectral subsetting to limit application of a function to selected bands of an
image.

Subsetting by Bands
1. In the Input File dialog, click Spectral Subset. The File Spectral Subset dialog
appears. The appearance of this dialog varies depending on whether the image
has a bad bands list. A bad band is not included in the processing. A list of
bands available for selection appear in the center of the dialog.

Subsetting Data ENVI User’s Guide


Chapter 2: File Management 221

Figure 2-13: Spectral Subset Dialog with Three Selected Bands

2. Select a spectral subset using one of the following methods:


• Use the mouse to select a series of bands by left-clicking and dragging
across the desired bands. Select multiple, non-adjacent bands by left-
clicking on individual bands while pressing the Ctrl key.
• Enter the min and max band numbers in the text fields to the left of the
Add Range button to select a series of bands. The series is selected when
you click Add Range.
• For images with a Bad Bands List (see “Selecting Bad Bands” on
page 198), click Apply BBL to apply the Bad Bands List. ENVI
automatically deselects individual bands that are marked Bad. Bad bands
do not appear in the output image.
3. Click OK.

Subsetting Using Previous Subsets


To select the same spectral subset previously used for a file with the same number of
spectral bands, click Open and select Previous File to reveal the last 25 files and
subsets used in previous ENVI sessions. Selecting a file from the list opens the file.

ENVI User’s Guide Subsetting Data


222 Chapter 2: File Management

Subsetting by Ranges
When selecting a range of bands to subset, the dialog default initially shows all bands
selected. To select a specific range of bands instead of the default:
1. In the File Spectral Subset dialog, click Clear to reset the default setting.
2. Enter the starting and ending band numbers into the two fields next to the Add
Range button.
3. Click Add Range.

Subsetting from an ASCII File


Spectral subsetting from an ASCII file is useful if you have defined several special-
use spectral subsets for a file with a large number of bands. To spectrally subset your
data using an ASCII file:
1. In the File Spectral Subset dialog, click Import ASCII.
2. When the Enter ASCII Filename dialog appears, select the ASCII file. The
format of the ASCII file must have the same number of lines in the file as the
number of bands in the image.
3. Columns in the ASCII file define possible spectral subsets. You can enter
multiple columns to allow specifying different band selections. For each
column in the ASCII file a 0 indicates the band is not selected and a 1 indicates
the band is selected.
For instance, a 5-band AVHRR file could use an ASCII file with the following
data:
0 1 1
0 0 1
0 1 1
1 0 0
1 1 0

Selecting column 1 deselects bands 1, 2 and 3, and selects bands 4 and 5.


Selecting column 2 selects bands 1, 3 and 5, and deselects bands 2 and 4.
Selecting column 3 selects bands 1, 2 and 3, and deselects bands 4 and 5.
Regardless of the number of rows in the ASCII file, only the top 5 bands are
shown in the Input ASCII File dialog.

Subsetting Data ENVI User’s Guide


Chapter 2: File Management 223

Statistics Subsetting
Use spectral subsetting to limit application of a function to selected spatial subset or
the area under an ROI.
1. When available in a dialog, click Stats Subset. The Select a Statistics Subset
dialog appears.
2. Select one of the following options from the Calculate Stats On field:
• Image Subset: To select a standard image spatial subset. See “Spatial
Subsetting” on page 215 to subset the data.
• ROI/EVF: To select an ROI or vector as the subset. A list of ROIs and
vectors display in the Select ROI/EVF list; select an ROI or vector name,
and click OK.
Tip
To add a previously saved ROI or vector to the list, click Open in the Select
Statistics Subset dialog and select ROI File or an EVF File.

ENVI User’s Guide Subsetting Data


224 Chapter 2: File Management

Figure 2-14: Select Statistics Subset Dialog for Image Subset (left) and for
ROI/EVF (right)

Masking
You can apply a spatial mask to your file, to prevent ENVI from applying the selected
function to the image portion that you mask. You can only apply a mask that was
previously defined (see “Building Masks” on page 350).
Only certain ENVI functions allow spatial masking before processing. These
functions include statistics, classification, Linear Spectral Unmixing, Matched
Filtering, Continuum Removal, and Spectral Feature Fitting.
To apply a previously built spatial mask to your image:
1. Select either of the following:
• In the Input File dialog, click Select Mask Band. The Select Mask Input
Band dialog appears with a list of all bands that are the same spatial size as
the input image.

Subsetting Data ENVI User’s Guide


Chapter 2: File Management 225

• In any dialog with the Select Mask button, click Select Mask. The Select
Mask Input Band dialog appears with a list of all bands that are the same
spatial size as the input image.
2. Select the band containing the mask.
3. Click OK.
To remove a mask applied to your image:
• In the Input File dialog, click Mask Options and select Clear Mask
Band.
• In any dialog with the Clear Mask button, click Clear Mask.

ENVI User’s Guide Subsetting Data


226 Chapter 2: File Management

Saving Files
Use Save File As to create a new standard ENVI disk file or an ENVI meta file from
bands contained in the Available Bands List and to output image data to various
image processing formats. See Saving as Standard ENVI Files, Saving as ENVI Meta
Files, and Saving as ASCII Files in Getting Started with ENVI for details about
saving to those file formats. See the following for details on saving to all other file
formats.
You can also save images from the Display group menu bar Save Image As →
Image File option, as described in “Saving Images from Displays” on page 15.

Saving Files as ArcView Raster Files


This option saves output data to an ArcView® raster (.bil) format file, including
.hdr and .stx files.
1. From the ENVI main menu bar, select File → Save File As → ArcView
Raster (.bil). The Input Filename dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Output File to ArcView dialog appears.
3. Enter the output filename.
4. Click OK. ENVI creates the.bil, .hdr, and .stx ArcView® raster output
files.
Note
The resulting ArcView® file does not contain datum and ellipsoid information.

Selecting an Output Geodatabase


You can save raster and vector datasets that are open in ENVI or ENVI Zoom to a
geodatabase. Follow these steps to continue:
1. Select one of the following menu options, depending on the program you are
using:
• Raster datasets in ENVI:
From the ENVI main menu bar, select File → Save File As → ArcGIS
Geodatabase.

Saving Files ENVI User’s Guide


Chapter 2: File Management 227

• Vector datasets in ENVI:


In the Available Vectors List, select a vector layer by clicking on the name.
Select File → Export Layers to ArcGIS Geodatabase.
• Raster and vector datasets in ENVI Zoom:
From the ENVI Zoom menu bar, select File → Save to ArcGIS
Geodatabase.
If you are saving raster datasets in ENVI or raster/vector datasets in ENVI
Zoom, the Select Input File dialog appears.
2. Select a dataset, and click OK.
The Process Manager updates to show export progress to a geodatabase. The
Process Manager displays the progress, but the coordination between ENVI or
ENVI Zoom and ArcMap™ software does not allow the process to be cancelled
once initiated.
The Select Output Geodatabase dialog appears. This dialog lists all available
geodatabases to which ENVI or ENVI Zoom is connected.
3. If the destination geodatabase is not present in this list, click Connect. The
Connection Properties dialog appears. See Managing Connection Properties in
Getting Started with ENVI for instructions on connecting to a dataset. If
successful, the new connection is added to the Destination Geodatabase list
and selected by default.
4. Select a geodatabase from the Destination Geodatabase list.
5. In the Select Output Geodatabase dialog, enter a dataset name in the Output
Name field. The default is the name of the input dataset. Dataset names must
not exceed 128 characters.
6. Optionally set any configuration keywords. (For more information on
configuration keywords, see the ArcGIS Help.)
7. Click OK. ENVI or ENVI Zoom verifies that the output geodatabase has
sufficient write permissions and that you have a valid ArcGIS® license. (See
also ESRI License Type in ENVI Zoom preferences.)

Restrictions
• You must have an ArcView® license to save to a personal or file geodatabase
and an ArcEditor™ or ArcInfo® license to save to an enterprise geodatabase.
Contact your ESRI sales representative to purchase a license.
• Personal geodatabases store datasets within a Microsoft Access data file,
which is limited in size to 2GB.

ENVI User’s Guide Saving Files


228 Chapter 2: File Management

• Enterprise geodatabases require a login. Users with read-only access cannot


save data to an enterprise geodatabase.
• You cannot load vector data with unsaved edits to a geodatabase.
• You can save point, line, polygon, and multipoint vector data to a geodatabase.
Vector files in ENVI Vector format (EVF) with multiple record types are not
supported.
• In ENVI, you cannot save virtual mosaics or spectral libraries to a
geodatabase.
• In ENVI and ENVI Zoom, display enhancements you add to a raster image
(contrast stretching, sharpening, etc.) are not retained when saving the image
to a geodatabase. You can use the Chip from Display or Chip Display to
ArcMap option in ENVI Zoom, or the Save Image As option from an ENVI
display group, to retain display enhancements (see “Chipping from Display” in
ENVI Zoom Help).
• ENVI stores any single-band raster data with a three-color lookup table as an
RGB image upon saving to a geodatabase. ENVI Zoom retains color maps
upon saving to a geodatabase.
• Traditional map information from input raster data will be retained upon
saving to a geodatabase. RPC information, affine map transformations (kx/ky
or pseudo projections), and custom projections are not retained when saving to
a geodatabase.
• You cannot save a vector dataset (feature class) to an ArcGIS® feature dataset
from ENVI or ENVI Zoom. After saving a feature class to a geodatabase, use
ArcCatalog™ software to drag the feature class to a feature dataset if needed.
• For NITF data, you can only save individual image segments to a geodatabase.
Composite images, annotation segments, and files with multiple image
segments are not supported. ENVI and ENVI Zoom do not export NITF
metadata to a geodatabase.
• Metadata that is supported in both ENVI and ArcGIS® will transfer upon
saving to a geodatabase. However, ENVI-specific metadata (such as spectral
information, band names, etc.) will not be stored in a geodatabase.
• Detailed information on geodatabase types, their structure, and their support in
ArcGIS® software can be found in the ArcGIS Desktop help.

Saving Files ENVI User’s Guide


Chapter 2: File Management 229

Saving Files as ER Mapper Files


1. From the ENVI main menu bar, select File → Save File As → ER Mapper
File. The Input Filename dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Output File to ER Mapper dialog appears.
3. Enter an output filename.
4. Click OK. ENVI creates an ER Mapper output file. In addition to saving
required header information, ENVI saves band names, the bad bands list, and
UTM map information (georeferenced files) or pixel sizes (non-georeferenced
files) when creating ER Mapper output. Only UTM map information is
supported when writing ER mapper files.

Saving Files as IMAGINE Files


ENVI supports the following file attributes when saving a file in the ERDAS
IMAGINE 8.x format:
• Georeferencing information
• Class colors
• Spatial and spectral subsets
• NaN values
• Unrestricted numbers of samples, lines, or bands
• Data types: unsigned byte, integer, unsigned integer, long integer, unsigned
long integer, floating-point, double precision floating-point, complex, double
precision complex
• Classification images
• Class names
1. From the ENVI main menu bar, select File → Save File As → ERDAS
IMAGINE. The Select File for ERDAS IMAGINE Output dialog appears.
2. Select the file to save.
3. Click OK. The ERDAS IMAGINE Output Parameters dialog appears.

ENVI User’s Guide Saving Files


230 Chapter 2: File Management

Figure 2-15: Saving a File in ERDAS IMAGINE Format

4. The Block Width and Block Height fields default to an optimized block size
(in pixels) for writing from ENVI. You can change the default values as
desired, especially if you want to specify the optimal ERDAS block size (64 by
64 pixels). The input image may be of any interleave, but the image is written
as block sequential by band interleave.
Blocks are similar to tiles used by ENVI to manage data. The size of the block
dictates how much image data is processed at one time. ENVI’s performance is
enhanced using larger block sizes. When writing data in the IMAGINE format,
ENVI optimizes the block size to fit the most data in memory. Smaller block
sizes may result in slower writing performance.
5. The Enter Output IMAGINE Filename field defaults to the root filename,
but uses the .img extension for the IMAGINE format. You can change the
path and filename.
You can assign any name to the file, but it must have the .img extension. If the
file size is greater than the 2 GB limit, a second file using the root name and
the .ige extension is automatically generated in the same directory as the
.img file.

Note
If the filename contains a character which is not valid for the ERDAS
filename convention, it is changed to an underscore character (_) when the
file is saved.

6. Click OK. In addition to saving required header information, ENVI saves band
names, the bad bands list, classification information, and map information (for
georeferenced files) when creating ERDAS IMAGINE output.

Saving Files ENVI User’s Guide


Chapter 2: File Management 231

Saving Files as JPEG 2000 Files


1. From the ENVI main menu bar, select File → Save File As → JPEG2000.
The Input Filename dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Output File to JPEG2000 dialog appears.
3. Enter an output filename.
4. Use the drop-down list to specify the type of compression used to save this
data as a JPEG2000 file. The drop-down list contains the following choices:
• Lossless Compression (default): A completely reversible compression
that produces a high quality result, but less data content is compressed than
with Low Compression or High Compression.
• Low Compression: A non-reversible compression that retains nearly all
the original data content while maintaining moderate compression.
• High Compression: A non-reversible compression that provides the
highest level of data content compression, but could produce in a lower
quality result.
5. Click OK. ENVI creates a JPEG2000 (.jp2) output file that is optimized for
visual performance.

Saving Files as NITF Files


If you have an ENVI NITF/NSIF Module license, see the NITF User’s Guide for
details about saving files to NITF format.

Saving Files as PCI Files


This option saves output data to a PCI (.pix) format file.
1. From the ENVI main menu bar, select File → Save File As → PCI File. The
Input Filename dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Output File to PCI dialog appears.
3. Enter an output filename.
4. Click OK. ENVI creates a .pix PCI output file. In addition to saving required
header information, ENVI saves band names, the bad bands list, and map

ENVI User’s Guide Saving Files


232 Chapter 2: File Management

information (georeferenced files) or pixel sizes (non-georeferenced files) when


creating PCI output.

Saving Files as TIFF Files


1. From the ENVI main menu bar, select File → Save File As → TIFF. The file
selection dialog appears. The Input Filename dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Output File to TIFF/GeoTIFF dialog appears.
3. Enter an output filename.
4. Click OK. ENVI creates a TIFF output file. If you selected a georeferenced
file as the input file, the output file is a GeoTIFF file with an associated TIFF
world file (.tfw). See “GeoTIFF Map Information” on page 1205 for more
information.

Saving Files as ESRI GRID Data


You can save your image files in the ESRI® GRID raster format. This is only
supported on Windows platforms, and it is only available in a licensed version of
ENVI.
When writing an ESRI GRID file, ENVI will preserve the ESRI coordinate system
code when the source file was an ESRI GRID file containing a supported ESRI
coordinate system code. ENVI supports the following projections when writing an
ESRI GRID file, as long as the source file was not an ESRI GRID file: UTM,
Geographic Lat/Lon, State Plane, Australian Map Grid (AGD 66), and Map Grid of
Australia (MGA 94).
Verify that you have a licensed version of ArcView® or ArcGIS® software installed
on your system. If you have ArcView or ArcGIS software installed but not licensed,
do not attempt to write GRID datasets with ENVI. Doing so may cause ENVI to exit
immediately.
For Windows, saving files in GRID format only works in 32-bit mode. If you have a
64-bit Windows PC, run ENVI in 32-bit mode by selecting Start → Program
Files → ENVI x.x → 32-bit → ENVI or ENVI + IDL.
You can only save imagery to the GRID format if that imagery contains 49 or fewer
bands and each band contains only square pixels. Even though the GRID format itself
allows non-square pixels, ENVI does not support non-square pixels in GRID format.
1. From the ENVI main menu bar, select File → Save File As → ESRI GRID.
The Input Filename dialog appears.

Saving Files ENVI User’s Guide


Chapter 2: File Management 233

2. Select the image file you want to save to a GRID.


3. Click OK. The Export to Grid dialog appears.
4. Navigate to the directory under which to save the GRID. Select an existing
GRID, or type in the name of a new GRID.
5. Click Open to save the data to the specified GRID.

ENVI User’s Guide Saving Files


234 Chapter 2: File Management

Working with IDL


For information on the File menu Import IDL Variables, Export to an IDL
Variable, and Compile IDL Module options, see Using IDL with ENVI in Getting
Started with ENVI. For information on modifying the IDL CPU parameters, see
“Modifying IDL CPU Parameters” on page 1171.

Working with IDL ENVI User’s Guide


Chapter 2: File Management 235

Tape Utilities
Use Tape Utilities to read MSS, TM, SPOT, AVHRR, AVIRIS, NLAPS, and CEOS
format radar data (including SIR-C/X-SAR, RADARSAT-1 and ERS-1) from a
variety of computer compatible tape (CCT) formats and to read U.S. Geological
Survey DEMs and DLGs (Optional Format only). You can also use the tape utilities
to read BSQ, BIP, or BIL data directly from tape and to control SCSI tape drives (9
track, 8 mm, and 4 mm media) at the file and record levels.
Flexible tape tools are included with the tape utilities for adding other data types,
even when a specific format is not directly supported. Also included is a special tape
output utility for writing ENVI files to tape, which preserves header information and
file structure. A corresponding tape input utility is also available for reading ENVI
formatted tapes. Use the tape scan and dump utilities to diagnose tape structures,
build scripts for commonly used tape types, and dump tapes to disk.
Tape functions are automatically supported on UNIX. To install SCSI tape support
for Microsoft Windows 2000 and Windows XP platforms, open the aspi_v470.exe
self-extracting archive in the \tape32 directory on the ENVI for Windows
installation CD. Please see the included README.DOC file for installation
instructions. For Windows, tape functions only work in 32-bit mode. If you have a
64-bit Windows PC, run ENVI in 32-bit mode by selecting Start →
Program Files → ENVI x.x → 32-bit → ENVI or ENVI + IDL.

Understanding Tape Device Names


On PC platforms, ENVI uses a tape device name based on the adaptor, target, and
unit number. On UNIX platforms, ENVI uses the standard UNIX tape device naming
conventions.

On PCs With Microsoft Windows


The tape devices on the PCs must be ASPI compatible SCSI tape drives. The tape
device name on the PC is referenced by the adapter number (a#), target ID (t#) and
logical unit (l#). Most PCs have only one adapter and the logical unit number for the
tape is 0. The target number is the SCSI ID of the device. For external devices this is
the pinwheel setting on the back of the drive. Internal devices use jumpers to set the
SCSI ID. In either case your SCSI adapter should list the target numbers of your tape
drives during bootup. For example, your Tape device name for a tape drive with SCSI
ID 4 would be /dev/a0t4l0 (assuming only one adapter). If your tape drive is
attached to your second SCSI adapter then you would use /dev/a1t4l0 as the Tape
device.

ENVI User’s Guide Tape Utilities


236 Chapter 2: File Management

On UNIX Platforms
The tape devices on UNIX platforms are specified as the name of the tape device in
the /dev directory. For example, to specify device Øb in the /dev/rmt directory, use
the name /dev/rmt/Øb as the ENVI Tape Device.

Reading Known Tape Formats


Use Read Known Tape Formats to read standard file formats from tape. Supported
formats include Landsat MSS, Landsat TM, AVHRR, SPOT, AVIRIS, USGS DEM,
USGS DLG, NLAPS, SIR-C CEOS, RADARSAT-1 CEOS, and Generic CEOS.

Reading Landsat MSS Tapes


ENVI reads two types of Landsat MSS tapes. MSS CCT-X format is typical of early
MSS data recorded in the BIP2 (BIPP) format. These data consist of strips of MSS
data for all 4 MSS bands in pixel pairs (See MSS documentation available from data
center and other sources). Landsat MSS data has been distributed in MSS EDIPS
format since 1979. ENVI automatically identifies both MSS CCT-X or EDIPS
formats by scanning the tape headers. You can subset the data directly from tape.
1. From the ENVI main menu bar, select File → Tape Utilities → Read Known
Tape Formats → Landsat MSS. The Landsat MSS - Load Tape dialog
appears.
2. Select from the following options:
• To designate a different tape device, enter or choose a device.
• To change the tape record size, enter the values into the MaxRecsize
fields.
Tip
If you designate a different tape device, allow your operating system enough
time to register the new device before proceeding.

3. Click OK to have ENVI scan the tape header. If MSS format data are
identified, the MSS Tape Output Parameter dialog appears.
To subset the image being read from tape, enter the starting and ending lines
and/or samples in the SamplesTo and/or LinesTo fields respectively.
4. Select bands to read by clicking the toggle buttons next to the desired band
names. To designate a range of bands, enter the beginning and ending band
numbers in the fields next to the Add Range button. Click Add Range.

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 237

5. Select output to File or to Memory. File output is recommended.


6. Click OK to start the tape processing.

Reading Landsat TM Tapes


ENVI reads Landsat TM tapes of these formats: full scene CCT-AT and CCT-PT
data, TIPS (Quad) format, LGSOWG, and FAST Format. ENVI identifies the file
type automatically by scanning the tape headers. The CCT-AT and CCT-PT data
formats are full-scene formats that were used for early (pre-1984) TM data and are
typically are on two (AT) or three (PT) 6250 bpi tapes. The TM TIPS format is
typical of most historical TM data recorded in the BSQ format from 1984 through
approximately 1991. These data consist of TM data organized by Quadrangle (see
TM documentation available from EROS data center and other sources). TM data are
currently distributed using the FAST format. For FAST format TM data that are
georeferenced with a UTM projection, ENVI reads all of the necessary information
and places it in the ENVI header. For Landsat data in NLAPS format, use the NLAPS
tape reader (see “Reading NLAPS Tapes” on page 242). You can subset the data
directly from tape.
1. From the ENVI main menu bar, select File → Tape Utilities → Read Known
Tape Formats → Landsat TM. The Landsat TM-Load Tape dialog appears.
2. Select from the following options:
• To designate a different tape device, enter or choose a device.
• To change the tape record size, enter the values into the MaxRecsize
fields. If you designate a different tape device, allow your operating system
enough time to register the new device before proceeding.
3. Click OK to have ENVI scan the tape header. If TM format data are identified,
the TM Tape Output Parameters dialog appears.
4. To subset the image being read from tape, enter the starting and ending lines
and/or samples in the SamplesTo and/or LinesTo fields respectively.
5. Select bands to read by clicking the toggle buttons next to the desired band
names. To designate a range of bands, enter the beginning and ending band
numbers in the fields next to the Add Range button. Click Add Range.
6. Select output to File or Memory. File output is recommended.
7. Click OK to start the tape processing.

ENVI User’s Guide Tape Utilities


238 Chapter 2: File Management

Reading AVHRR Tapes


ENVI reads both AVHRR LAC (HRPT) and GAC (in Level 1B format) data as
provided by NOAA. You can subset the data directly from tape.
1. From the ENVI main menu bar, select File → Tape Utilities → Read Known
Tape Formats → AVHRR. The AVHRR Format - Load Tape dialog appears.
2. Select from the following options:
• To designate a different tape device, enter or choose a device. If you
designate a different tape device, allow your operating system enough time
to register the new device before proceeding.
• To change the tape record size, enter the values into the MaxRecsize
fields.
3. In the File field, enter the file number to retrieve from the tape.
4. Click OK to scan the tape header. If AVHRR format data are identified, the
AVHRR Tape Output Parameters dialog appears and the bands available on
tape are listed.
Note
To subset the image being read from tape, enter the starting and ending lines
and/or samples in the SamplesTo and/or LinesTo fields, respectively.

5. Select bands to read by clicking the toggle buttons next to the desired band
names. To designate a range of bands, enter the beginning and ending band
numbers in the fields next to the Add Range button. Click Add Range.
6. Select output to File or Memory. File output is recommended.
7. Click OK to start the tape processing.

Reading SPOT Tapes


ENVI automatically reads two types of SPOT data tapes: SPOT panchromatic data
(PAN) and SPOT multispectral data (XS). You can subset the data directly from tape.
1. From the ENVI main menu bar, select File → Tape Utilities → Read Known
Tape Formats → Spot. The SPOT - Load Tape dialog appears.
2. Select from the following options:
• To designate a different tape device, enter or choose a device. If you
designate a different tape device, allow your operating system enough time
to register the new device before proceeding.

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 239

• To change the tape record size, enter the values into the MaxRecsize
fields.
3. Click OK to have ENVI scan the tape header. If the data are identified as one
of the supported SPOT data formats, the SPOT Tape Output Parameters dialog
appears.
4. To subset the image being read from tape, enter the starting and ending lines
and/or samples in the SamplesTo and/or LinesTo fields respectively.
5. Select the bands to read by clicking the toggle buttons next to the band names.
If SPOT PAN data are identified, one band is listed in the Select Output
Bands list. If SPOT XS data are identified, three bands are listed. To designate
a range of bands, enter the beginning and ending band numbers in the fields
next to the Add Range button. Click Add Range.
6. Select output to File or to Memory. File output is recommended.
7. Click OK to start the tape processing.

Reading AVIRIS Tapes


ENVI reads 1992 to 1996 NASA/JPL Airborne Visible/Infrared Spectrometer
(AVIRIS) data tapes. These tapes are in BIL format and have a 1000 byte header,
which ENVI automatically scans to identify the data and to extract key image
parameters. You can subset the data directly from tape.
Tip
The 1997 and later AVIRIS tapes are in UNIX tar format and ENVI cannot read
them directly. To read these tapes, dump the tape using tar and use File → Open
Image File to read the data into an ENVI file.

1. From the ENVI main menu bar, select File → Tape Utilities → Read Known
Tape Formats → AVIRIS. The AVIRIS - Load Tape dialog appears.
2. Select from the following options:
• To designate a different tape device, enter or choose a device. If you
designate a different tape device, allow your operating system enough time
to register the new device before proceeding.
• To change the tape record size, enter the values into the MaxRecsize
fields.
3. Click OK to have ENVI read the AVIRIS wavelength file and scan the AVIRIS
image header. If the data are identified as AVIRIS data, the AVIRIS Tape
Output Parameters dialog appears.

ENVI User’s Guide Tape Utilities


240 Chapter 2: File Management

4. To subset the image being read from tape, enter the starting and ending lines
and/or samples in the SamplesTo and/or LinesTo fields respectively.
5. Choose the bands (and their corresponding wavelengths) to read by clicking
the toggle buttons next to the band names. To designate a range of bands, enter
the beginning and ending band numbers in the fields next to the Add Range
button. Click Add Range.
6. Select output to File or to Memory. File output is recommended.
7. Click OK to start the tape processing.

Reading USGS DEM Tapes


ENVI reads both 1:24,000 (7 1/2’) and 1:250,000 (3 arc second) digital elevation
model data in standard USGS format. You must know which files on the tape
correspond to the input DEMs before starting this function (this information is
usually on the tape label or in documentation provided by the USGS with the tape).
The UTM, geographic, or state plane projection information is read from the tape and
placed in the ENVI header. ENVI can automatically mosaic multiple DEMs together
from tape.
1. From the ENVI main menu bar, select File → Tape Utilities → Read Known
Tape Formats → USGS DEM. The DEM Tape Reader Input Parameters
Dialog appears.
2. Enter the file number of each DEM to read into the Tape File field and press
Enter. The file numbers to read appear in a list under the box.
3. Enter a root filename to use for DEM output. Each individual output file is
assigned the root name with the file number appended. For example, if you
assign the root test then file 2 is named test_2.
• To have ENVI automatically mosaic files together, select Yes.
• To have the numbered temp files that are created during the mosaic process
automatically deleted after mosaicking, select Yes next to the Delete temp
files when done? field.
4. Click OK. The USGS DEM Format - Load Tape Dialog appears.
5. Select from the following options:
• To designate a different tape device, enter or choose a device. If you
designate a different tape device, allow your operating system enough time
to register the new device before proceeding.

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 241

• To change the tape record size, enter the values into the MaxRecsize
fields.
6. Click OK. ENVI scans the data file to determine critical format and location
information and automatically identifies and reads the data.
7. Select output to File or to Memory. File output is recommended.
8. Click OK to start the tape processing.

Reading USGS DLG Tapes


ENVI reads 1:24,000 (7 1/2’) or 1:100,000 digital line graph data in the USGS
Optional format. You must know which files on the tape correspond to the desired
DLGs before starting this function (this information is usually on the tape label or in
documentation provided with the tape by the USGS). The UTM projection
information and Albers Equal Area projection information are read from the tape,
placed in the .evf output file, and used as the vector projection.
1. From the ENVI main menu bar, select File → Tape Utilities → Read Known
Tape Formats → USGS DEM. The DEM Tape Reader Input Parameters
dialog appears.
2. Enter the file number of each DLG to read into the Tape File field and press
Enter. The file numbers to read appear in a list under the box.
3. Enter a root filename to use for DLG output. Each individual output file is
assigned the root name with the file number appended. For example, if you
enter the root filename test, then file two is named test_2.
4. Click OK. The USGS DLG Format - Load Tape dialog appears.
5. Select from the following options:
• To designate a different tape device, enter or choose a device. If you
designate a different tape device, allow your operating system enough time
to register the new device before proceeding.
• To change the tape record size, enter the values into the MaxRecsize
fields.
6. Click OK to read the DLG data. ENVI scans the data file to determine critical
format and location information, automatically identifies and reads the data,
and adds it to the Available Vectors List.

ENVI User’s Guide Tape Utilities


242 Chapter 2: File Management

Reading NLAPS Tapes


ENVI reads National Landsat Archive Production System (NLAPS) tapes. ENVI
reads only the first image from the tape (TM, MSS, or DEM) and currently does not
read the optional DEM that follows a TM or MSS image. You can use ENVI’s dump
tape utility to read these optional DEM files (see “Dumping Tape Data” on page 253).
ENVI currently only reads UTM projection information from the header file on tape.
You can subset the data directly from tape.
1. From the ENVI main menu bar, select File → Tape Utilities → Read Known
Tape Formats → NLAPS. The NLAPS - Load Tape dialog appears.
2. Select from the following options:
• To designate a different tape device, enter or choose a device. If you
designate a different tape device, allow your operating system enough time
to register the new device before proceeding.
• To change the tape record size, enter the values into the MaxRecsize
fields.
3. Click OK to have ENVI scan the tape header. If NLAPS format data are
identified, the Landsat NLAPS Tape Output Parameters dialog appears.
4. To subset the image being read from tape, enter the starting and ending lines
and/or samples in the Samples To and/or Lines To fields respectively.
5. Select bands to read by clicking the toggle buttons next to the desired band
names. To designate a range of bands, enter the beginning and ending band
numbers in the fields next to the Add Range button. Click Add Range.
6. Select output to File or Memory. File output is recommended.
7. Click OK to start the tape processing.

Reading SIR-C CEOS Tapes


On UNIX and Windows platforms, use Read SIR-C CEOS Tape to read SIR-C
tapes as distributed by JPS or EROS Data Center in CEOS format. Supported formats
include Single Look Complex (SLC), Multilook Complex (MLC), and Multilook
Ground Detected (MGD). ENVI creates a compressed data product (.cdp) format
file from the tape files, which you can then synthesize into a SIR-C image.

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 243

Note
If you are using SIR-C files dumped directly from tape to disk, or if you are using
SIR-C data on disk that were not read from tape, see “Using the CEOS Header Tool
to Find Missing Information” on page 1120 for instructions for entering required
data parameters.

You can subset all data types directly from tape to conserve disk space. In addition,
you can multilook SLC datasets from tape with integer or non-integer number of
looks.
Depending on the data type, the size of the SIR-C data scene, and the number of
datasets selected, tape reading and processing could take from less than one hour to
several hours to complete.
1. From the ENVI main menu bar, select File → Tape Utilities → Read Known
Tape Formats → SIR-C CEOS. The SIR-C Format - Load Tape dialog
appears.
2. Select from the following options:
• To designate a different tape device, enter or choose a device. If you
designate a different tape device, allow your operating system enough time
to register the new device before proceeding.
• To change the tape record size, enter the values into the MaxRecsize
fields.
3. Click OK to have ENVI scan the tape for standard format SIR-C data. When
the tape scan is completed, the SIR-C Tape File Selection dialog appears. A list
of the SIR-C data files on the tape appears in the Select Output Files list.

ENVI User’s Guide Tape Utilities


244 Chapter 2: File Management

Figure 2-16: SIR-C Tape File Selection Dialog

4. Select the box next to one or more of the desired datasets to choose the data to
read from the tape. To designate a range of data, enter the beginning and
ending numbers in the fields next to the Add Range button. Click Add Range.
5. Click OK. The SIR-C Tape Parameters dialog appears. The SIR-C datasets
selected in the previous dialog are listed in the Selected SIR-C Tape Files list.

SIR-C Tape Options


Use the SIR-C Tape Parameters dialog to select spatial subsetting from tape, assign
output filenames, and choose multi-looking from tape if desired. Each dataset is
independently named and processed.
Subsetting SIR-C Data
1. In the SIR-C Tape Parameters dialog, select a dataset.
2. Click Spatial Subset.
3. Use optional Spatial Subsetting to subset the data.
Multi-Looking SIR-C Data from Tape
Multi-looking from tape can take a long time because of the start-stop tape movement
caused by processing data between tape reads.

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 245

Only select this option if insufficient disk space is available to read the entire dataset.
Multi-looking on disk is much more efficient and is the preferred processing option
(see “Multilooking SIR-C Compressed Data” on page 1135).
1. In the SIRC Tape Parameters dialog, select a dataset.
2. Click Multi-Look. The SIRC Multi-Look Parameters dialog appears.

Figure 2-17: SIRC Multi-Look Parameters Dialog

3. Enter the multi-looking parameters by selecting one of the following options:


• In the Looks fields, enter the number of looks in the range (samples) and
azimuth (lines) directions. ENVI supports both integer and floating-point
number of looks.
• In the Pixels fields, enter the output number of pixels.
• In the Pixel Size fields, enter the output pixel size in meters.
When one of the parameters is entered, ENVI automatically calculates the
others to match. For example, if you enter the Pixel Size as 30 m, the
corresponding number of pixels and the looks are calculated and change in
the corresponding fields. Both integer and floating-point number of looks
are supported.
4. Click OK to return to the SIR-C Tape Parameters dialog.
5. Repeat the multi-look process for each dataset listed in the dialog.
Entering Output Filenames
1. In the SIR-C Tape Parameters dialog, select a dataset name in Selected SIR-C
Tape Files list.

ENVI User’s Guide Tape Utilities


246 Chapter 2: File Management

2. In the Enter Output Filename [.cdp] field, enter an output filename. By


convention, filenames should take the form filename_c.cdp and
filename_l.cdp.
3. Repeat steps 1 and 2 for each dataset. ENVI creates one compressed scattering
matrix output file for each dataset selected.
4. Click OK to begin reading the tape and processing the data.

Reading RADARSAT-1 CEOS Tapes


Use Read RADARSAT CEOS Tape to read RADARSAT-1 CEOS data tapes onto
disk if you are running ENVI on UNIX or Windows platforms.
1. From the ENVI main menu bar, select File → Tape Utilities → Read Known
Tape Formats → RADARSAT CEOS. The RADARSAT - Load Tape dialog
appears.
2. Select from the following options:
• To designate a different tape device, enter or choose a device. If you
designate a different tape device, allow your operating system enough time
to register the new device before proceeding.
• To change the tape record size, enter the values into the MaxRecsize
fields.
3. Click OK to have ENVI scan the tape for standard format RADARSAT-1 data.
When the tape scan is completed, the RADARSAT Tape File Selection dialog
appears. A list of the RADARSAT-1 data files on the tape appear in the Select
Output Files list.
4. Select the box next to the dataset(s) to read from the tape. To designate a range
of files, enter the beginning and ending numbers in the fields next to the Add
Range button. Click Add Range.
5. Click OK. The RADARSAT Tape Parameters dialog appears. The
RADARSAT-1 datasets that were selected in the RADARSAT Tape File
Selection dialog are listed in the Selected RADARSAT Tape Files list.

RADARSAT-1 Tape Options


Use the RADARSAT Tape Parameters dialog to select spatial subsetting from tape
and to assign output filenames. Each dataset is independently named and processed.
Subsetting RADARSAT-1 Data
1. In the RADARSAT Tape Parameters dialog, select a dataset.

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 247

2. Click Spatial Subset to use optional Spatial Subsetting, then click OK. The
RADARSAT Tape Parameters dialog appears.
3. Repeat steps 1 through 3 for each dataset listed in the dialog.
Entering RADARSAT-1 Output Filenames
1. In the RADARSAT Tape Parameters dialog, select a dataset in the Selected
RADARSAT Tape Files list.
2. In the Enter Output Filename field, enter a filename.
3. Repeat steps 1 and 2 for each dataset listed in the dialog. ENVI creates one
image output file for each dataset selected.
4. Click OK to begin reading the tape and processing the data. The processed
images appear in the Available Bands List.

Reading Generic CEOS Tapes


Use Read Generic CEOS Tape to read a variety of SAR data tapes in CEOS format.
It is a flexible CEOS-format tape reader for UNIX and Windows platforms. Use this
routine to read ERS-1, JERS-1, and X-SAR (MLD) data. CEOS information is used
directly to minimize user interaction and simplify creation of files for viewing and
analysis in ENVI.
Note
The generic CEOS reader does not dump data files that are complex (for example,
SLC, MLC, and so forth). Instead, use the specific SIR-C or RADARSAT-1 tape
tool or dump the tape using ENVI’s Scanning Tapes and Customizing Dumps
utility. When the complex files are on disk, you can open them using the Open
External File menu or synthesized into images using ENVI’s radar tools. For more
information, see “Scanning Tapes and Customizing Dumps” on page 251 and
“Radar Tools” on page 1099.

Tip
To conserve disk space, subset the data directly from tape.

1. From the ENVI main menu bar, select File → Tape Utilities → Read Known
Tape Formats → Read Generic CEOS. The CEOS Format - Load Tape
dialog appears.
2. Select from the following options:

ENVI User’s Guide Tape Utilities


248 Chapter 2: File Management

• To designate a different tape device, enter or choose a device. If you


designate a different tape device, allow your operating system enough time
to register the new device before proceeding.
• To change the tape record size, enter the values into the MaxRecsize
fields.
3. Click OK to have ENVI scan the tape for standard format CEOS data. When
the tape scan is completed, the CEOS Tape File Selection dialog appears. The
CEOS-format data files on the tape appear in the Select Output Files list.
4. Select the box next to one or more of the desired datasets to read from the tape.
To designate a range files, enter the beginning and ending numbers in the fields
next to the Add Range button. Click Add Range.
5. Click OK. The CEOS Tape Parameters dialog appears. The CEOS datasets
that were selected in the CEOS Tape File Selection dialog appear in the
Selected CEOS Tape Files list.

CEOS Tape Options


Use the CEOS Tape Parameters dialog to select spatial subsetting from tape and to
assign output filenames. Each dataset is independently named and processed.
Subsetting CEOS Data
1. In the CEOS Tape Parameters dialog, select a dataset name.
2. Click Spatial Subset to use optional Spatial Subsetting, then click OK.
3. Repeat steps 1 through 3 for each dataset listed in the dialog.
4. Click OK. The CEOS Tape Parameters dialog appears.
Entering CEOS Output Filenames
1. In the CEOS Tape Parameters dialog, select a dataset name in the Selected
CEOS Tape Files list.
2. In the Enter Output Filename field, enter a filename.
3. Repeat steps 1 and 2 for each dataset listed in the dialog. ENVI created one
image output file for each dataset selected.
4. Click OK to begin reading the tape and processing the data. The processed
images appear in the Available Bands List.

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 249

Reading and Writing ENVI Tapes


Use Read/Write ENVI Tape to read and write ENVI-formatted tapes. The ENVI
tape output utility writes image data to tape while preserving the ENVI file structure
and header configuration. A corresponding utility reads these tapes.
ENVI Tape Format Information
ENVI tapes are written in a standard format to simplify reading of image data while
maintaining key image characteristics found in the image headers. As a result, the
ENVI format uses several header records and files. See the following table for
descriptions.

Data
File ID Rec ID Information
Type

1 1 ASCII 1024 bytes, ID String ENVI TAPE FORMAT,


and string NUM_ENVI_FILES=n (where n is
the total number of ENVI image files on the
tape).
2 ASCII 1024 bytes, Keyword strings containing required
information for the first ENVI image file on the
tape. Keywords are NL (number of lines), NS
(number of samples), NB (number of bands),
INTERLEAVE (BSQ, BIL, or BIP), DATA
TYPE (byte, signed and unsigned integer, long
integer, 64-bit integer, unsigned 64-bit integer,
floating-point, double precision complex and
double complex), ENVI_TYPE (0 is ENVI
image file), NAME (image name), and
DESCRIPT (image description string).
3 ASCII Same as above for 2nd ENVI file
4 thru ASCII Same as above for 3rd through nth ENVI file
n+1
2 ASCII Header for Image 1 (variable length)
3 BINARY Image 1 (Record length is number of samples)
4 ASCII Header for Image 2 (variable length)

Table 2-3: ENVI Format Tape Structure

ENVI User’s Guide Tape Utilities


250 Chapter 2: File Management

Data
File ID Rec ID Information
Type

5 BINARY Image 2 (Record length is number of samples)


6 thru Pairs of ASCII header files and binary image
n+1 files up to n+1 as specified in the first header
record

Table 2-3: ENVI Format Tape Structure (Continued)

Reading ENVI Tapes


Use Read ENVI Tape to read ENVI format tapes that were written using the Write
ENVI Tape function.
1. From the ENVI main menu bar, select File → Tape Utilities → Read/Write
ENVI Tapes → Read ENVI Tape. The ENVI Format - Load Tape dialog
appears.
2. Select from the following options:
• To designate a different tape device, enter or choose a device. If you
designate a different tape device, allow your operating system enough time
to register the new device before proceeding.
• To change the tape record size, enter the values into the MaxRecsize
fields.
3. Click OK to have ENVI scan the tape header. If the data are identified as ENVI
format data, the ENVI Tape Files dialog appears, listing the names of the
ENVI files on the tape.
4. Select files to read by selecting the toggle buttons next to the desired
filenames. To select ranges of files, enter the beginning and ending files in the
fields next to the Add Range button. Click Add Range.
5. Click OK. The ENVI Tape to Output File dialog appears for each selected file
to read.
6. Select either File or Memory output.
7. Click OK to start the tape processing. The bands in each file are added to the
Available Bands List as the files are read.

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 251

Writing ENVI Files to Tape


Use Write ENVI File to Tape to write ENVI format files to tape while preserving
their file structure and header information. The function requires the ENVI files are
currently shown in the Available Bands List. If the files are not open, open them.
1. From the ENVI main menu bar, select File → Tape Utilities → Read/Write
ENVI Tapes → Write ENVI File to Tape. The Output ENVI Files to Tape
dialog appears.
2. Click Import ENVI File. The Input File dialog appears.
3. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The selected files appear in the Select ENVI Files
to Output to Tape list in the Output ENVI Files to Tape window.
To select additional files, repeat steps 2 and 3.
4. To designate a different tape device, enter the device name in the Tape Device
field. If you designate a different tape device, allow your operating system
enough time to register the new device before proceeding.
5. Click Accept. The ENVI Format - Load Tape window appears.
6. Select from the following options:
• To designate a different tape device, enter or choose a device. If you
designate a different tape device, allow your operating system enough time
to register the new device before proceeding.
• To change the tape record size, enter the values into the MaxRecsize
fields.
7. Click OK to have ENVI sequentially output the selected files to tape in
standard ENVI tape format. The tape is rewound at the end of the processing.

Scanning Tapes and Customizing Dumps


Use Scan Tape and Customize Dump to scan a tape, to select files from tape, and to
build a tape script that describes the tape contents. Use the script as is, edit it to
combine specific tape records or files, and/or save the script for future use on
identical tapes.
1. From the ENVI main menu bar, select File → Tape Utilities → Scan Tape
and Customize Dump. When the ENVI Tape Dump Utility dialog appears,
the default tape device is automatically listed in the Tape Device field at the

ENVI User’s Guide Tape Utilities


252 Chapter 2: File Management

top of the window. To designate a different tape device, enter the device name
in the Tape Device field.
If you designate a different tape device, allow your operating system enough
time to register the new device before proceeding.
2. In the ENVI Tape Dump Utility window, select Options → Scan Tape. The
ENVI Tape Information Scan window appears as the tape is scanned and the
current file number and the total number of bytes scanned on the tape are
listed. As each file is completed, the tape information is shown in the ENVI
Tape Dump Utility dialog.
To interrupt the tape scan at any time, click Interrupt Tape Scan at the bottom
of the window (the interrupt may take a few seconds to register with the
system). If the tape scan is interrupted, the information up to that point is
shown and the tape is automatically rewound. In either case, the file number,
the number of records, and the number of bytes per record are listed.
3. In the ENVI Tape Dump Utility dialog, select from the following options to
select records and bytes and to edit their values:
To edit values, select an item in the list. Change the values as they appear in the
corresponding fields and press Enter.
This allows combining files/records and selecting subsets of bytes to read.
• To add new items to the dump list, enter new values in the fields and click
Add Entry.
• To delete an entry from the list, select the entry in the list and click Delete
Entry.
• To clear the list, select Clear Entries.
• To recall data from the previous scan, select Options → Restore Prev
Scan.
• To save the Tape Script to an ASCII text file, select File → Save Format
and enter the filename. The default file extension is .fmt. (See “Tape
Script Format (.fmt)” on page 1177).
• To recall previously saved Tape Scripts, select File → Restore Format
and select the file.
4. In the ENVI Tape Dump Utility dialog, select Options → Dump Tape to read
the tape. The Tape Dump Output Parameters dialog appears.
5. Use the toggle button to select either Dump tape records to a single output
file or Dump each item to a separate output file.

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 253

6. Enter an output filename.


7. Click OK. If separate output files are selected, the output filename entered is
used as a base filename and the file number that is dumped is appended to the
base filename. For example, if a filename of test is entered and files 2 and 3
are dumped, they are output as test_2 and test_3.
As the tape is dumped, the status displays in the ENVI Dump Tape to Output File
window.
To interrupt the tape dump, click Interrupt Tape Dump.

Dumping Tape Data


To perform binary dumps of tapes to disk:
1. From the ENVI main menu bar, select File → Tape Utilities → Dump Tape.
2. When the Dump Tape dialog appears, the default tape device is automatically
listed in the Tape Device field at the top of the window. The starting and
ending file numbers to dump from the tape are listed in the Dump Files fields.
3. To change the active tape device, enter the device name in the Tape Device
field. If you designate a different tape device, allow your operating system
enough time to register the new device before proceeding.
4. Select output to a single output file or to separate files by clicking the
appropriate toggle button.
5. Enter an output filename.
6. Click OK. If you select output to separate files, the output filename you enter
is used as a base filename and the file number that is dumped is appended to
the base filename. For example, if a filename of test is entered and files 2 and
3 are dumped, they would be output as test_2 and test_3.
As the tape is dumped, the status displays in the ENVI Dump Tape to Output File
window.
To interrupt the tape dump, click Interrupt Tape Dump.

ENVI User’s Guide Tape Utilities


254 Chapter 2: File Management

Using the Scan Directory List


ENVI can perform directory scanning, which enables you to select files to open from
one or more of the scanned directories.
After ENVI scans the specified directories, you can additionally use the Geo-Browser
option to view a world map that includes the locations of georeferenced images from
the scanned directories. From the Geo-Browser, you can select and open files based
on their geographic location (see “Opening Files with the Geo-Browser” on
page 256).

Figure 2-18: Directory Scan Dialog

Adding Directories to Scan


1. From the ENVI main menu bar, select File → Scan Directory List. The
Directory Scan dialog appears.
2. Enter a directory name, then click either:
• Add: Adds the selected directory to the Selected Directories List.
• Add Recursively: Adds the directory and all of its sub-directories to the
Selected Directories List. A plus sign (+) appears before the name of the
directories to scan recursively.

Using the Scan Directory List ENVI User’s Guide


Chapter 2: File Management 255

3. When the Selected Directories List is complete, click OK. ENVI displays a
status window as it scans the directories.
If a header does not match its ENVI file, ENVI displays a warning message.
Click OK. The Header Info dialog appears so that you may enter the correct
information (described in Creating Header Files in Getting Started with ENVI).
When scanning is finished, the Scanned ENVI Files dialog appears, listing all
of the ENVI files found in the specified directories.

Figure 2-19: Scanned ENVI Files Dialog

4. To open a file, select a file in the Located Files List and select File → Open
File from the Scanned ENVI Files dialog menu bar. ENVI adds the image to
the Available Bands List.
To add a new directory and enable selecting files from within that directory, select
Options → Scan New Directory List from the Scanned ENVI Files dialog menu
bar.
To open a file based on geographic location, see “Opening Files with the Geo-
Browser” on page 256

ENVI User’s Guide Using the Scan Directory List


256 Chapter 2: File Management

Removing Directories and Files from the Scan


Directory Lists
You can remove directories from the Directory Scan dialog, and you can remove files
from the Scanned ENVI Files dialog.

Removing Directories from the Directory Scan Dialog


To remove a directory from the Selected Directories List in the Directory Scan
dialog:
1. Select a filename.
2. Click Delete to remove a directory from the Selected Directories List.
To clear all directories from the Selected Directories List in the Directory Scan
dialog, click Clear.

Removing Files from the Scanned ENVI Files Dialog


To remove a single file from the Located Files List in the Scanned ENVI Files
dialog:
1. Select a filename.
2. From the Scanned ENVI Files dialog menu bar, select File → Remove File.
To remove a single file from the Located Files List in the Scanned ENVI Files
dialog:
1. Select a filename.
2. From the Scanned ENVI Files dialog menu bar, select File → Remove All
Files.

Opening Files with the Geo-Browser


Use the scanned files Geo Browser option to display files and open them based on
their geographic location. ENVI’s Geo-Browser allows map browsing of the
locations of georeferenced images.

Using the Scan Directory List ENVI User’s Guide


Chapter 2: File Management 257

In the Geo-Browser window, the mouse cursor’s latitude and longitude appear in the
upper-left corner of the map.

Figure 2-20: ENVI Geographic Browser Zoomed on the United States

To use the Geo-Browser:


1. From the Scanned ENVI Files dialog menu bar, select Options →
Geo-Browser. ENVI plots a world map with continent and country outlines.
Within the United States, state outlines appear. ENVI plots the locations of
georeferenced images (the location of the reference pixel designated in the
ENVI header) on the world map as flags. For multiple files with the same
location, ENVI plots a different colored flag with a number next to it showing
the number of files at that location.
2. Select from the following mouse options:
• To change the size of the window, grab and drag one of the window
corners.
• To center the map on a point, left-click the desired center point.
• To zoom to the map area, middle-click, hold, and drag the area to zoom.
• To zoom back out, middle-click on the map.

ENVI User’s Guide Using the Scan Directory List


258 Chapter 2: File Management

3. To identify the file corresponding to a flag, left-click near a flag. ENVI


highlights the corresponding file in the Located Files List of the Scanned
ENVI Files dialog.
4. To open the highlighted file, from the Scanned ENVI Files dialog menu bar
select File → Open File.

Using the Scan Directory List ENVI User’s Guide


Chapter 2: File Management 259

Working With Files and Scripts


See the following sections in ENVI Help for details on these File menu options:
• Change Output Directory: “Changing Output Directories”
• Save Session to Script: “Saving a Session to a Script”
• Execute Startup Script: “Using Startup Scripts”
• Restore Display Group: “Restoring Saved Display Groups”
• Close All Files: “Closing All Files”
• ENVI Queue Manager: “Queuing ENVI Processes”

ENVI User’s Guide Working With Files and Scripts


260 Chapter 2: File Management

Logging Processing Information


Use the ENVI Log Manager to save an ASCII log of all file-to-file processing. The
log file contains all the function parameters and filenames used you can selectively
turn on and off. See “Using ENVI Recording to Write Batch Code” in the ENVI
Programmer’s Guide for information on using the log script for batch mode.
1. From the ENVI main menu bar, select File → ENVI Log Manager. The
ENVI Log Manager dialog appears.
2. Click the On toggle button to start the logging. To turn off the logging, select
the Off button.
3. Enter the output log filename. If the same name as a previous filename is used,
ENVI appends the log to the end of the file.
4. Click OK to start the logging.

Logging Processing Information ENVI User’s Guide


Chapter 2: File Management 261

ENVI Preferences
Use Preferences to view information about the current configuration of ENVI, or to
change the current configuration. For information about setting ENVI preferences,
see Setting ENVI Preferences in Getting Started with ENVI.

ENVI User’s Guide ENVI Preferences


262 Chapter 2: File Management

ENVI Preferences ENVI User’s Guide


Chapter 3
Basic Tools

This chapter covers the following topics:

The Basic Tools Menu . . . . . . . . . . . . . . . . 264 Change Detection Analysis . . . . . . . . . . . 294


Resizing Data (Spatial/Spectral) . . . . . . . . 265 Measurement Tool . . . . . . . . . . . . . . . . . . 303
Subsetting Data via ROIs . . . . . . . . . . . . . . 266 Band Math . . . . . . . . . . . . . . . . . . . . . . . . 306
Rotating Images . . . . . . . . . . . . . . . . . . . . . 267 Spectral Math . . . . . . . . . . . . . . . . . . . . . . 320
Layer Stacking . . . . . . . . . . . . . . . . . . . . . . 269 Segmenting Images . . . . . . . . . . . . . . . . . 321
Converting Data (BSQ, BIL, BIP) . . . . . . . 271 Defining ROIs . . . . . . . . . . . . . . . . . . . . . 323
Stretching Data . . . . . . . . . . . . . . . . . . . . . 272 Mosaicking Images . . . . . . . . . . . . . . . . . 348
Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 Creating Masks . . . . . . . . . . . . . . . . . . . . . 349
Spatial Statistics . . . . . . . . . . . . . . . . . . . . . 283 Preprocessing Utilities . . . . . . . . . . . . . . . 357

ENVI User’s Guide 263


264 Chapter 3: Basic Tools

The Basic Tools Menu


Use the Basic Tools menu to access a variety of ENVI functions. The functions are
generally useful regardless of the specific type of image data being analyzed. You can
use functions such as Regions of Interest across multiple displays while functions
such as Band Math offer general image processing capabilities. The Stretch Data
function is an example of a function that offers file-to-file contrast stretching.

The Basic Tools Menu ENVI User’s Guide


Chapter 3: Basic Tools 265

Resizing Data (Spatial/Spectral)


You can spatially resize an image and/or perform image spatial or spectral subsetting,
as well as use the resize function to create new images of any size or aspect ratio:
1. From the ENVI main menu bar, select Basic Tools → Resize Data
(Spatial/Spectral). The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Resize Data Parameters dialog appears.
3. Either enter the number of Samples and Lines in the corresponding fields, or
enter the multiplicative x and y enlargement or reduction factors in the xfac
and yfac fields and press Enter. The Output Size field updates.
Tip
If your image contains map information, you can determine the number of
output sample and lines based upon the desired output pixel size by clicking
Set Output Dims by Pixel Size.

• If the xfac and yfac values are greater than or equal to 1, select Nearest
Neighbor, Bilinear, or Cubic Convolution, from the Resampling drop-
down list (see “Warping and Resampling” on page 904).
• If the xfac and yfac values are less than 1, select from Nearest Neighbor
or Pixel Aggregate resampling only.
• You can control x and y scales independently. Enter values less than 1 to
reduce the image and values greater than 1 to enlarge the image. The
number of output samples and lines are updated.
• Nearest neighbor resampling uses the nearest pixel value as the output
pixel value and pixel aggregate averages all of the pixel values that
contribute to the output pixel (for example, if you enter .5 for both xfac
and yfac, the output pixel values are calculated by averaging the four input
pixel values).
4. Select output to File or Memory.
5. Click OK.

ENVI User’s Guide Resizing Data (Spatial/Spectral)


266 Chapter 3: Basic Tools

Subsetting Data via ROIs


Use Subset Data via ROIs to subset your data into a rectangle that contains the
selected ROIs. The rectangle is the smallest rectangle that will fit the ROI. You can
mask the pixels in the rectangle that do not fall within the ROI.
1. From the ENVI main menu bar, select Basic Tools → Subset Data via ROIs.
The Select Input File to Subset via ROIs dialog appears.
2. Select an input file and perform optional Spatial Subsetting, then click OK.
The Spatial Subset via ROI Parameters dialog appears.
3. From the Select Input ROIs list, select the ROIs to include in the subset.
4. Use the Mask pixels outside of ROI? toggle button to select whether or not to
mask pixels outside of the selected ROI.
If you select Yes, enter a Mask Background Value.
5. Select output to File or Memory.
6. Click OK. ENVI adds the resulting output to the Available Bands List.

Subsetting Data via ROIs ENVI User’s Guide


Chapter 3: Basic Tools 267

Rotating Images
Use Rotate/Flip Data to perform several standard image rotations, including 0, 90,
180, and 270 degrees with or without transposition. (Here, transpose means that the
dimensions of the array are swapped.) Alternatively, you can specify the exact angle
of the desired rotation. Rotating images is useful for orienting images before
registration.
Tip
To flip an image vertically, where the pivot line is a horizontal running through the
middle of the image, choose 270 degrees with transpose. To flip an image
horizontally, where the pivot line is a vertical running through the middle of the
image, choose 90 degrees with transpose.

1. From the ENVI main menu bar, select Basic Tools → Rotate/Flip Data. The
Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Rotation Parameters dialog appears. This
dialog varies slightly depending on whether you use a standard IDL rotation or
an exact rotation angle.
Initially, some letters and numbers are printed horizontally (normal text
orientation) in the box in the upper-right corner of the dialog. The orientation
of the numbers shows schematically the orientation of the output image with
the selected rotation and/or transpose applied.
3. Select from the following rotation options:
• To apply a standard rotation (0, 90, 180, or 270 degrees), click Standard
and select the rotation.
To flip the x and y coordinates of the image, click the Transpose toggle
button to Yes.

ENVI User’s Guide Rotating Images


268 Chapter 3: Basic Tools

• To specify the exact rotation angle desired, enter a value in the Angle field
(angles are measured clockwise from horizontal) and press Enter.
Select the resampling algorithm to use to calculate the output image from
the Resampling drop-down list. The choices are Nearest Neighbor,
Bilinear Interpolation, or Cubic Convolution (see “Warping and
Resampling” on page 904).

Figure 3-1: Rotation Parameters Dialog with Standard IDL Rotations and
Transposes (left) and with Arbitrary Angle Rotations (right)

4. Select output to File or Memory.


5. Click OK. ENVI adds the resulting output to the Available Bands List.

Rotating Images ENVI User’s Guide


Chapter 3: Basic Tools 269

Layer Stacking
Use Layer Stacking to build a new multiband file from georeferenced images of
various pixel sizes, extents, and projections. The input bands will be resampled and
re-projected to a common user-selected output projection and pixel size. The output
file will have a geographic extent that either encompasses all of the input file extents
or encompasses only the data extent where all of the files overlap.
1. Select one of the following options from the ENVI main menu bar:
• Basic Tools → Layer Stacking
• Map → Layer Stacking
The Layer Stacking Parameters dialog appears.

Figure 3-2: Layer Stacking Parameters Dialog

ENVI User’s Guide Layer Stacking


270 Chapter 3: Basic Tools

2. Click Import File. The Input File dialog appears.


3. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Layer Stacking Parameters dialog appears.
ENVI adds the input file to the Selected Files for Layer Stacking list.
Repeat the file selection using the Import File button for each input file to
include in the new output file.
4. Select Inclusive or Exclusive to specify the output file range:
• Inclusive: Creates an output file with a geographic extent that
encompasses all the input file extents.
• Exclusive: Creates an output file that contains only the data extent where
all the files overlap.
5. Select output to File or Memory.
6. Select an output map projection from the list. See “Selecting Map Projection
Types” on page 990.
7. Enter the X Pixel Size and Y Pixel Size. Enter the pixel sizes in the units
selected under the map projection section.
8. From the Resampling drop-down list, select a resampling method:
• Nearest Neighbor: Uses the nearest pixel without any interpolation to
create the warped image.
• Bilinear: Performs a linear interpolation using four pixels to resample the
warped image.
• Cubic Convolution: Uses 16 pixels to approximate the sinc function using
cubic polynomials to resample the image. Cubic convolution resampling is
significantly slower than the other methods.
9. Click OK. ENVI adds the resulting output to the Available Bands List.

Layer Stacking ENVI User’s Guide


Chapter 3: Basic Tools 271

Converting Data (BSQ, BIL, BIP)


Use Convert Data (BSQ, BIL, BIP) to convert between common data storage
conventions. Often, it is more efficient to use image data stored in a specific manner
for specific processing operations or interactive analysis. For details about data
storage, see ENVI Image Files in Getting Started with ENVI.
1. From the ENVI main menu bar, select Basic Tools → Convert Data (BSQ,
BIL, BIP). The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Convert File Parameters dialog appears.
3. Choose the output data type from the Output Interleave radio buttons. ENVI
automatically determines the format of the input file and offers conversion to
the other two formats.
4. From the Convert in Place toggle button, select Yes or No.
• Yes: Overwrites the existing file. This option saves significant disk space,
but the process is slower than writing to a separate file.
• No: Writes the converted file to a separate output file.
Note
If the overwrite function fails for any reason (for example, due to a power
outage), your data will be corrupted and the original file will not be
recoverable.

5. Enter the output filename.


6. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Converting Data (BSQ, BIL, BIP)


272 Chapter 3: Basic Tools

Stretching Data
Use Stretch Data to perform file-to-file contrast stretching. The data stretching
function is a flexible method for changing the data range of a given input file. You
have full control over both the input and output histograms and the output data type
(byte, integer, floating-point, and so forth). For more information, see “Using
Interactive Stretching” on page 80.
1. From the ENVI main menu bar, select Basic Tools → Stretch Data. The Input
File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Data Stretching dialog appears.

Figure 3-3: Data Stretching Dialog

Stretching Data ENVI User’s Guide


Chapter 3: Basic Tools 273

3. To calculate the statistics based on a statistics subset or the area under an ROI,
click Stats Subset. For subsetting details, see “Statistics Subsetting” on
page 223.
4. Select the Stretch Type (Linear, Equalize (histogram equalized), Gaussian,
and Square Root) from the appropriate radio button.
If you select Gaussian, enter a standard deviation in the Stdv field.
5. Select a Stretch Range value of By Percent or By Value from the appropriate
radio buttons.
6. Enter the minimum and maximum values in the Min and Max fields,
respectively, to control the input data range.
7. Set the Output Data Range in the Min and Max fields. The values must
match the ranges of the data type selected from the Data Type drop-down list
(see next). If out-of-range values are entered, low values are automatically
corrected to the minimum and high values are automatically corrected to the
maximum of the selected data type.
8. From the Data Type drop-down list, select the appropriate data type (byte,
integer, unsigned integer, long integer, unsigned long integer, 64-bit integer
and unsigned 64-bit integer, floating-point, double precision, complex, or
double complex).
9. Select output to File or Memory.
10. Click OK. If no statistics file exists for the selected input file, ENVI calculates
the image statistics before data stretching and an Image Statistics window
shows the percent processing complete as a slider that moves from 0 to 100%.
If a statistics file already exists (or when the image statistics are calculated) a
Data Stretching window shows the percentage of data stretching completed.
When complete, ENVI adds the resulting file to the Available Bands List.

ENVI User’s Guide Stretching Data


274 Chapter 3: Basic Tools

Statistics
Use the Statistics option to generate statistical reports and display plots of
histograms, mean spectra, eigenvalues, and other statistic information for image files.

Computing Statistics
ENVI can calculate basic statistics and/or tabulated histogram information
(frequency distributions) for single-band or multi-band images. The minimum,
maximum, and mean spectra can only be calculated for multi-band images. Similarly,
covariance statistics, which include eigenvectors and a correlation matrix, can only be
calculated for multi-band images. The statistics are calculated in double-precision.
1. From the ENVI main menu bar, select Basic Tools → Statistics → Compute
Statistics. The Input File dialog appears.
2. In the Select Input File list, select the input file by selecting the filename.
3. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK.
4. Click OK. The Compute Statistics Parameters dialog appears.

Statistics ENVI User’s Guide


Chapter 3: Basic Tools 275

Figure 3-4: Compute Statistics Parameters Dialog

5. Select the type of statistics to include:


• Basic Stats: Calculates basic statistics (the minimum, maximum, mean,
and standard deviation for all bands) for your data. These basic statistics
are always calculated. This option is always set.
ENVI does not calculate statistics for any bands specified as bad bands in
the image’s ENVI header file.
• Histograms: Calculates the histogram of each band. The frequency
distribution calculations also return the number of points, cumulative
points, percent for each bin, and cumulative percentage for each DN
(digital number) in the image histogram. The Max Histogram Bins
preference sets the number of histogram bins used in the calculation.

ENVI User’s Guide Statistics


276 Chapter 3: Basic Tools

• Covariance: Calculates the covariance matrix, the correlation matrix,


eigenvalues, and eigenvectors. When selected, a Covariance Image check
box also appears in the dialog. Select the Covariance Image check box to
return the covariance and correlation matrices, and the eigenvectors as
images in the Available Bands List. The dimensions of the resulting
images are nb by nb, where nb is the number of bands of the input data.
The eigenvectors are associated with the rows in the output eigenvector
image.
Operations that require ENVI to invert the covariance matrix for an input
image (such as MNF transforms and principal components analysis) use an
iterative method to perform the inversion. Typically, the operation
converges on a solution after three or four iterations. However, if one
image band is a near-perfect linear combination of other bands in a dataset,
a “singularity” problem may result that prevents the matrix from being
inverted. If this happens, a “Too Many Iterations in TQLI” error message
appears. See “Computing New Statistics and Rotating” on page 504 and
“Statistics Subsetting” on page 223 for tips on avoiding singularity.
6. Specify the factors to use for resizing the samples and the lines of the image
while calculating the statistics in the Samples Resize Factor and Lines Resize
Factor fields. To improve the performance for larger images, specify a value of
less than 1 to skip pixels. For example, a factor of 0.5 indicates to use only
every other pixel to calculate the statistics.
7. Select the Output to the Screen check box to display the statistics report on
the screen. When selected, a Statistics Results dialog displays the resulting
statistics. For more information on this dialog, see “Viewing Statistics
Reports” on page 278.
8. To save the output to an ENVI format statistics file, select the Output to a
Statistics File check box. ENVI uses this file format to improve the speed of
some processes. When selected, enter a filename in the Enter Output Stats
Filename field. The default file extension for statistics files is .sta.
9. To save the output to a text file, select the Output to a Text Report File check
box to save the statistics report to a text file. When selected, enter a filename in
the Enter Output Text Filename field.
10. To change the data precision displayed in the output statistics report, click
Report Precision. The Set Report Precision dialog appears.
A. Use the Data Precision field to set the number of digits to display after the
decimal point.

Statistics ENVI User’s Guide


Chapter 3: Basic Tools 277

B. Use the Floating Report toggle button to designate the format (Normal or
Scientific) for the numbers in the ASCII report. Normal numbers are in
decimal format (for example, 25.88). Scientific numbers are a single digit
followed by a decimal value, the letter e, and the exponential power (for
example, 2.588e+001).
11. Click OK. When the statistics are calculated, the Statistics Results plot
window appears.

Figure 3-5: Statistics Results Dialog

ENVI User’s Guide Statistics


278 Chapter 3: Basic Tools

Viewing Statistics Reports


The plot section of the Statistics Results dialog displays the plot you selected from
the Select Plot drop-down button. In the plot window, mouse buttons allow you to
perform the following tasks:
• Left Mouse Button: Displays a crosshair cursor on the nearest data point and
reports its (x,y) location.
• Middle Mouse Button: Zooms in or out of the plot.
• Right Mouse Button: Contains all the options associated with a regular plot
window (see “Using Interactive Plot Functions” on page 106).
The plot section also contains the following items:
• Select Plot: Click to change the current display in the plot window. When the
Statistics Results dialog first appears, the plot window contains the minimum,
maximum, and mean values for each band in the image. Use the Select Plot
drop-down button to change the display to the standard deviation, eigenvalues
(if the Covariance check box was selected in the previous Compute Statistics
Parameters dialog), or histograms (if the Histograms check box was selected
in the previous Compute Statistics Parameters dialog) for each or all bands.
• Clear Plot: Clears the plot window.
A text section containing the following items:
• report text: Contains the values of the calculated statistics in a table format.
Each table in this box shows the resulting type of statistics (basic, covariance,
eigenvalues, and histograms) calculated for each band in the image.
The text fields include: File Information; Basic Statistics; Covariance,
Correlation, and Eigenvectors (only if you selected the Covariance check box
in the Compute Statistics Parameters dialog); Histograms for Each Band (only
if you selected the Histograms check box in the Compute Statistics
Parameters dialog).
• Select Stat: Enables you to change the information displayed. At any point,
you can use the File Info option in the Select Stat drop-down button to return
to the file information section, which is at the beginning (top) of the text. You
can also use the scroll bars to move around this area.
The File menu in the Statistics Results dialog contains the following items:
• Save results to ENVI stats file: Saves the statistics report to an ENVI format
statistics file to speed processing for later use with ENVI functions. When this
option is selected, the Save results to ENVI stats file dialog appears. In the

Statistics ENVI User’s Guide


Chapter 3: Basic Tools 279

Enter Output Stats Filename[.sta] field, enter a filename. The default file
extension for statistics files is .sta. ENVI saves the statistics report to the
specified file when you click OK.
• Save results to text file: Saves the statistics report to a text file. When this
option is selected, the Save Results to Text File dialog appears. In the Enter
Output Text Filename[.txt] field, enter a filename. The statistics report is
saved to the specified file when you click OK.
Tip
The resulting text file is tab-delimited for easy import into external
spreadsheet programs, such as Excel.

• Save Current Covariance to Image: Adds the covariance and correlation


matrices as well as the eigenvectors as images to the Available Bands List. The
dimensions of the resulting images are nb by nb, where nb is the number of
bands of the input data. The eigenvectors are associated with the rows in the
output eigenvector image. This option is available only if you selected the
Covariance check box in the Compute Statistics Parameters dialog.
• View Statistics Files: Enables you to open one or more ENVI statistics files
(.sta) and display them in other Statistics Results dialogs. You can use this
option to compare your current statistics with information in an another ENVI
statistics file.
You can open multiple ENVI statistics files only if they are related (such as,
files saved from a group of classes or ROIs with the same output root name).
The Options menu in the Statistics Results dialog contains the following items:
• Copy results to new window: Enables you to compare statistics for different
bands. When selected, a copy of the Statistics Results plot window appears.
You can use this copy to compare various statistics. For example, you click
Select Plot in one dialog to display the histogram of one band, then click
Select Plot in the copied plot window to display the histogram of a different
band. As with other plot windows, you can drag-and-drop a plot display from
one window to another (see “Using Interactive Plot Functions” on page 106).
• Set Report Precision: Provides access to the Set Report Precision dialog to
change the precision of the information displayed in the Statistics Results
dialog. This option does not affect histogram precision.
A. Use the Data Precision field to set the number of digits to display after the
decimal point.

ENVI User’s Guide Statistics


280 Chapter 3: Basic Tools

B. Use the Floating Report toggle button to designate the format (Normal or
Scientific) for the numbers in the ASCII report. Normal numbers are in
decimal format (for example, 25.88). Scientific numbers are a single digit
followed by a decimal value, the letter e, and the exponential power (for
example, 2.588e+001).

Opening Statistics Files


Use View Statistics File to view previously saved statistics files.
1. From the ENVI main menu bar, select Basic Tools → Statistics → View
Statistics File. The Enter Statistics Filename dialog appears.
2. Select a statistics file. The Stats File plot window appears. Use this window to
select the type of reports to generate.
See “Viewing Statistics Reports” on page 278 for a description of the plot window
options.
The options available in the Stats File plot window depend on the type of statistics
computed for the original file (for example, if covariance statistics were not
calculated for the original file, then covariance options are not available in the View
Statistics File dialog).

Summing Data Bands


Use Sum Data Bands to add all of the bands in an image together or to calculate
spectral statistics for every pixel in an image. You can calculate up to 8 different
statistics: sum, sum of squares, mean, standard deviation, variance, skewness,
kurtosis, and mean absolute deviation.
The statistics calculated using Sum Data Bands are spectral, which means that the
statistics are calculated using all of the bands for every pixel and that output images
will result. The statistics calculated using the other statistics functions are spatial,
which means that they are calculated using all pixels for every band.
1. From the ENVI main menu bar, select Basic Tools → Statistics → Sum Data
Bands. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Sum Data Parameters dialog appears.
3. Select one or more output bands to calculate.

Statistics ENVI User’s Guide


Chapter 3: Basic Tools 281

4. From the Output Data Type drop-down list, select the output data type. If the
output data falls outside the data type range, the output data will be clipped to
the highest or lowest data type value (that is, byte output will have values only
between 0-255 and all negative values will clip to 0).
5. Select output to File or Memory.
6. Click OK. ENVI adds the resulting output to the Available Bands List.
ENVI calculates the various statistics as follows, where xj is the value of a pixel for
band j and N = number of bands:

Figure 3-6: Statistics Used in ENVI

Generating a Random Sample


It is often helpful to generate a random sampling of points from a classification result,
or from ROIs. Such samplings can be valuable in supporting classification accuracy
assessments and field truthing expeditions.

ENVI User’s Guide Statistics


282 Chapter 3: Basic Tools

ENVI offers three types of random samplings:


• Stratified Random: Also called proportional or quota random sampling, this
technique divides the population (the entire classification image or all of the
ROIs) into homogeneous subgroups (the individual classes or ROIs) and then
takes a simple random sample in each subgroup. Two types of Stratified
Random sampling are available: proportionate and disproportionate.
Proportionate sampling produces sample sizes that are directly related to the
size of the classes (that is, the larger the class, the more samples will be drawn
from it). Disproportionate sampling allows you to explicitly define each
sample size.
• Equalized Random: As with Stratified Random, divides the population into
homogeneous subgroups (as in Stratified Random) but ensures that each class's
(or ROI’s) sample size is exactly the same. The sample size remains fixed
regardless of class size.
• Random: Draws a random sampling from the entire (heterogeneous)
population. For large sample sizes, the distribution of classes (or ROIs) in the
sample will approximate a Stratified Random sampling, but classes with small
sizes may be missed altogether in the random sample.
For details, see “Generating a Random Sample” on page 475.

Statistics ENVI User’s Guide


Chapter 3: Basic Tools 283

Spatial Statistics
Use Spatial Statistics to calculate spatial autocorrelation and semivariance for
images. These statistics aid analyzing the extent to which the occurrence of an event
in an area inhibits, or makes more likely, the occurrence of an event in a neighboring
area.
You can either calculate statistics for each pixel’s nearest neighbors only, or you can
calculate a correlogram, which is a plot of the autocorrelation value calculated at
multiple pixel separations.
ENVI provides options to calculate the following spatial statistics:
• Global Spatial Statistics: Provide a single value describing the overall
autocorrelation within a scene.
• Local Spatial Statistics: Result in an image output, where each pixel value
represents the autocorrelation of that pixel and its neighbors. The two types of
statistics are described in the following sections:

Global Spatial Statistics


Global spatial statistics look for an overall pattern between proximity and the
similarity of pixel values. These statistics provide a single value that describes the
spatial autocorrelation of the dataset as a whole. ENVI offers three global spatial
statistics, consisting of the spatial autocorrelation statistics known as Moral’s I,
Geary’s C, and semivariance.
• The Moran’s I index compares the differences between neighboring pixels and
the mean to provide a measure of local homogeneity. The value range is
between +1 and -1, where +1 = strong positive spatial autocorrelation, 0 =
spatially uncorrelated data, and -1 = strong negative spatial autocorrelation.
• The Geary’s C index compares the differences between neighboring pixels to
the standard deviation to provide a measure of dissimilarity within a dataset.
The value range is between 0 and 2, where 0 = strong positive spatial
autocorrelation,
1 = spatially uncorrelated data, and 2 = strong negative spatial autocorrelation.
• The semivariance statistic uses the squared difference between neighboring
pixel values to provide another measure of dissimilarity within a dataset. It
differs from the unitless Moran’s I and Geary’s C indices in that it is in the
same units of the input dataset, and the value range is only constrained to be
greater than or equal to 0.

ENVI User’s Guide Spatial Statistics


284 Chapter 3: Basic Tools

While autocorrelation statistics provide an indication of the local homogeneity of a


dataset, it is sometimes interesting to understand how that autocorrelation decreases
as distance increases. You can examine this using the correlogram or semivariogram.
These plots consist of an autocorrelation statistics calculated at various lag distances
displayed against the lag. When using the Moran’s I or Geary’s C statistics, this plot
is called a correlogram; when using the semivariance statistics, this plot is called a
semivariogram.
1. From the ENVI main menu bar, select Basic Tools → Spatial Statistics →
Compute Global Spatial Statistics. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking then click OK. The Global Spatial Statistics
Parameters dialog appears.

Figure 3-7: Global Spatial Statistics Parameters Dialog

3. In the Global Spatial Statistics Parameters dialog, set the following choices:
4. From the Neighborhood Rule drop-down list, select which adjacency rule to
use in the calculation. This rule defines which adjacent pixels to compare to
the central pixel. The choices are:
• Rook’s Case (default): Selects the pixels on the top, bottom, left, and
right.

Spatial Statistics ENVI User’s Guide


Chapter 3: Basic Tools 285

• Bishop’s Case: Selects four diagonal neighboring pixels.


• Queen’s Case: Selects all eight neighboring pixels.
• Horizontal: Selects two neighboring pixels in the same row.
• Vertical: Selects two neighboring pixels in the same column.
• Positive Slope: Selects two neighboring pixels in opposite corners in a
positive diagonal.
• Negative Slope: Selects two neighboring pixels in opposite corners in a
negative diagonal.
5. Select the Output Semivariogram and Correlogram check box to calculate a
semivariogram and correlogram. The correlogram plots the autocorrelation
value at multiple lag distances. The semivariogram plots the semivariance at
increasing distances. Selecting this check box causes the Select Maximum
Lag (Pixels) option to display.
6. Use Select Maximum Lag (Pixels) with the Output Semivariogram and
Correlogram option to specify the maximum lag distance, in pixels, to use in
the correlogram and semivariogram calculation. The autocorrelation statistics
are calculated at each lag distance, up to the specified maximum lag. For
example, a value of 5 means that autocorrelation will be calculated for lags of
5, 4, 3, 2, and for each pixel’s nearest neighbors. This value must be greater
than 1, but less than the lesser value of the number of rows and columns in the
source dataset divided by 4. The default is 2 pixels.
7. Select the Output to the Screen check box to send the output to the Global
Spatial Statistics Results dialog. The dialog displays automatically after the
statistics calculation is complete. Using either this option, the Output to a
Text Report File option, or both is required. This is the default selection.
8. Select the Output to a Text Report File check box to save the output to a text
report file. The format of the text report file is identical to the format of the text
report in the Global Spatial Statistics Results dialog. If selected, enter a
filename in the Enter Output Report Filename field. Using this option, the
Output to the Screen option, or both is required.
9. Click OK. If you selected Output to Screen, the Global Spatial Statistics
Results plot window displays. If you selected Output to a Text Report, ENVI
saves the report to a text file.

ENVI User’s Guide Spatial Statistics


286 Chapter 3: Basic Tools

Viewing Global Spatial Statistics Data


In the Global Spatial Statistics Parameters plot window:
• If you selected Output Semivariogram and Correlogram in the Global
Spatial Statistics Parameters dialog, the Global Spatial Statistics Results plot
window shows graphical output in a plot, correlogram data in tabular format,
and the statistics report in text format (Figure 3-8).
• If you selected Output Semivariogram and Correlogram in the Global
Spatial Statistics Parameters dialog, the Global Spatial Statistics Results plot
window shows the statistics report in text format and band data in tabular
format (Figure 3-9 and Figure 3-10).
When you have the plot view (Figure 3-8), select from the Moran’s I, Geary’s C, or
Semivariogram radio buttons in the upper portion of the Global Spatial Statistics
Results dialog to change the view. The Moran’s I and Geary’s C plots show the
autocorrelation for each lag; the semivariogram view plots the semivariance for each
lag. To view the plot key, right-click in the plot and select Plot Key.

Spatial Statistics ENVI User’s Guide


Chapter 3: Basic Tools 287

Figure 3-8: Global Spatial Statistics Results Dialog with Plot, Correlogram, and
Text Report Output

In the lower portion of the Global Spatial Statistics Results plot window, the View
Correlogram tab is the default display when the input file has multiple bands. When
the input file has a single band, the Text Report tab is the default display. You can
switch between the two views by selecting the appropriate tab. When you select the
Moran’s I, Geary’s C, or Semivariogram radio buttons, the correlogram data
updates to reflect the current plot view.

ENVI User’s Guide Spatial Statistics


288 Chapter 3: Basic Tools

If you did not generate plot output, the View By Band and Text Report tabs display.
When the input file has a single band, the Text Report tab is the default display
(Figure 3-9).

Figure 3-9: Global Spatial Statistics Results Dialog with Text Output (No Plot)

When viewing information in the Text Report tab, you can quickly jump to statistics
for a specific band in the report. To do this, click Select Stat, then select the band to
view.

Spatial Statistics ENVI User’s Guide


Chapter 3: Basic Tools 289

When the input file has multiple bands, the View By Band tab is the default display
(Figure 3-10). The View By Band tab shows the Moran’s I and Geary’s C indices,
and semivariance statistics by band.

Figure 3-10: Global Spatial Statistics Results Dialog with View By Band Output

References:
Daniel A. Griffith, 1987. Spatial Autocorrelation – A Primer. Association of
American Geographers, Washington D.C.
Curran, P.J., 1988. The Semivariogram in Remote Sensing: An Introduction. Remote
Sensing of Environment, 24:493-507.
Woodcock, C.E. and A.H. Strahler, 1987. The Factor of Scale in Remote Sensing.
Remote Sensing of Environment, 21:311-332.

ENVI User’s Guide Spatial Statistics


290 Chapter 3: Basic Tools

Local Spatial Statistics


Local spatial statistics look for specific areas in an image that have clusters of similar
or dissimilar values. The statistics output is an image for each index you select to
calculate; each image contains a measure of autocorrelation around that pixel. ENVI
provides three local spatial statistics: Anselin Local Moran’s I, Getis-Ord Local Gi,
and Anselin Local Geary’s C.
• The Local Moran’s I index identifies pixel clustering. Positive values indicate a
cluster of similar values, while negative values imply no clustering (that is,
high variability between neighboring pixels).
• The Getis-Ord Gi index identifies hot spots, such as areas of very high or very
low values that occur near one another. This is useful for determining clusters
of similar values, where concentrations of high values result in a high Gi value
and concentrations of low values result in a low Gi value. The results of this
index differ from the results of the Local Moran’s I index because clusters of
negative values give high values for I, but low values for Gi.
• The Local Geary’s C index identifies areas of high variability between a pixel
value and its neighboring pixels. It is useful for detecting edge areas between
clusters and other areas with dissimilar neighboring values.
To compute local spatial statistics:
1. From the ENVI main menu bar, select Basic Tools → Spatial Statistics →
Compute Local Spatial Statistics. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The Local Spatial Statistics
Parameters dialog appears.
If the input file has a bad bands list associated with it, the default spectral
subset excludes the bands specified in the list. For more information, see
“Selecting Bad Bands” on page 198.

Spatial Statistics ENVI User’s Guide


Chapter 3: Basic Tools 291

Figure 3-11: Local Spatial Statistics Parameters Dialog

3. From the Neighborhood Rule drop-down list, select which adjacency rule to
use in the calculation. This rule defines which adjacent pixels to compare to
the central pixel. The choices are:
• Rook’s Case (default): Selects the pixels on the top, bottom, left, and
right.
• Bishop’s Case: Selects four diagonal neighboring pixels.
• Queen’s Case: Selects all eight neighboring pixels.
• Horizontal: Selects two neighboring pixels in the same row.
• Vertical: Selects two neighboring pixels in the same column.
• Positive Slope: Selects two neighboring pixels in opposite corners in a
positive diagonal.
• Negative Slope: Selects two neighboring pixels in opposite corners in a
negative diagonal.

ENVI User’s Guide Spatial Statistics


292 Chapter 3: Basic Tools

4. Select the Calculate Statistics at Multiple Ranges check box to calculate a


multi-range correlogram. Selecting this check box causes the Select
Maximum Lag (Pixels) and Include Intermediate Lags options to display.
5. Use Select Maximum Lag (Pixels) with the Calculate Statistics at Multiple
Ranges option to specify the maximum lag distance, in pixels, to use in the
correlogram calculation. The autocorrelation statistics are calculated at each
lag distance, up to the specified maximum lag. For example, a value of 5
means that autocorrelation will be calculated for lags of 5, 4, 3, 2, and for each
pixel’s nearest neighbors. The statistics for each lag are stored as a separate
band in the output image. This value must be greater than 1, but less than the
lesser value of the number of rows and columns in the source dataset divided
by 4. The default is 2 pixels.
6. Use Include Intermediate Lags with the Select Maximum Lag (Pixels)
option to use all pixel values inside the range specified in the Select
Maximum Lag field for the local calculation. If this value is not set, ENVI
uses only the pixels at the specified range in the calculation.
7. Select the Output Local Moran’s I (Clustering) check box to calculate the
Local Moran’s I correlation image. At least one of the three local output types
is required. The default is selected.
8. Select the Output Local Getis-Ord Gi (Hot Spots) check box to calculate the
Local Getis-Ord Gi correlation image. At least one of the three local output
types is required. The default is selected.
9. Select the Output Local Geary’s C (Variability) check box to calculate the
Local Geary’s C correlation image. At least one of the three local output types
is required. The default is selected.
10. Select output to File or Memory. Enter the root name for the output file in
Output Root Name field. ENVI appends a string to the root name for each
output type you select (for example, the output filenames for the root name
bighorn would be: bighornmoran_i, bighorngeary_c,
bighorngetis_ord_gi).
11. Click OK. ENVI adds the resulting output to the Available Bands List.
Tip
When calculating statistics for multiple ranges, you can use the Z Profile tool to
view the correlogram for an individual pixel. See “Extracting Z Profiles” on
page 98.

Spatial Statistics ENVI User’s Guide


Chapter 3: Basic Tools 293

References:
Anselin, L., 1995. Local Indicators of Spatial Association – LISA. Geographical
Analysis 27(2):93-115
Getis, A. and J.K. Ord, 1992. The Analysis of Spatial Association by Use of Distance
Statistics. Geographical Analysis 24(3):189-206.

ENVI User’s Guide Spatial Statistics


294 Chapter 3: Basic Tools

Change Detection Analysis


Change Detection Analysis encompasses a broad range of methods used to identify,
describe, and quantify differences between images of the same scene at different
times or under different conditions. You can use many of ENVI's tools (such as Band
Math or Principal Components Analysis) independently, or in combination, as part of
a change detection analysis. In addition, the routines found under the ENVI main
menu option Basic Tools → Change Detection offer a straightforward approach to
measuring changes between a pair of images that represent an initial state and final
state. Use Change Detection Statistics for classification images; use Compute
Difference Map for gray scale (single-band) images.

Computing a Difference Map


Use Compute Difference Map to produce an ENVI classification image
characterizing the differences between any pair of initial state and final state images.
The input images may be single-band images of any data type. The difference is
computed by subtracting the initial state image from the final state image (that is,
final - initial), and the classes are defined by change thresholds. A positive change
identifies pixels that became brighter (final state brightness was greater than the
initial state brightness), while a negative change identifies pixels that became dimmer
(final state brightness was less than initial state brightness).
As an optional pre-processing step, you can normalize the input images to a data
range between zero and one, or standardize them to a zero mean and unit variance.
The input images must be coregistered or georeferenced. For the most accurate
results, carefully coregister the images before processing. If the input images are not
coregistered, the Compute Difference Map tool uses the available map information
to automatically coregister the images, using the initial state image as the base if re-
projection or resampling is required.

Tips for Successful Analyses


When performing a change detection analysis on non-thematic images (gray scale
data), it is important to consider all of the factors that can cause scenes of the same
area to look different. The following are a few notable factors:
• Differences in the instrument or sensor: Consider the similarity of the
sensors that collected the images. Even bands collected in the same part of the
spectrum (for example, two red bands) may have different band center
wavelengths, or different spectral response functions, which can lead to
different pixel values for the same material.

Change Detection Analysis ENVI User’s Guide


Chapter 3: Basic Tools 295

• Differences in the collection date and time: Seasonal changes can impart big
differences in scenes containing vegetation (due to plant senescence and
canopy architecture development). Differences in the season and time of day
will also affect the solar azimuth and elevation.
• Differences in Atmospheric Conditions: The dominant weather conditions
can affect atmospheric transmission and scattering. Consistent differences in
gross atmospheric conditions are often associated with seasonal changes. For
example, differences in the predominant wind direction can be important
(winds blowing in over the ocean contain different aerosols with different
scattering properties from those blowing in over an urban area). Another
common, yet consistent, atmospheric difference is the water content of the
atmosphere. Summer atmospheres tend to be wetter than winter atmospheres.
Atmospherically corrected images can reduce such influences.
• Differences in Image Calibrations: For the most accurate change detection
results, it is important to work with images that are calibrated into the same
units. If a calibration into physical units (such as radiance) is not possible, a
relative calibration may be better than none at all (especially if the instruments
that collected the images have different dynamic ranges).
• Differences in Image Resolution: Differing pixel sizes can lead to false
change detections. It is important that the original images (prior to resampling
or re-projection) have the same pixel resolution. For scenes with large swaths
(such as AVHRR, SeaWiFS, or MODIS) the actual pixel sizes differ across the
scene. In such cases, differences in the sensor viewing geometry can also be
important.
• Coregistration Accuracy: Accurately coregistered images are critical for
change detection analyses. While the Compute Difference Map routine will
automatically coregister the input images using the available map information,
if the differences in the image geometry are substantial, it is well worth the
effort to ensure that the coregistration is as accurate as possible before
performing a change detection.
The Compute Difference Map tool does not compensate for any of these (or other)
conditions. Its results are strictly dependent on pixel-for-pixel comparisons.
1. From the ENVI main menu bar, select Basic Tools → Change Detection →
Compute Difference Map. The Select the ‘Initial State’ Image dialog appears.
The input images must be georeferenced or coregistered. If the images are not
coregistered, then the available map information will be used to automatically
coregister the area common to both.

ENVI User’s Guide Change Detection Analysis


296 Chapter 3: Basic Tools

2. Select a single band image representing the initial state and perform optional
Spatial Subsetting, then click OK. The Select the ‘Final State’ Image dialog
appears.
3. Select a single band image representing the final state and perform optional
Spatial Subsetting, then click OK. The Compute Difference Map Input
Parameters dialog appears.
4. Enter the number of classes to use. Each class is defined by a difference
threshold that represents a varying amount of change between the two images.
The minimum number of classes is two. The default classification thresholds
are evenly spaced between (-1) and (+1) for simple differences, and (-100%)
and (+100%) for percent differences. The default class definitions attempt to
produce symmetric classes, with an equal number of positive and negative
change classes surrounding a No Change category. The order in which the
classes are defined is as follows:
• For n classes, where n is odd, the first (n/2) classes represent positive
changes, starting with the largest positive changes and ending with the
smallest.
• The middle class, (n/2) + 1, represents no change.
• The last (n/2) classes represent negative changes, starting with the smallest
negative changes end ending with the largest.
• For an even number of classes the definitions remain the same except that
the number of negative classes is reduced by one. In short, the default class
definitions range from positive to negative, with the magnitude of the
change increasing with distance from the middle No Change class.
5. To modify or view the classification thresholds, define names for the classes,
or import classification thresholds from a previous result, click Define Class
Thresholds. (If using default thresholds, this step is unnecessary.) The Define
Class Simple Difference Thresholds dialog appears. Each class is defined by
one line in the dialog.
While you are encouraged to customize the criteria to use to define the change
thresholds, It is recommended that the classes retain their default symmetrical
property, with an equal number of positive and negative classes surrounding a
No Change class. Retaining the default position (order) and type (negative or
positive) of classes will make the results easier to interpret using the
classification color assignments.
A. Define class names by placing the cursor in the field next to the class you
wish to rename, and enter the new class name.

Change Detection Analysis ENVI User’s Guide


Chapter 3: Basic Tools 297

B. Modify class thresholds by selecting logical operators from the drop-down


lists and enter numeric values in the fields to define the thresholds for any
selected class. When you click OK, ENVI saves the changes. To further
modify class thresholds, click Define Class Thresholds again. The first
and last class have only one logical operator and are intended to be open-
ended.
To revert to the default classification thresholds, click Apply Defaults at
the bottom of the dialog. The defaults that are applied are dependent on the
Change Type selected in the Compute Difference Map Input Parameters
dialog (the Change Type is also indicated by the title bar of the Define
Class Thresholds dialog).
To undo changes made since the Define Class Thresholds dialog was last
opened, click Reset. All changes made since the dialog was brought up
will be removed.
C. To automatically set the classification change thresholds to match those
used in a previous analysis, click Match Previous Result. The Select a
Previous Difference Map Classification Result dialog appears.
Choose a Difference Map classification image produced previously using
the Compute Difference Map routine that contains the thresholds you
wish to reuse, and click OK.
If necessary, the number of classes for the current analysis will be reset to
match the number of classes used in the previous analysis.
6. Set the Change Type:
• Simple Difference: Subtracts the initial state image from the final state
image.
• Percent Difference: The simple difference divided by the initial state
value.
7. Select one of the following optional Data Pre-Processing options:
• Normalization: Subtracts the image minimum and dividing by the image
data range: Normalization = (DN - min) / (max - min).
• Standardization: Subtracts the image mean and dividing by the standard
deviation: Standardization = (DN - mean) / stdev.
8. Select output to File or Memory.

ENVI User’s Guide Change Detection Analysis


298 Chapter 3: Basic Tools

9. If the input images require warping or resampling in order to produce a


coregistered pair, then an extra section appears which allows saving the auto-
coregistered images to File or Memory.
10. Click OK. The resulting Difference Map classification image is color coded to
indicate the magnitude of the change between the two images. Positive
changes display in shades of red, grading from gray for no change to bright red
for largest positive change. Negative changes display in shades of blue,
grading from gray for no change to bright blue for the largest negative change.
If the number of positive and negative change classes or the order in which the
classes are defined has changed from the default settings, the interpretation of
the color scheme may not match that described here.

Computing Change Detection Statistics


Use Change Detection Statistics to compile a detailed tabulation of changes
between two classification images. The changes detected using this routine differ
significantly from a simple differencing of the two images. While the statistics report
does include a class-for-class image difference, the analysis focuses primarily on the
initial state classification changes; that is, for each initial state class, the analysis
identifies the classes into which those pixels changed in the final state image. ENVI
can report changes as pixel counts, percentages, and areas. In addition, you can
produce a special type of mask image (classification masks) that provide a spatial
context for the tabular report. The class masks are ENVI classification images with
class colors matching the final state image, making it easy to identify not only where
changes occurred but also the class into which the pixels changed.
The input images must be coregistered or georeferenced. For the most accurate
results, carefully coregister the images before processing. If the input images are not
coregistered, ENVI uses the available map information to automatically coregister
the images, using the initial state image as the base if re-projection or resampling is
required.
1. From the ENVI main menu bar, select one of the following:
• Basic Tools → Change Detection → Change Detection Statistics.
• Classification → Post Classification → Change Detection Statistics.
The Select the ‘Initial State’ Image dialog appears.
2. Select a classification image representing the initial state and perform optional
Spatial Subsetting, then click OK. The Select the ‘Final State’ Image dialog
appears.

Change Detection Analysis ENVI User’s Guide


Chapter 3: Basic Tools 299

3. Select a classification image representing the final state and perform optional
Spatial Subsetting, then click OK. The Define Equivalent Classes dialog
appears.
4. Match the classes from the Initial and final state images by selecting the
matching names in the two lists and clicking Add Pair.
Add only the classes you wish to include in the change detection analysis (you
do not have to pair all classes). The class combinations are shown in a list at
the bottom of the dialog. If the classes in each image have the same names,
they are automatically paired.
5. Click OK. The Change Detection Statistics Output dialog appears.
6. Select the Report Type. You may choose any combination of Pixels, Percent,
and Area.
7. Click the Output Classification Mask Images? toggle button to specify
whether or not to create class masks.
8. If the Output Classification Mask Images? toggle button is Yes, select output
to File or Memory.
9. Click OK. If an Area Report was requested but the initial state image does not
have pixel sizes defined, the Define Pixel Sizes for Area Statistics dialog
displays.
10. Enter the pixel sizes.
11. Click OK. ENVI adds the resulting output to the Available Bands List and
opens the statistics in the Change Detection Statistics window.

The Change Detection Statistics Report


The Change Detection Statistics window contains all of the statistics tables that you
selected from the Report Type field in the Change Detection Statistics Output dialog
box, separated by tabs. It also contains a Reference tab, which includes additional

ENVI User’s Guide Change Detection Analysis


300 Chapter 3: Basic Tools

information about the analysis, such as the names of the input images and the
equivalent class pairings.

Figure 3-12: Sample Change Detection Statistics Report

The statistics tables list the initial state classes in the columns and the final state
classes in the rows. However, the columns include only the selected (paired) initial
state classes, while the rows contain all of the final state classes. This is required for a
complete accounting of the distribution of pixels that changed classes. For each initial
state class (that is, each column), the table indicates how these pixels were classified
in the final state image. For example, the table in Figure 3-12 shows that 2,094 pixels
initially classified as Water changed into the Sediment class in the final state image.
• The Class Total row indicates the total number of pixels in each initial state
class, and the Class Total column indicates the total number of pixels in each
final state class. The table in Figure 3-12 shows that 35,989 pixels were
classified as Agriculture in the initial state image.
• The Row Total column is a class-by-class summation of all final state pixels
that fell into the selected initial state classes. Note that this may not be the
same as the Final State Class Totals because it is not required that all initial
state classes be included in the analysis.

Change Detection Analysis ENVI User’s Guide


Chapter 3: Basic Tools 301

• The Class Changes row indicates the total number of initial state pixels that
changed classes. In the table in Figure 3-12, the total Class Changes for
Agriculture is 30,923 pixels. In other words, 30,923 pixels that were initially
classified as Agriculture changed into final state classes other than agriculture.
• The Image Difference row is the difference in the total number of equivalently
classed pixels in the two images, computed by subtracting the Initial State
Class Totals from the Final State Class Totals. An Image Difference that is
positive indicates that the class size increased. For example, in the sample
analysis, the Water class grew by 67,618 pixels.
Select the tabs along the top of the Change Detection Statistics dialog to show
equivalent information for the class changes in terms of Percentage and Area. In the
Percent report (not shown here) the increase in the size of the Water class corresponds
to a growth of 21%:
(final state - initial state) / initial state = (390381 - 322763) / 322763 = 0.209
Additional Features of the Change Detection Statistics Report
Options from the Change Detection Statistics Report dialog menu bar are:
• To change the floating-point precision displayed in the report, select
Options → Set Report Precision.
• To convert the units for the Area report, select Options → Convert Area
Units.
• To save the statistics reports to an ASCII text file, select File → Save to Text
File. The Save Change Detection Stats to Text dialog appears; you can
optionally add a descriptive line of header text to the file being written. The
data is saved in a tab delimited format to facilitate importing into other
software programs.

The Classification Mask Images


The classification masks complement the statistics tables by spatially identifying
which initial state pixels changed classes, and into which class they changed. By
examining the masks, you can often see patterns of changes. The masks can also help
highlight coregistration errors.

ENVI User’s Guide Change Detection Analysis


302 Chapter 3: Basic Tools

ENVI saves the class mask images as a multi-band image with one mask for each
paired class. To help identify the class into which a pixel changed, the masks are
stored as ENVI classification images with the class assignments (names, colors, and
values) matching the final state. A value of zero in the mask indicates that no change
occurred from the initial to the final state; non-zero values indicate a change.
To differentiate pixels that did not change classes from those that changed into the
Unclassified class (which typically has a classification value of zero), pixels that
changed into the Unclassified class are assigned a value equal to the number of final
state classes plus one, and color coded white. For example, in the sample analysis
shown in Figure 3-12, the final state image contains 6 classes; therefore, any pixel in
the mask that changed into the Unclassified class would be assigned a value of 7.

Change Detection Analysis ENVI User’s Guide


Chapter 3: Basic Tools 303

Measurement Tool
Use Measurement Tool to get a report on the distance between points in a polygon
or polyline, and to get perimeter and area measurements for polygons, rectangles, and
ellipses.
To measure ROIs while using the ROI function, see “Reporting ROI Measurements”
on page 333.
1. Select one of the following options:
• From the ENVI main menu bar, select Basic Tools → Measurement Tool.
• From the Display group menu bar, select Tools → Measurement Tool.
The Display Measurement Tool dialog appears.
2. In the Display field, enter the number of the display that you want to take
measurements from.

Figure 3-13: Display Measurement Tool Dialog

3. Select the radio button for the display group window (Image, Scroll, Zoom) in
which you want to measure.
To disable the measurement function at any time, select the Off radio button.
4. From the Display Measurement Tool menu bar, select Type → area_shape you
want to measure.

ENVI User’s Guide Measurement Tool


304 Chapter 3: Basic Tools

5. From the Display Measurement Tool dialog menu bar, select Units →
unit_type. If the pixel size of the image is not stored in the header, and you
select any unit except Pixels, complete the following steps when the Input
Display Pixel Size dialog appears:
A. In the X Pixel Size and Y Pixel Size fields, type the size of the pixels in
your image.
B. From the Units drop-down list, select the unit type.
C. Click OK.
6. From the Display Measurement Tool dialog menu bar, select Area →
report_type to specify measuring the area in Units2 (for example, meters2),
Acres, or Hectares.
If you select Acres or Hectares, The Input Display Pixels dialog appears.
Enter the X/Y Pixel Size, select the Units from the drop-down list, and click
OK.
7. From the Display Measurement Tool dialog menu bar, select Options →
unit_type to specify whether the measurement information is reported as line
segments (the default) or as point coordinates. The options are:
• Report as Points: To produce a listing of the vertices coordinates. The
coordinates are reported as a pixel location (Pixel (x,y)).
• Report as Segments: To produce a listing of the line segment distances.
• Georef Map (x,y) or Georef (Lat/Lon): For georeferenced images, you
can produce a listing of the coordinates as either map coordinates or as
latitude and longitude coordinates.
8. In the display group window, left-click and draw the shape.
• For Rectangle or Ellipse type, left-click and hold the button and drag the
shape to the size. To draw a square or circle, middle-click and hold the
button and drag.
• Right-click to close the polygon or complete the line.
• For Polygon type, the distance between the vertices are listed and the
perimeter and total area are reported when the polygon is closed.
• For Polyline type, the distance between the vertices are listed and the total
distance is given when the polyline is completed.
• For Rectangle type, the lengths of the side segments, the perimeter, and
the total area are reported.

Measurement Tool ENVI User’s Guide


Chapter 3: Basic Tools 305

• For Ellipse type, the circumference and total area are reported.
• To erase the shape, right-click again.

Saving Measurement Reports to ASCII


1. From the Display Measurement Tool dialog menu bar, select File → Save
Points to ASCII. The Output Measurement Points dialog appears.
2. Enter an output filename.
3. Click OK.

ENVI User’s Guide Measurement Tool


306 Chapter 3: Basic Tools

Band Math
ENVI Band Math is a flexible image processing tool with many capabilities not
available in any other image processing system. You can use ENVI’s Band Math
dialog to define bands or files used as input, to call a user Band Math function, and to
write the result to a file or memory. ENVI’s Band Math function accesses data
spatially by mapping variables to bands or files. Spatial data that are too large to read
entirely into memory are automatically accessed using ENVI’s data tiling.
The following figure depicts Band Math processing that adds three bands. Each band
in the expression is mapped to an input image band, summed, and output as the
resulting image data. You can map one or more of the expression’s variables to a file
instead of mapping each variable to a single band. The resulting output is a new
image file. For example, in the expression b1 + b2 + b3, if b1 is mapped to a file and
b2 and b3 are mapped to a single band, then the resulting image file contains the
bands of the b1 file summed with b2 and b3.

Figure 3-14: Band Math Processes – Addition of Three Bands

Some common image summing operations are easier to perform using the
Basic Tools → Statistics → Sum Data Bands selection (see “Summing Data
Bands” on page 280).

Band Math ENVI User’s Guide


Chapter 3: Basic Tools 307

Entering Mathematical Expressions


1. From the ENVI main menu bar, select Basic Tools → Band Math. The Band
Math dialog appears.

Figure 3-15: Band Math Dialog

2. In the Band Math dialog, enter the desired mathematical description, including
variable names, into the Enter an expression field. Use variables in place of
band names or filenames (the variables will be assigned in the next step).
Variable names must begin with the character “b” or “B” followed by up to 5
numeric characters.
For example, to calculate the average of three bands, use the following
equation:

(float(b1)+float(b2)+float(b3))/3.0

Three variables are used in this expression: B1, B2, and B3. Note that, in this
example, the IDL function float() is used to prevent byte overflow errors
during calculation. See “Band Math Requirements” on page 310 for further
details.

ENVI User’s Guide Band Math


308 Chapter 3: Basic Tools

The Band Math dialog also contains the following functionality:


• Previous Band Math Expressions: This list shows previously applied
mathematical expressions. To apply an expression to a new set of bands,
select it from the list and enter it into the Enter an expression field. Click
OK.
• Save: Save mathematical expressions to a file. The Save Expressions to a
File dialog appears. Enter an output filename with an .exp extension.
Click OK. You can save expressions to a file without having to first run
them through the Band Math function.
• Restore: Restore previously saved mathematical expressions. The Enter
Expressions Filename dialog appears. Select a filename and click OK.
• Clear: Clear all expressions from the Previous Band Math Expressions
list.
• Delete: Delete a single expression from the Previous Band Math
Expressions list.
• Add to List: To add an individual expression to the Previous Band Math
Expressions list, enter it in the Enter an expression field and click Add
to List.
3. After entering a mathematical expression in the Enter an expression field,
click OK. The Variables to Bands Pairings dialog appears.

Assigning Values to Variables


Use the Variables to Bands Pairings dialog to assign bands from a list of input bands
to variable names you entered in the Enter an expression field of the Band Math
dialog.
Using the example mathematical expression
(float(b1)+float(b2)+float(b3))/3.0,
1. In the Variables used in expression field, select the variable
B1 - [undefined].

Band Math ENVI User’s Guide


Chapter 3: Basic Tools 309

Figure 3-16: Variables to Bands Pairings Dialog

2. Select the band in the Available Bands List. When the first band is selected,
only those bands with the same spatial dimensions are shown in the band list.
3. Continue to assign a value to B2, B3, and so forth in the same manner.
Mapping Variables to Multiband Images
You can assign a multiband image as one or all of the variables (using an image file as
a variable is considered File Math).
1. In the Variables to Bands Pairings dialog, select a variable in the Variables
used in expression field.

ENVI User’s Guide Band Math


310 Chapter 3: Basic Tools

2. Click Map Variable to Input File.


3. Select an input file the Input File dialog, and perform optional Spatial
Subsetting, then click OK.
4. Continue to assign a value to B2, B3, and so forth in the same manner. If more
than one file is used, they must have the same number of bands.
5. Select output to File or Memory.
6. Click OK. A multiband output image is produced for File Math modified by
the math expression.

Band Math Requirements


The Band Math routine has four basic requirements:
1. The Band Math expression must be a single IDL statement: The syntax for
defining your processing algorithm, or Band Math expression, is that of IDL.
However, simple Band Math expressions do not require prior knowledge of
IDL. If you plan to perform complex processing, you should review “IDL Tips
for Use in Band Math” on page 311.
A Band Math expression must be a single IDL statement in the form of a
function:

result = expression

In the Band Math dialog, enter only the expression part of the function.
Your expression can include any valid IDL function, including those that you
write yourself. If you are using your own custom IDL functions, be sure to
properly compile the function before using it in Band Math (see “Writing Band
Math User Functions” on page 319).
2. All input bands must have identical dimensions: The expression is applied
on a simple pixel-by-pixel basis. Therefore, the input bands (to which your
expression is applied) must all have the same spatial dimensions in samples
and lines. Furthermore, Band Math does not automatically coregister images
that are georeferenced. To automatically coregister images prior to using Band
Math, use the Basic Tools → Layer Stacking utility (see “Layer Stacking” on
page 269).

Band Math ENVI User’s Guide


Chapter 3: Basic Tools 311

3. All variables in the expression must be named Bn (or bn): The variables in
the expression that represent input bands must begin with the character “b” or
“B” followed by up to 5 numeric characters. For example, all of the following
expressions are valid when adding three bands:
b1 + b2 + b3
B1 + B11 + B111
B1 + b2 + B3

4. The result must be a band of the same dimension as the input bands: The
expression must produce a result with the same spatial dimensions in samples
and lines as the input bands.

IDL Tips for Use in Band Math


The power of the Band Math routine is provided by the power, speed, and flexibility
of IDL. You do not need to be an expert IDL programmer to be successful with Band
Math. The following tips will help you make the most of Band Math and avoid
common problems.

Pay Attention to the Data Type


Doing arithmetic in IDL is a bit different than using a calculator. The data type of
your input bands and any constants you use in your expression are very important.
Each data type, especially the non-floating-point integer data types, has a limited
dynamic range, meaning that they can only represent a limited set of numbers. For
example, a byte data type can only represent values between 0 and 255. If you were to
add two byte bands together (b1 + b2) and the sum was greater than 255, the result
would not be what you expect. When a value becomes bigger than the data type can
hold, it overflows and starts counting from the beginning again. For example, adding
the bytes 250 + 10 would produce a result of 4. This situation is commonly
encountered in Band Math because remote sensing images are frequently stored as
bytes or integers. To avoid data type overflow, you should promote the data type of
input bands using one of the IDL data type casting functions (see Table 3-1 for a full
list of these functions). For example, when adding two-byte image bands together (as
above), you will get the correct answer if you promote the data type to an integer
using the IDL function FIX().
fix(b1) + b2

Tip
To find out the data type of your images, highlight them in the Available Bands List
and their data type will be listed in the DIMS box at the bottom of the dialog.

ENVI User’s Guide Band Math


312 Chapter 3: Basic Tools

You might ask, why not just carry out all computations in a floating-point data type
since it can represent any value? The answer is disk space. The greater the dynamic
range a data type can represent, the more disk space it consumes. For example, byte
data types use only 1 byte for every pixel, integers use 2 bytes for every pixel, while
floating-point data types use 4 bytes for every pixel. Thus a floating-point result will
consume twice as much disk space as an integer result. See Table 3-1 to learn more
about the disk space usage and dynamic ranges of the IDL data types.

IDL is Dynamically Typed


Using the IDL data type casting functions, like fix(), is not the only way that the data
type of your Band Math result can get promoted. This is because IDL is Dynamically
Typed, which means that the data type of an IDL statement is automatically promoted
to the largest data type it encounters in the expression. Because certain numbers (such
as small integers) can be represented by several different data types, IDL must apply
some default rules about how these numbers are interpreted. For example, numbers
without decimal points are always interpreted as integers, even if they are within the
dynamic range of a byte data type. For example, if you wanted to add the value 5 to a
byte image and you used the Band Math expression:
b1 + 5

the number 5 is interpreted as a 2-byte integer, so the result would be promoted to an


integer image (which uses twice as much disk space as a byte image). If you wanted
to keep the result a byte image, you could either use the data type casting function
byte():
b1 + byte(5)

or, use an IDL shortcut for casting an integer as a byte:


b1 + 5B

Adding a B (upper or lowercase) immediately following a number ensures that it is


interpreted as a byte data type. There are several other shortcuts like this that are quite
useful if you use constants in your Band Math expressions. See the following table
for details.

Casting Bytes
Data Type Shortcut Dynamic Range
Function per Pixel

Byte byte() B 0 to 255 1


Integer fix() -32768 to + 32767 2

Table 3-1: Data Type Casting Shortcuts

Band Math ENVI User’s Guide


Chapter 3: Basic Tools 313

Casting Bytes
Data Type Shortcut Dynamic Range
Function per Pixel

Unsigned integer uint() U 0 to 65535 2


Long integer long() L approximately 4
+/- 2 billion
Unsigned long ulong() UL 0 to approximately 4
integer 4 billion
64-bit integer long64() LL approximately 8
+/- 9e18
64-bit Unsigned ulong64() ULL 0 to approximately 8
integer 2e19
Floating-point float() . (decimal +/- 1e38 4
point)
Double precision double() D +/- 1e308 8
Complex complex() same as float 8
floating-point
Complex double dcomplex() same as double 16
precision

Table 3-1: Data Type Casting Shortcuts (Continued)

The Order of Operation is Important


Mathematical operators are not necessarily carried out in the order they appear in the
expression, but instead according to a hierarchy of precedence. Using parentheses can
change the order of operations, with the most deeply nested part of the expression
being carried out first. Table 3-2 lists the order of precedence for IDL operators.
Operators that have the same precedence will be carried out in the order they appear
in the expression. For example, consider the following expressions (with constants
used in place of bands):

5 + 3 * 2 Evaluates to 11 because the multiplication operator


takes precedence
(5 + 3) * 2 Evaluates to 16 because the parentheses change the
order of operation

ENVI User’s Guide Band Math


314 Chapter 3: Basic Tools

The order of precedence combined with the dynamic typing can also change the
outcome of your expression. Be sure to promote the data type in the proper place in
the expression to avoid data type overflow or integer division errors. For example,
consider the following case:

Float(5) + 10 / 3 All of the constants are integers but the float()


function promotes the result into a floating-point
data type. However, because the division operator
has precedence over the addition, it is applied first
and the division is carried out as integers, then
added to 5 as a floating-point operation. The result
is 8.0 (instead of the expected 8.3).
5 + 10 / float(3) If the data type promotion is moved to one of the
division variables then the result is 8.3.

The following table describes the order of precedence for each operator:

Order of
Operator Description
Precedence

First () Parentheses to group expressions


Second ^ Exponents
Third * Multiplication
# and ## Matrix multiplication
/ Division
MOD Modulus (remainder)
Fourth + Addition
- Subtraction and negation
< Minimum
> Maximum
NOT Boolean negation

Table 3-2: Operator Precedence

Band Math ENVI User’s Guide


Chapter 3: Basic Tools 315

Order of
Operator Description
Precedence

Fifth EQ Equal
NE Not equal
LE Less than or equal
LT Less than
GE Greater than or equal
GT Greater than
Sixth AND Boolean AND
OR Boolean OR
XOR Boolean exclusive OR
Seventh ?: Conditional expression (rarely used in Band
Math). The following example expression
compares two arrays, b1 and b2:
(max(b1) eq 0) ? b2: b1

Table 3-2: Operator Precedence (Continued)

Avoid Using IDL Functions That Require All of the Image Data
at Once
Like all other ENVI routines, the Band Math processing is tiled. This means that if
the images being processed are larger than the Image Tile Size (Mb) preference,
which is set to 1 MB by default, then it will be broken into smaller pieces, each piece
processed separately, then reassembled. This can cause problems if you use an IDL
function that requires all of the image data at once, because the Band Math
expression is applied individually to each tile of data. For example, consider using the
IDL function MAX(), which determines the maximum value in an array:
b1 / max(b1)

If the Band Math processing is tiled, then each tile will be divided by the tile's
maximum value, instead of the maximum value of the whole band. If you find that
your Band Math result has broad horizontal stripes in it, tiling may be the cause of the
problem (because the tiles are horizontal sections of the image). IDL functions to
avoid include FFT, MAX, MIN, MEAN, MEDIAN, STDDEV, VARIANCE, and

ENVI User’s Guide Band Math


316 Chapter 3: Basic Tools

TOTAL. In most cases it is also difficult to use the BYTSCL function, but if you
know beforehand the data range of your input bands then you can use BYTSCL as
long as you include the MIN and MAX keywords.

Take Advantage of IDL’s Powerful Array Operators


IDL’s array operators are very easy to use and enormously powerful for Band Math.
They allow you to examine and treat every pixel in an image individually without
having to do a FOR loop (which is not allowed in Band Math). The array operators
include the relational operators (LT, LE, EQ, NE, GE, GT), the Boolean operators
(AND, OR, NOT, XOR), and the minimum and maximum operators (<, >). These
operators are special because they operate simultaneously on every pixel in an image,
and thus return an image of the same dimensions as that passed into them (a Band
Math requirement). For example, to find all pixels with a negative value and replace
them with the value -999, you could use the following Band Math expression:
(b1 lt 0) * (-999) + (b1 ge 0) * b1

The relational operators return a one for true and a zero for false, so the portion of the
expression that reads (b1 lt 0) will return an array of the same dimensions as b1 filled
with ones where b1 was negative and zeros everywhere else. Multiplying this by the
replacement value (-999) affects only those pixels that met the criterion of being
negative. The second relational operator (b1 ge 0) is the complement to the first,
finding all of the pixels that are positive or zero, which is multiplied by their original
value and added to the replacement value array. Constructing Band Math expressions
with array operators like this provides a great deal of flexibility. See “Sample Band
Math Expressions” on page 317 for more examples.
The following table describes selected IDL array handling functions. For a complete
listing, see the IDL Reference Guide.

Category Available Functions

Basic Arithmetic Addition (+), subtraction (-), multiplication (*), and


division (/)
Trigonometric sin(x), cos(x), and tan(x)
Functions
Arcs: asin(x), acos(x), and atan(x)
Hyperbolics: sinh(x), cosh(x), and tanh(x)

Table 3-3: IDL Array Handling Functions

Band Math ENVI User’s Guide


Chapter 3: Basic Tools 317

Category Available Functions


Relational and Logical LT, LE, EQ NE, GE, GT
Operators
AND, OR, NOT, XOR
maximum (>) and minimum (<)
Data Type Conversions See Table 3-1 in “IDL is Dynamically Typed” on
page 312
Other Math Functions Exponent (^) and natural exponent (exp(x))
Natural Logarithm: alog(x)
Log Base 10: alog10(x)
Integer rounding: round(x), ceil(x), and floor(x)
Square Root: sqrt(x)
Absolute Value: abs(x)

Table 3-3: IDL Array Handling Functions (Continued)

Sample Band Math Expressions


Avoiding Integer Division
When performing division on bands that are not a floating-point data type, the results
are not rounded up or down, but simply truncated (the part of the number following
the decimal point is dropped). To avoid integer division, always promote the data type
to a floating-point.
b1 / float(b2)

If you want to keep the results of the division as an integer, it is usually better to carry
out the division as a floating-point operation then convert the results back to your
desired data type. For example, if your input bands are both byte data type and you
want to round up the result and store it as an integer, use the following expression:
fix( ceil( b1/float(b2) ) )

ENVI User’s Guide Band Math


318 Chapter 3: Basic Tools

Avoiding Integer Overflow


Integers have a limited dynamic range. If the Band Math operation is likely to
produce a number that is too large or small to be represented by the data type of your
input bands, then be sure to promote the data type accordingly. For example, if bands
b1 and b2 for this sample expression are byte data types, then the maximum possible
result could be as large as (255 * 255) = 65,025. Because bytes can only represent
values up to 255, the result should be promoted to an unsigned integer to ensure that
the correct values are returned, otherwise values larger than 255 will overflow and be
reported incorrectly.
uint(b1) * b2

To learn more about the dynamic range of IDL data types, see Table 3-1 in “IDL is
Dynamically Typed” on page 312.
Creating a Blended Image
Band Math is an easy way to experiment with blending multiple images together. For
example, if b1 and b2 are both byte data types, the above expression will produce a
new byte image that is weighted 80% by b2 and 20% by b1.
byte( round( (0.2 * b1) + (0.8 * b2) ) )

Using Array Operators to Selectively Modify an Image


Using IDL’s array operators its easy to selectively modify an image or combine data
from multiple image sources. In the following example, two images are combined to
remove clouds from a scene. Pixels in the image b1 with values greater than 200 are
assumed to be clouds and are replaced by the corresponding pixels from image b2.
(b1 gt 200)*b2 + (b1 le 200)*b1

The next example is a slightly more complicated expression but its use of array
operators is quite similar to the previous example. This expression uses several
criteria to create a binary mask identifying pixels that are predominantly clouds. This
algorithm can actually be used to create cloud masks from calibrated daytime
imagery from the Advanced Very High Resolution Radiometer (AVHRR) sensor. In
the expression, b4 (a thermal band) must be negative or b2 (a reflectance band) must
exceed 0.65 and the difference between bands b3 and b4 (a mid IR and thermal band)
must exceed 15 degrees. Because relational operators return a one for true, the mask
will have a value of one where there are clouds and zeros elsewhere.
(b4 lt 0) or ( b2 gt 0.65 AND (b3 - b4) gt 15 )

Band Math ENVI User’s Guide


Chapter 3: Basic Tools 319

Using the Maximum and Minimum Operators


The minimum and maximum operators are also array based operators, but unlike the
relational or Boolean operators they do not return true or false, but instead the actual
MAX or MIN value. In the following example, for every pixel in the image, the
greater of zero, b2 or b3 is added to b1. This ensures that the value that is added to b1
is always positive.
b1 + (0 > b2 > b3)

In the next example, the use of both the minimum and maximum operators clips the
data values in b1 at zero and one. No value in b1 will exceed one or fall below zero.
0 > b1 < 1

Writing Band Math User Functions


You can write a custom function in IDL, save it to a.pro or .sav file in the
save_add directory, and call it from the Enter an expression field of the Band Math
dialog. See “Writing Band Math User Functions” in the ENVI Programmer’s Guide
for further details and examples.

ENVI User’s Guide Band Math


320 Chapter 3: Basic Tools

Spectral Math
Use Spectral Math to apply mathematical expressions or IDL procedures to spectra
(and also to selected multiband images). The spectra can be from a multiband image
(that is, a Z Profile), a spectral library, or an ASCII file. For details, see “Spectral
Math” on page 857.

Spectral Math ENVI User’s Guide


Chapter 3: Basic Tools 321

Segmenting Images
Use Segmentation Image to segment an image into areas of connected pixels based
on the pixel DN value. You can enter a single DN or a range of DN values to use in
the segmentation. Either four or eight adjacent pixels are considered for the
connectivity and you can specify the minimum number of pixels that must be
contained in a region. Each connected region, or segment, is given a unique DN value
in the output image.

Figure 3-17: Example of a Segmentation Image

1. From the ENVI main menu bar, select Basic Tools → Segmentation Image.
The Input File dialog appears.
2. Select an input band and perform optional Spatial Subsetting, then click OK.
The Segmentation Image Parameters dialog appears.

ENVI User’s Guide Segmenting Images


322 Chapter 3: Basic Tools

3. In the Min Thresh Value and Max Thresh Value threshold fields, enter a
minimum and/or maximum threshold value in DN. If you enter only one value,
the data minimum or maximum is used as the other end of the threshold.
To use a single DN value, enter that value in both the Min Thresh Value and
Max Thresh Value threshold fields. Only pixels that fall within the entered
DN range will be considered in making the segmentation image. All other
pixels will have an output value of 0.
4. In the Population Minimum field, enter the minimum number of pixels in a
segment.
5. Use the Number of Neighbors toggle button to select either 4 or 8 neighbors
to consider for the connectivity.
6. Select output to File or Memory.
7. Click OK. ENVI adds the resulting output to the Available Bands List.

Segmenting Images ENVI User’s Guide


Chapter 3: Basic Tools 323

Defining ROIs
Regions of interest (ROIs) are portions of images, either selected graphically or
selected by other means such as thresholding. The regions can be irregularly-shaped
and are typically used to extract statistics for classification, masking, and other
operations. To perform ROI definition, you use the ROI Tool dialog. The topic
Defining Regions of Interest in Getting Started with ENVI describes how to open the
ROI Tool dialog, and how to turn off ROI definition. The sections that follow describe
how to define ROIs.

Drawing ROIs
The following ROI types are available in ENVI:
• Polygon
• Polyline
• Point
• Rectangle and square
• Ellipse and circle
• Multi Part (donut)
A single region can contain any combination of the six ROI types. Each type has
different mouse button functions.
1. Select one of the following options for the active display group:
• From the Display group menu bar, select Overlay → Region of Interest.
• From the Display group menu bar, select Tools → Region of Interest →
ROI Tool.
• From the ENVI main menu bar, select Basic Tools → Region of
Interest → ROI Tool.
• In the display group, right-click and select ROI Tool.
The ROI Tool dialog appears. To hide the ROI Tool dialog at any time without
erasing your ROIs, see “Showing and Hiding Overlay Dialogs and Layers” on
page 29.
2. Select the Window you want to use for adding the ROI. The choices are
Image, Scroll, and Zoom. To disable ROI mode, select Off.

ENVI User’s Guide Defining ROIs


324 Chapter 3: Basic Tools

3. From the ROI Tool dialog menu bar, select ROI_Type and select one of the
following options.
You can change the settings for how each ROI appears in the display group.
See “Editing ROI Attributes” on page 326 for descriptions.
Mouse buttons functions vary when you are in ROI mode. See “ROI Mouse
Button Functions” on page 324 for details.
• Polygon: (default) Left-click on the image or plot to add polygon vertices.
Right-click to complete the polygon.
• Polyline: Left-click on the image to add polyline vertices. Right-click to
complete the polyline.
• Point: Left-click on the image to add points.
• Rectangle: Left-click and drag on the image to draw the rectangle, or
middle-click to draw a square.
• Ellipse: Left-click and drag on the image to draw the ellipse, or middle-
click to draw a circle.
• Multi Part: On/Off: Use multi part mode to draw ROIs with holes in
them, or donut ROIs. You cannot draw multi part ROIs using point or
polyline ROIs. Left-click and drag on the image to draw the base shape.
Right-click to fill the ROI. Draw any number of additional ROIs or parts
within the first ROI to create holes (holes cannot cross the path of any
other shape within its group). The ROIs do not fill in when you right-click
the second time.
• Input Points from ASCII: See “Adding ASCII Data into ROIs” on
page 331.
4. After adding parts to the ROI, right-click a third time to accept the multi part
ROI. ENVI fills in the base ROI and removes the parts to reveal holes in the
base ROI.
5. Use the colored diamond-shaped handle if you need move the ROI to another
location.
6. Right-click to accept the ROI placement.

ROI Mouse Button Functions


When working with ROIs in display group windows, normal mouse operations in the
window you select for the ROI creation are disabled, but normal mouse operations

Defining ROIs ENVI User’s Guide


Chapter 3: Basic Tools 325

still apply in all other windows. To temporarily suspended drawing ROIs, select the
Off radio button in the ROI Tool dialog, to return to normal mouse operations.

Mouse
Function
Button

Left Click to place the ROI on the image.


For polygons or polylines: Click to add vertices. Optionally, you
can click and drag to draw a line or polygon.
For rectangles or ellipses: Click and drag to draw a rectangle or
ellipse.
Click and hold, then drag the diamond-shaped handle to move the
ROI.
Middle For rectangles or ellipses: Click and drag to draw a square or circle.
Click on an ROI that has not been accepted (set in place) to delete
it.
For polygons or polylines: Click to delete the last vertex added
(repeat to delete all vertices, one at a time).
Click to select part of an ROI to delete.
Right Click to accept the ROI placement.
For polygons: Right-click once to close the polygon, then right-
click a second time to set the placement.
For polylines: Right-click once to set the last vertex, then right-
click a second time to set the placement of the polyline.
For points: Right-click to delete all points in the ROI.
For multipart: Click three times after the ROI_Type → Multi
Part: On option is set to accept the multipart ROI.

Table 3-4: Mouse Button Functions – ROIs

Note
If you have multiple images of the same size displayed and their associated ROI
Tool dialogs open at the same time, any ROIs drawn in one image display also
display in the other images.

ENVI User’s Guide Defining ROIs


326 Chapter 3: Basic Tools

Editing ROI Attributes


You can view or edit any ROI properties with the table in the ROI Tool dialog. The
table contains the following columns:
• current selection: An asterisk signifies the currently active ROI. Select in the
cell of an ROI row to make it active.
• ROI Name: Contains the name of each ROI. To edit the ROI names, click in
the cells of this column.
• Color: Contains the color assigned to each ROI. You can use any of the
following methods to change the color of an ROI.
• Right-click in a cell to display the color menu.
• Left-click in a cell to enter a valid ENVI graphics color name. All of the
valid color names are provided in the color menu. If the color entered in
the cell is not valid, it is replaced by a default color.
• Left-click in a cell to enter an RGB triplet (such as 255, 0, 0 for red). If an
RGB triplet is provided, the closest valid ENVI graphics color is used.
You can also set the default ENVI colors for all the ROIs by right-clicking in
the Color column title and selecting the Assign default colors option. The
right-click menu can also be used to set all the ROIs to the same color.
• Pixels: Displays the total number of image pixels for each ROI. You cannot
edit these values.
• Polygons, Polylines, and Points: Display the total number of ROI types and
the number of pixels in each ROI type. You cannot edit these values.
• Fill: This column specifies the fill pattern for each polygon ROI. You can
change the fill pattern of a polygon ROI by right-clicking in the cell of the fill
pattern to change. You can set the same fill pattern for all of the polygon ROIs
by right-clicking in the column title.
• Orien and Space: These columns display the orientation and spacing of stripes
in non-solid filled polygon ROIs. If the fill pattern for polygon ROIs exists and
is non-solid, you can change these values by right-clicking in these cells. You
can set the same value for all of the non-solid filled polygon ROIs by right-
clicking in the column title for each property.

Creating New Regions


You can draw multiple ROIs in any display group window.

Defining ROIs ENVI User’s Guide


Chapter 3: Basic Tools 327

If you have multiple images of the same size displayed and their associated ROI Tool
dialogs open at the same time, any ROIs drawn in one image display also display in
the other images.
1. To start a new ROI, click New Region in the ROI Tool dialog. A new name
appears in the Available Regions of Interest table. The new region uses the next
color in the graphics colors list by default.
2. Select the ROI type and draw the ROI.
3. Edit the ROI as needed.

ROI Options
In the ROI Tool dialog, you have many options to choose from when working with
ROIs. You can input ASCII points into an ROI, create multiple ROIs, report ROI
statistics, measure distances and area, report the areas of the ROIs, load, erase, delete,
plot means, merge regions, reconcile ROIs, and perform band thresholds to ROIs.
If the ROI displays in more than one image (of the same spatial size), any edits are
reflected in all of those images.

Hiding and Showing ROIs


Hiding an ROI removes it from the display, but the region of interest is still defined.
To hide a selected ROI overlay from the selected image, select one or more ROIs in
the Available Regions of Interest table, then click Hide ROIs. To re-display these
ROIs on the image, click Show ROIs. The Show ROIs dialog appears. This dialog
enables you to select which ROIs to re-display on the image and in the table.
To hide all ROI overlays from the current display, click Select All then click Hide
ROIs.

ENVI User’s Guide Defining ROIs


328 Chapter 3: Basic Tools

Deleting ROIs
Use the Tools menu on the Display group menu bar, the Delete ROI or Delete Part
buttons in the ROI Tool dialog, or the Basic Tools menu on the ENVI main menu bar
to delete ROIs.
Note
If the ROI to delete displays in more than one image (for images of the same spatial
size), deleting it from one deletes it from all. When the ROIs are deleted, they
cannot be recovered unless they are saved to a file.

Deleting ROIs from the ROI Tool Dialog


• To delete part of an ROI, select the ROI in the table. Use the middle mouse
button to select the ROI in the Zoom window or click Goto to locate the ROI,
then click Delete Part.
• To delete a selected ROI, select one or more ROIs in the table, then click
Delete ROI.
• To delete all ROIs listed in the ROI Tool dialog and remove them from the
system, click Select All, then click Delete ROI. The ROIs are deleted from all
displays of the same spatial size and from their associated ROI Tool dialogs.
ENVI erases the unsaved ROIs from the displays and deletes them from the system.
The ROIs do not appear in the ROI Tool dialog after being deleted.
Deleting Saved ROIs
1. Select one of the following options:
• From the ENVI main menu bar, select Basic Tools → Region of
Interest → Delete ROIs.
• From the Display group menu bar, select Tools → Region of Interest →
Delete ROIs.
The Delete Regions dialog appears.
2. Select the names of the regions to delete.
3. Click OK.

Locating Defined ROIs


To center the Zoom window over the first pixel defined in an ROI:

Defining ROIs ENVI User’s Guide


Chapter 3: Basic Tools 329

1. From the ROI Tool dialog menu bar, select an ROI in the ROI Tool dialog table
and click Goto.
2. Continue clicking Goto to move the Zoom window over each pixel contained
in that ROI.

Displaying ROI Statistics


1. From the ROI Tool dialog menu bar, select one or more ROIs in the Available
Regions of Interest table.
2. Click Stats. The ROI Statistics Results dialog appears. This dialog is similar to
the Statistics Results dialog (see “Viewing Statistics Reports” on page 278)
and contains the same functions. However, the ROI Statistics Results dialog
also contains additional sections for reporting multiple instances of statistical
information:
The File menu contains the following additional options:
• Save current ROI result to ENVI stats file: Saves the statistics report for the
ROI specified in the Stats for section of the ROI Statistics Results dialog to an
ENVI statistics file. The Save Current ROI Result to ENVI Stats File dialog
appears. Enter the name of the statistics file (the default file extension for
ENVI statistics files is .sta) and click OK.
• Save ROI results to text file: Saves the statistics report for the ROI specified
in the Stats for section of the ROI Statistics Results dialog to a text file. The
Save Current ROI Result to Text File dialog appears. Enter the name of the text
file and click OK.
Tip
The resulting text file is tab-delimited for easy import into external
spreadsheet programs, such as Excel.

• Save all ROI results to ENVI stats files: Saves the statistics reports for all the
ROIs to separate ENVI statistics files. The Save All ROI Results to ENVI Stats
Files dialog appears. Enter the root name of the statistics files (the default file
extension for statistics files is .sta) and click OK. The statistics report for
each class or region is saved to individual files. The individual files have the
same root name that you specified and are appended with their appropriate
ROI number.
• Save all ROI results to text file: Saves the statistics report for all the ROIs to a
text file. The Save All ROI Results to Text File dialog appears. Enter the name
of the text file and click OK.

ENVI User’s Guide Defining ROIs


330 Chapter 3: Basic Tools

Tip
The resulting text file is tab-delimited for easy import into external
spreadsheet programs, such as Excel.

The Stats for button contains a list of the available ROIs. The ROI Statistics Results
dialog reports the calculated statistics (in both the plot and text sections) of the ROI
specified by this menu. To compare statistics for different ROIs with the current ROI
shown in the Statistics Results dialog, use the Options → Copy results to new
window option to create a copy of the ROI Statistics Results dialog for the current
ROI, then use the Stats for menu to display a different ROI in the newly created
dialog.
The Select Plot drop-down button also contains the following additional options:
• Mean for all ROIs: Displays a plot of the means of all the ROIs.
• Stdev for all ROIs: Displays a plot of the standard deviations of all the ROIs.
• Eigenvalues for all ROIs: Displays a plot of the eigenvalues of all the ROIs.
• Histogram for all ROIs: Displays a plot of the histogram of all ROIs for a
chosen band of data.

Displaying ROI Statistics for All Regions


To display the statistics for all defined ROIs, choose Select All then click Stats in the
ROI Tool dialog. An ROI Statistics Results dialog containing the statistics for all the
ROIs appears.

Growing ROIs
You can grow ROIs to neighboring pixels using a specified threshold. The threshold
is determined by specifying a number of standard deviations away from the mean of
the drawn region. You can use either 4 or 8 neighboring pixels to determine the
growth pattern. It is calculated using the displayed band for a gray scale display, or
the red band for a color display.
Note
All grown ROIs are output as points, regardless of the starting ROI type.

1. In the ROI Tool dialog table, select the name of the ROI to grow.
Within the current Image window, neighboring pixels that fall within the
standard deviation threshold are included in the grown region. Adjacent pixels

Defining ROIs ENVI User’s Guide


Chapter 3: Basic Tools 331

outside the current Image window, regardless of pixel value, are not included
in the ROI.
2. Click Grow. The new grown ROI is shown in the Image window. A prompt
asks if you want to keep the resulting grown ROI.
3. Select Yes to grow the ROI with all of the points shown. Select No to return the
ROI to its original size.
If you select No, the Region Growing dialog appears. Change the values of the
standard deviation multiplier and the number of neighbors, if desired.
4. Click OK.

Converting Shape-Based ROIs to Raster


Use the Pixel button to convert polygons, ellipses, rectangles, and polylines to a
collection of editable points. This allows you to remove single points from polygons,
rectangles, and so forth.
1. Draw a polygon or other ROI shape, or select an existing ROI to convert into a
collection of points.
2. Click Pixel in the ROI Tool dialog.
3. Select ROI_Type → Point from the ROI Tool dialog menu bar. You can now
edit individual pixels within the ROI using standard point editing techniques
with the mouse.

Adding ASCII Data into ROIs


You can input ASCII data points into a new or an existing ROI, select the ROI type,
and select the associated map projection information.
Tip
To input the ASCII data points into a new region, click New Region before
completing the following procedure.

1. From the ROI Tool dialog menu bar, select ROI_Type → Input Points from
ASCII. The Enter ASCII Points Filename dialog appears.
2. Select an input ASCII filename. The Input ASCII File dialog appears.
3. Enter the column numbers for the x and y point coordinates.
4. Select the type of ROI that the points define from the These points comprise
drop-down list. For polygon and polyline ROIs, the ASCII points define the
vertices of the ROI.

ENVI User’s Guide Defining ROIs


332 Chapter 3: Basic Tools

5. Select whether the input coordinates are Pixel Based or Map Based. If you
select Map Based, select the projection type and enter the zone and datum
information as necessary by clicking Zone and Datum.
6. Click OK.

Merging Regions
To merge multiple defined ROIs into one:
1. From the ROI Tool dialog menu bar, select Options → Merge Regions. The
Merge ROIs dialog appears with two lists of all defined regions.
2. Under Choose Base ROI to Merge, select the name of a region.
3. Under the Choose ROIs to Merge list, select the names of the regions to
merge into the base region.
4. Click the Delete Merged ROIs? toggle button to select whether or not to
delete the individual regions being merged after they are merged. The color of
the other ROIs change to that of the base ROI and the other names are removed
from the ROI Tools dialog table.
5. Click OK.

Intersecting Regions
Use Intersect Regions to create a point type region of interest that contains only the
points where two or more ROIs intersect in an image.
You can also calculate ROI intersections on-the-fly and use them when building a
mask. For more information, see “Including ROI Intersections” on page 353.
To intersect ROIs:
1. From the ROI Tool dialog menu bar, select Options → Intersect Regions. The
ROI Intersection dialog appears.
2. Select the names of the intersecting ROIs to include in the new ROI. Only
select regions that intersect. If a non-intersecting ROI is selected, an error
occurs.
3. Click OK. The new ROI appears in the Available Regions of Interest list. It is a
point type ROI and displays under any overlying polygon ROIs.
Tip
If you cannot see the new point ROI in the Image window, erase all other ROIs and
re-display the new ROI.

Defining ROIs ENVI User’s Guide


Chapter 3: Basic Tools 333

Reporting ROI Areas


To get a report of the area covered by each ROI in one of these units: meters,
kilometers, feet, yards, miles or nautical miles:
1. From the ROI Tool dialog menu bar, select Options → Report Area of
ROIs → unit_type.
2. If the pixel size of the image is not stored in the header, a dialog appears. Enter
the x and y pixel size in meters.
The ROI Area Info dialog appears, listing each ROI name and corresponding area. To
save ROI Area Information to an ASCII File, perform the following steps.
1. In the ROI Area Info dialog, select File → Save Text to ASCII.
2. Enter a filename.
3. Click OK.

Reporting ROI Measurements


Use the ROI Measurement tool to produce a report on the distance between points in
a polygon or polyline, and to get perimeter and area measures for polygons,
rectangles, and ellipses.

Figure 3-18: ROI Measurement Report Dialog

Tip
To take measurements of an image without using the ROI functions, see
“Measurement Tool” on page 303.

ENVI User’s Guide Defining ROIs


334 Chapter 3: Basic Tools

1. From the ROI Tool dialog menu bar, select Options → Measurement Report.
A blank ROI Measurement Report dialog appears. As you draw the ROI, the
ROI Measurement Report dialog lists the measurements, which differ
depending on the active ROI type.
2. Draw the ROIs as described in “Drawing ROIs” on page 323 for specific ROI
types.
• In Polygon mode, the report lists the distance between the vertices, the
perimeter, and the total area when the polygon is closed.
• In Polyline mode, the report lists the distance between the vertices and the
total distance when the polyline is completed.
• No distance measurements are given when in Point mode.
• In Rectangle mode, the report lists the lengths of the sides, the perimeter,
and total area.
• In Ellipse mode, the report lists the circumference and total area.
Selecting Measurement Units
In the ROI Measurement Report dialog, use the Units menu to select the unit the ROI
is measured in. The choices are pixels, meters, kilometers, feet, yards, miles, and
nautical miles.
1. Select Units → unit_type.
2. If the pixel size of the image is not stored in the header, and you select any unit
except pixel, complete these steps when the Input Display Pixel Size dialog
appears.
A. In the X Pixel Size and Y Pixel Size fields, type the size of the pixels in
your image.
B. From the Units menu, select the unit type.
C. Click OK.
Measuring ROI Area
In the ROI Measurement Report dialog, use the Area menu to measure the area of the
ROI in acres, hectares, or units2 (for example, meters2). Select Area → Acres or
Hectares.

Defining ROIs ENVI User’s Guide


Chapter 3: Basic Tools 335

ROI Measurement Options


In the ROI Measurement Report dialog, use the Options menu to select whether the
measurement information is reported as line segments (the default) or as point
coordinates.
• To get a listing of the vertices coordinates, select Options → Report as
Points. The coordinates are reported as a pixel location (Pixel (x,y)).
• To get a listing of the line segment distances, select Options → Report as
Segments.
• For images that are georeferenced, you may list the coordinates as map
coordinates or as latitude and longitude coordinates by selecting Options →
Georef Map (x,y) or Georef (Lat/Lon).
• To output the list of coordinates to a file, select File → Save Points to ASCII.
Saving Measurement Reports
In the ROI Measurement Report dialog, use the File menu to save the ROI
measurement report to an ASCII file and to close the dialog.
1. In the ROI Measurement Report dialog, select File → Save Points to ASCII.
2. Enter an output filename.

Reconciling ROIs
In the ROI Tool dialog, use Reconcile ROIs to apply ROIs defined in one image size
to different sized images.
Tip
When using Reconcile ROIs, ROIs can only be reconciled to images with the same
pixel size as the original image. To reconcile ROIs to an image with a different pixel
size, use Reconcile ROIs via Map.

1. Select one of the following options:


• From the ROI Tool dialog menu bar, select Options → Reconcile ROIs.
• From the Display group menu bar, select Tools → Region of Interest →
Reconcile ROIs.
• From the ENVI main menu bar, select Basic Tools → Region of
Interest → Reconcile ROIs.
The Reconcile ROIs Parameters dialog appears.

ENVI User’s Guide Defining ROIs


336 Chapter 3: Basic Tools

Figure 3-19: Reconcile ROIs Parameters Dialog

2. To manually designate the spatial dimensions for the new ROIs:


A. Enter the difference in pixels between the origin of the image where the
ROIs were drawn and the origin of the new image into the xoffset and
yoffset fields.
B. Enter the number of samples and lines in the new image into the
appropriate fields.
3. To have ENVI calculate the x and y offsets and the number of samples and
lines automatically:
A. Click Set Values from Source/Destination Files. The Input File dialog
appears.
B. Choose the file where the ROI was originally drawn.
C. Click OK. The Input File dialog appears.
D. Select a destination file for the ROIs.

Defining ROIs ENVI User’s Guide


Chapter 3: Basic Tools 337

E. Click OK. The Reconcile ROIs Parameters dialog appears.


4. Click OK. The ROIs are listed in the ROI Tool dialog and are automatically
loaded onto the new image.

Reconciling ROIs via Map


Use Reconcile ROIs via Map to use ROIs defined in one georeferenced image in
another overlapping georeferenced image, regardless of differences in image or pixel
sizes between the two images.
1. Select one of the following options:
• From the ROI Tool dialog menu bar, select Options → Reconcile ROIs
via Map.
• From the Display group menu bar, select Tools → Region of Interest →
Reconcile ROIs via Map.
• From the ENVI main menu bar, select Basic Tools → Region of
Interest → Reconcile ROIs via Map.
The Reconcile ROIs via Map Parameters dialog appears.
2. Select the ROI names.
3. Click OK.
4. Select the georeferenced file to which you want the ROIs reconciled.
5. Click OK. The ROIs are listed in the ROI Tool dialog and automatically loaded
onto the new image.

Converting Band Values to ROIs


Use Band Threshold to ROI to convert specific image values and ranges of values to
ROIs.
1. Select one of the following options:
• From the ROI Tool dialog menu bar, select Options → Band Threshold
to ROI.
• From the Display group menu bar, select Tools → Region of Interest →
Band Threshold to ROI.
• From the ENVI main menu bar, select Basic Tools → Region of
Interest → Band Threshold to ROI.
The Band Threshold to ROI Input Band dialog appears.

ENVI User’s Guide Defining ROIs


338 Chapter 3: Basic Tools

2. Select a band to threshold. The Band Threshold to ROI Parameters dialog


appears.
3. To make an ROI using those pixels greater than or equal to the entered
minimum value, enter only the Min Thresh Value.
4. To select those pixels less than or equal to the entered maximum value, enter
only the Max Thresh Value.
5. To select pixels that fall within a specified range of values, enter both a
minimum and a maximum threshold value.
6. To assign an ROI name, edit the ROI Name text entry.
7. To change the color of the ROI, select the color from ROI Color drop-down
list.
8. Click OK. A warning dialog appears and list the number of pixels that satisfy
the threshold criteria.
9. Click OK to accept and load the ROI. ENVI lists the region in the ROI Tool
dialog as a Thresh Bandname, where Bandname is the name of the band to
use to extract the ROI. The number of pixels in the region are also listed.

Calculating Buffer Zone Images for ROIs


Use Calculate Buffer Zone to calculate a buffer zone image from the original image.
In the resulting buffer zone image, every pixel has a floating-point or integer value
that is defined as the distance from that pixel to the nearest pixel of the selected ROI.
You designate a maximum distance value and the result is that any pixels with a
distance larger than that value are set to the maximum distance value.
1. From the ROI Tool dialog menu bar, select Options → Calculate Buffer
Zone. The Buffer Zone Image Parameters dialog appears.
If the image has more than one ROI associated with it, the Input Buffer Zone
ROIs dialog appears. Select the names of the ROIs to include in the buffer zone
image calculation and click OK. If you select more than one ROI, the distance
calculated is from the pixel to the nearest selected ROI.
2. Use the Maximum Distance field to set the maximum distance to measure (in
pixels). Any pixels with a distance larger than this value is set to the maximum
distance value +1.
3. From the Distance Kernel drop-down button, select either Floating Point or
Integer output.

Defining ROIs ENVI User’s Guide


Chapter 3: Basic Tools 339

4. Select output to File or Memory.


5. Click OK.

Creating Class Images from ROIs


Use Create Class Image from ROIs to convert selected ROIs into an ENVI
classification image. The class colors are the same as the ROI colors.
1. Select one of the following options:
• From the Display group menu bar, select Tools → Regions of Interest →
Create Class Image from ROIs.
• From the ROI Tool dialog menu bar, select Options → Create Class
Image from ROIs.
• From the ENVI main menu bar, select Classification → Create Class
Image from ROIs.
• From the ENVI main menu bar, select Basic Tools → Region of
Interest → Create Class Image from ROIs.
The Classification Image from ROIs dialog appears.
2. In the list of ROIs, select the ROIs.
3. Click OK. The Classification Image from ROIs Parameters dialog appears.
Note
To change the output classification image DN (Digital Number) value of an
ROI, select the ROI and use the increase/decrease buttons to enter a new DN
value.

4. Enter an output filename.


5. Click OK. ENVI adds the resulting output to the Available Bands List.

Computing ROI Separability


The Compute ROI Separability option computes the spectral separability between
selected ROI pairs for a given input file. Both the Jeffries-Matusita and Transformed
Divergence separability measures are reported. These values range from 0 to 2.0 and
indicate how well the selected ROI pairs are statistically separate. Values greater than
1.9 indicate that the ROI pairs have good separability. For ROI pairs with lower
separability values, you should attempt to improve the separability by editing the
ROIs or by selecting new ROIs. For ROI pairs with very low separability values (less
than 1), you might want to combine them into a single ROI.

ENVI User’s Guide Defining ROIs


340 Chapter 3: Basic Tools

Reference:
J.A. Richards, 1999, Remote Sensing Digital Image Analysis, Springer-Verlag,
Berlin, p. 240.
The following steps show how you can use the Compute ROI Separability option to
compute the spectral separability between selected ROI pairs.
1. Select one of the following options:
• From the ROI Tool dialog menu bar, select Options → Compute ROI
Separability.
• From the Display group menu bar, select Tools → Regions of Interest →
Compute ROI Separability.
• From the ENVI main menu bar, select Basic Tools → Region of
Interest → Compute ROI Separability.
The Input File dialog appears.
2. Select an input file and perform optional Spectral Subsetting, then click OK.
3. The ROI Separability Calculation dialog appears.
4. In the dialog, select ROIs for the separability calculation.
5. Click OK. The separabilities are calculated and reported in a report dialog.
Both the Jeffries-Matusita and Transformed Divergence values are reported for
every ROI pair. The bottom of the report shows the ROI pair separability
values listed from the least separable pair to the most separable.
6. To save the report to an ASCII file, select File → Save Text to ASCII.

Managing ROI Files


Use the File menu in the ROI Tool dialog to save and restore ROI information to an
ENVI ROI file (default file extension .roi) and to export ROIs to ENVI vector files
(.evf).

Saving ROIs to Files


To save ROIs currently in memory to a file:
1. Select one of the following options:
• From the ROI Tool dialog menu bar, select File → Save ROIs.
• From the Display group menu bar, select Tools → Region of Interest →
Save ROIs to File.

Defining ROIs ENVI User’s Guide


Chapter 3: Basic Tools 341

• From the ENVI main menu bar, select Basic Tools → Region of
Interest → Save ROIs to File.
The Save ROIs to File dialog appears.
2. Select the ROIs to save. Only ROIs that were defined in images with the same
dimensions as those in the current display appear in the ROI list. ROIs of other
dimensions remain in memory.
3. Enter a filename or choose an existing output filename (with the extension
.roi for consistency).
4. Click OK.

Restoring Saved ROIs


1. To restore all of the saved ROIs, select one of the following options:
• From the ROI Tool dialog menu bar, select File → Restore ROIs.
• From the Display group menu bar, select Tools → Region of Interest →
Restore Saved ROI File.
• From the ENVI main menu bar, select Basic Tools → Region of
Interest → Restore Saved ROI File.
The Input File dialog appears.
2. Select the ROI file. ENVI loads the ROI into the display group and the ROI
Tool dialog of every image of the same spatial size.
When you restore ROIs using Basic Tools → Region of Interest → Restore Saved
ROI File, a message appears when the file is restored, but no ROIs appear in the
image until you open the ROI Tool dialog.

Selecting Multiple ROIs for Restoration


You can restore multiple selected ROIs from the Enter ROIs Filenames dialog when
restoring saved ROIs.
1. Select one of the following options:
• From the ROI Tool dialog menu bar, select File → Restore ROIs.
• From the Display group menu bar, select Tools → Region of Interest →
Restore Saved ROI File.
• From the ENVI main menu bar, select Basic Tools → Region of
Interest → Restore Saved ROI File.

ENVI User’s Guide Defining ROIs


342 Chapter 3: Basic Tools

The Input File dialog appears.


2. Select multiple ROIs. ENVI loads the selected ROIs into the display group and
the ROI Tool dialog of every image of the same spatial size.

Subsetting Data via ROIs


To subset an image file based on the bounding box (that is, the area encompassing) an
ROI or group of ROIs currently drawn on an image, follow these steps:
1. From the ROI Tool dialog menu bar, select File → Subset Data via ROIs. The
Input File dialog appears.
2. Select the file to subset. The Spatial Subset via ROI Parameters dialog appears.

Figure 3-20: Spatial Subset via ROI Parameters Dialog

3. To apply Spectral Subsetting to the input file, click Spectral Subset.


4. Select the input ROIs.

Defining ROIs ENVI User’s Guide


Chapter 3: Basic Tools 343

5. Use the Mask pixels outside of ROI? toggle button to select whether or not to
mask pixels that do not fall within the ROI. If you select Yes, enter a
background value.
6. Select output to File or Memory.
7. Click OK. ENVI adds the resulting output to the Available Bands List.

Exporting ROIs to ENVI Vector Files


Use Export ROIs to EVF to export ROIs to ENVI vector files (.evf). All of the
ROIs selected are exported as separate records in a single layer. If the file associated
with the ROI is georeferenced, the vector layer is in the same projection.
1. Select one of the following options:
• From the ROI Tool dialog menu bar, select File → Export ROIs to EVF.
• From the Display group menu bar, select Tools → Region of Interest →
Export ROIs to EVF.
• From the ENVI main menu bar, select Basic Tools → Region of
Interest → Export ROIs to EVF.
The Export Regions to EVF dialog appears.
2. Select the ROIs to export.
3. Select how ROI points should be treated: each point as a separate vector
record, or with all points as one vector record.
4. Enter the Layer Name.
5. Select output to File or Memory.
Note
The vectors appear to be shifted one half pixel to the Southeast because ENVI
interprets the map coordinate of the vector node to be the upper left hand corner of
the raster pixel (versus treating the address as the center of the pixel).

ENVI User’s Guide Defining ROIs


344 Chapter 3: Basic Tools

Exporting ROIs to the n-D Visualizer


Use Export ROIs to n-D Visualizer to export selected ROIs to the n-D Visualizer so
you can see the distribution of the points within your ROIs and between your ROIs.
This option is very useful for checking the separability of your classes when you use
ROIs as input into supervised classifications.
1. Select one of the following options:
• From the ROI Tool dialog menu bar, select File → Export ROIs to n-D
Visualizer.
• From the ENVI main menu bar, select Basic Tools → Regions of
Interest → Export ROIs to n-D Visualizer.
The Select Input Data File dialog appears.
2. Select the input file that the ROIs are associated with.
3. Click OK. The n-D Visualizer Input ROIs dialog appears.
4. Select an ROI to export. To select all of the ROIs, click Select All Items.
5. Click OK. An n-D Visualizer window and n-D Controls dialog appear.
6. Select the band numbers to select those bands for rotation.
7. Click Start. The pixels for the selected ROIs appear in the n-D Visualizer
window in the same colors as the ROIs.
Note
For good classification results using these ROIs, the groups of pixels for the
different ROIs should be separate from each other and should not overlap.

If the pixels overlap, edit the groups of pixels by selecting the appropriate
colors from the Class menu to add pixels to an ROI or by selecting White to
remove pixels from an ROI.

8. From the n-D Controls dialog menu bar, select Options → Export Class or
Export All to export the colored pixels back to the ROI Tool dialog so you can
import them into classifications.
For details about the n-D Visualizer, see “The n-D Visualizer” on page 754.

Exporting ROIs to ASCII


Use Output ROIs to ASCII to output ROIs to an ASCII text file. You can edit the
ASCII file format prior to output by selecting the parameters to include in the file.

Defining ROIs ENVI User’s Guide


Chapter 3: Basic Tools 345

You can also output map information, latitude and longitudes, and band data values
for every ROI location. Prior to output, you can select which parameters to include in
the ASCII file. The output is formatted into columns for easy input into spread sheets.
For an example of an ROI ASCII file, see “Example of ASCII Output” on page 346.
1. Select one of the following options:
• From the ROI Tool dialog menu bar, select File → Output ROIs to
ASCII.
• From the Display group menu bar, select Tools → Region of Interest →
Output ROIs to ASCII.
• From the ENVI main menu bar, select Basic Tools → Region of
Interest → Output ROIs to ASCII.
The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Output ROIs to ASCII Parameters dialog
appears.
3. Select the ROIs to output.
4. Click Edit ASCII Output Form to set parameters. The Output ROI Values to
ASCII dialog appears.
5. Set the parameters by selecting/clearing the corresponding check box. By
default, all parameters are selected for output.
• Point #: Include a label with the output.
• ROI Location: Include the ROI location information in the output. Use
the ROI Location toggle button to select whether the ROI location is
output by 1D locations or by sample/line. Pointers to each of the pixels
contained in the selected ROIs are output to the ASCII file. The pointers
are the 1D addresses to the pixel locations in the file where a 1D address
equals the line number times the number of samples plus the sample
number.
• Map Location: Include geographic location information for
georeferenced data. Use the Map Location toggle button to designate
output of the geographic locations in normal or scientific notation. Use the
increase/decrease buttons to set the number of significant digits.

ENVI User’s Guide Defining ROIs


346 Chapter 3: Basic Tools

• Geo Location: Include geographic (lat/lon) location information for


georeferenced data. Use the Geo Location toggle button to designate
output of the geographic locations in normal or scientific notation. Use the
increase/decrease buttons to set the number of significant digits.
• Bands: Include the band DN values for all input bands. Each band value
goes in its own column in the output ASCII file.
6. Click OK.
7. Enter an output filename.
8. Click OK.
Example of ASCII Output
Here is an example of ROIs output to an ASCII file:
;ENVI Output of ROIs (3.4) [Mon Apr 17 17:00:26 2000]
;Number of ROIs: 1
;File Dimension: 512 x 512
;
; ROI name: Region #1
; ROI rgb value: {255, 0, 0}
; ROI npts: 409
; ID X Y Map X Map Y Lat Lon B1 B2
B3 B4 B5 B6
1 179 243 282977.65 4899997.33 44.222839 -107.716970 11 10
9 46 16 10
2 180 243 283006.15 4899997.33 44.222848 -107.716614 9 10
8 47 15 7
3 178 243 282949.15 4899997.33 44.222831 -107.717327 10 10
8 48 14 8
4 178 244 282949.15 4899968.83 44.222574 -107.717315 10 10
8 48 13 6
5 179 244 282977.65 4899968.83 44.222583 -107.716959 10 11
10 46 16 8
6 177 244 282920.65 4899968.83 44.222566 -107.717671 10 10
8 47 13 6
7 180 244 283006.15 4899968.83 44.222591 -107.716602 10 9
8 48 14 6
8 181 244 283034.65 4899968.83 44.222600 -107.716246 9 9
7 48 12 6
9 182 244 283063.15 4899968.83 44.222608 -107.715889 10 10
8 47 14 7
10 183 244 283091.65 4899968.83 44.222617 -107.715533 9 10
7 49 14 6
11 184 244 283120.15 4899968.83 44.222625 -107.715177 9 9
6 50 12 4

Defining ROIs ENVI User’s Guide


Chapter 3: Basic Tools 347

12 176 245 282892.15 4899940.33 44.222301 -107.718016 10 10


8 47 15 8
13 177 245 282920.65 4899940.33 44.222310 -107.717660 10 10
8 46 14 8
14 178 245 282949.15 4899940.33 44.222318 -107.717303 10 10
7 48 13 6
15 179 245 282977.65 4899940.33 44.222327 -107.716947 10 10
8 47 15 8

ENVI User’s Guide Defining ROIs


348 Chapter 3: Basic Tools

Mosaicking Images
Use Mosaicking to mosaic both pixel-based and georeferenced images.
You may also access this function from the Map menu. For details about using this
function, see “Image Mosaicking” on page 919.
1. From the ENVI main menu bar, select Basic Tools → Mosaicking → Pixel-
Based or Georeferenced.
2. From the Import menu, select images for the mosaic. The Input File dialog
appears.
3. Select the file. Load as many files as needed for the mosaic.
4. Position each one in the output file by either entering the upper-left corner
coordinate or by clicking and dragging the schematic image outline for each
image to the desired location (see “Image Mosaicking” on page 919 for a more
detailed description).
5. Click OK.

Opening Mosaic Tiled QuickBird Files


Large QuickBird datasets are split into tiles. A QuickBird tile file (.til) is usually
provided as a descriptive header for these tiles. The tile file contains information
about the number of tiles, the name of each tile, and their spatial relationship to one
another. ENVI uses this file to access the tiles and automatically create a virtual
mosaic of the entire dataset. The resulting dataset can then be used as a single entity
within ENVI.
To read a QuickBird tile file and automatically create a virtual mosaic of its tiles, use
the steps in “Opening QuickBird Mosaic Tiled Files” on page 166.

Opening Mosaic Tiled WorldView Files


Large WorldView-1 and WorldView-2 datasets are split into tiles. A WorldView tile
file (.til) is usually provided as a descriptive header for these tiles. The tile file
contains information about the number of tiles, the name of each tile, and their spatial
relationship to one another. ENVI uses this file to access the tiles and automatically
create a virtual mosaic of the entire dataset. The resulting dataset can then be used as
a single entity within ENVI.
To read a WorldView tile file and automatically create a virtual mosaic of its tiles, use
the steps in “Opening WorldView Mosaic Tiled Files” on page 168.

Mosaicking Images ENVI User’s Guide


Chapter 3: Basic Tools 349

Creating Masks
Use Masking to create image masks. A mask is a binary image that consists of values
of 0 and 1. When a mask is used in a processing function, ENVI includes the areas
with values of 1 and ignores the masked 0 values in the calculations.
Masking is available for selected ENVI functions, including: statistics, classification,
Linear Spectral Unmixing, Matched Filtering, Continuum Removal and Spectral
Feature Fitting.

Figure 3-21: Example Mask Image from a Data Range and Imported ROI

ENVI User’s Guide Creating Masks


350 Chapter 3: Basic Tools

Building Masks
Use Build Mask to build image masks from specific data values (including the data
ignore value), ranges of values, finite or infinite values, ROIs, ENVI vector files
(EVFs), and annotation files. You can use any combination of input to define a mask
and you can permanently apply a mask to an image.

Setting Mask Sizes


You can set the size of the mask to the same size as a displayed image or to the size
parameters that you enter manually:
1. From the ENVI main menu bar, select Basic Tools → Masking → Build
Mask. The Mask Definition Input dialog appears.
2. Select a display number or select No Display. The Mask Definition dialog
appears. If a display number was selected, the number of samples and lines are
automatically entered in the Samples and Lines parameters.
If no display groups are open, or if you selected No Display, the Mask
Definition dialog appears directly and you must enter the number of samples
and lines to define the size of the mask image.

Creating Masks ENVI User’s Guide


Chapter 3: Basic Tools 351

Figure 3-22: Mask Definition Dialog

If the input file has a data ignore value, then the dialog opens with the value
automatically added to the Selected Attributes for Mask list. The two
numbers shown with the filename indicate the data ignore value in the file, and
the bracketed word [All] refers to which bands in a multiband file must contain
the data ignore value in order for a pixel to be masked.

Masking Options
Options in the Mask Definition dialog include importing data values, importing
annotations, masking finite values, masking non-numbers and infinite data values,
using ROIs and EVFs with the mask, and selecting areas for masking.

Importing Data Values and Ranges


1. From the Mask Definition dialog menu bar, select Options → Import Data
Range. The Select Input for Mask Data Range dialog appears.

ENVI User’s Guide Creating Masks


352 Chapter 3: Basic Tools

2. Use this dialog, the select the input file for the data range. The Input for Data
Range Mask dialog appears.
3. Click Select New Input if you need to change the input file.
4. Enter a minimum and/or maximum value in the Band Min Value and Band
Max Value fields. If you enter only a minimum or maximum value, the data’s
actual maximum or minimum, respectively, will be used as the other end value.
If the input file has a data ignore value, then the dialog opens with the value
automatically entered in the Band Min Value and Band Max Value fields.
5. Select either Mask pixel if ALL bands match range or Mask pixel if ANY
bands match range. The ALL option includes all pixels that are in the data
range for all bands (a logical AND operation). The ANY option includes all
pixels that are in the data range for any band (a logical OR operation)
6. Click OK to enter the range into the mask definition list.

Including Annotations
To include an annotation file in the mask, select Options → Import Annotation
from the Mask Definition dialog menu bar and select the input file.
To include the currently displayed annotation shapes in the mask, select Options →
Import Displayed Annotation.
Only rectangles, ellipses, and polygons are imported into the mask definition.

Masking Finite Values


1. From the Mask Definition dialog menu bar, select Options → Mask Finite
Values.
2. In the band selection dialog, select a band.
3. Click OK. ENVI lists the band in the Mask Definition dialog.

Masking Non-Numbers and Infinite Values


This option produces a mask of all NaN (Not a Number) and Inf (Infinite) data
values.
1. From the Mask Definition dialog menu bar, select Options → Mask “NaN”/
“Inf” Values.
2. In the band selection dialog, select a band.
3. Click OK. ENVI lists the band in the Mask Definition dialog.

Creating Masks ENVI User’s Guide


Chapter 3: Basic Tools 353

Including Regions of Interest


Use Import ROIs or Import ROI Intersection to include ROIs in a mask as
described in the following sections:
Including Standard ROIs
1. From the Mask Definition dialog menu bar, select Options → Import ROIs.
The Mask Definition Import ROI dialog appears.
2. Select the ROIs.
3. Click OK. All imported ROIs are treated as a single mask layer.
Including ROI Intersections
Use Import ROI Intersection to calculate the intersection of two or more ROIs on-the-
fly and include the result in a mask. When the intersection of the ROIs is calculated, a
point type ROI is created from the intersecting points.
1. From the Mask Definition dialog menu bar, select Options → Import ROI
Intersection. The Mask Input ROI Intersection dialog appears.
2. Select the names of the intersecting regions. All of the selected regions must
intersect.
3. Click OK. ENVI lists the new ROI in the Mask Definition dialog.
Memory Considerations
When building a mask from an ROI, you may receive an error message that says,
“Unable to allocate memory to make array.” This indicates that your system does not
have enough RAM available to build a mask from the specified ROI. Making a mask
from an ROI uses a large amount of RAM because ENVI must read the address for
every pixel in the ROI into memory before it can build the mask. The ROI pixel
addresses are long integers, so each pixel in the ROI requires four bytes of memory.
For large ROIs, the required RAM can add up fast. Also, one continuous block of
memory is required to store all of the addresses for the ROI; this is in addition to the
memory required to run ENVI, your operating system, and any other applications you
may be running.
In this case, you may want to consider building a mask using another method than
ROIs. For example, if you generated your ROI using the Image Threshold to ROI
tool, you could make an equivalent mask by selecting Options → Import Band
Data Range in the Mask Definition dialog.

ENVI User’s Guide Creating Masks


354 Chapter 3: Basic Tools

Or, if the ROI is a polygon, then you could create an annotation polygon with the
same shape as your ROI and import it into the Mask Definition dialog (instead of
importing the ROI). From the Display group menu bar, select Overlay →
Annotation. You will need to trace your annotation polygon over your ROI polygon
because it is not possible to convert an ROI polygon directly to an annotation
polygon.

Including ENVI Vector Files (EVFs)


1. From the Mask Definition dialog menu bar, select Options → Import EVFs.
The Mask Definition Input EVFs dialog appears.
2. Select the vector file to input by selecting the filename.
3. Click OK.

Selecting Areas
Select from the following options to define mask areas:
• To set the defined areas in the mask to 1 (On) or to 0 (Off), select Options →
Selected Areas On/Off from the Mask Definition dialog menu bar. The mask
is built using a Logical OR or Logical AND operation between all of the items
in the list. The default, Logical OR, uses all the defined areas to make the
mask. Using the Logical AND masks only the areas where all of the defined
areas overlap.
Selected areas are those pixels that satisfy the masking criteria.
• To define the mask using only those areas where the listed data ranges,
annotation shapes, and/or ROIs overlap, select Options → Selected
Attributes [Logical AND] from the Mask Definition dialog menu bar.
• To use all the defined areas to make the mask, select Options → Selected
Attributes [Logical OR] from the Mask Definition dialog menu bar.

Deleting Attributes
To delete an item from the Select Attributes list in the Mask Definition dialog,
highlight the item and click Delete Item.

Clearing the Attribute List


To remove all items from the Select Attributes list in the Mask Definition dialog,
click Clear All Items.

Creating Masks ENVI User’s Guide


Chapter 3: Basic Tools 355

Saving Masks
1. In the Mask Definition dialog, select output to File or Memory.
2. Click Apply.

Applying Masks
Use Apply Mask to permanently apply a mask to an image, giving that the masked
out value is what you specify.
1. From the ENVI main menu bar, select Basic Tools → Masking → Apply
Mask. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK.
3. To create a mask, click Mask Options. This menu contains the following
options:
• Build Mask: Opens the Mask Definition dialog, which is described in
“Building Masks” on page 350.
• Mask Data Ignore Values [All Bands]: Build a mask that includes all the
pixels for which the data ignore value occurs in all bands (a logical AND
operation).
• Mask Data Ignore Values [Any Band]: Build a mask that includes all the
pixels for which the data ignore value occurs in any band (a logical OR
operation).
• Mask NaNs [All Bands]: Build a mask that includes all pixels which have
a value of NaN in all bands (a logical AND operation).
• Mask NaNs [Any Band]: Build a mask that includes all pixels which have
a value of NaN in any band (a logical OR operation).
Note
NaN and Infinity values are treated the same in ENVI. Infinity values are
masked along with NaNs. Moreover, the Mask NaNs options are only
available for files containing floating-point, double-precision floating,
complex floating, or double-precision complex data types.

When one of the latter four mask options is chosen, the mask is automatically
built and named either <basename>_iv_mask, or <basename>_nan_mask,
where <basename> is the name of the selected input file and the mask is made

ENVI User’s Guide Creating Masks


356 Chapter 3: Basic Tools

from either ignore values (iv) or NaNs (nan). In the case where the selected
input file is in memory, then the mask is assigned a temporary filename.
4. Specify the mask by clicking Select Mask Band. See “Masking” on page 224.
5. Click OK. The Apply Mask Parameters dialog appears.
6. Enter the value in the Mask Value field. All areas in the input images where
the mask equals zero are set to this mask value.
7. Enter an output filename or select output to memory.

Creating Masks ENVI User’s Guide


Chapter 3: Basic Tools 357

Preprocessing Utilities
ENVI provides preprocessing utilities for calibration, general purpose tools, and data-
specific tools. These utilities are described in the following sections.

Calibration Utilities
Use Calibration Utilities to apply calibration factors to AVHRR, MSS, QuickBird,
TM, TIMS, and WorldView-1 and -2 data, and to use a variety of atmospheric
correction techniques.

AVHRR Calibration
Use the AVHRR calibration utility to calibrate AVHRR data from the NOAA-12,
-14, -15, -16, -17, and -18 satellites. Bands 1 and 2 are calibrated to percent
reflectance and bands 3, 4, and 5 are calibrated to brightness temperature, in degrees
Kelvin. For details, see “Calibrating AVHRR Data” on page 380.

Landsat Calibration
Use Landsat Calibration to convert Landsat MSS, TM, and ETM+ digital numbers
to spectral radiance or exoatmospheric reflectance (reflectance above the atmosphere)
using published post-launch gains and offsets.
The spectral radiance (Lλ) is calculated using the following equation:

LMAX λ – LMIN λ
L λ = LMIN λ + ⎛⎝ --------------------------------------------------------------------⎞⎠ ( QCAL – QCALMIN )
QCALMAX – QCALMIN

Where:
• QCAL is the calibrated and quantized scaled radiance in units of digital
numbers
• LMINλ is the spectral radiance at QCAL = 0
• LMAXλ is the spectral radiance at QCAL = QCALMAX
LMINλ and LMAXλ are derived from values published in Chander, Markham,
and Helder (2009). See References.
• QCALMIN is the minimum quantized calibrated pixel value (corresponding to
LMINλ) in DN. Valid values are as follows:
1: LPGS products

ENVI User’s Guide Preprocessing Utilities


358 Chapter 3: Basic Tools

1: NLAPS products processed after 04 April 2004


0: NLAPS products processed before 05 April 2004
When metadata is not available to determine the appropriate values,
QCALMIN is set by default to 1 (TM and ETM+) or 0 (MSS).
• QCALMAX is the maximum quantized calibrated pixel value (corresponding
to LMAXλ) in DN. Valid values are 127, 254, or 255. When metadata is not
available to determine the appropriate values, QCALMAX is set by default to
255 (TM and ETM+) or 127 (MSS).
The resulting radiance (Lλ) is in units of watts per square meter per steradian per
micrometer (W/(m2*sr*μm)).
The exoatmospheric reflectance (ρp) is calculated using the following equation:
2
π ⋅ Lλ ⋅ d
ρ p = -------------------------------------
-
ESUN λ ⋅ cos θ s

Where:
• Lλ is the spectral radiance
• d is the Earth-Sun distance in astronomical units
• ESUNλ is the mean solar exoatmospheric irradiance. ENVI uses the ESUNλ
values from the Landsat 7 Science Data Users Handbook for Landsat 7 ETM+.
ENVI uses the ESUNλ values from Chander and Markham (2003) for Landsat
TM 4 and 5. See References.
• θs is the solar zenith angle in degrees.
Using the Landsat Calibration Tool
Use Landsat Calibration to specify the calibration coefficients and other related
parameters for Landsat MSS, TM and ETM+ data.
1. Use File → Open External File → Landsat to open a Landsat file, as
described in “Opening Landsat Files” in ENVI Help. Landsat metadata files
are preferred since ENVI will use the metadata to automatically determine
calibration parameters. The Landsat Calibration tool only works with file
formats described in “Opening Landsat Files” in ENVI Help. You cannot
calibrate a meta file consisting of multiple Landsat files.
The Landsat Calibration tool also works with Landsat data that you previously
saved to ENVI raster format. Use File → Open Image File to open a Landsat
data file in ENVI raster format.

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 359

2. Select one of the following options from the ENVI main menu bar:
• Basic Tools → Preprocessing → Calibration Utilities → Landsat
Calibration
• Basic Tools → Preprocessing → Data-Specific Utilities →
Landsat TM → Landsat Calibration
• Basic Tools → Preprocessing → Data-Specific Utilities →
Landsat MSS → Landsat Calibration
• Spectral → Preprocessing → Calibration Utilities → Landsat
Calibration
• Spectral → Preprocessing → Data-Specific Utilities → Landsat TM →
Landsat Calibration
• Spectral → Preprocessing → Data-Specific Utilities → Landsat
MSS → Landsat Calibration
The ENVI Landsat Calibration Input File dialog appears.
3. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The TM Calibration Parameters dialog appears.

ENVI User’s Guide Preprocessing Utilities


360 Chapter 3: Basic Tools

Figure 3-23: ENVI Landsat Calibration Dialog

ENVI determines the calibration parameters from the metadata and populates
the dialog accordingly.
For Landsat 7 GeoTIFF files without metadata, the dialog defaults to a date of
January 1, 1984 and a sun elevation angle of 90 degrees. You can obtain
calibration parameters from the EROS Data Center as CPF files and MetaData
files. However, most Landsat GeoTIFF data now come with metadata, so if
you use File → Open External File → Landsat → GeoTIFF with Metadata
to open the data, ENVI will automatically determine the calibration
parameters.
4. You can edit the Data Acquistion Month/Day/Year, and Sun Elevation (deg)
values if you want to override the metadata-derived values.
5. Select the desired Calibration Type using the Radiance or Reflectance radio
buttons. If you selected a thermal band for input (Bands 61 or 62), the
calibrated output will be temperature (in degrees Kelvin).

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 361

6. Gain/Bias or Lmin/Lmax calibration values are automatically calculated from


the associated metadata file(s). Click Edit Calibration Values if you want to
enter your own calibration values instead of the metadata-derived values, or if
the metadata contains Gain/Bias values of 0, or if there is no available
metadata file. The Edit Calibration Values dialog appears.
Enter new values for Gain/Bias or Lmin/Lmax as needed, and click OK. Or,
click Restore Dataset Parameters to reset the values to what was specified in
the metadata.
7. If you used File → Open External File → Landsat → GeoTIFF to open a
.TIF file in Step 1, ENVI cannot automatically determine the Gain/Bias or
Lmin/Lmax values, so you will need to enter them manually. Follow these
steps to continue:
• The ENVI Landsat Calibration dialog contains two additional radio
buttons: Lmin-Lmax and Gain-Bias. Select either option, depending on
the processing type, and click Edit Calibration Values. The Edit
Calibration Parameters dialog appears.
• For Landsat 7 ETM+ data only, select the Low or High radio button for
Radiance Range.
• Enter Gain/Bias or Lmin/Lmax calibration values.
• Click OK to continue.
8. In the ENVI Landsat Calibration dialog, select output to File or Memory.
9. Click OK. When complete, ENVI adds the resulting output to the Available
Bands List.
References
Chander, G., B. Markham, and D. Helder, 2009. Summary of current radiometric
calibration coefficients for Landsat MSS, TM, ETM+, and EO-1 ALI sensors.
Remote Sensing of the Environment, Vol. 113, pp. 893-903.
Landsat 7 Science Data Users Handbook, updated October 2007. NASA Goddard
Space Flight Center.
http://landsathandbook.gsfc.nasa.gov/handbook/handbook_htmls/chapter9/chapter9.
html. Accessed February 2009.

QuickBird Radiance Calibration


DigitalGlobe’s QuickBird image data is typically distributed in relative radiance. Use
the QuickBird Radiance calibration utility to convert the relative radiance into
absolute radiance in units of [(μW) / (cm2 *nm*sr)]. The calibration is performed

ENVI User’s Guide Preprocessing Utilities


362 Chapter 3: Basic Tools

using the calibration factors in the QuickBird metadata file (the absCalFactor value in
the .imd file). The units are converted from [W/(m2*sr)] into
[(μW) / (cm2 *nm*sr)] using the following nominal bandpass widths:

Pan band: 398 nm


Multispectral Band 1 (Blue): 68 nm
Multispectral Band 2 (Green): 99 nm
Multispectral Band 3 (Red): 71 nm
Multispectral Band 4 (NIR): 114 nm

ENVI stores the gain factors that were applied in the ENVI header file of the
calibrated image.
1. From the ENVI main menu bar, select Basic Tools → Preprocessing →
Calibration Utilities → QuickBird Radiance. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. Select only an original unmodified QuickBird
image product.
If ENVI is unable to locate the associated QuickBird metadata file, you will be
prompted to select it.
The QuickBird Calibration Parameters dialog appears.
3. To scale the calibrated result into unsigned integers set the Scale Output to
Integers toggle button to Yes and enter a scale factor. To output the result in
floating-point set the toggle button to No.
Scaling the result into integers will produce a file that is half the size (in bytes)
as the floating-point result, however the precision is typically reduced to three
digits. The maximum value that an unsigned integer can hold is 65,535.
4. Select output to File or Memory.
5. Click OK.

WorldView Radiance Calibration


DigitalGlobe’s QuickBird image data is typically distributed in relative radiance. Use
the WorldView Radiance calibration utility to convert the relative radiance into
absolute radiance in units of [(μW) / (cm2 *nm*sr)]. The calibration is performed
using the calibration factors in the WorldView-1 or WorldView-2 metadata file (the

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 363

absCalFactor value in the .imd file). The units are converted from [W/(m2*sr)] into
[(μW) / (cm2 *nm*sr)] using the following nominal bandpass widths:

Pan band: 372 nm

The gain factors that were applied are found in the ENVI header file of the calibrated
image.
1. From the ENVI main menu bar, select Basic Tools → Preprocessing →
Calibration Utilities → WorldView Radiance. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. Select only an original unmodified WorldView-1 or
WorldView-2 image product.
If ENVI is unable to locate the associated WorldView metadata file, you will
be prompted to select it.
The WorldView Calibration Parameters dialog appears.
3. To scale the calibrated result into unsigned integers set the Scale Output to
Integers toggle button to Yes and enter a scale factor. To output the result in
floating-point set the toggle button to No.
Scaling the result into integers will produce a file that is half the size (in bytes)
as the floating-point result, however the precision is typically reduced to three
digits. The maximum value that an unsigned integer can hold is 65,535.
4. Select output to File or Memory.
5. Click OK.

FLAASH Calibration
Fast Line-of-sight Atmospheric Analysis of Spectral Hypercubes (FLAASH) is an
atmospheric correction method in ENVI for retrieving spectral reflectance from
hyperspectral radiance images. FLAASH incorporates the MODTRAN4 radiation
transfer model to compensate for atmospheric effects.
FLAASH is part of the Atmospheric Correction Module: QUAC and FLAASH and is
available for purchase from ITT Visual Information Solutions or your ENVI
distributor. Contact your sales representative or ITT Visual Information Solutions
(303-786-9900, [email protected]) for more information.
If you have an Atmospheric Correction Module license, see the Atmospheric
Correction Module: QUAC and FLAASH User’s Guide for details.

ENVI User’s Guide Preprocessing Utilities


364 Chapter 3: Basic Tools

QUick Atmospheric Correction Calibration


QUick Atmospheric Correction (QUAC) is an automated atmospheric correction
method in ENVI for retrieving spectral reflectance from multispectral and
hyperspectral images.
QUAC is part of the Atmospheric Correction Module: QUAC and FLAASH and is
available for purchase from ITT Visual Information Solutions or your ENVI
distributor. Contact your sales representative or ITT Visual Information Solutions
(303-786-9900, [email protected]) for more information.
If you have an Atmospheric Correction Module license, see the Atmospheric
Correction Module: QUAC and FLAASH User’s Guide for details.

Flat Field Calibration


Use Flat Field calibration to normalize images to an area of known “flat” reflectance.
This is particularly effective for reducing hyperspectral data to relative reflectance.
The method requires that you select a Region Of Interest (ROI) prior to execution.
The average spectrum from the ROI is used as the reference spectrum, which is then
divided into the spectrum at each pixel of the image.
1. Define an ROI over a spectrally flat area (see “Drawing ROIs” on page 323).
2. From the ENVI main menu bar, select Basic Tools → Preprocessing →
Calibration Utilities → Flat Field. The Input File dialog appears.
3. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK.
4. Select the average spectrum to use for the flat field calibration by selecting the
ROI name in the Select Calibration from Regions column. The selected ROI
name appears at the bottom of the window in the Selected Item field.
5. Select output to File or Memory.
6. Click OK.

Log Residuals
The new Log Residuals calibration tool is designed to remove solar irradiance,
atmospheric transmittance, instrument gain, topographic effects, and albedo effects
from radiance data. This transform creates a pseudo reflectance image that is useful
for analyzing mineral-related absorption features. Log residuals calibration is similar
to IARR calibration in that both tools use only in-scene statistics to produce a result.

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 365

The logarithmic residuals of a dataset are defined as the input spectrum divided by
the spectral geometric mean, then divided by the spatial geometric mean. The
geometric mean is used because the transmittance and other effects are considered
multiplicative; it is calculated using logarithms of the data values. The spectral mean
is the mean of all bands for each pixel and removes topographic effects. The spatial
mean is the mean of all pixels for each band and accounts for the solar irradiance,
atmospheric transmittance, and instrument gain.
Figure 3-24 shows a comparison of input and output spectra.

Figure 3-24: Comparison of Input Spectra from Original Image (left) and Output
Spectra from Log Residual Calibrated Image (right)

1. From the ENVI main menu bar, select one of the following:
• Basic Tools → Preprocessing → Calibration Utilities → Log Residuals
• Spectral → Preprocessing → Calibration Utilities → Log Residuals
2. The Input File dialog appears.
3. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Log Residuals Calibration Parameters dialog
appears.
4. Select output to File or Memory.
5. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Preprocessing Utilities


366 Chapter 3: Basic Tools

Reference:
Green, A.A., M.D. Craig, “Analysis of aircraft spectrometer data, with logarithmic
residuals”, Proceedings of the Airborne Imaging Spectrometer Data Analysis
Workshop, April 8-10, 1985, G. Vane and A. Goetz editors, JPL, pp111-119.

IAR Reflectance Calibration


Use IAR Reflectance calibration (Internal Average Relative Reflectance) to
normalize images to a scene average spectrum. This is particularly effective for
reducing hyperspectral data to relative reflectance in an area where no ground
measurements exist and little is known about the scene. It works best for arid areas
with no vegetation. An average spectrum is calculated from the entire scene and is
used as the reference spectrum, which is then divided into the spectrum at each pixel
of the image.
1. From the ENVI main menu bar, select Basic Tools → Preprocessing →
Calibration Utilities → IAR Reflectance. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The IARR Calibration Parameters dialog appears.
3. Select output to File or Memory.
4. Click OK. ENVI adds the resulting output to the Available Bands List.

Empirical Line Calibration


Use Empirical Line calibration to force spectral data to match selected field
reflectance spectra. A linear regression is used for each band to equate DN and
reflectance. This is equivalent to removing the solar irradiance and the atmospheric
path radiance. The following equation shows how the empirical line gain and offset
values are calculated.
Reflectance (field spectrum) = gain x radiance (input data) + offset

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 367

ENVI’s empirical line calibration requires at least one field, laboratory, or other
reference spectrum; these can come from spectral profiles or plots, spectral libraries,
ROIs, statistics or from ASCII files. Input spectra will automatically be resampled to
match the selected data wavelengths. If more than one spectrum is used, then the
regression for each band will be calculated by fitting the regression line through all of
the spectra. If only one spectrum is used, then the regression line will be assumed to
pass through the origin (zero reflectance equals zero DN). The calibration can also be
performed on a dataset using existing factors.
Computing Factors and Calibrating
Typically, you should choose a dark and a bright region in the image for use in the
empirical line calibration (providing that reference spectra are available for these
regions). This provides a more accurate linear regression. Using as many paired
data/field spectra as you can will also improve the calibration. At least one spectral
pair is necessary.
To use spectra from ROIs, define the ROIs before running this function.
1. From the ENVI main menu bar, select Basic Tools → Preprocessing →
Calibration Utilities → Empirical Line → Compute Factors and
Calibrate. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Empirical Line Spectra dialog appears.

ENVI User’s Guide Preprocessing Utilities


368 Chapter 3: Basic Tools

Figure 3-25: Empirical Line Spectra Dialog

3. Collect image spectra and reference spectra, and pair spectra using the
procedures described in the following sections.
Collecting Data (Image) Spectra
Use the Data Spectra Collection dialog to collect the image spectra (un-calibrated
spectra), which can come from a plot or profile, a spectral library, ROI, or ASCII
spectrum. Use the Import menu and other interactive options to import and collect
spectra.
1. In the Empirical Line Spectra dialog, click Data Spectra: Import Spectra.
2. Collect spectra using the Import menu as described in “Importing Spectra” on
page 442 or using the black draw widget at the top of the dialog as described in
“Dragging-and-Dropping Spectra” on page 443.
3. After the data spectra are selected, click Apply. The spectra names are entered
into the Empirical Line Spectra dialog.

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 369

Collecting Field Spectra


After importing Data (image) spectra into the Empirical Line Spectra dialog, import
the corresponding Field (reference) spectra.
1. In the Empirical Line Spectra dialog, click Field Spectra Import Spectra.
2. Collect spectra using the Import menu as described in “Importing Spectra” on
page 442 or using the black draw widget at the top of the dialog as described in
“Dragging-and-Dropping Spectra” on page 443.
3. Click Apply to enter the spectra names.
Pairing Spectra
After importing Data and Field (reference) spectra into the Empirical Line Spectra
dialog, use the following procedure to pair the Data and Field (reference) spectra for
use in the regression.
1. In the Empirical Line Spectra dialog, select the data spectrum name at the top
list.
2. In the bottom list, select the corresponding field spectrum name.
3. Click Enter Pair to associate the two spectra. The paired spectra are listed in
the Selected Pairs field.
4. Repeat the selection process for as many data and field spectra pairs as desired.
5. Click OK. The Empirical Line Calibration Parameters dialog appears.
Completing the Calibration
1. After collecting and pairing spectra, select output to File or Memory in the
Empirical Line Calibration Parameters dialog.
To save the correction coefficients in an ASCII file, enter a second filename in
the Output Calibration Filename field.
The default extension for correction coefficients files is .cff.
2. Click OK. When the calibration is completed, the calibration factors are
plotted in a plot window and ENVI adds the resulting output to the Available
Bands List.
Calibrating Using Existing Factors
Use Calibrate Using Existing Factors to run Empirical Line Calibration using
output correction factors that were saved during another calibration session.

ENVI User’s Guide Preprocessing Utilities


370 Chapter 3: Basic Tools

1. From the ENVI main menu bar, select Basic Tools → Preprocessing →
Calibration Utilities → Empirical Line → Calibrate Using Existing
Factors.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Enter Calibration Factors Filename dialog
appears.
3. Choose a calibration factors file (.cff) created during a previous Empirical
Line Calibration session.
4. Click OK. The Empirical Line Calibration Parameters dialog appears.
5. Select output to File or Memory.
6. Click OK.

Thermal Atmospheric Correction


Use Thermal Atm Correction to approximate and remove the atmospheric
contributions to the thermal infrared data. For best results, perform this correction
before converting your data to emissivity. The atmospheric correction algorithm used
in ENVI is similar to the In-Scene Atmospheric Compensation algorithm, ISAC. For
details, see “Thermal IR Utilities” on page 391.

TIMS Radiance Calibration


Use TIMS Radiance to calibrate raw data from the NASA Thermal Infrared
Multispectral Scanner (TIMS) to radiance in units of W/m2/μm/sr. For details, see
“TIMS Utilities” on page 388.

Calculating Emissivity
Use Calculate Emissivity to use one of three techniques in ENVI to separate the
emissivity and temperature information in radiance data measured with thermal
infrared sensors. Both the Reference Channel and Emissivity Normalization
techniques assume a fixed emissivity value and produce emissivity and temperature
outputs. The Alpha Residuals technique does not provide temperature information.
Reference Channel Emissivity Calculation
Use Reference Channel to calculate emissivity and temperature values from thermal
infrared radiance data. For details, see “Using Reference Channel Emissivity” on
page 395.

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 371

Emissivity Normalization
Use Emissivity Normalization to calculate emissivity and temperature values from
thermal infrared radiance data. For details, see “Using Emissivity Normalization” on
page 396.
Alpha Residuals
Use Alpha Residuals to produce alpha residual spectra that approximate the shape of
emissivity spectra from thermal infrared radiance data. For details, see “Using Alpha
Residuals” on page 397.

General Purpose Utilities


Use General Purpose Utilities to replace bad lines with averages, perform dark
subtractions, and to destripe data.

Replacing Bad Lines


Use Replace Bad Lines to replace bad data lines in image data. You must identify the
position of the lines to replace before running the function by using the Cursor
Location/Value tool (see Displaying Cursor Location/Value in Getting Started with
ENVI).
Tip
To interactively fix bad lines, see “Using the Spatial Pixel Editor” on page 136.

1. From the ENVI main menu bar, select Basic Tools → Preprocessing →
General Purpose Utilities → Replace Bad Lines. The Input File dialog
appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Bad Lines Parameters dialog appears.

ENVI User’s Guide Preprocessing Utilities


372 Chapter 3: Basic Tools

Figure 3-26: Bad Lines Parameters Dialog

3. In the Enter Bad Line field, specify which bad lines to replace and press
Enter.
4. The line appears in the Selected Lines list.
• To remove that line from the list, select the line.
• To save the line coordinates to a file, click Save.
• To restore the coordinates from a previously saved file, click Restore.
• To clear the list of lines to replace, click Clear.
5. In the Half Width to Average field, enter the number of adjacent lines to use
as an average for calculation of the replacement line. The value is symmetrical
around the line to replace. For example, the value 2 means that two lines on
either side of the selected line will be averaged to calculate the replacement.
6. Click OK. The Bad Lines Output dialog appears.
7. Select output to File or Memory.
8. Click OK.

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 373

Using Dark Subtraction


Use Dark Subtract to apply atmospheric scattering corrections to the image data.
The digital number to subtract from each band can be either the band minimum, an
average based upon an ROI, or a specific value.
1. From the ENVI main menu bar, select Basic Tools → Preprocessing →
General Purpose Utilities → Dark Subtract. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Dark Subtraction Values dialog appears.
3. Select a Subtraction method as described in the following sections.
4. Click OK. The Dark Subtract Parameters dialog appears.
5. Select output to File or Memory.
6. Click OK.

ENVI User’s Guide Preprocessing Utilities


374 Chapter 3: Basic Tools

Figure 3-27: Dark Subtraction Values Dialog

Selecting Band Minimum Subtraction


To automatically use the minimum DN value of each spectral band for the dark
subtraction:
1. In the Dark Subtraction Values dialog, select the Band Minimum radio button.
2. Click OK.
Selecting Region of Interest Subtraction
To use the average of an ROI in each spectral band as the value for dark subtraction
(ROIs must first be defined; see “Defining ROIs” on page 323):
1. In the Dark Subtraction Values dialog, select the Region of Interest radio
button.

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 375

2. From the list of available regions, select an ROI.


3. Click OK.
Selecting User Value Subtraction
To enter a user-defined value to subtract from each band:
1. In the Dark Subtraction Values dialog, select the User Value radio button. A
list of the bands and a default value of 0.0000 appear under the Current
Subtraction Values label.
2. Select one of the band names.
3. In the Edit Selected Item field, enter the subtraction value. Press Enter.
4. Edit the other band values as desired.
5. Click OK.

Applying Gain and Offset


Use Apply Gain and Offset to apply a simple gain and offset correction to a set of
bands. ENVI multiplies the selected bands by an input gain value and adds an offset
value that you define.
Note
ENVI applies gains and offsets to ENVISAT/MERIS geophysical (non-reflectance)
products, so you do not need to apply them to these products.

1. From the ENVI main menu bar, select Basic Tools → Preprocessing →
General Purpose Utilities → Apply Gain and Offset.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Gain and Offset Values dialog appears.
3. In the Gain Values list, select a band name.
4. In the Edit Selected Item field, edit the gain value of the item.
5. In the Offset Values list, select a band name.
6. In the Edit Selected Item field, edit the offset value of the item.
7. Repeat this selection and assignment of values for each band to process.
To reset all of the bands to their original values, click Reset.
8. Select an output data type from the Output Data Type drop-down list.
9. Select output to File or Memory.

ENVI User’s Guide Preprocessing Utilities


376 Chapter 3: Basic Tools

10. Click OK. ENVI adds the resulting output to the Available Bands List.

Destriping Data
Use Destripe data to remove periodic scan line striping in image data. This type of
striping is often seen in Landsat MSS data (every 6th line) and less commonly, in
Landsat TM data (every 16th line). When destriping the data, ENVI calculates the
mean of every nth line and normalizes each line to its respective mean. In order for
destriping to function properly, the data must be in the acquired format (horizontal
strips) and cannot be rotated or georeferenced.
1. From the ENVI main menu bar, select Basic Tools → Preprocessing →
General Purpose Utilities → Destripe. The Destriping Data Input File
appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Destriping Parameters dialog appears.
3. Enter the number of detectors in the Number of Detectors field. The number
of detectors is the periodicity of the striping (for example, for Landsat MSS,
the value would be 6).
If the file type has been set in the header, the default is set automatically.
4. Select output to File or Memory.
5. Click OK.

Applying Cross-Track Illumination Corrections


Use Cross-Track Illumination Correction to remove variation in the cross-track
illumination of an image. Cross track illumination variations may be due to
vignetting effects, instrument scanning, or other non-uniform illumination effects.
Along-track mean values are calculated and you can plot them to show the mean
variation in the cross-track direction. A polynomial function, with the order defined
by you, is fit to the means and used to remove the variation.
1. From the ENVI main menu bar, select Basic Tools → Preprocessing →
General Purpose Utilities → Cross-Track Illumination Correction. The
Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The Cross Track Illumination
Correction Parameters dialog appears.
3. Select the cross track direction by selecting the check box next to either
Samples or Lines.

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 377

4. Select either an Additive or Multiplicative correction method. The Additive


method will subtract the fitted polynomial from the data and the Multiplicative
method will divide the data by the fitted polynomial.
5. Enter the polynomial order and click Plot Polynomial. A plot of the mean data
values display in red with the selected polynomial fit overlaid in white. It is
best to use a low order polynomial so as not to remove the local variation in the
data.
You can change the polynomial order and plot it again.
6. Select output to File or Memory.
7. Click OK.
Note
The Cross-Track Illumination Correction plot drop-down buttons are not active
until you close the Cross Track Illumination Correction Parameters dialog.

Converting Complex Data


Use Convert Complex Data to output selected images calculated from complex
data. Image types included are: Real (real portion of number), Imaginary (imaginary
portion), Power (log10 of magnitude), Magnitude (square root of sum of the squares
of the real and imaginary), and Phase (arc tangent of imaginary divided by real).
1. From the ENVI main menu bar, select Basic Tools → Preprocessing →
General Purpose Utilities → Convert Complex Data.
2. Select an input data file.
3. Click OK. The Convert Complex Parameters dialog appears, select the output
band functions by selecting the check boxes next to the function names.
4. Select output to File or Memory.
5. Click OK. ENVI adds the resulting output to the Available Bands List.

Converting VAX to IEEE Data


Use the VAX to IEEE Converter to convert VAX floating-point images to IEEE
standard floating-point. Most computers support the IEEE standard representation of
floating-point numbers, but DEC VAX computers still use their own internal floating-
point representation and some image data still are distributed in this format.

ENVI User’s Guide Preprocessing Utilities


378 Chapter 3: Basic Tools

1. From the ENVI main menu bar, select Basic Tools → Preprocessing →
General Purpose Utilities → Convert VAX to IEEE. The Input File dialog
appears.
2. Choose the file to converted from the list of available files.
3. Click OK.
4. When the VAX to IEEE Parameters dialog appears, enter the VAX header size
(bytes).
5. Select one of the following options:
• To copy the header information into the output file as an embedded ENVI
header, click Yes next to Copy Header.
• To copy only the data, click No.
6. Enter an output filename.
7. Click OK.

Data-Specific Utilities
Use Data-Specific Utilities to apply data-specific functions that work specifically on
your data type.

Displaying HDF Global Attributes


Use View HDF Global Attributes to create a text report of any global attribute
values that are present in an HDF scientific data (SD) file.
1. From the ENVI main menu bar, select Basic Tools → Preprocessing → Data-
Specific Utilities → View HDF Global Attributes. The Input File dialog
appears.
2. Select the HDF SD file.
Any global attributes contained in the HDF file appear on-screen in a text report.
Saving Reports to ASCII Files
1. In the Report window, select File → Save Text to ASCII.
2. Enter an output filename.
3. Click OK.

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 379

ASTER Utilities
Use ASTER Utilities to extract and apply calibration information from HDF
attributes, compute sea surface temperatures, use information in the data for
georeferencing, and to orthorectify data.
Building ASTER Geometry Files
Use ASTER Build Geometry File to calculate the geometry values for each pixel.
You may select which values to calculate: latitude, longitude, solar zenith, and/or
sensor zenith angles.
For details, see “Building ASTER Geometry Files” on page 949.
Georeferencing ASTER Data
You can georeference the ASTER data, calibration results, and sea surface
temperature image using information from the ASTER data themselves. Each line of
data has 51 latitude and longitude values that you can use in the georeferencing.
For details, see “Georeferencing ASTER Data” on page 949.
Orthorectifying ASTER Data
Use Orthorectify ASTER or Orthorectify ASTER with Ground Control to
orthorectify ASTER data. For details, see “Orthorectify Using RPCs” on page 911.

AVHRR Utilities
Use AVHRR Utilities to read and display information from the AVHRR header,
calibrate AVHRR data to percent reflectance and brightness temperature, compute
sea surface temperatures (SSTs), and to use information in the data for
georeferencing. The AVHRR utilities support NOAA-12 through -19.
The calibration and sea surface temperatures should be calculated before
georeferencing.
References:
Di, L. and D. C. Rundquist, 1994. A one-step algorithm for correction and calibration
of AVHRR Level 1b data, Photogrammetric Engineering & Remote Sensing, Vol. 60,
No. 2, pp. 165-171.
Displaying AVHRR Header Information
1. From the ENVI main menu bar, select Basic Tools → Preprocessing → Data-
Specific Utilities → AVHRR → Display Header Information.
2. Select the input AVHRR data file.

ENVI User’s Guide Preprocessing Utilities


380 Chapter 3: Basic Tools

3. Click OK. The AVHRR File Information dialog appears. The header
information displays.
Saving Header Info to ASCII Files
To save the header information to an ASCII file, select from the AVHRR File
Information dialog, File → Save Text to ASCII, and enter an output filename.
Calibrating AVHRR Data
Use Calibrate Data to calibrate AVHRR data from the NOAA-12 though -18
satellites. Bands 1 and 2 are calibrated to percent reflectance, and bands 3, 4, and 5
are calibrated to brightness temperature, in degrees Kelvin.
1. From the ENVI main menu bar, select Basic Tools → Preprocessing → Data-
Specific Utilities → AVHRR → Calibrate Data.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The AVHRR Calibrate Parameters dialog appears.
3. Select the satellite number from the Satellite drop-down button.
4. Select output to File or Memory.
5. Click OK.
Output bands 1 and 2 are in % reflectance, and output bands 3, 4, and 5 are in
brightness temperature, in degrees Kelvin.
Building AVHRR Geometry Files
Use AVHRR Build Geometry File to calculate the geometry values for each pixel.
You may select which values to calculate: latitude, longitude, solar zenith, and/or
sensor zenith angles.
For details, see “Building AVHRR Geometry Files” on page 952.
Georeferencing AVHRR Data
You can georeference the AVHRR data, calibration results, and sea surface
temperature image using information from the AVHRR data themselves. Each line of
data has 51 latitude and longitude values that you can use in the georeferencing.
For details, see “Georeferencing AVHRR Data” on page 953.
Computing Sea Surface Temperature
1. From the ENVI main menu bar, select Basic Tools → Preprocessing → Data-
Specific Utilities → AVHRR → Compute Sea Surface Temperature.

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 381

2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The AVHRR Sea Surface Temperature Parameters
dialog appears.
The input file must contain AVHRR bands 3, 4, and 5.
3. From the Satellite drop-down button, select the satellite name.
4. From the SST Algorithm drop-down button, select the algorithm.
5. Select output to File or Memory.
6. Click OK.
The output sea surface temperature image is in degrees Celsius.
Note
AVHRR data that have been scaled to 8-bit depth cannot be used to compute SSTs
because NOAA does not modify the calibration coefficients stored in the file’s
Level 1B header.

ENVI computes SST images in degrees Celsius, using AVHRR bands 3, 4, and 5.
Currently, ENVI does not use a cloud or land mask in the sea surface temperature
calculation. ENVI uses the Multi-Channel Sea Surface Temperature (MCSST)
algorithms: one for daytime data and three for nighttime data:
• Day MCSST Split
• Night MCSST Split
• Night MCSST Dual
• Night MCSST Triple
These algorithms differ by which bands are used to correct for the atmosphere. Split-
window uses bands 4 and 5, dual-window uses bands 3 and 4, and triple-window uses
bands 3, 4, and 5.
ENVI uses the following SST equations for NOAA-12, -14, and -15:
Day MCSST Split
Ts = a0 + a1*band4 + a2(band4 - band5) + a3(band4 - band5)(sec(φ) -1)
Night MCSST Split
Ts = a0 + a1*band4 + a2(band4 - band5) + a3(band4 - band5)(sec(φ)-1)
Night MCSST Dual
Ts = a0 + a1*band4 + a2(band3 - band4) + a3(sec(φ) -1)

ENVI User’s Guide Preprocessing Utilities


382 Chapter 3: Basic Tools

Night MCSST Triple


Ts = a0 + a1*band4 + a2(band3 - band5) + a3(sec(φ)-1)
ENVI uses the following SST equations for NOAA-16 through NOAA-18:
Day MCSST Split
Ts = a0 + a1*band4 + a2*band5 + a3(band4 - band5)(sec(φ) -1)
Night MCSST Split
Ts = a0 + a1*band4 + a2*band5 + a3(band4 - band5)(sec(φ) -1)
Night MCSST Dual
Ts = a0 + a1*band4 + a2(band3 - band4) + a3(sec(φ) -1)
Night MCSST Triple
Ts = a0 + a1*band3 + a2*band4 + a3*band5 + a4(band3 - band5)(sec(φ) -1)
ENVI uses the following SST equations for NOAA-19:
Day MCSST Split
Ts = a0 + a1*band4 + a2(band4 - band5) + a3(band4 - band5)(sec(φ) -1)
Night MCSST Split
Ts = a0 + a1*band4 + a2(band4 - band5) + a3(band4 - band5)(sec(φ) -1)
Night MCSST Dual
Ts = a0 + a1*band4 + a2(band3 - band4) + a3(sec(φ) -1)
Night MCSST Triple
Ts = a0 + a1*band4 + a2(band3 - band5) + a3(band3 - band5)(sec(φ) -1)
ENVI uses the following SST equations for NOAA MetOp-A FRAC data:
Day MCSST Split
Ts = a0 + a1*band4 + a2(band4 - band5) + a3(band4 - band5)(sec(φ) -1)
Night MCSST Split
Ts = a0 + a1*band4 + a2(band4 - band5) + a3(band4 - band5)(sec(φ) -1)
Night MCSST Dual
Ts = a0 + a1*band4 + a2(band3 - band4) + a3(sec(φ) -1)
Night MCSST Triple
Ts = a0 + a1*band4 + a2(band3 - band5) + a3*(band3 - band5)(sec(φ) -1)
Sec(φ) is the secant of the satellite zenith angle (φ), and bands 3 through 5 are the
calibrated brightness temperatures of NOAA AVHRR bands (in Kelvins). The “a”
coefficients are derived from a regression model based on drifting buoy and tropical
Pacific fixed-buoy data. The coefficient values depend on which NOAA satellite was
used to collect the AVHRR image. ENVI uses MCSST coefficients for NOAA-12

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 383

through NOAA-17 from the following NOAA website:


http://manati.orbit.nesdis.noaa.gov/sst/coefficient.html. The following tables show
the “a” coefficients for the various NOAA sensors, for each algorithm that ENVI
computes.

Satellite a0 a1 a2 a3
NOAA-12 -263.006 0.963563 2.579211 0.242598

NOAA-14 -278.43 1.017342 2.139588 0.779706

NOAA-15 -261.029735 0.959456 2.663579879 0.570613

NOAA-16 -273.77 3.301267 -2.30195 0.628966

NOAA-17 -271.206 0.992818 -2.49916 0.915103

NOAA-18 -280.43 1.02453 2.10044 0.0784059

NOAA-19 -278.74596 1.01922 1.72270 0.80263


MetOp-A FRAC -273.816 1.00255 2.39451 0.903773

Table 3-5: Day MCSST Split

Satellite a0 a1 a2 a3
NOAA-12 -263.94 0.967077 2.384376 0.480788

NOAA-14 -282.24 1.029088 2.275385 0.752567

NOAA-15 -271.3969724 0.993892 2.7523466369 0.662999

NOAA-16 -273.15 -2.53655 3.5316 0.753291

NOAA-17 -276.59 1.01015 -2.5815 1.000541

NOAA-18 -276.075 1.00841 2.23459 0.736946

NOAA-19 -277.71304 1.01432 1.91798 0.72064

MetOp-A FRAC -277.447 1.01377 2.52362 1.03056

Table 3-6: Night MCSST Split

ENVI User’s Guide Preprocessing Utilities


384 Chapter 3: Basic Tools

Satellite a0 a1 a2 a3
NOAA-12 -279.846 1.031355 1.288548 2.265075

NOAA-14 -273.914 1.008751 1.409936 1.975581

NOAA-15 -283.5117285 1.041037 1.5875819344 1.67743

NOAA-16 -273.082 1.50825 1.00413 1.52452

NOAA-17 -276.603 1.01805 1.49789 1.96181

NOAA-18 -275.493 1.01463 1.42759 1.68783

NOAA-19 -276.61174 1.01873 1.47374 1.88560

MetOp-A FRAC -273.235 1.00711 1.49927 1.88373

Table 3-7: Night MCSST Dual

Satellite a0 a1 a2 a3 a4
NOAA-12 -271.971 1.000281 0.911173 1.710028

NOAA-14 -275.364 1.010037 0.920822 1.760411

NOAA-15 -276.7558563 1.015354 1.0635723508 1.294955

NOAA-16 -271.763 0.733532 1.01684 0.344182 -0.753123

NOAA-17 -274.622 1.00903 0.913248 0.440015

NOAA-18 -274.398 1.00820 0.841674 0.377061


NOAA-19 -275.24563 1.01084 0.81643 0.43235

MetOp-A -273.044 1.00424 0.894349 0.508159


FRAC

Table 3-8: Night MCSST Triple

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 385

CARTOSAT-1 Utilities
Use Orthorectify CARTOSAT-1 or Orthorectify CARTOSAT-1 with Ground
Control to orthorectify CARTOSAT-1 data. For details, see “Orthorectify Using
RPCs” on page 911.

ENVISAT Utilities
Use Georeference AATSR, Georeference ASAR, or Georeference MERIS to
georeference your ENVISAT AATSR, ASAR, or MERIS data with the geolocation
information included in the ENVISAT file. ENVISAT imagery contains geolocation
tie points that correspond to specific pixels in the image. You can use these tie points
to automatically georeference the ENVISAT data without building a geometry file.
For details, see “Georeferencing ENVISAT” on page 956.

IKONOS Utilities
Use Orthorectify IKONOS or Orthorectify IKONOS with Ground Control to
orthorectify IKONOS data. For details, see “Orthorectify Using RPCs” on page 911.

Landsat MSS Utilities


Use Landsat MSS utilities to correct aspect ratios and to deskew Landsat
Multispectral Scanner (MSS) data.
Deskewing Data
Landsat MSS image data processed prior to 1978 typically contains systematic
distortions caused by earth rotation and scan skew. Use MSS Deskewing to remove
the skew by offsetting groups of scan lines based on the relationship between the
orbital characteristics and latitude-dependent earth rotation characteristics.
1. From the ENVI main menu bar, select Basic Tools → Preprocessing → Data-
Specific Utilities → Landsat MSS → Deskew. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Deskewing Parameters dialog appears.
3. Enter the latitude of the MSS scene center into the Latitude Degrees,
Latitude Minutes, and Latitude Seconds field.
4. Select output to File or Memory.
5. Click OK.

ENVI User’s Guide Preprocessing Utilities


386 Chapter 3: Basic Tools

Correcting Aspect Ratio


Use MSS Aspect Ratio Correction to adjust the aspect ratio by applying nearest
neighbor resampling to a regular grid. Landsat MSS image data typically contains
geometric distortions caused by oversampling in the scan direction. The actual pixel
sizes are approximately 79 x 79 meters, but the instrument samples at 57 meter
intervals in the scan direction. Because of this oversampling, an adjustment of the
aspect ratio by the factor 57/79=0.72 is required.
1. From the ENVI main menu bar, select Basic Tools → Preprocessing → Data-
Specific Utilities → Landsat MSS → Aspect. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Aspect Correction Parameters dialog appears.
3. Select output to File or Memory.
4. Click OK.
Landsat MSS Data Calibration
Use Landsat MSS Calibration to convert Landsat MSS digital numbers to radiance
or exoatmospheric reflectance (reflectance above the atmosphere) using published
post-launch gains and offsets. For details, see “Landsat Calibration” on page 357.

Landsat TM Utilities
Use Landsat TM Calibration to convert Landsat TM digital numbers to radiance or
exoatmospheric reflectance (reflectance above the atmosphere) using published post-
launch gains and offsets. For details, see “Landsat Calibration” on page 357.

MODIS Utilities
Use Georeference Data to georeference your MODIS Level 1B and Level 2 datasets
and apply correction for the MODIS bow tie effect. ENVI extracts latitude and
longitude values from the header information to georeference the data. For details,
see “Georeferencing MODIS” on page 957.

OrbView-3 Utilities
Use Orthorectify OrbView-3 or Orthorectify OrbView-3 with Ground Control to
orthorectify IKONOS data. For details, see “Orthorectify Using RPCs” on page 911.

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 387

QuickBird Utilities
Use the QuickBird Radiance utility to convert QuickBird relative radiance into
absolute radiance in units of [ ( μW ) ⁄ ( cm 2 ⋅ nm ⋅ sr ) ]. For details, see “QuickBird
Radiance Calibration” on page 361.
Use the Orthorectify QuickBird or Orthorectify QuickBird with Ground Control
to orthorectify QuickBird data. For details, see “Orthorectify Using RPCs” on
page 911.

WorldView Utilities
Use the WorldView Radiance utility to convert WorldView-1 and WorldView-2
relative radiance into absolute radiance in units of [ ( μW ) ⁄ ( cm2 ⋅ nm ⋅ sr ) ]. For
details, see “WorldView Radiance Calibration” on page 362.
Use the Orthorectify WorldView or Orthorectify WorldView with Ground
Control to orthorectify WorldView data. For details, see “Orthorectify Using RPCs”
on page 911.

SeaWiFS Utilities
Use SeaWiFS Utilities to calculate geometry information for and to georeference
HDF and CEOS format SeaWiFS data. Geometry information includes latitude,
longitude, sensor azimuth, sensor zenith, solar azimuth, solar zenith, and UTC time.
The georeferencing function produces a full precision geocoding based on a complete
geometry model of the earth and satellite orbits.
Build Geometry File
Use Build Geometry File to calculate the geometry for HDF and CEOS format
SeaWiFS data. For details see “Building SeaWiFS Geometry Files” on page 946.
Georeference SeaWiFS Data
Use Georeference Data to georeference your SeaWiFS data. For details, see
“Georeferencing SeaWiFS Data” on page 947.

SPOT Utilities
Build Geometry File
Use Build Geometry File to build a SPOT geometry file to calculate the x and y
coordinates for each pixel. For details, see “Building SPOT Geometry Files” on
page 943.

ENVI User’s Guide Preprocessing Utilities


388 Chapter 3: Basic Tools

Georeference SPOT Data


Use Georeference Data to georeference SPOT data based on header information.
See “Georeferencing SPOT Data” on page 944.
Orthorectify SPOT Data
Use the Orthorectify SPOT or Orthorectify SPOT with Ground Control to
orthorectify SPOT data. For details, see “Orthorectify Using RPCs” on page 911.

TIMS Utilities
Thermal IR Atmospheric Correction
Use Thermal Atm Correction to approximate and remove the atmospheric
contributions to thermal infrared data. TIMS data must be converted to radiance
before performing the Thermal Atm Correction. ENVI provides a tool for converting
TIMS data to radiance (see “Radiance Calibration” on page 390). For best results,
perform this correction before converting your data to emissivity. The atmospheric
correction algorithm used in ENVI is similar to the In-Scene Atmospheric
Compensation algorithm, ISAC. This algorithm assumes that the atmosphere is
uniform over the data scene and that there is an occurrence of a near-blackbody
surface within the scene. The location of the blackbody surface is not required. A
single layer approximation of the atmosphere is used and it is assumed that there is no
reflected downwelling radiance.
The algorithm first determines the wavelength that most often exhibits the maximum
brightness temperature. This wavelength is then used as the reference wavelength.
Only spectra that have their brightest temperature at this wavelength are used to
calculate the atmospheric compensation. At this point, for each wavelength, the
reference blackbody radiance values are plotted against the measured radiances. A
line is fitted to the highest points in these plotted data and the fit is weighted to assign
more weight to regions with denser sampling. The compensation for this band is then
applied as the slope and offset derived from the linear regression of these data with
their computed blackbody radiances at the reference wavelength.
Upwelling atmospheric radiance and atmospheric transmission are approximated
using the following method: first, the surface temperature of every pixel is estimated
from the data and used to estimate the brightness temperature using the Planck
function and assuming an emissivity of 1; next, a line is fitted, using one of two
methods, to a scatter plot of radiance versus brightness temperature. The atmospheric
upwelling and transmission are then derived from the slope and offset of this line.

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 389

Johnson, B. R. and S. J. Young, “In-Scene Atmospheric Compensation: Application


to SEBASS Data Collected at the ARM Site,” Technical Report, Space and
Environment Technology Center, The Aerospace Corporation, May 1998.
Hernandez-Baquero, E., “Characterization of the Earths Surface and Atmosphere
from Multispectral and Hyperspectral Thermal Imagery,” Ph.D. Dissertation,
Rochester Institute of Technology, Chester F. Carlsom Center for Imaging Science,
Rochester, NY, 2000.
1. Select one of the following options from the ENVI main menu bar:
• Basic Tools → Preprocessing → Calibration Utilities →
Thermal Atm Correction
• Basic Tools → Preprocessing → Data-Specific Utilities → Thermal
IR → Thermal Atm Correction
• Basic Tools → Preprocessing → Data-Specific Utilities → TIMS →
Thermal Atm Correction
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Thermal Atm Correction Parameters dialog
appears.
3. Enter the Data Scale Factor needed to scale your data to units of W/m2/μm/sr.
4. Click Wavelength Units and select the units.
5. Use the toggle button to select either All or Max Hit to determine which pixels
to use in the surface temperature estimation regression.
Selecting All will estimate the surface temperature for each pixel by using the
maximum value of the brightness temperatures found throughout the input
wavelengths. Selecting Max Hit will estimate the surface temperature for only
those pixels that have their maximum brightness temperatures at a particular
wavelength. The wavelength used is the wavelength that has the largest number
of pixels with a maximum brightness temperature value.
6. Use the toggle button to select either Top of Bins or Normalized Regression
for the scatter plot fitting technique.
• Top of Bins fits a line to the top of the scatter plot of radiance vs.
brightness temperature. The top of the scatter plot corresponds to those
pixels whose emissivity is closest to 1. This Top of Bins fit is achieved by
doing a standard least squares regression on the top 5% of the data in the
scatter plot. This technique is susceptible to sensor noise which may occur
at the top of the scatter plot.

ENVI User’s Guide Preprocessing Utilities


390 Chapter 3: Basic Tools

• Normalized Regression first fits a line to the scatter plot of radiance vs.
brightness temperature by doing a standard least squares regression. The
residuals of this fit are then compared to a normal probability plot. Another
regression is done on the residuals in the normal plot. Points that are 3
times the noise equivalent sensor response (NESR) away from the
regression line are deemed outliers and are removed. A final regression is
done on the scatter plot using this reduced set of pixels. This method uses
all the points in the scatter plot that are not outliers and does not fit to only
the top of the scatter plot where the emissivity values are closest to 1.
• If you choose Normalized Regression, enter the Noise Equivalent
Sensor Response in the field.
7. Enter a gain and offset output filename, if desired.
8. Use the toggle button to select whether to plot the resulting atmospheric
transmission and upwelling spectra.
9. Enter an output filename.
10. Click OK. ENVI adds the resulting output to the Available Bands List.
References:
Johnson, B. R. and S. J. Young, “In-Scene Atmospheric Compensation: Application
to SEBASS Data Collected at the ARM Site,” Technical Report, Space and
Environment Technology Center, The Aerospace Corporation, May 1998.
Hernandez-Baquero, E., “Characterization of the Earths Surface and Atmosphere
from Multispectral and Hyperspectral Thermal Imagery,” Ph.D. Dissertation,
Rochester Institute of Technology, Chester F. Carlsom Center for Imaging Science,
Rochester, NY, 2000.
Radiance Calibration
Use Radiance Calibration to calibrate raw data from the NASA Thermal Infrared
Multispectral Scanner (TIMS) to radiance in units of W/m2/μm/sr. Data from on-
board black bodies, and two internal reference sources, are stored within the first 60
bytes of each image line. You can smooth reference data. ENVI calculates gain and
offset values for each TIMS spectral band using Plank’s radiation law, and uses the
reference data to calibrate the raw DN values to radiance.
References:
Palluconi, F. D. and Meeks, G. R., 1985. “Thermal Infrared Multispectral Scanner
(TIMS): An Investigator’s Guide to TIMS Data,” JPL Publication 85-32, p. 14.
1. Select one of the following from the ENVI main menu bar:

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 391

• Basic Tools → Preprocessing → Data-Specific Utilities → TIMS →


Radiance Calibration
• Basic Tools → Preprocessing → Calibration Utilities → TIMS
Radiance
2. Select the TIMS input file (must contain the 60 bytes per line of reference
information). The TIMS Calibration Parameters dialog appears.
3. Enter the number of lines of reference data to smooth.
4. Enter an output filename.
5. Click OK. ENVI adds the resulting output to the Available Bands List and
contains radiance values in W/m2/μm/sr.

Thermal IR Utilities
Use Thermal IR utilities to apply an atmospheric correction, and to convert the
dataset from radiance to emissivity and temperature using one of three methods:
Reference Channel Emissivity, Emissivity Normalization, and Alpha Residuals.
Thermal image data must be converted to radiance before performing the atmospheric
correction. Perform this correction before converting your data to emissivity for best
results.
Atmospheric Correction for Thermal IR Data
Use Thermal Atm Correction to approximate and remove the atmospheric
contributions from thermal infrared radiance data. Thermal image data must be
converted to radiance before performing the atmospheric correction. TIMS data
should be converted to radiance using TIMS Radiance tool before performing the
atmospheric correction. TIMS Radiance tools apply the correct band coefficients to
convert to radiance in the appropriate units. No data scale factor is then required
during the atmospheric correction. Perform the correction before converting your
data to emissivity for the best results.
Note
ENVI does not check to make sure the images are thermal infrared data. Be sure
that your data wavelengths measure between 8 and 14 μm before applying this
correction.

The atmospheric correction algorithm used in ENVI is similar to the In-Scene


Atmospheric Compensation algorithm, ISAC (see references at the end of this
section). This algorithm assumes that the atmosphere is uniform over the data scene
and that a near-blackbody surface exists within the scene. The location of the

ENVI User’s Guide Preprocessing Utilities


392 Chapter 3: Basic Tools

blackbody surface is not required for this correction. A single layer approximation of
the atmosphere is used. No reflected downwelling radiance is also assumed.
The algorithm first determines the wavelength that most often exhibits the maximum
brightness temperature. This wavelength is then used as the reference wavelength.
Only spectra that have their brightest temperature at this wavelength are used to
calculate the atmospheric compensation. At this point, for each wavelength, the
reference blackbody radiance values are plotted against the measured radiances. A
line is fitted to the highest points in these plotted data and the fit is weighted to assign
more weight to regions with denser sampling. The compensation for this band is then
applied as the slope and offset derived from the linear regression of these data with
their computed blackbody radiances at the reference wavelength.
Upwelling atmospheric radiance and atmospheric transmission are approximated
using the following method. First, the surface temperature of every pixel is estimated
from the data and used to approximate the brightness temperature using the Planck
function and assuming an emissivity of 1. Next, a line is fitted (using one of two
methods) to a scatter plot of radiance vs. brightness temperature. The atmospheric
upwelling and transmission are then derived from the slope and offset of this line.
1. Select one of the following from the ENVI main menu bar:
• Basic Tools → Preprocessing → Calibration Utilities →
Thermal Atm Correction
• Basic Tools → Preprocessing → Data-Specific Utilities → Thermal
IR → Thermal Atm Correction
• Basic Tools → Preprocessing → Data-Specific Utilities → TIMS →
Thermal Atm Correction
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Thermal Atm Correction Parameters dialog
appears.
3. Enter the Data Scale Factor needed to scale your data to units of W/m2/μm/sr.
The image output from this atmospheric correction uses the same units as the
input image. For example, if the results of the correction are used to calculate
emissivity and temperature, then the same scale factor must be specified.
4. Click Wavelength Units and select the units.
5. Use the toggle button to select either All or Max Hit to determine which pixels
to use in the surface temperature estimation regression.
Selecting All will estimate the surface temperature for each pixel by using the
maximum value of the brightness temperatures found throughout the input

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 393

wavelengths. Selecting Max Hit will estimate the surface temperature for only
those pixels that have their maximum brightness temperatures at a particular
wavelength. The wavelength used is the wavelength that has the largest number
of pixels with a maximum brightness temperature value.

ENVI User’s Guide Preprocessing Utilities


394 Chapter 3: Basic Tools

6. Use the toggle button to select either Top of Bins or Normalized Regression
for the scatter plot fitting technique.
• Top of Bins fits a line to the top of the scatter plot of radiance vs.
brightness temperature. The top of the scatter plot corresponds to those
pixels whose emissivity is closest to 1. This Top of Bins fit is achieved by
doing a standard least squares regression on the top 5% of the data in the
scatter plot. This technique is susceptible to sensor noise which may occur
at the top of the scatter plot.
• Normalized Regression first fits a line to the scatter plot of radiance vs.
brightness temperature by doing a standard least squares regression. The
residuals of this fit are then compared to a normal probability plot. Another
regression is done on the residuals in the normal plot. Points that are 3
times the noise equivalent sensor response (NESR) away from the
regression line are deemed outliers and are removed. A final regression is
done on the scatter plot using this reduced set of pixels. This method uses
all the points in the scatter plot that are not outliers and does not fit to only
the top of the scatter plot where the emissivity values are closest to 1.
• If you choose Normalized Regression, enter the Noise Equivalent
Sensor Response in the field.
7. Enter a gain and offset output filename, if desired.
8. Use the toggle button to select whether to plot the resulting atmospheric
transmission and upwelling spectra.
9. Enter an output filename.
10. Click OK. ENVI adds the resulting output to the Available Bands List.
References:
Johnson, B. R. and S. J. Young, “In-Scene Atmospheric Compensation: Application
to SEBASS Data Collected at the ARM Site,” Technical Report, Space and
Environment Technology Center, The Aerospace Corporation, May 1998.
Hernandez-Baquero, E., “Characterization of the Earths Surface and Atmosphere
from Multispectral and Hyperspectral Thermal Imagery,” Ph.D. Dissertation,
Rochester Institute of Technology, Chester F. Carlsom Center for Imaging Science,
Rochester, NY, 2000.
Converting to Emissivity and Temperature
The radiation emitted from a surface in the thermal infrared wavelengths is a function
of both the surface temperature and emissivity. The emissivity relates to the
composition of the surface and is often used for surface constituent mapping.

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 395

ENVI uses three techniques to separate the emissivity and temperature information in
radiance data measured with thermal infrared sensors. Both the Reference Channel
Emissivity and Emissivity Normalization techniques assume a fixed emissivity
value and produce emissivity and temperature outputs. The Alpha Residuals
technique does not provide temperature information.
References:
Hook, S. J., A. R. Gabell, A. A. Green, and P. S. Kealy, 1992. A comparison of
techniques for extracting emissivity information from thermal infrared data for
geologic studies. Remote Sensing of Environment, Vol. 42, pp. 123-135.
Kealy, P. S. and S. J. Hook, 1993., Separating temperature and emissivity in thermal
infrared multispectral scanner data: Implications for recovering land surface
temperatures. IEEE Transactions on Geoscience and Remote Sensing, Vol. 31, No. 6,
pp.1155-1164.
Using Reference Channel Emissivity
Use Reference Channel Emissivity to calculate emissivity and temperature values
from thermal infrared radiance data. The reference channel emissivity technique
assumes that all the pixels in one channel (band) of the thermal infrared data have a
constant emissivity. Using this constant emissivity, a temperature image is calculated
and those temperatures are used to calculate the emissivity values in all the other
bands using the Planck function. You can select the band to keep constant and enter
the desired emissivity value for that band. See the previous references for more
information.
1. Select one of the following from the ENVI main menu bar:
• Basic Tools → Preprocessing → Data-Specific Utilities → Thermal
IR → Reference Channel Emissivity
• Basic Tools → Preprocessing → Calibration Utilities → Calculate
Emissivity → Reference Channel
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Calculate Emissivity parameters dialog
appears.
3. Enter a data scale factor to scale the radiance values into the units of
W/m2/μm/sr (for example, if your data is in microflicks (μW/cm2/μm/sr) enter
a scale factor of .01).
4. Enter a wavelength scale factor to scale the wavelengths that are read from the
header into units of μm.

ENVI User’s Guide Preprocessing Utilities


396 Chapter 3: Basic Tools

5. From the Emissivity Band drop-down list, select which band to set to a
constant emissivity value.
6. In the Assumed Emissivity Value field, enter the emissivity value for the
constant band.
7. Click the Output Temperature Image? toggle button to designate whether or
not to output a temperature image. Enter an output filename.
8. Enter an output filename for the emissivity data.
9. Click OK. ENVI adds the temperature image (single band) and emissivity data
cube (same number of bands as input radiance data) to the Available Bands
List.
Using Emissivity Normalization
Use Emissivity Normalization to calculate emissivity and temperature values from
thermal infrared radiance data. The emissivity normalization technique calculates the
temperature for every pixel and band in the data using a fixed emissivity value. The
highest temperature for each pixel is used to calculate the emissivity values using the
Planck function. You can enter the desired fixed emissivity value. See the references
in the introduction to “Thermal IR Utilities” on page 391 for more information.
1. Select one of the following from the ENVI main menu bar:
• Basic Tools → Preprocessing → Data-Specific Utilities → Thermal
IR → Emissivity Normalization
• Basic Tools → Preprocessing → Calibration Utilities → Calculate
Emissivity → Emissivity Normalization
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Calculate Emissivity parameters dialog
appears.
3. Enter a data scale factor to scale the radiance values into the units of
W/m2/μm/sr (for example, if your data is in microflicks (μW/cm2/μm/sr) enter
a scale factor of .01).
4. Enter a wavelength scale factor to scale the wavelengths (read from the header)
into units of μm.
5. In the Assumed Emissivity Value field, enter the fixed emissivity value to use
to calculate the temperatures.
6. Click the Output Temperature Image? toggle button to designate whether or
not to output a temperature image. Enter an output filename.

Preprocessing Utilities ENVI User’s Guide


Chapter 3: Basic Tools 397

7. Enter an output filename for the emissivity data.


8. Click OK. ENVI adds the temperature image (single band) and emissivity data
cube (same number of bands as input radiance data) to the Available Bands
List.
Using Alpha Residuals
Use Alpha Residuals to produce alpha residual spectra that approximate the shape of
emissivity spectra from thermal infrared radiance data. ENVI uses Wien’s
approximation of the Planck function so it can linearize the equation with logarithms.
ENVI separates the temperature and emissivity terms, and uses means to subtract the
temperature term out.
The alpha residual spectra are a function of emissivity only and have a similar shape
as emissivity spectra but have a zero mean. Therefore emissivity spectra must be
scaled for direct comparison to alpha residual spectra. You can calculate emissivity
spectra from alpha residual spectra using empirical data as described in the Kealy,
1993 reference mentioned in the introduction to “Thermal IR Utilities” on page 391.
1. Select one of the following from the ENVI main menu bar:
• Basic Tools → Preprocessing → Data-Specific Utilities → Thermal
IR → Alpha Residuals
• Basic Tools → Preprocessing → Calibration Utilities → Calculate
Emissivity → Alpha Residuals
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Calculate Emissivity parameters dialog
appears.
3. Enter a data scale factor to scale the radiance values into the units of
W/m2/μm/sr (for example, if your data is in microflicks (μW/cm2/μm/sr) enter
a scale factor of .01).
4. Enter a wavelength scale factor to scale the wavelengths (read from the header)
into units of μm.
5. Enter an output filename.
6. Click OK. ENVI adds the alpha residual data cube (same number of bands as
input radiance data) to the Available Bands List.

ENVI User’s Guide Preprocessing Utilities


398 Chapter 3: Basic Tools

Preprocessing Utilities ENVI User’s Guide


Chapter 4
Classification Tools

This chapter covers the following topics:

The Classification Menu . . . . . . . . . . . . . . 400 Collecting Endmember Spectra . . . . . . . . 439


Supervised Classification . . . . . . . . . . . . . 401 Creating Class Images from ROIs . . . . . . 456
Unsupervised Classification . . . . . . . . . . . 425 Post Classification . . . . . . . . . . . . . . . . . . 457
Decision Tree Classifier . . . . . . . . . . . . . . 430

ENVI User’s Guide 399


400 Chapter 4: Classification Tools

The Classification Menu


Use the Classification menu to access ENVI’s classification functions. Functions
include supervised and unsupervised classification, collecting endmembers,
classifying previous rule images, calculating class statistics and confusion matrices,
applying majority and minority analysis to classification images, clumping and
sieving classes, combining classes, overlaying classes on gray scale images,
calculating buffer zone images, calculating segmentation images, and exporting
classes to vector layers.

The Classification Menu ENVI User’s Guide


Chapter 4: Classification Tools 401

Supervised Classification
Use Supervised classification to cluster pixels in a dataset into classes corresponding
to user-defined training classes.
Training classes are groups of pixels (ROIs) or individual spectra. Select them as
representative areas or materials that you want mapped in the output. You should try
to select ROIs that are homogenous. You can examine the separability of your ROIs
by exporting them to an n-D Visualizer and looking at the distribution of the points
within each ROI (they should cluster tightly together) and looking for overlap
between the classes (they should not overlap). For details, see “Exporting ROIs to the
n-D Visualizer” on page 344. You can also get a report of the separability values
between ROI pairs (see “Computing ROI Separability” on page 339).
Supervised classification techniques include parallelepiped, minimum distance,
Mahalanobis distance, maximum likelihood, Spectral Angle Mapper (SAM), Spectral
Information Divergence (SID), and binary encoding.
For all supervised classification methods, you have an option to create rule images
(which is recommended). Rule images show the classification results before final
assignment of classes. For example, the pixel values in the rule images (one per class)
for a minimum distance classification represent the distance between the class and
each pixel. You can use these rule images in the rule classifier to adjust thresholds
and generate new classification images (see “Classifying from Rule Images” on
page 458).
The supervised classification methods in ENVI (excluding Neural Net) differentiate
masked pixels from unclassified pixels. ENVI does not apply the algorithm to
masked pixels because they are already masked out. Conversely, unclassified pixels
are those to which ENVI applies the classification algorithm, but it is unable to assign
the pixels to one of the defined classes. If you choose a mask band upon input, ENVI
creates a class called Masked Pixels. While the unclassified pixels are given a pixel
value in the output image of 0, the output pixel value of the Masked Pixels class is
[max class value]+1, where max class value is the value given to the last valid class.
This new Masked Pixels class enables you to accurately apply a confusion matrix to a
classified image containing masked pixels.
You must define training classes before performing supervised classification. You can
define training classes by either using the Endmember Collection dialog to select
spectra (see “Collecting Endmember Spectra” on page 439), or by defining ROIs (see
“Defining ROIs” on page 323). You can define the training sites as multiple irregular
polygons, vectors, and/or individual pixels.

ENVI User’s Guide Supervised Classification


402 Chapter 4: Classification Tools

Using the Endmember Collection option (described in “Collecting Endmember


Spectra” on page 439) allows you to use the same training classes or endmembers for
several classifications without reloading, thus simplifying comparison of
classification results. You can define training classes using the Endmember
Collection dialog or ROI tool.

Applying Parallelepiped Classification


Parallelepiped classification uses a simple decision rule to classify multispectral data.
The decision boundaries form an n-dimensional parallelepiped classification in the
image data space. The dimensions of the parallelepiped classification are defined
based upon a standard deviation threshold from the mean of each selected class. If a
pixel value lies above the low threshold and below the high threshold for all n bands
being classified, it is assigned to that class. If the pixel value falls in multiple classes,
ENVI assigns the pixel to the last class matched. Areas that do not fall within any of
the parallelepiped classes are designated as unclassified.
Reference:
J.A.Richards, 1999, Remote Sensing Digital Image Analysis, Springer-Verlag, Berlin,
p. 240.
1. Select one of the following:
• From the ENVI main menu bar, select Classification → Supervised →
Parallelpiped.
• From the Endmember Collection dialog menu bar, select Algorithm →
Parallelpiped (see “Selecting Processing Techniques” on page 452 for
further details).
The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The Parallelepiped Parameters
dialog appears.

Supervised Classification ENVI User’s Guide


Chapter 4: Classification Tools 403

Figure 4-1: Parallelepiped Parameters Dialog

3. In the Select Classes from Regions list, select ROIs and/or vectors as training
classes. The ROIs listed are derived from the available ROIs in the ROI Tool
dialog. The vectors listed are derived from the open vectors in the Available
Vectors List.
4. Select one of the following thresholding options from the Set Max stdev from
Mean area:
• None: Use no standard deviation threshold.
• Single Value: Use a single threshold for all classes. Enter a value in the
Max stdev from Mean field to designate the number of standard
deviations to use around the mean.
• Multiple Values: Enter a different threshold for each class. Use this option
as follows:
A. In the list of classes, select the class or classes to which you want to assign
different threshold values and click Multiple Values. The Assign Max
stdev from Mean dialog appears.

ENVI User’s Guide Supervised Classification


404 Chapter 4: Classification Tools

B. Select a class, then enter a threshold value in the field at the bottom of the
dialog. Repeat for each class. Click OK when you are finished.
5. Select classification output to File or Memory.
6. Use the Output Rule Images? toggle button to select whether or not to create
rule images. Use rule images to create intermediate classification image results
before final assignment of classes. You can later use rule images in the Rule
Classifier to create a new classification image without having to recalculate the
entire classification (see “Classifying from Rule Images” on page 458).
7. If you selected Yes to output rule images, select output to File or Memory.
8. Click Preview to see a 256 x 256 spatial subset from the center of the output
classification image (see “Previewing the Output Classification Image” in the
next section for more information). Change the parameters as needed and click
Preview again to update the display.
9. Click OK. ENVI adds the resulting output to the Available Bands List. The
pixel values of the resulting rule images range from 0 to n (where n is the
number of bands) and represent the number of bands that satisfied the
parallelepiped criteria. There is one rule image for each selected class. Areas
that match all bands for a particular class are carried over as classified areas
into the classified image. If more than one match occurs, the first class to
evaluate (the first ROI from the selected list) carries over into the classified
image.

Previewing the Output Classification Image


Click Preview in the Parameters dialog to open a preview window within the dialog.
The preview window in the Parameters dialog allows you to quickly see a 256 x 256
spatial subset from the center of the output classification image. You can adjust your
classification parameters and update the preview window to determine how these
changes affect the resulting classification.
Below the preview window is a Change View button and a label describing the x and
y pixel ranges of the spatial subset. Clicking the Change View button initiates a
Select Spatial Subset dialog, where you can modify the location of the spatial subset
interactively or by using a specified value. For details, see “Spatial Subsetting” on
page 215.
For SAM classification, the preview window is only available after you click Apply
in the Endmember Collection dialog.

Supervised Classification ENVI User’s Guide


Chapter 4: Classification Tools 405

Applying Minimum Distance Classification


The minimum distance technique uses the mean vectors of each endmember and
calculates the Euclidean distance from each unknown pixel to the mean vector for
each class. All pixels are classified to the nearest class unless a standard deviation or
distance threshold is specified, in which case some pixels may be unclassified if they
do not meet the selected criteria.
Reference:
J.A.Richards, 1999, Remote Sensing Digital Image Analysis, Springer-Verlag, Berlin,
p. 240.
1. Select one of the following:
• From the ENVI main menu bar, select Classification → Supervised →
Minimum Distance.
• From the Endmember Collection dialog menu bar, select Algorithm →
Minimum Distance (see “Selecting Processing Techniques” on page 452
for further details).
The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The Minimum Distance
Parameters dialog appears.
3. In the Select Classes from Regions list, select ROIs and/or vectors as training
classes. The ROIs listed are derived from the available ROIs in the ROI Tool
dialog. The vectors listed are derived from the open vectors in the Available
Vectors List.
Minimum Distance requires at least two regions.
4. Select one of the following thresholding options each from the Set Max stdev
from Mean and/or Set Max Distance Error areas.
If you are running the Minimum Distance Classification from within the
Endmember Collection dialog, the Max Stdev from Mean area is not
available.
• None: Use no standard deviation threshold.

ENVI User’s Guide Supervised Classification


406 Chapter 4: Classification Tools

• Single Value: Use a single threshold for all classes. Enter a value in the
Max stdev from Mean and/or Set Max Distance Error fields. For Max
stdev from Mean, enter the number of standard deviations to use around
the mean. ENVI does not classify pixels outside this range. For Max
Distance Error, enter the value in DNs. ENVI does not classify pixels at a
distance greater than this value.
If you set values for both Set Max stdev from Mean and Set Max
Distance Error, the classification uses the smaller of the two to determine
which pixels to classify. If you select None for both parameters, then
ENVI classifies all pixels.
• Multiple Values: Enter a different threshold for each class. Use this option
as follows:
A. In the list of classes, select the class or classes to which you want to assign
different threshold values and click Multiple Values. The Assign Max
Distance Error dialog appears.
B. Select a class, then enter a threshold value in the field at the bottom of the
dialog. Repeat for each class. Click OK when you are finished.

Supervised Classification ENVI User’s Guide


Chapter 4: Classification Tools 407

Figure 4-2: Minimum Distance Parameters Dialog

5. Select classification output to File or Memory.


6. Use the Output Rule Images? toggle button to select whether or not to create
rule images. Use rule images to create intermediate classification image results
before final assignment of classes. You can later use rule images in the Rule
Classifier to create a new classification image without having to recalculate the
entire classification (see “Classifying from Rule Images” on page 458).
7. If you selected Yes to output rule images, select output to File or Memory.
8. Click Preview to see a 256 x 256 spatial subset from the center of the output
classification image (see “Previewing the Output Classification Image” on
page 404 for more information). Change the parameters as needed and click
Preview again to update the display.

ENVI User’s Guide Supervised Classification


408 Chapter 4: Classification Tools

9. Click OK. ENVI adds the resulting output to the Available Bands List. If you
selected to output rule images, ENVI creates one for each class with the pixel
values equal to the Euclidean distance from the class mean. Areas that satisfied
the minimum distance criteria are carried over as classified areas into the
classified image.

Applying Mahalanobis Distance Classification


The Mahalanobis distance classification is a direction-sensitive distance classifier
that uses statistics for each class. It is similar to the maximum likelihood
classification but assumes all class covariances are equal and therefore is a faster
method. All pixels are classified to the closest ROI class unless you specify a distance
threshold, in which case some pixels may be unclassified if they do not meet the
threshold.
Reference:
J.A.Richards, 1999, Remote Sensing Digital Image Analysis, Springer-Verlag, Berlin,
p. 240.
1. Select one of the following:
• From the ENVI main menu bar, select Classification → Supervised →
Mahalanobis Distance.
• From the Endmember Collection dialog menu bar, select Algorithm →
Mahalanobis Distance (see “Selecting Processing Techniques” on
page 452 for further details).
The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The Mahalanobis Distance
Parameters dialog appears.
3. Import (or re-import) the endmembers in the Endmember Collection dialog
after selecting Mahalanobis as the classification method so that ENVI will
import the endmember covariance information along with the endmember
spectra.
4. In the Select Classes from Regions list, select ROIs and/or vectors as training
classes. The ROIs listed are derived from the available ROIs in the ROI Tool
dialog. The vectors listed are derived from the open vectors in the Available
Vectors List.
5. Select one of the following thresholding options from the Set Max Distance
Error area:

Supervised Classification ENVI User’s Guide


Chapter 4: Classification Tools 409

• None: Use no standard deviation threshold.


• Single Value: Use a single threshold for all classes. Enter a value in the
Set Max Distance Error field, in DNs. ENVI does not classify pixels at a
distance greater than this value.
If you set values for both Set Max stdev from Mean and Set Max
Distance Error, the classification uses the smaller of the two to determine
which pixels to classify. If you select None for both parameters, then
ENVI classifies all pixels.
• Multiple Values: Enter a different threshold for each class. Use this option
as follows:
A. In the list of classes, select the class or classes to which you want to assign
different threshold values and click Multiple Values. The Assign Max
Distance Error dialog appears.
B. Select a class, then enter a threshold value in the field at the bottom of the
dialog. Repeat for each class. Click OK when you are finished.
6. Select classification output to File or Memory.
7. Use the Output Rule Images? toggle button to select whether or not to create
rule images. Use rule images to create intermediate classification image results
before final assignment of classes. You can later use rule images in the Rule
Classifier to create a new classification image without having to recalculate the
entire classification (see “Classifying from Rule Images” on page 458).
8. If you selected Yes to output rule images, select output to File or Memory.
9. Click Preview to see a 256 x 256 spatial subset from the center of the output
classification image (see “Previewing the Output Classification Image” on
page 404 for more information). Change the parameters as needed and click
Preview again to update the display.
10. Click OK. ENVI adds the resulting output to the Available Bands List. If you
selected to output rule images, ENVI creates one for each class with the pixel
values equal to the distances from the class means. Areas that satisfied the
minimum distance criteria are carried over as classified areas into the classified
image. If a pixel falls into two or more classes, ENVI classifies it into the class
coinciding with the first-listed ROI.

Applying Maximum Likelihood Classification


Maximum likelihood classification assumes that the statistics for each class in each
band are normally distributed and calculates the probability that a given pixel belongs

ENVI User’s Guide Supervised Classification


410 Chapter 4: Classification Tools

to a specific class. Unless you select a probability threshold, all pixels are classified.
Each pixel is assigned to the class that has the highest probability (that is, the
maximum likelihood). If the highest probability is smaller than a threshold you
specify, the pixel remains unclassified.
ENVI implements maximum likelihood classification by calculating the following
discriminant functions for each pixel in the image (Richards, 1999):

Figure 4-3: Discriminant Functions Calculated for Each Pixel

Where:
i = class
x = n-dimensional data (where n is the number of bands)
p(ωi) = probability that class ωi occurs in the image and is assumed the same for
all classes
|Σi| = determinant of the covariance matrix of the data in class ωi
Σi-1 = its inverse matrix
mi = mean vector
Reference:
Richards, J.A., 1999, Remote Sensing Digital Image Analysis, Springer-Verlag,
Berlin, p. 240.
1. Select one of the following:
• From the ENVI main menu bar, select Classification → Supervised →
Maximum Likelihood.
• From the Endmember Collection dialog menu bar, select Algorithm →
Maximum Likelihood (see “Selecting Processing Techniques” on
page 452 for further details).
The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and Masking, then click OK. The Maximum Likelihood
Parameters dialog appears.

Supervised Classification ENVI User’s Guide


Chapter 4: Classification Tools 411

3. Import (or re-import) the endmembers in the Endmember Collection dialog


after selecting Maximum Likelihood as the classification method so that
ENVI will import the endmember covariance information along with the
endmember spectra.
4. In the Select Classes from Regions list, select ROIs and/or vectors as training
classes. The ROIs listed are derived from the available ROIs in the ROI Tool
dialog. The vectors listed are derived from the open vectors in the Available
Vectors List.
5. Select one of the following thresholding options from the Set Probability
Threshold area:
• None: Use no threshold.
• Single Value: Use a single threshold for all classes. Enter a value between
0 and 1 in the Probability Threshold field. ENVI does not classify pixels
with a value lower than this value.
• Multiple Values: Enter a different threshold for each class. Use this option
as follows:
A. In the list of classes, select the class or classes to which you want to assign
different threshold values and click Multiple Values. The Assign
Probability Threshold dialog appears.
B. Select a class, then enter a threshold value in the field at the bottom of the
dialog. Repeat for each class. Click OK when you are finished.
6. Enter a Data Scale Factor. The scale factor is a division factor used to convert
integer scaled reflectance or radiance data into floating-point values. For
example, for reflectance data scaled into the range of zero to 10,000, set the
scale factor to 10,000. For uncalibrated integer data, set the scale factor to the
maximum value the instrument can measure 2n - 1, where n is the bit depth of
the instrument). For example, for 8-bit instruments (such as Landsat 4) set the
scale factor to 255, for 10-bit instruments (such as NOAA 12 AVHRR) set the
scale factor to 1023, for 11-bit instruments (such as IKONOS) set the scale
factor to 2047.
7. Select classification output to File or Memory.
8. Use the Output Rule Images? toggle button to select whether or not to create
rule images. Use rule images to create intermediate classification image results
before final assignment of classes. You can later use rule images in the Rule
Classifier to create a new classification image without having to recalculate the
entire classification (see “Classifying from Rule Images” on page 458).

ENVI User’s Guide Supervised Classification


412 Chapter 4: Classification Tools

9. If you selected Yes to output rule images, select output to File or Memory.
10. Click Preview to see a 256 x 256 spatial subset from the center of the output
classification image (see “Previewing the Output Classification Image” on
page 404 for more information about this class preview). Change the
parameters as needed and click Preview again to update the display.
11. Click OK. ENVI adds the resulting output to the Available Bands List. The
rule images, one per class, contain a maximum likelihood discriminant
function with a modified Chi Squared probability distribution. Higher rule
image values indicate higher probabilities. The final classification allocates
each pixel to the class with the highest probability.
To convert between the rule image’s data space and probability, use the Rule
Classifier. For the classification threshold, enter the probability threshold used in the
maximum likelihood classification as a percentage (for example, 95%) (see
“Classifying from Rule Images” on page 458 for more information). The Rule
Classifier automatically finds the corresponding rule image Chi Squared value.
Tip
If you specify an ROI as a training set for maximum likelihood classification, you
may receive a “Too May Iterations in TQLI” error message if the ROI includes only
pixels that all have the same value in one band. A band with no variance at all
(every pixel in that band in the subset has the same value) leads to a singularity
problem where the band becomes a near-perfect linear combination of other bands
in the dataset, resulting in an error message.

Applying Spectral Angle Mapper Classification


Spectral Angle Mapper (SAM) is a physically-based spectral classification that uses
an n-D angle to match pixels to reference spectra. The algorithm determines the
spectral similarity between two spectra by calculating the angle between the spectra
and treating them as vectors in a space with dimensionality equal to the number of
bands. This technique, when used on calibrated reflectance data, is relatively
insensitive to illumination and albedo effects. Endmember spectra used by SAM can
come from ASCII files or spectral libraries, or you can extract them directly from an
image (as ROI average spectra). SAM compares the angle between the endmember
spectrum vector and each pixel vector in n-D space. Smaller angles represent closer
matches to the reference spectrum. Pixels further away than the specified maximum
angle threshold in radians are not classified.
SAM classification assumes reflectance data. However, if you use radiance data, the
error is generally not significant because the origin is still near zero.

Supervised Classification ENVI User’s Guide


Chapter 4: Classification Tools 413

Reference:
Kruse, F. A., A. B. Lefkoff, J. B. Boardman, K. B. Heidebrecht, A. T. Shapiro, P. J.
Barloon, and A. F. H. Goetz, 1993, “The Spectral Image Processing System (SIPS) -
Interactive Visualization and Analysis of Imaging spectrometer Data.” Remote
Sensing of the Environment, v. 44, p. 145 - 163.
Tip
You can use ENVI’s Spectral Hourglass Wizard to guide you through the spectral
hourglass processing flow, which includes SAM classification, to find and map
image spectral endmembers from hyperspectral or multispectral data. See “Spectral
Hourglass Wizard” on page 829.

1. Select one of the following:


• From the ENVI main menu bar, select Classification → Supervised →
Spectral Angle Mapper.
• From the Endmember Collection dialog menu bar, select Algorithm →
Spectral Angle Mapper (see “Selecting Processing Techniques” on
page 452 for further details).
The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The Endmember Collection:SAM
dialog appears.
3. From the Endmember Collection:SAM dialog menu bar, select Import →
spectra_source and collect endmember spectra from a variety of sources. For
details, see “Importing Spectra” on page 442 and “Managing Endmember
Spectra” on page 453.
4. In the Endmember Collection:SAM dialog, click Apply. The Spectral Angle
Mapper Parameters dialog appears.
5. Select one of the following thresholding options from the Set Maximum
Angle (radians) area:
• None: Use no threshold.
• Single Value: Use a single threshold for all classes. Enter a value, in
radians, in the Maximum Angle (radians) field. This is the maximum
acceptable angle between the endmember spectrum vector and the pixel
vector (in # of bands dimensional space). The default is 0.1 radians. ENVI
does not classify pixels with an angle larger than this value.

ENVI User’s Guide Supervised Classification


414 Chapter 4: Classification Tools

• Multiple Values: Enter a different threshold for each class. Use this option
as follows:
A. In the list of classes, select the class or classes to which you want to assign
different threshold values and click Multiple Values. The Assign
Maximum Angle (radians) dialog appears.
B. Select a class, then enter a threshold value in the field at the bottom of the
dialog. Repeat for each class. Click OK when you are finished.
6. Select classification output to File or Memory.
7. Use the Output Rule Images? toggle button to select whether or not to create
rule images. Use rule images to create intermediate classification image results
before final assignment of classes. You can later use rule images in the Rule
Classifier to create a new classification image without having to recalculate the
entire classification (see “Classifying from Rule Images” on page 458).
8. If you selected Yes to output rule images, select output to File or Memory.
9. Click Preview to see a 256 x 256 spatial subset from the center of the output
classification image (see “Previewing the Output Classification Image” on
page 404 for more information about this class preview). Change the
parameters as needed and click Preview again to update the display.
10. Click OK. ENVI adds the resulting output to the Available Bands List. 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 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.

Applying Spectral Information Divergence


Classification
Spectral Information Divergence (SID) is a spectral classification method that uses a
divergence measure to match pixels to reference spectra. The smaller the divergence,
the more likely the pixels are similar. Pixels with a measurement greater than the
specified maximum divergence threshold are not classified. Endmember spectra used
by SID can come from ASCII files or spectral libraries, or you can extract them
directly from an image (as ROI average spectra).

Supervised Classification ENVI User’s Guide


Chapter 4: Classification Tools 415

Reference:
Du, H., C.-I. Chang, H. Ren, F.M. D’Amico, J. O. Jensen, J., “New Hyperspectral
Discrimination Measure for Spectral Characterization,” Optical Engineering, Vol.
43, No. 8, 2004, 1777-1786.
1. Select one of the following:
• From the ENVI main menu bar, select Classification → Supervised →
Spectral Information Divergence.
• From the Endmember Collection dialog menu bar, select Algorithm →
Spectral Information Divergence (see “Selecting Processing
Techniques” on page 452 for further details).
The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The Endmember Collection:SID
dialog appears.
3. From the Endmember Collection:SID dialog menu bar, select Import →
spectra_source and collect endmember spectra from a variety of sources. For
details, see “Importing Spectra” on page 442 and “Managing Endmember
Spectra” on page 453.
4. In the Endmember Collection:SID dialog, click Apply. The Spectral
Information Divergence Parameters dialog appears.
5. Select one of the following thresholding options from the Set Maximum
Divergence Threshold area:
• None: Use no threshold.
• Single Value: Use a single threshold for all classes. Enter a value in the
Maximum Divergence Threshold field. This is the minimum allowable
variation between the endmember spectrum vector and the pixel vector.
The default value is .05, but can vary substantially given the nature of the
similarity measure. A threshold that discriminates well for one pair of
spectral vectors may be either too sensitive or not sensitive enough for
another pair due to the similar/dissimilar nature of their probability
distributions.
• Multiple Values: Enter a different divergence to test each class against its
corresponding maximum spectral divergence. When selected, the Assign

ENVI User’s Guide Supervised Classification


416 Chapter 4: Classification Tools

Maximum Divergence Threshold dialog appears. Use this dialog as


follows:
A. Select the class to assign a threshold value to and edit the value in the
Edit Selected Value field. Click Reset to return to the default value.
B. Repeat until the thresholds are edited as needed. Click OK when you
are finished.
6. Select classification output to File or Memory.
7. Use the Output Rule Images? toggle button to select whether or not to create
rule images. Use rule images to create intermediate classification image results
before final assignment of classes. You can later use rule images in the Rule
Classifier to create a new classification image without having to recalculate the
entire classification (see “Classifying from Rule Images” on page 458).
8. If you selected Yes to output rule images, select output to File or Memory.
9. Click Preview to see a 256 x 256 spatial subset from the center of the output
classification image (see “Previewing the Output Classification Image” on
page 404 for more information about this class preview). Change the
parameters as needed and click Preview again to update the display.
10. Click OK. ENVI adds the resulting output to the Available Bands List. The
output from SID is a classified image and a set of rule images (one per
endmember). The pixel values of the rule images represent the SID value (the
output of the equation that defines SID for a pair of spectral vectors). Lower
spectral divergence measures represent better matches to the endmember
spectra. Areas that satisfied the maximum divergence threshold criteria are
carried over as classified areas into the classified image.

Applying Binary Encoding Classification


The binary encoding classification technique encodes the data and endmember
spectra into zeros and ones, based on whether a band falls below or above the
spectrum mean, respectively. An exclusive OR function compares each encoded
reference spectrum with the encoded data spectra and produces a classification
image. All pixels are classified to the endmember with the greatest number of bands
that match, unless you specify a minimum match threshold, in which case some
pixels may be unclassified if they do not meet the criteria.

Supervised Classification ENVI User’s Guide


Chapter 4: Classification Tools 417

Reference:
Mazer, A. S., Martin, M., Lee, M., and Solomon, J. E., 1988, “Image Processing
Software for Imaging Spectrometry Analysis,” Remote Sensing of the Environment, v.
24, no. 1, p. 201-210.
1. Select one of the following:
• From the ENVI main menu bar, select Classification → Supervised →
Binary Encoding.
• From the Endmember Collection dialog menu bar, select Algorithm →
Binary Encoding (see “Selecting Processing Techniques” on page 452 for
further details).
The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The Binary Encoding Parameters
dialog appears.
3. In the Select Classes from Regions list, select ROIs and/or vectors as training
classes. The ROIs listed are derived from the available ROIs in the ROI Tool
dialog. The vectors listed are derived from the open vectors in the Available
Vectors List.
4. Select one of the following thresholding options from the Set Minimum
Encoding Threshold area:
• None: Use no threshold.
• Single Value: Use a single threshold for all classes. Enter a decimal
percentage value (from 0.0 to 1.0) in the Minimum Encoding Threshold
field. The percentage value represents the number of bands that must
match.
• Multiple Values: Enter a different threshold for each class. Use this option
as follows:
A. In the list of classes, select the class or classes to which you want to assign
different threshold values and click Multiple Values. The Assign
Minimum Encoding Threshold dialog appears.
B. Select a class, then enter a threshold value in the field at the bottom of the
dialog. If you do not enter a minimum value, ENVI classifies all pixels.
Repeat for each class. Click OK when you are finished.
5. Select classification output to File or Memory.

ENVI User’s Guide Supervised Classification


418 Chapter 4: Classification Tools

6. Use the Output Rule Images? toggle button to select whether or not to create
rule images. Use rule images to create intermediate classification image results
before final assignment of classes. You can later use rule images in the Rule
Classifier to create a new classification image without having to recalculate the
entire classification (see “Classifying from Rule Images” on page 458).
7. If you selected Yes to output rule images, select output to File or Memory.
8. Click Preview to see a 256 x 256 spatial subset from the center of the output
classification image (see “Previewing the Output Classification Image” on
page 404 for more information about this class preview). Change the
parameters as needed and click Preview again to update the display.
9. Click OK. ENVI adds the resulting output to the Available Bands List. If you
selected to output rule images, ENVI creates rule images for each class with
the pixel values equal to the percentage (0-100%) of bands that matched that
class. Areas that satisfied the minimum threshold are carried over as classified
areas into the classified image.

Supervised Classification ENVI User’s Guide


Chapter 4: Classification Tools 419

Applying Neural Net Classification


Use Neural Net to apply a layered feed-forward neural network classification
technique. The Neural Net technique uses standard backpropagation for supervised
learning. You can select the number of hidden layers to use and you can choose
between a logistic or hyperbolic activation function. Learning occurs by adjusting the
weights in the node to minimize the difference between the output node activation
and the output. The error is backpropagated through the network and weight
adjustment is made using a recursive method. You can use Neural Net classification
to perform non-linear classification.
References:
Richards, J.A., 1999, Remote Sensing Digital Image Analysis, Springer-Verlag,
Berlin, p.240.
Rumelhart, D., and J. Mc Clelland, 1987 Parallel Distributed Processing Vol. 1, MIT
Press, Chp. 8 “Learning Internal Representation by Error Propagation,” Rumelhart,
Hinton, and Williams.
You must first have ROIs selected to use as training pixels for each class. The more
pixels, the better the results will be.
1. From the ENVI main menu bar, select Classification → Supervised →
Neural Net. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The Neural Net Parameters dialog
appears.
3. In the Select Classes from Regions list, select ROIs and/or vectors as training
classes. The ROIs listed are derived from the available ROIs in the ROI Tool
dialog. The vectors listed are derived from the open vectors in the Available
Vectors List.
4. Select the activation method from one of the Activation radio buttons.
5. In the Training Threshold Contribution field, enter a value from 0 to 1.0.
The training threshold contribution determines the size of the contribution of
the internal weight with respect to the activation level of the node. It is used to
adjust the changes to a node’s internal weight. The training algorithm
interactively adjusts the weights between nodes and optionally the node
thresholds to minimize the error between the output layer and the desired
response. Setting the Training Threshold Contribution to zero does not
adjust the node’s internal weights. Adjustments of the nodes internal weights

ENVI User’s Guide Supervised Classification


420 Chapter 4: Classification Tools

could lead to better classifications but too many weights could also lead to
poor generalizations.
6. In the Training Rate field, enter a value from 0 to 1.0. The training rate
determines the magnitude of the adjustment of the weights. A higher rate will
speed up the training, but will also increase the risk of oscillations or non-
convergence of the training result.
7. In the Training Momentum field, enter a value from 0 to 1.0. Entering a
momentum rate greater than zero allows you to set a higher training rate
without oscillations. A higher momentum rate trains with larger steps than a
lower momentum rate. Its effect is to encourage weight changes along the
current direction.
8. In the Training RMS Exit Criteria field, enter the RMS error value at which
the training should stop.
If the RMS error, which is shown in the plot during training, falls below the
entered value, the training will stop, even if the number of iterations has not
been met. The classification will then be executed.
9. Enter the Number of Hidden Layers to use. For a linear classification, enter a
value of 0. With no hidden layers the different input regions must be linearly
separable with a single hyperplane. Non-linear classifications are performed by
setting the Number of Hidden Layers to a value of 1 or greater. When the
input regions are linearly inseparable and require two hyperplanes to separate
the classes you must have a least one hidden layer to solve the problem. Two
hidden layers are used to classify input space where the different elements are
neither contiguous or connected.
10. Enter the Number of Training Iterations.
11. To enter a minimum output activation threshold, enter a value in the Min
Output Activation Threshold field. If the activation value of the pixel being
classified is less than this threshold value, then that pixel will be labeled
unclassified in the output.
12. Select classification output to File or Memory.
13. Use the Output Rule Images? toggle button to select whether or not to create
rule images. Use rule images to create intermediate classification image results
before final assignment of classes. You can later use rule images in the Rule
Classifier to create a new classification image without having to recalculate the
entire classification (see “Classifying from Rule Images” on page 458).
14. If you selected Yes to output rule images, select output to File or Memory.

Supervised Classification ENVI User’s Guide


Chapter 4: Classification Tools 421

15. Click OK. ENVI adds the resulting output to the Available Bands List. During
the training, a plot window appears showing the RMS error at each iteration.
The error should decrease and approach a steady low value if proper training
occurs. If the errors are oscillating and not converging, try using a lower
training rate value or different ROIs. ENVI lists the resulting neural net
classification image, and rule images if output, in the Available Bands List.

Applying Support Vector Machine Classification


Use Support Vector Machine to perform supervised classification on images using a
support vector machine (SVM) to identify the class associated with each pixel. SVM
provides good classification results from complex and noisy data.
SVM is a classification system derived from statistical learning theory. It separates
the classes with a decision surface that maximizes the margin between the classes.
The surface is often called the optimal hyperplane, and the data points closest to the
hyperplane are called support vectors. The support vectors are the critical elements of
the training set.
You can adapt SVM to become a nonlinear classifier through the use of nonlinear
kernels. While SVM is a binary classifier in its simplest form, it can function as a
multiclass classifier by combining several binary SVM classifiers (creating a binary
classifier for each possible pair of classes). ENVI’s implementation of SVM uses the
pairwise classification strategy for multiclass classification. SVM classification
output is the decision values of each pixel for each class, which are used for
probability estimates. The probability values, stored in ENVI as rule images,
represent “true” probability in the sense that each probability falls in the range of 0 to
1, and the sum of these values for each pixel equals 1. ENVI performs classification
by selecting the highest probability. An optional threshold allows reporting pixels
with all probability values less than the threshold as unclassified.
SVM includes a penalty parameter that allows a certain degree of misclassification,
which is particularly important for non-separable training sets. The penalty parameter
controls the trade-off between allowing training errors and forcing rigid margins. It
creates a soft margin that permits some misclassifications, such as it allows some
training points on the wrong side of the hyperplane. Increasing the value of the
penalty parameter increases the cost of misclassifying points and forces the creation
of a more accurate model that may not generalize well.
The ENVI SVM classifier provides four types of kernels: linear, polynomial, radial
basis function (RBF), and sigmoid. The default is the radial basis function kernel,

ENVI User’s Guide Supervised Classification


422 Chapter 4: Classification Tools

which works well in most cases. The mathematical representation of each kernel is
listed below:

Linear K(xi,xj) = xiTxj


Polynomial K(xi,xj) = (γxiTxj + r)d, γ > 0
RBF K(xi,xj) = exp(-γ||xi - xj||2), γ > 0
Sigmoid K(xi,xj) = tanh(γxiTxj + r)

where:
γ is the gamma term in the kernel function for all kernel types except linear.
dis the polynomial degree term in the kernel function for the polynomial
kernel.
r is the bias term in the kernel function for the polynomial and sigmoid kernels.
γ, d, and r are user-controlled parameters, as their correct definition
significantly increases the accuracy of the SVM solution.
Processing large images through the SVM classifier is time-consuming at high
resolution, so ENVI’s SVM provides a hierarchical, reduced-resolution classification
process that improves performance without significantly degrading results. It is most
effective when operating in areas that contain homogenous features, such as water
bodies, parking lots, and fields. The hierarchical classification process performs the
following steps:
1. ENVI resamples the image to the lowest-resolution level requested.
2. ENVI resamples the ROIs to the same resolution.
3. The SVM classifier trains and runs on the reduced resolution image and ROIs.
The classifier performs training at the lower-resolution level (instead of at full
resolution and applying the results at each level) because retraining at each
level provides higher-accuracy results for the resampled imagery.
4. SVM examines all of the rule image values to determine those that exceed the
reclassification probability threshold. The class information and probability
information associated with these pixels are stored for later application to the
result image.
5. The examination process continues at the next higher-resolution pyramid level,
except that SVM performs classification only for pixels that are not marked as
classified at the lower-level resolution. The process repeats until it reaches the
full-resolution layer.

Supervised Classification ENVI User’s Guide


Chapter 4: Classification Tools 423

References:
Chang, C.-C. and C.-J. Lin. (2001). “LIBSVM: a library for support vector
machines.”
Hsu, C.-W., Chang, C.-C., and Lin, C.-J. (2007). “A practical guide to support vector
classification.” National Taiwan University. URL
http://ntu.csie.org/~cjlin/papers/guide/guide.pdf.
Wu, T.-F., C.-J. Lin, and R. C. Weng. (2004). “Probability estimates for multi-class
classification by pairwise coupling.” Journal of Machine Learning Research, 5:975-
1005, URL http://www.csie.ntu.edu.tw/~cjlin/papers/svmprob/svmprob.pdf.
You must first have ROIs selected to use as training pixels for each class. The more
pixels, the better the results.
1. From the ENVI main menu bar, select Classification → Supervised →
Support Vector Machine. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Support Vector Machine Classification
Parameters dialog appears.
3. In the Select Classes from Regions list, select at least one ROI and/or vector
as training classes. The ROIs listed are derived from the available ROIs in the
ROI Tool dialog. The vectors listed are derived from the open vectors in the
Available Vectors List.
4. Select the Kernel Type to use in the SVM classifier from the drop-down list.
Options are Linear, Polynomial, Radial Basis Function, and Sigmoid.
Depending on the option you select, additional fields may appear.
5. If the Kernel Type is Polynomial, set the Degree of Kernel Polynomial to
specify the degree use for the SVM classification. The minimum value is 1, the
default is 2, and the maximum value is 6.
6. If the Kernel Type is Polynomial or Sigmoid, specify the Bias in Kernel
Function for the kernel to use in the SVM algorithm. The default is 1.
7. If the kernel type is Polynomial, Radial Basis Function, or Sigmoid, use the
Gamma in Kernel Function field to set the gamma parameter used in the
kernel function. This value is a floating point value greater than 0. The default
is the inverse of the number of bands in the input image.
8. Specify the Penalty Parameter for the SVM algorithm to use. This value is a
floating point value greater than 0. The penalty parameter controls the trade-off
between allowing training errors and forcing rigid margins. Increasing the
value of the penalty parameter increases the cost of misclassifying points and

ENVI User’s Guide Supervised Classification


424 Chapter 4: Classification Tools

causes ENVI to create a more accurate model that may not generalize well.
The default is 100.
9. Use the Pyramid Levels field to set the number of hierarchical processing
levels to apply during the SVM training and classification process. If this value
is set to 0, ENVI processes the image at full resolution only. The default is 0.
The maximum value is dynamic; it varies with the size of the image you select.
The maximum value is determined by the criteria that the highest pyramid-
level image is larger than 64 x 64. For example, for an image that is
24000 x 24000, the maximum level is 8.
10. If the Pyramid Levels field is a value greater than zero, set the Pyramid
Reclassification Threshold to specify the probability threshold that a pixel
classified at a lower resolution level must meet to avoid being reclassified at a
finer resolution. The range is from 0 to 1. The default is 0.9.
11. Use the Classification Probability Threshold field to set the probability that
is required for the SVM classifier to classify a pixel. Pixels where all rule
probabilities are less than this threshold are unclassified. The range is from 0 to
1. The default is 0.0.
12. Select classification output to File or Memory.
13. Use the Output Rule Images? toggle button to select whether or not to create
rule images output. Use rule images to create intermediate classification image
results before final assignment of classes. You can later use rule images in the
Rule Classifier to create a new classification image without having to
recalculate the entire classification (see “Classifying from Rule Images” on
page 458).
14. If you selected Yes to output rule images, select output to File or Memory.
15. Click OK. ENVI adds the resulting output to the Available Bands List. If you
selected to output rule images, ENVI creates rule images for each class with
the pixel values equal to the percentage (0-100%) of bands that matched that
class. Areas that satisfied the minimum threshold are carried over as classified
areas into the classified image.

Supervised Classification ENVI User’s Guide


Chapter 4: Classification Tools 425

Unsupervised Classification
Use Unsupervised classification to cluster pixels in a dataset based on statistics only,
without any user-defined training classes. The unsupervised classification techniques
available are ISODATA and K-Means.

Using ISODATA Classification


ISODATA unsupervised classification calculates class means evenly distributed in the
data space then iteratively clusters the remaining pixels using minimum distance
techniques. Each iteration recalculates means and reclassifies pixels with respect to
the new means. Iterative class splitting, merging, and deleting is done based on input
threshold parameters. All pixels are classified to the nearest class unless a standard
deviation or distance threshold is specified, in which case some pixels may be
unclassified if they do not meet the selected criteria. This process continues until the
number of pixels in each class changes by less than the selected pixel change
threshold or the maximum number of iterations is reached.
Reference:
Tou, J. T. and R. C. Gonzalez, 1974. Pattern Recognition Principles, Addison-Wesley
Publishing Company, Reading, Massachusetts.
1. From the ENVI main menu bar, select Classification → Unsupervised →
IsoData. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The ISODATA Parameters dialog
appears.

ENVI User’s Guide Unsupervised Classification


426 Chapter 4: Classification Tools

Figure 4-4: ISODATA Parameters Dialog

3. Enter the minimum and maximum Number Of Classes to define. ENVI uses a
range for the number of classes because the ISODATA algorithm splits and
merges classes based on input thresholds and does not keep a fixed number of
classes.
4. Enter the maximum number of iterations in the Maximum Iterations field and
a change threshold (0-100%) in the Change Threshold % field. ENVI uses
the change threshold to end the iterative process when the number of pixels in
each class changes by less than the threshold. The classification ends when
either this threshold is met or the maximum number of iterations is reached.
5. Enter the minimum number of pixels needed to form a class in the Minimum #
Pixels in Class field. If there are fewer than the minimum number of pixels in
a class then ENVI deletes that class and the pixels placed in the class(es)
nearest to them.
6. Enter the maximum class standard deviation (in DN) in the Maximum Class
Stdv field. If the standard deviation of a class is larger than this threshold then
the class is split into two classes.
7. Enter the minimum distance (in DN) between class means and the maximum
number of merge pairs in the fields provided.

Unsupervised Classification ENVI User’s Guide


Chapter 4: Classification Tools 427

If the distance between class means is less than the minimum value entered,
then ENVI merges the classes. The maximum number of class pairs to merge
is set by the maximum number of merge pairs parameter.
To set the optional standard deviation to use around the class mean and/or the
maximum allowable distance error (in DN), enter the values in the Maximum
Stdev From Mean or Maximum Distance Error fields, respectively.
If you enter values for both of these optional parameters, the classification uses
the smaller of the two to determine which pixels to classify. If you do not enter
a value for either parameter, then all pixels are classified.
8. Select output to File or Memory.
9. Click OK. The status bar cycles from 0 to 100% for each iteration of the
classifier. ENVI adds the resulting output to the Available Bands List. ENVI
computes the statistics for the initial class seeds with a skip factor of 2.5 for
both the sample and line directions.

Using K-Means Classification


K-Means unsupervised classification calculates initial class means evenly distributed
in the data space then iteratively clusters the pixels into the nearest class using a
minimum distance technique. Each iteration recalculates class means and reclassifies
pixels with respect to the new means. All pixels are classified to the nearest class
unless a standard deviation or distance threshold is specified, in which case some
pixels may be unclassified if they do not meet the selected criteria. This process
continues until the number of pixels in each class changes by less than the selected
pixel change threshold or the maximum number of iterations is reached.
Reference:
Tou, J. T. and R. C. Gonzalez, 1974. Pattern Recognition Principles, Addison-Wesley
Publishing Company, Reading, Massachusetts.
1. From the ENVI main menu bar, select Classification → Unsupervised →
K-Means. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The K-Means Parameters dialog
appears.

ENVI User’s Guide Unsupervised Classification


428 Chapter 4: Classification Tools

Figure 4-5: K-Means Parameters Dialog

3. Enter the number of classes and maximum number of iterations in the fields
provided.
4. Enter a Change Threshold % (0-100%) which ENVI uses to end the iterative
process when the number of pixels in each class changes by less than the
threshold. The classification ends when either this threshold is met or the
maximum number of iterations is reached.
To set the optional standard deviation to use around the class mean and/or the
maximum allowable distance error (in DN), enter the values in the Maximum
Stdev From Mean or Maximum Distance Error fields, respectively.
If you enter values for both of these optional parameters, the classification uses
the smaller of the two to determine which pixels to classified. If you do not
enter a value for either parameter, then all pixels are classified.

Unsupervised Classification ENVI User’s Guide


Chapter 4: Classification Tools 429

5. Select output to File or Memory.


6. Click OK. The status bar cycles from 0 to 100% for each iteration of the
classifier. ENVI adds the resulting output to the Available Bands List. ENVI
computes the statistics for the initial class seeds with a skip factor of 2.5 for
both the sample and line directions.

ENVI User’s Guide Unsupervised Classification


430 Chapter 4: Classification Tools

Decision Tree Classifier


The Decision Tree classifier performs multistage classifications by using a series of
binary decisions to place pixels into classes. Each decision divides the pixels in a set
of images into two classes based on an expression. You can divide each new class into
two more classes based on another expression. You can define as many decision
nodes as needed. The results of the decisions are classes. You can use data from many
different sources and files together to make a single decision tree classifier. You can
edit and “prune” the decision trees interactively, and you can save the trees and apply
them to other datasets.
The following figure shows an example decision tree in ENVI.

Figure 4-6: ENVI Decision Tree

Decision Tree Classifier ENVI User’s Guide


Chapter 4: Classification Tools 431

Input data can be from various sources and data types. For example, you can use
multispectral data in conjunction with digital elevation data to find pixels with low
vegetation and high slopes. You can use georeferenced files that are in different
projections with different pixel sizes in a single decision tree and ENVI reprojects
and resample them on-the-fly. ENVI can calculate special variables, such as NDVI,
on-the-fly and use them in the expressions. The variables and expressions are
described in the following section.
Tip
See the ENVI Tutorials on the ITT Visual Information Solutions website (or on the
ENVI Resource DVD that shipped with your ENVI installation) for step-by-step
examples.

Decision Tree Variables and Expressions


The expressions used in ENVI’s decision tree classifier are similar to those used in
Band Math. They must produce single band output and have a binary result of 0 or 1.
The 0 result is sent to the “No” branch and the 1 result is sent to the “Yes” branch of
the decision tree.
The expressions can include math functions, relational operators, boolean operators,
and other IDL functions as shown in Table 4-1.

Category Available Functions

Basic arithmetic Addition (+), subtraction (-), multiplication (*), and division
(/)
Trigonometric sin(x), cos(x), and tan(x)
functions
Arcs: asin(x), acos(x), and atan(x)
Hyperbolics: sinh(x), cosh(x), and tanh(x)
Relational and LT, LE, EQ, NE, GE, GT
logical operators
AND, OR, NOT, XOR
maximum (>) and minimum (<)

Table 4-1: IDL Array Handling Functions

ENVI User’s Guide Decision Tree Classifier


432 Chapter 4: Classification Tools

Category Available Functions

Other math exponent (^) and natural exponent


functions
Natural logarithm: alog(x)
Log base 10: alog10(x)
Integer rounding: round(x), ceil(x)
Square root: sqrt(x)
Absolute value: abs(x)

Table 4-1: IDL Array Handling Functions


The variables in ENVI’s decision tree classifier refer to a band of data or to a special
function that acts on the data. The variable names must be within curly brackets, such
as {variable name}, or be named bx, where x is a number, as in band math. If a
variable is assigned to a multiband file, the variable must have a subscript, in square
brackets, referring to a band number (band numbers are 1 to the number of bands).
For example, {pc[2]} refers to band 2 of the file assigned to the variable pc.
ENVI’s special variable names do calculations on-the-fly, and use the results in the
expression. These special variable names must be within curly brackets and can have
numbers or additional text after them. For example, {ndvi1} or {pc_can[1]} are
allowed special variable names. The special variable names are listed here:
• {slope}: The slope calculated from a DEM file.
• {aspect}: The aspect calculated from a DEM file.
• {ndvi}: NDVI calculated from file. If the sensor type is set in the header, the
bands used to calculate the NDVI are automatically found. If ENVI does not
know which bands to use, it will prompt you to enter the band numbers.
• {tascap[n]}: Tasseled Cap transform. The subscript, n, points to which tasseled
cap result to use in the expression; for example, for TM data, {tascap[2]} will
use the greenness band.
• {pc[n]}: Principal components. The subscript, n, points to which PC band to
use in the expression.
• {mnf[n]}: Minimum noise fraction. The subscript, n, points to which MNF
band to use in the expression.
• {lpc[n]}: Local principal components. Uses only the surviving pixels in the
calculations.

Decision Tree Classifier ENVI User’s Guide


Chapter 4: Classification Tools 433

• {lmnf[n]}: Local minimum noise fraction. Uses only the surviving pixels in
the calculations.
• {mean[n]}: The mean for band n.
• {stdev[n]}: The standard deviation for band n.
• {min[n]}: The minimum of band n.
• {max[n]}: The maximum of band n.
• {lmean[n]}: Local mean. The mean of only the surviving pixels.
• {lstdev[n]}: Local standard deviation. The standard deviation of only the
surviving pixels.
• {lmin[n]}: Local minimum. The minimum of only the surviving pixels.
• {lmax[n]}: Local maximum. The maximum of only the surviving pixels.
You can use any number of different expressions within the decision tree classifier as
long as the expression results in a single, binary decision (true or false answer for
each pixel). The following examples show how to define various simple and complex
decisions:
• Pixels with values greater than 20 in band 1, and values less than or equal to 45
in band 2 are identified by the following expression:
(b1 GT 20) AND (b2 LE 45)

• Pixels with NDVI (Normalized Difference Vegetation Index) values greater


than or equal to 0.3 are identified by the following expression:
{ndvi} GE 0.3

• Pixels with values in band 1 greater than the mean of band 2 plus twice the
standard deviation of band 2 are identified by the following expression:
b1 GT ({mean[2]} + 2*{stdev[2]})

• Pixels with a slope greater than 15 degrees and a northern aspect are identified
by the following expression:
({slope} GT 15) AND (({aspect} LT 90) or ({aspect} GT 270))
Note
The local statistics variables can only be used on georeferenced files that have the
same projection as the selected base file, otherwise statistics are calculated using the
entire band.

ENVI User’s Guide Decision Tree Classifier


434 Chapter 4: Classification Tools

Using IDL Functions in Node Expressions


The Expression field also accepts user-defined functions written in IDL. Derive and
apply these functions as expressions in the same manner as user-defined functions in
the Band Math and Spectral Math tools. However, the result of the overall expression
must still equal 0 or 1.
Because ENVI + IDL provides access to IDL’s capabilities, you can use the power of
built-in IDL features, IDL user functions, or write your own decision tree expressions
to perform custom operations. These functions are required to accept one or more
pixel variables as input. Moreover, the overall expression must equal 0, 1, or a binary
array (of the same spatial size as the input data) in which each pixel value is 0 or 1.
Save the functions in a directory that is within the IDL path list (for example, the
save_add directory in the ENVI distribution) so that ENVI auto-compiles them.

Tip
You can also compile the functions as described in “Compiling” in the ENVI
Programmer’s Guide.

Example Custom Decision Tree Functions


This example function returns a mask (byte array) where the specified values in the
input data are set to 1 and all other pixels are set to 0:
FUNCTION dt_choose_values, data, values

info = SIZE(data)
result = MAKE_ARRAY(/BYTE, SIZE = info)
FOR index = 0L, (N_ELEMENTS(values) - 1) DO $
result += (data EQ values[index])

RETURN, result
END

To call this function from the Expression field to derive a mask for values of 20, 22,
24, and 26 in the first band (b1) in the bhtmref.img file in the data directory of the
ENVI distribution, use the following syntax:
dt_choose_values(b1, [20, 22, 24, 26])

Building a New Decision Tree


1. From the ENVI main menu bar, select Classification → Decision Tree →
Build New Decision Tree. The ENVI Decision Tree dialog appears with a
single decision node and two classes (leaves).

Decision Tree Classifier ENVI User’s Guide


Chapter 4: Classification Tools 435

2. Click Node 1. The Edit Decision Properties dialog appears.


3. Enter a node Name and an Expression (see “Decision Tree Variables and
Expressions” on page 431), then click OK. The Variable/File Pairings dialog
appears.
4. In the Variable/File Pairings dialog, select the variable name. The Select File to
Associate with Variable dialog appears.
5. Select the input file or band to associate to the variable.
6. In the ENVI Decision Tree dialog, add a new node by right-clicking on a Class
button and selecting Add Children. ENVI adds two children below the node
and clears the title from the node button.
7. Click the new, blank node button. The Edit Decision Properties dialog appears.
8. Enter node Name and an Expression, then click OK.
9. In the Variable/File Pairings dialog, click on the variable name. The Select File
to Associate with Variable dialog appears.
10. Select the input file or band to associate to the variable.
11. Repeat steps 6 through 10, adding as many nodes as necessary.
12. When the tree is finished, select Options → Execute from the ENVI Decision
Tree menu bar.

Executing a Decision Tree


To interactively execute and edit a decision tree:
1. From the ENVI Decision Tree dialog menu bar, select Options → Execute.
The Decision Tree Execution Parameters dialog appears.
2. To spatially subset your data, click Spatial Subset. For spatial subsetting
details, see “Statistics Subsetting” on page 223.
3. Select output to File or Memory. If your data are georeferenced, also select
which image to use as a base image, enter an output pixel size, and select the
resampling method from the drop-down list.
Each node changes to a green color while the decision tree is processing. The
classification results appear in a new display group. ENVI saves a temporary
file for each node so you do not need to recalculate the results each time you
execute the decision tree.

ENVI User’s Guide Decision Tree Classifier


436 Chapter 4: Classification Tools

4. To see details about the number of pixels at each node, right-click in the
background of the Decision Tree dialog and select Zoom In. Each node lists
how many pixels survived to reach that node. The status bar also provides
details when you position the cursor over the class.
5. To make any changes to the decision nodes, click the node button and change
the expression in the Edit Decision Properties dialog.
To change the output class color and name, click the class node button and
enter the new name and color in the Edit Class Properties dialog.
For other interactive options, see the following “Decision Tree Options”
section.
6. Execute the decision tree again and look at the results.
7. Repeat steps 4 through 6 until you are satisfied with the results.

Decision Tree Options


You can access decision tree menu options from either the Decision Tree dialog menu
bar Options menu, or by right-clicking on the background of the Decision Tree
dialog. The choices are:
• Rotate View: To switch between viewing the decision tree graphics as either a
vertical tree or a horizontal tree.
• Zoom In: To zoom into the decision tree. When fully zoomed in, the number
of pixels that survive each node is shown on the node.
• Zoom Out: To zoom out of the decision tree. If you have a large tree, you can
zoom out to see more of the tree in the window. The number of pixels
surviving to each node will not be shown in the classes, but are visible in the
status bar when you position the cursor over the class.
• Assign Default Class Values: To reassign the class numbers and colors in
order from left to right in the decision tree.
• Hide/Show Variable/File Pairings: To hide or show the Variable/File Pairings
dialog.
• Change Output Parameters: To open the Decision Tree Execution
Parameters dialog where you can change the output parameters ENVI uses
when it executes the decision tree.

Decision Tree Classifier ENVI User’s Guide


Chapter 4: Classification Tools 437

Decision Tree Node Options


The decision nodes and class nodes have menu options that you access by right-
clicking on the node button. The options are as follows:
• Prune Children: To temporarily remove the children below a decision node
and combine all their classes into a single class. Pruned children only apply to
the current ENVI session; they will not appear in a saved decision tree.
• Restore Pruned Children: To restore pruned children to a decision node.
• Delete Children: To permanently delete the children below the decision node
and change the node into a class node.
• Add Children: To add children and change the class node into a decision
node.
• Edit Properties: For decision nodes, to change the node name and expression
in the Edit Decision Properties dialog. For class nodes, to change the class
name and color in the Edit Class Properties dialog.
• Survivors to Mask: To save the surviving pixels to a mask file. Enter the
filename in the Output Survivors to Mask Filename dialog when it appears.

Managing Decision Tree Files


Use the options under the File menu to build a new decision tree, save a decision tree
to an ASCII file, restore a saved decision tree, and to exit the function. The menu
options are:
• New Tree: To build a new decision tree.
• Save Tree: To save the decision tree to an ASCII file. Enter an output filename
in the Save Decision Tree dialog that appears.
• Restore Tree: To restore a previously saved decision tree. Select the filename
of the decision tree to restore in the Enter Saved Decision Tree dialog that
appears.

Editing an Existing Decision Tree


Use Edit Existing Decision Tree to restore an existing decision tree file and edit it as
desired.

ENVI User’s Guide Decision Tree Classifier


438 Chapter 4: Classification Tools

1. From the ENVI main menu bar, select Classification → Decision Tree →
Edit Existing Decision Tree. The Enter Saved Decision Tree Filename dialog
appears.
2. Select the decision tree file to restore and click Open. The selected decision
tree appears in the Decision Tree dialog and you can edit it or execute it as
desired.

Executing an Existing Decision Tree


Use Execute Existing Decision Tree to execute an existing decision tree file. You
can change the input bands and edit the output parameters.
1. From the ENVI main menu bar, select Classification → Decision Tree →
Execute Existing Decision Tree. The Enter Saved Decision Tree Filename
dialog appears.
2. Select the decision tree file to execute and click Open. The Variable/File
Pairings dialog appears.
3. Assign the variables to files by selecting the variable name and selecting a file.
4. Click OK. The Decision Tree Execution Parameters dialog appears.
5. To spatially subset your data, click Spatial Subset. For spatial subsetting
details, see “Statistics Subsetting” on page 223.
6. Select output to File or Memory. If your data are georeferenced, also select
which image to use as a base image, enter an output pixel size, and select the
resampling method from the drop-down list.
7. Click OK. ENVI adds the resulting output to the Available Bands List.

Decision Tree Classifier ENVI User’s Guide


Chapter 4: Classification Tools 439

Collecting Endmember Spectra


Use Endmember Collection to select endmember spectra from many sources for use
in classification and advanced spectral analysis techniques. You can run all of the
supervised classification techniques and many of the advanced spectral techniques
from the Endmember Collection dialog.
You can run several classifications using the same endmembers or training classes as
input by changing the algorithm technique.
1. From the ENVI main menu bar, select Classification → Endmember
Collection. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and Masking, then click OK. The Endmember Collection dialog
appears.

Figure 4-7: Endmember Collection Dialog

ENVI User’s Guide Collecting Endmember Spectra


440 Chapter 4: Classification Tools

Use the Endmember Collection dialog to collect endmembers, select algorithm types,
and manage endmembers. The procedures to use the Endmember Collection dialog
are described in the following sections.

Endmember Collection Dialog Components


The following input file information is provided in the text at the top of the
Endmember Collection dialog:
• File: The name of the input file and its selected spatial subset range. If the
image is not spatially subset, the phrase Full Scene displays.
• Mask: The name of the mask associated with the input file.
• Wavelength: The wavelength range of the image data. The units of these
wavelengths are derived from the header file of the input file. If the units
cannot be derived from the header file, the phrase <unknown units>
displays.
• Number and range of the bands in the spectral subset: The number of
bands spectrally subsetted from the input file and the range of the subset. If the
input file is not spectrally subsetted, the total number of bands in the input file
and the entire range displays.
The Endmember Collection dialog also contains the Endmember Spectra table. This
table enables you to view and edit properties associated with any of the spectra listed
in the table. The table contains the following columns:
• Row Number: Contains the row number of each spectrum. You can select one
or more spectra. Use the Select All button to select all of the spectra in the
table. Click Plot or Delete to plot or delete the selected spectra.
• Spectrum Name: Contains the name of each spectrum. You can edit the name
of a spectrum by selecting its cell in this column. You can also specify the
spectrum names for all the spectra from an ASCII file by right-clicking the
Spectrum Name column title and selecting the Import names from ASCII.
This menu also contains a Reset names option to reset all the spectra to their
original names. All of the options in this menu are also available in the
Options menu.
• Color: Contains the color of each spectrum. You can use any of the following
methods to change the color of a spectrum.
• Right-click in the cell to display the color menu.
• Left-click in the cell to enter a valid ENVI graphics color name. If a valid
color is not provided, ENVI sets the color value to <none> by default.

Collecting Endmember Spectra ENVI User’s Guide


Chapter 4: Classification Tools 441

• Left-click in the cell to enter an RGB triplet (such as 255, 0, 0 for red). If
you provide an RGB triplet, ENVI uses the closest valid ENVI graphics
color.
You can also set the default ENVI colors for all the spectra by right-clicking in
the Color column title and selecting Assign default colors to all. You can set
all the spectra colors to <none> with Assign default colors to undefined, and
you can select Reset Colors to reset all the spectra to their original colors. All
of the right-click menu options are also available in the Endmember Collection
dialog Options menu.
• Source: Displays the source of each spectrum. The values in this column
cannot be edited. The following list shows the possible sources for the spectra
in the table.
ASCII file: Spectrum imported from ASCII column data file.
ASD file: Spectrum imported from ASD formatted file (which is output from
the Analytical Spectral Devices spectrometers).
Spec Lib: Spectrum imported from ENVI spectral library (.sli) file.
ROI mean: Mean spectrum from either an ROI or a vector.
Stats file: Spectrum imported from ENVI statistics (.sta) file.
Plot: Spectrum imported from a plot window. For more information on how to
import from the plot window, see “Using the Right-Click Menu” on page 442.
Unknown: Spectrum retrieved from any other source.
• Bands: Displays the number of spectral bands contained in each spectrum.
You cannot edit the values in this column.
• Wavelength: Contains the wavelength range of each spectrum. ENVI converts
the wavelengths of the spectra to the wavelengths of the image data when you
click either Plot or Apply in the dialog. This conversion does not occur if the
wavelength units of the spectra are unknown. You can change the wavelength
units by right-clicking in the cell of the Wavelength column.
To change an input file with unknown wavelength units to a file containing
known wavelength units, select File → Change input File option from the
Endmember Collection dialog menu bar.
• Status: Displays the status of each spectrum related to the input file. You
cannot edit the values in this column. The following list shows the possible
status values for the spectra in the table:

ENVI User’s Guide Collecting Endmember Spectra


442 Chapter 4: Classification Tools

Match: The wavelengths of the input file and the spectrum match exactly and
no resampling is necessary when you click either Plot or Apply.
Resample: The wavelengths of the input file and the spectrum are different,
but ENVI is able to resample the spectrum to the wavelength space of the input
file when you click either Plot or Apply.
Invalid: The wavelengths of the input file and the spectrum are different, but
ENVI is not able to resample because the wavelength units of either the
spectrum or the input file are unknown. If a spectrum is invalid, it cannot be
plotted and is not used when you click Apply.

Importing Spectra
You can import endmember spectra into the table in several ways. You can import
from the following:
• Plot windows
• ACII files
• ASD binary files
• Spectral libraries
• ROIs or vectors
• Statistics files
When using the Mahalanobis distance or maximum likelihood classifiers, you can
only import the endmember spectra from ROIs or statistics files because these
classifications use the endmember covariance statistics.

Importing Spectra from Plot Windows


You can import spectra from plot windows by using the right-click menu, by dragging
and dropping the spectra from the plot window to the Endmember Spectra table, or by
using a dialog box menu option, as described in the next sections.
Using the Right-Click Menu
Use the following steps to derive spectra from the Spectral Profile plot window for
your displayed image and import them into the Endmember Spectra table.
1. Right-click in the display group and select Z Profile (Spectrum). The Spectral
Profile plot window appears.
2. From the Spectral Profile plot window menu bar, select Options → Collect
Spectra.

Collecting Endmember Spectra ENVI User’s Guide


Chapter 4: Classification Tools 443

3. Click on the spectra you want to collect for the Endmember Spectra table.
4. In the Endmember Collection dialog, right-click on either an empty space in
the table or on the upper-left corner of the table. The resulting menu contains
all the available spectra from every displayed plot window.
If no spectrum was available in any plot window, the right-click menu states
that no spectrum is available.

Figure 4-8: Right-Click Menu in the Endmember Spectra Table

5. Left-click on the spectra you want to import into the table. The selected spectra
appears in the Endmember Spectra table.
6. Use the right-click menu to import all of the spectrum you want to include in
the table.
Dragging-and-Dropping Spectra
You can also drag-and-drop a spectrum from the Spectral Profile plot window key to
the Endmember Spectra table to collect it in the Endmember Collection dialog.

ENVI User’s Guide Collecting Endmember Spectra


444 Chapter 4: Classification Tools

1. From the Spectral Profile plot window menu bar, select Options → Plot Key.
The key (legend) for the plot window appears to the right of the spectral plot.
2. Click and drag the key of a spectrum into the Endmember Spectra table. The
spectrum appears in the Endmember Collection table.
Using the Endmember Collection Dialog Menu Option
You can also import multiple spectra by using an Endmember Collection dialog menu
option.
1. From the Endmember Collection dialog menu bar, select Import → from Plot
Windows. The Import from Plot Windows dialog appears.
2. Select one or more spectra.
3. Click OK. The selected spectra appear in the Endmember Collection dialog.

Importing Spectra from ASCII Files


1. From the Endmember Collection dialog menu bar, select Import → from
ASCII File. The Select ASCII Files to Import dialog appears.
2. Select an ASCII file or a group of ASCII files of the same format and click
Open. The Input ASCII File dialog appears, with a list of the number of
columns and rows and the first few data values of each column of data.

Collecting Endmember Spectra ENVI User’s Guide


Chapter 4: Classification Tools 445

Figure 4-9: Input ASCII File Dialog

3. Enter the X Axis Column number that contains the x axis data.
4. Select the endmember spectra to import in the Select Y Axis Columns area.
5. Change the Wavelength Units and Y Scale Factor parameters as needed.
6. Click OK to enter the selected endmember spectra into the list on the
Endmember Collection dialog.
Importing Additional ASCII Files
To select another ASCII file and read the data using the settings previously defined
the Input ASCII File dialog:
1. From the Endmember Collection dialog menu bar, select Import → from
ASCII file (previous template). The Select ASCII Files to Import dialog
appears.

ENVI User’s Guide Collecting Endmember Spectra


446 Chapter 4: Classification Tools

2. Select an ASCII file and click Open. This option reads the data directly into
the Endmember Collection dialog without the intermediate parameter dialog.

Importing Spectra from ASD Binary Files


1. From the Endmember Collection dialog menu bar, select Import → From
ASD Binary File. The Enter ASD Files to Import dialog appears.
2. Select the ASD file or files and click Open. ENVI automatically resamples the
file to match the wavelengths from a data file, ASCII file, or first imported
spectrum as designated when the Spectral Library Builder function was
started. If importing the ASD file from the Endmember Collection dialog,
ENVI automatically resamples the first input spectrum.
If the range of the ASD file does not match the range of the input wavelengths, all
zeroes will result.

Importing Spectra from Spectral Libraries


1. Select Import → from Spectral Library. The Input File dialog appears.
2. Choose the spectral library name.
3. Click OK. The Input Spectral Library dialog appears. If the desired spectral
library was not previously opened, select File → Open Spectral Library in
the Input File dialog.

Collecting Endmember Spectra ENVI User’s Guide


Chapter 4: Classification Tools 447

Figure 4-10: Input Spectral Library Dialog

4. Select endmember spectra by selecting the spectrum names.


5. Change the Wavelength Units and Y Scale Factor parameters as needed.

ENVI User’s Guide Collecting Endmember Spectra


448 Chapter 4: Classification Tools

If the Reflectance Scale Factor parameter is set in both the spectral library
header and the image data header, then ENVI will automatically scale the
library data to match the image data. If one of the two data sources has no scale
factor in its header, then no scaling will be done.
6. Click OK to enter the selected spectra into the Endmember Spectra list.

Importing Spectra from ROIs and Vectors


You can import mean spectra from previously defined ROIs or vectors open in the
Available Vectors List. You can associate these ROIs and vectors with either the
current input file or another file.
Importing ROIs and Vectors Associated with Current File
1. From the Endmember Collection dialog menu bar, select Import → from
ROI/EVF from input file. The Select Regions for Stats Calculation dialog
appears. The Select Regions for Stats Calculation dialog is only provided if
more than one ROI or vector is available.
2. Select endmember spectra (ROI or vector averages) by selecting the ROI or
vector names. To open an ROI or EVF file, click Open ROI/EVF file. The
Enter ROI/EVF Filenames dialog appears. Use this dialog to select and open
ROI and EVF files. The Select Regions for Stats Calculation dialog is updated
with the ROIs and vectors from the open files.
3. Click OK to enter the ROI and vector means into the Endmember Spectra list.
Importing ROIs and Vectors Associated with Another File
1. From the Endmember Collection dialog menu bar, select Import → from
ROI/EVF from other file. The Input File of associated ROI/EVF dialog
appears.
2. Select the input file. The Select Regions for Stats Calculation dialog appears.
The Select Regions for Stats Calculation dialog is only provided if more than
one ROI or vector is available.
3. Select endmember spectra (ROI or vector averages) by selecting the ROI or
vector names. To open an ROI or EVF file, click Open ROI/EVF file. The
Enter ROI/EVF Filenames dialog appears. Use this dialog to select and open
ROI and EVF files. The Select Regions for Stats Calculation dialog is updated
with the ROIs and vectors from the open files.
4. Click OK to enter the ROI and vector means into the Endmember Spectra list.

Collecting Endmember Spectra ENVI User’s Guide


Chapter 4: Classification Tools 449

Importing Spectra from Statistics Files


Use from Stats file to import the mean spectrum from a previous classification result
that was calculated using Basic Tools → Statistics.
1. Select Import → from Stats file. The Enter Statistics Filename dialog
appears.
2. Select one or more statistics files.
3. Click OK. The mean spectrum from the statistics file is entered into the list on
the Endmember Collection dialog.

Importing Spectra from Endmember Collection Files


Use from Endmember Collection file to import an Endmember Collection file (see
“Saving Spectra to an Endmember Collection File” on page 453 for more information
on the Endmember Collection file).
1. From the Endmember Collection dialog menu bar, select Import → from
Endmember Collection file. The Select Endmember Collection File to Import
dialog appears.
2. Select and open an Endmember Collection .txt file. ENVI updates the
Endmember Collection dialog with the spectra from the specified file.

Plotting Spectra
• To plot a spectrum from the Endmember Spectra table, select the row number
column of the spectrum to plot, then click Plot.
• To plot multiple spectra, use the Shift or Ctrl key as you select the row number
columns, then click Plot.
• To plot all the spectra in the table, click Select All, then click Plot.

Deleting Spectra
• To delete a spectrum from the Endmember Spectra table, select the row
number column of the spectrum to delete, then click Delete.
• To delete multiple spectra, use the Shift or Ctrl key as you select the row
number columns, then click Delete.
• To delete all the spectra in the table, click Select All, then click Delete.

ENVI User’s Guide Collecting Endmember Spectra


450 Chapter 4: Classification Tools

Endmember Options
Use the Options menu in the Endmember Collection dialog to edit the endmember
names, edit the endmember colors, or suppress backgrounds (using BandMax).

Editing Endmember Names


1. From the Endmember Collection dialog menu bar, select Options → Import
spectrum names from ASCII. The Select ASCII Filenames dialog appears.
2. Select and open the ASCII file that contains the spectrum names. The names of
the spectra collected in the dialog are changed to the names from the ASCII
file.
To reset the spectra to their initial names, select Options → Reset spectrum names.

Editing Endmember Colors


To assign default colors to all of the endmember spectra, select Options → Assign
default colors to all.
To assign default colors to all of the undefined spectra colors (indicated by <none>),
select Options → Assign default colors to undefined.
To reset the spectra to their initial colors, select Options → Reset colors.

Suppressing Backgrounds with BandMax


You can select an optimal subset of input bands to differentiate one or more related
target spectra from the spectra of other similar materials (backgrounds). The
BandMax process isolates the bands that best distinguish selected targets from
selected backgrounds. This optimal spectral subset generated with BandMax may
increase the accuracy of the classification selected in the Endmember Collection
dialog and speed processing.
You can also access BandMax in the SAM Target Finder with BandMax Wizard (see
“Finding Targets with BandMax” on page 814 for more information).
1. Select at least one spectrum (to represent a target) in the Endmember Spectra
table of the Endmember Collection dialog.
2. From the Endmember Collection dialog menu bar, select Options →
BandMax Background Suppression in the Endmember Collection dialog.
The BandMax Background Suppression dialog appears.

Collecting Endmember Spectra ENVI User’s Guide


Chapter 4: Classification Tools 451

3. Use the Select Background section of the dialog to collect any spectra you
want to use as backgrounds. This section contains an embedded version of the
Endmember Collection dialog. All the items in this section are the same as the
items provided in the Endmember Collection dialog.
The BandMax significance values are calculated whenever a spectrum is added
or deleted in the Select Background section.
4. Review the Significant Bands list, which shows the bands that BandMax
automatically determined were significant.
5. Modify the Band Significance Threshold value as needed. The threshold
ranges from 0 to 1. ENVI uses only bands with a significance value greater
than or equal to the significance threshold. Setting the Band Significance
Threshold to a higher value results in fewer selected bands in the subset.
The increase/decrease buttons change the threshold by increments of 0.01. An
increase in the Band Significance Threshold value decreases the Number of
Significant Bands value and updates the Significant Bands list. If a change of
0.01 is not enough to update the Number of Significant Bands, increase the
increment until it does.
6. You can also decrease the Number of Significant Bands value, which
increases the Band Significance Threshold value and updates the Significant
Bands list.
The increase/decrease buttons change the number of bands by at least 1. If two
or more bands have the same significance value, ENVI uses a greater
increment to include all of these bands.
7. Click Save Significant Bands to File if you want to save the band subset in the
Significant Bands list to an ASCII file. When you have derived the subset of
bands that effectively detects your targets, you may want to use this same band
subset to perform a series of classifications on a set of images from the same
sensor. You can use the output ASCII file as input when spectrally subsetting a
file.
8. Click OK. All the significant bands displayed in the Significant Bands section
form the band subset that is used on the input data when you click Apply in the
Endmember Collection dialog.

ENVI User’s Guide Collecting Endmember Spectra


452 Chapter 4: Classification Tools

Selecting Processing Techniques


Use the Algorithm menu in the Endmember Collection dialog to select a
classification or advanced spectral processing method. The classification methods
available are parallelepiped, minimum distance, Mahalanobis distance, maximum
likelihood, Spectral Angle Mapper, and binary encoding. The advanced spectral
processing methods available are linear spectral unmixing, matched filtering, mixture
tuned matched filtering, and spectral feature fitting.
When using the Mahalanobis distance or maximum likelihood classifiers, you can
only import the endmember spectra from ROIs or statistic files because these
classifications use the endmember covariance statistics. You must also have at least
two endmembers.
1. From the Endmember Collection dialog menu bar, select Algorithm →
classification_method.
You can also start the classification methods from the Classification →
Supervised menu and you can start the advanced spectral processing methods
from the Spectral Tools menu.
2. Click Apply. The Algorithm Parameters dialog appears.
3. Enter the selected algorithm’s needed parameters.
The parameters displayed are specific to the selected classification algorithm. For
details about the different classification methods, see the following topics:
• “Applying Parallelepiped Classification” on page 402
• “Applying Minimum Distance Classification” on page 405
• “Applying Mahalanobis Distance Classification” on page 408
• “Applying Maximum Likelihood Classification” on page 409
• “Applying Spectral Angle Mapper Classification” on page 412
• “Applying Spectral Information Divergence Classification” on page 414
• “Applying Binary Encoding Classification” on page 416
For details about the advanced processing methods, see the following topics:
• “Using Linear Spectral Unmixing” on page 773
• “Using Matched Filtering” on page 776
• “Using Mixture Tuned Matched Filtering” on page 778
• “Using Constrained Energy Minimization” on page 781

Collecting Endmember Spectra ENVI User’s Guide


Chapter 4: Classification Tools 453

• “Using Adaptive Coherence Estimator” on page 782


• “Using Orthogonal Subspace Projection” on page 784
• “Using Spectral Feature Fitting” on page 788
• “Using Multi Range Spectral Feature Fitting” on page 790

Managing Endmember Spectra


Use the File menu in the Endmember Collection dialog to save endmember spectra to
an ASCII file, as a spectral library, or as an Endmember Collection file. You can also
use the File menu to change the input file or exit the dialog.

Saving Spectra to ASCII Files


1. From the Endmember Collection dialog menu bar, select File → Save Spectra
As → ASCII file. The Output Plots to ASCII File dialog appears.
2. Enter an output filename and click OK.

Saving Spectra to Spectral Libraries


1. From the Endmember Collection dialog menu bar, select File → Save Spectra
As → Spectral Library file. The Output Spectral Library dialog appears.
2. Enter the Z Plot Range, X Axis Title, Y Axis Title, Reflectance Scale Factor
and Wavelength Units for the spectral library header file.
3. Enter the input to output scaling for the X and Y Scale Factor.
4. Enter the output filename and click OK

Saving Spectra to an Endmember Collection File


An Endmember Collection file enables you to save and restore the current state of the
Endmember Collection dialog to a text file. This Endmember Collection file contains
all the current information that is provided for each spectrum in the Endmember
Spectra table.
1. From the Endmember Collection dialog menu bar, select File → Save Spectra
As → Endmember Collection file. The Output Endmember Collection to File
dialog appears.
2. Enter the output filename and click OK.

ENVI User’s Guide Collecting Endmember Spectra


454 Chapter 4: Classification Tools

Changing the Input File


To change the input file but keep the selected endmembers:
1. From the Endmember Collection dialog menu bar, select File → Change
Input File. The Select Input File dialog appears.

Collecting Endmember Spectra ENVI User’s Guide


Chapter 4: Classification Tools 455

2. Select an input file and perform optional Spatial Subsetting, and/or Masking,
then click OK. ENVI resamples all the endmembers to match the new input
file.
You can change the spectral or spatial subset of your input file by selecting
File → Change Input File, selecting the same filename, and changing the
spectral subset.

ENVI User’s Guide Collecting Endmember Spectra


456 Chapter 4: Classification Tools

Creating Class Images from ROIs


Use Create Class Image from ROIs to convert selected ROIs into an ENVI
classification image. For details, see “Creating Class Images from ROIs” on
page 339.

Creating Class Images from ROIs ENVI User’s Guide


Chapter 4: Classification Tools 457

Post Classification
Use Post Classification tools to classify rule images, to calculate class statistics and
confusion matrices, to apply majority or minority analysis to classification images, to
clump, sieve, and combine classes, to overlay classes on an image, to calculate buffer
zone images, to calculate segmentation images, and to output classes to vector layers.

Changing Class Colors


Use Class Color Mapping to change the colors of classes after a classified image is
loaded into a display group. The color that a class is automatically displayed in
corresponds to the color of the selected ROI for supervised classification and to pre-
selected class colors for unsupervised classification. Unclassified areas appear black
on the images.

Figure 4-11: Class Color Mapping Option from Display Group Menu Bar

1. From the Display group menu bar, select Tools → Color Mapping → Class
Color Mapping. The Classification Mapping dialog appears.

ENVI User’s Guide Post Classification


458 Chapter 4: Classification Tools

2. To change the color system for all classes, select RGB, HLS, or HSV from
drop-down list.
3. To modify the class color, select a class name in the Selected Classes list and
use one of the following methods:
• Click on the Color button and select the new color from the resulting
menu.
• Enter new values into the Red, Green, and Blue fields and press Enter.
• Move the color adjustment slider bars.
4. To change the name of the selected class, edit it in the Class Name field.
5. To reset the colors and names to their original values, select Options → Reset
Color Mapping.
6. Select File → Save Changes to retain the new colors.
For more information, see “Mapping Class Colors” on page 123 and “Editing
Classification Information” on page 205.

Classifying from Rule Images


Use Rule Classifier to use previously saved rule images to generate new
classification images from different thresholds. The previously saved rule images
may contain the classification measures such as the number of matches, distance
measures, or probabilities. Much of the time required to run classification routines is
attributed to calculation of the classification measures; classification itself does not
require extensive computation.
To use the Rule Classifier, you must first generate rule images. For details, see
“Supervised Classification” on page 401.
1. From the ENVI main menu bar, select Classification → Post
Classification → Rule Classifier. The Rule Image Classifier dialog appears.
2. Select an input file and perform optional Spatial Subsetting, then click OK.
The Rule Image Classifier Tool dialog appears.

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 459

Figure 4-12: Interactive Rule Image Classifier Tool

3. Click the Classify By toggle button to select whether the image will be
classified by Minimum or Maximum values.
4. Select one of the following options to set a threshold value:
• To enter the same threshold value for all classes, enter a value in the Set
All Thresholds field and click Set All Thresholds. The threshold value
appears in the Thresh field for each class.
• To enter a different threshold for each class, enter a value in the Thresh
field for each class.
• To enter a threshold value based on histogram percentage, enter the
percent value (for example, 5%) in the Thresh field.
Tip
You can plot a histogram of a rule band to help you determine threshold
values. For details, see “Plotting Histograms” on page 460.

ENVI User’s Guide Post Classification


460 Chapter 4: Classification Tools

If using maximum likelihood rule images that were produced from ENVI 3.6
or later, enter the threshold using a percentage (for example, 95%), and the
corresponding Chi Square value will automatically be computed using the
histogram of the rule image.
5. Click Quick Apply. A classification image based on the current settings
displays in a new display group.
To remove a class from the display, select the On check box for that class to
deselect it. To display that class again, select the On check box again.
6. Click Quick Apply to see how any of your changes affect the classification
image.

Plotting Histograms
You can plot a histogram of a rule band to help you determine threshold values by
clicking Hist for that class. A plot window displays with the histogram of the selected
band.
For details about working with ENVI plots, see “Using Interactive Plot Functions” on
page 106.

Options in the Rule Image Classifier Tool Dialog


Use the Rule Image Classifier Tool Options menu to change class names and/or
colors, and to reorder classes. Click Save to File to save the classification image to a
file.
Changing Class Names and Colors
1. To change the class color or name select Options → Edit class colors/names.
The Class Color Map Editing dialog appears.
2. Select a class name in the Selected Classes list and select from the following
options:
• To change the class name, enter the new name in the Class Name field.
• To change the class color, select a color system and/or color using the
Color button. To further adjust the color, use the slider bars.
For details about color selection, see “Mapping Class Colors” on page 123.
Reordering Classes
If two classes have the same rule value, the first one in the list will be used to make
the output classification image.

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 461

1. To reorder the classes, selecting Options → Reorder Classes. The Reorder


Classes dialog appears with the class names displayed in a list.
2. Click on a class name and drag it to the desired location in the list.
3. Click OK.
Calculating Statistics
To calculate statistics for each On rule band, select Options → Stats for Selected
Rule Bands. The band minimum, maximum, mean, and standard deviation display in
the Statistics Results window.
To save the report as an ASCII file, select File → Save Text to ASCII in the report
window.
Turning Rule Bands On/Off
To select all of the rule band check boxes without having to click on each one, select
Options → Select All Rule Bands, or Options → Clear All Rule Bands.
Saving the Classification Image
To save the displayed classification image to a file, click Save To File and enter or
choose an output filename.

Calculating Class Statistics


Use Class Statistics to calculate statistics based upon classification results for any
related input file. Basic statistics include the number of points in a class and
minimum, maximum, mean, and standard deviation for each band for that class. You
can plot minimum, maximum, mean, and standard deviation plots for each class.
Histograms for each class can also be reported and plotted and the covariance matrix,
correlation matrix, and eigenvalues and eigenvectors calculated. A summary report
for all classes will also be displayed.
1. From the ENVI main menu bar, select Classification → Post
Classification → Class Statistics. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. You can select only classified images (based upon
the file type described in the image’s header). The Input File dialog appears.

ENVI User’s Guide Post Classification


462 Chapter 4: Classification Tools

3. Select an input file from which to calculate the statistics. Select the file that
will be used to calculate class statistics for the areas identified in the
classification image (usually the data file). You can also apply a mask to the
calculation through the Select Mask Band or Build Mask buttons on this
dialog.
4. Click OK. The Class Selection dialog appears.
5. Select the classes that you want to calculate statistics for.
6. Click OK. The Compute Statistics Parameters dialog appears.
7. Select the statistics options by selecting the check boxes. See “Computing
Statistics” on page 274 for detailed information about the options available in
the Compute Statistics Parameters dialog.
8. Click OK. The class statistics are calculated and the Class Statistics Results
dialog appears.
The Class Statistics Results dialog is very similar to the Statistics Results dialog (see
“Viewing Statistics Reports” on page 278) and contains the same functions. However,
the Class Statistics Results dialog also contains additional sections for reporting
multiple instances of statistical information.
The File menu contains the following additional options:
• Save current Class result to ENVI stats file: This option enables you to save
the statistics report for the class specified in the Stats for section of the Class
Statistics Results dialog to an ENVI statistics file. When this option is selected,
the Save Current Class Result to ENVI Stats File dialog appears. In the Enter
Output Stats Filename[.sta] section of this dialog, enter a filename. The
default file extension for ENVI statistics files is .sta. The statistics report is
saved to the specified file when you click OK.
• Save current Class result to text file: This option enables you to save the
statistics report for the class specified in the Stats for section of the Class
Statistics Results dialog to a text file. When this option is selected, the Save
Current Class Result to Text File dialog appears. In the Enter Output Text
Filename[.txt] section of this dialog, enter a filename. The statistics report is
saved to the specified file when you click OK.
Tip
The resulting text file is tab-delimited for easy import into external
spreadsheet programs, such as Excel.

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 463

• Save all Class results to ENVI stats files: This option enables you to save the
statistics reports for all the classes to separate ENVI statistics files. When this
option is selected, the Save All Class Results to ENVI Stats Files dialog
appears. In the Enter Output Root Filename section of this dialog, enter the
root name of the statistics files. The default file extension for statistics files is
.sta. The statistics report for each class or region is saved to individual files
when you click OK. The individual files have the same root name that you
specified and are appended with their appropriate class or ROI number.
• Save all Class results to text file: This option enables you to save the statistics
report for all the classes to a text file. When this option is selected, the Save All
Class Results to Text File dialog appears. In the Enter Output Text
Filename[.txt] section of this dialog, enter a filename. The statistics report is
saved to the specified file when you click OK.
Tip
The resulting text file is tab-delimited for easy import into external
spreadsheet programs, such as Excel.

If the input file has an associated pixel size (via georeferencing or explicit setting of
the size in the header file), the Class Summary Area Units submenu appears in the
Options menu. This submenu enables you to specify the units of the reported area.
The default area unit is Meter2. When a different unit is chosen, the Class
Distribution Summary text section is updated to show this change.
The Stats for button contains a list of the available classes. The Class Statistics
Results dialog reports the calculated statistics (in both the plot and text sections) of
the class specified by this menu. To compare statistics for different classes with the
current class shown in the Class Statistics Results dialog, use the Options → Copy
results to new window option to create a copy of the Class Statistics Results for the
current class, then use the Stats for menu to display a different class.
The Select Plot drop-down button also contains the following additional options:
• Mean for all Classes: This option displays a plot of the mean of all the classes.
• Stdev for all Classes: This option displays a plot of the standard deviation of
all the classes.
• Eigenvalues for all Classes: This option displays a plot of the eigenvalues of
all the classes.
• Histogram for all Classes: This option and its submenu display a plot of the
histogram of all the classes for each band of data.

ENVI User’s Guide Post Classification


464 Chapter 4: Classification Tools

Calculating Change Detection Statistics


Use Change Detection Statistics to compile a detailed tabulation of changes
between two classification images. See “Computing Change Detection Statistics” on
page 298 for complete details.

Calculating Confusion Matrices


Use Confusion Matrix to show the accuracy of a classification result by comparing a
classification result with ground truth information. ENVI can calculate a confusion
matrix (contingency matrix) using either a ground truth image or using ground truth
ROIs. In each case, an overall accuracy, producer and user accuracies, kappa
coefficient, confusion matrix, and errors of commission and omission are reported.

Using Ground Truth Image


When using a ground truth image, you can also calculate error mask images for each
class showing which pixels were incorrectly classified.
Reference:
J. R. Jensen, 1986, Introductory Digital Image Processing, Prentice-Hall, Englewood
Cliffs, New Jersey, p. 379.
1. From the ENVI main menu bar, select Classification → Post
Classification → Confusion Matrix → Using Ground Truth Image. The
Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Input File dialog appears. The Ground Truth
Input File dialog appears.
3. Select the ground truth image and perform any Spatial Subsetting, then click
OK. The Match Classes Parameters dialog appears.
4. Match the ground truth classes with the classification result classes by
selecting the matching names in the two lists and clicking Add Combination.
The class combinations are shown in a list at the bottom of the dialog. If the
ground truth and classification classes have the same names, they are
automatically matched.
To remove a class match from the list, select the combination name. The two
class names reappear in the lists at the top of the dialog.
5. Click OK. The Confusion Matrix Parameters dialog appears.

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 465

6. Next to the Output Confusion Matrix in label, select the Pixels and/or the
Percent check boxes. If you select both check boxes, they will be reported in
the same window.
7. Next to the Report Accuracy Assessment label, select the Yes or No toggle.
8. Next to Output Error Images label, click the toggle button to select Yes or
No.
The output error images are mask images, one for each class, where all
correctly classified pixels have a value of 0 and incorrectly classified pixels
have a value of 1. The last error image band shows all the incorrectly classified
pixels for all the classes combined.
9. Select output to File or Memory.
10. Click OK.

Figure 4-13: Confusion Matrix Report

The report shows the overall accuracy, kappa coefficient, confusion matrix, errors of
commission (percentage of extra pixels in class), errors of omission (percentage of

ENVI User’s Guide Post Classification


466 Chapter 4: Classification Tools

pixels left out of class), producer accuracy, and user accuracy for each class. Producer
accuracy is the probability that a pixel in the classification image is put into class x
given the ground truth class is x. User Accuracy is the probability that the ground
truth class is x given a pixel is put into class x in the classification image. The
confusion matrix output shows how each of these accuracy assessments is calculated.
For details, see “Confusion Matrix Example” on page 467.

Using Ground Truth Regions of Interest


To display a confusion matrix report using ROIs for ground truth:
1. From the ENVI main menu bar, select Classification → Post
Classification → Confusion Matrix → Using Ground Truth ROIs. The
Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Match Classes Parameters dialog appears.
The ground truth ROIs must be opened and associated with an image of the
same size as the classification output image. The ROIs are automatically
loaded into the Match Classes Parameters dialog.
If the ground truth ROIs were defined on an image of a different size, you can
use Basic Tools → Region of Interest → Reconcile ROIs to make them
compatible with the classification (see “Reconciling ROIs” on page 335).
3. Match the ground truth ROIs with the classification result classes by selecting
the matching names in the two lists and clicking Add Combination. The class
combinations are shown in a list at the bottom of the dialog. If the ground truth
and classification classes have the same names, they are automatically
matched.
To remove a class match from the list, select the combination name. The two
class names reappear in the lists at the top of the dialog.
4. Click OK. The Confusion Matrix Parameters dialog appears.
5. Next to the Output Confusion Matrix in label, select the Pixels and/or the
Percent check boxes.
6. Next to the Report Accuracy Assessment label, click the Yes or No toggle.
7. Click OK.
The report shows the overall accuracy, kappa coefficient, confusion matrix, errors of
commission (percentage of extra pixels in class), errors of omission (percentage of
pixels left out of class), producer accuracy, and user accuracy for each class. Producer
accuracy is the probability that a pixel in the classification image is put into class x

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 467

given the ground truth class is x. User Accuracy is the probability that the ground
truth class is x given a pixel is put into class x in the classification image. The
confusion matrix output shows how the accuracy assessments are calculated.

Confusion Matrix Example


The following example explains the items calculated for the confusion matrix,
including the overall accuracy, kappa coefficient, confusion (contingency) matrix,
errors of commission, errors of omission, producer accuracy, and user accuracy.
ENVI can calculate a confusion matrix using either a ground truth image or using
ground truth ROIs and both produce an output similar to the following example.
Confusion Matrix: {M6} (640x400x1)
Overall Accuracy = (131003/256000) 51.1730%
Kappa Coefficient = 0.2648

Ground Truth (Pixels)


Class Unclassified Grass Forest Swamp Total
Unclassified 43689 26949 40 18001 88679
Grass 32835 64516 1741 3329 102421
Forest 8202 7277 4096 654 20229
Swamp 15227 10742 0 18702 44671
Total 99953 109484 5877 40686 256000

Ground Truth (Percent)


Class Unclassified Grass Forest Swamp Total
Unclassified 43.71 24.61 0.68 44.24 34.64
Grass 32.85 58.93 29.62 8.18 40.01
Forest 8.21 6.65 69.70 1.61 7.90
Swamp 15.23 9.81 0.00 45.97 17.45
Total 100.00 100.00 100.00 100.00 100.00

ENVI User’s Guide Post Classification


468 Chapter 4: Classification Tools

Class Commission Omission Commission Omission

(Percent) (Percent) (Pixels) (Pixels)

Unclassified 50.73 56.29 44990/88679 56264/99953


Grass 37.01 41.07 37905/102421 44968/109484
Forest 79.75 30.30 16133/20229 1781/5877
Swamp 58.13 54.03 25969/44671 21984/40686

Prod.
Class User Acc. Prod. Acc. User Acc.
Acc.

(Percent) (Percent) (Pixels) (Pixels)


Unclassified 43.71 49.27 43689/99953 43689/88679
Grass 58.93 62.99 64516/109484 64516/102421
Forest 69.70 20.25 4096/5877 4096/20229
Swamp 45.97 41.87 18702/40686 18702/44671

Overall Accuracy
The overall accuracy is calculated by summing the number of pixels classified
correctly and dividing by the total number of pixels. The ground truth image or
ground truth ROIs define the true class of the pixels. The pixels classified correctly
are found along the diagonal of the confusion matrix table which lists the number of
pixels that were classified into the correct ground truth class. The total number of
pixels is the sum of all the pixels in all the ground truth classes.

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 469

Kappa Coefficient
The kappa coefficient (κ) is another measure of the accuracy of the classification. It is
calculated by multiplying the total number of pixels in all the ground truth classes (N)
by the sum of the confusion matrix diagonals (xkk), subtracting the sum of the ground
truth pixels in a class times the sum of the classified pixels in that class summed over
all classes ( xκΣ x Σκ ), and dividing by the total number of pixels squared minus the sum
of the ground truth pixels in that class times the sum of the classified pixels in that
class summed over all classes.

N ∑ x kk – ∑ x kΣ x Σk
k k
κ = --------------------------------------------------
-
N ∑ kΣ Σk
2– x x
k

Confusion Matrix (Pixels)


The confusion matrix is calculated by comparing the location and class of each
ground truth pixel with the corresponding location and class in the classification
image. Each column of the confusion matrix represents a ground truth class and the
values in the column correspond to the classification image’s labeling of the ground
truth pixels. For example, look at the ground truth column for the Forest class in the
Ground Truth (Pixels) table above. The ground truth shows 5,877 pixels in this class.
The classification was able to classify 4,096 of these pixels properly but 40 pixels
were Unclassified and 1,741 were classified as Grass.

Confusion Matrix (Percent)


The Ground Truth (Percent) table shows the class distribution in percent for each
ground truth class. The values are calculated by dividing the pixel counts in each
ground truth column by the total number of pixels in a given ground truth class. For
example, in the Forest class the percent pixels classified correctly is
4,096/5,877=0.697 or 69.7%.

Commission
Errors of commission represent pixels that belong to another class that are labelled as
belonging to the class of interest. The errors of commission are shown in the rows of
the confusion matrix. In the confusion matrix example, the Grass class has a total of
102,421 pixels where 64,516 pixels are classified correctly and 37,905 other pixels
are classified incorrectly as Grass (37,905 is the sum of all the other classes in the
Grass row of the confusion matrix). The ratio of the number of pixels classified

ENVI User’s Guide Post Classification


470 Chapter 4: Classification Tools

incorrectly by the total number of pixels in the ground truth class forms an error of
commission. For the Grass class the error of commission is 37,905/102,421 which
equals 37%.

Omission
Errors of omission represent pixels that belong to the ground truth class but the
classification technique has failed to classify them into the proper class. The errors of
omission are shown in the columns of the confusion matrix. In the confusion matrix
example, the Grass class has a total of 109,484 ground truth pixels where 64,516
pixels are classified correctly and 44,968 Grass ground truth pixels are classified
incorrectly (44,968 is the sum of all the other classes in the Grass column of the confusion
matrix). The ratio of the number of pixels classified incorrectly by the total number of
pixels in the ground truth class forms an error of omission. For the Grass class the
error of omission is 44,968/109,484 which equals 41.1%.

Producer Accuracy
The producer accuracy is a measure indicating the probability that the classifier has
labelled an image pixel into Class A given that the ground truth is Class A. In the
confusion matrix example, the Grass class has a total of 109,484 ground truth pixels
where 64,516 pixels are classified correctly. The producer accuracy is the ratio
64,516/109,484 or 58.9%.

User Accuracy
User accuracy is a measure indicating the probability that a pixel is Class A given that
the classifier has labelled the pixel into Class A. In the confusion matrix example, the
classifier has labelled 102,421 pixels as the Grass class and a total of 64,516 pixels are
classified correctly. The user accuracy is the ratio 64,516/102,421 or 63.0%.

Displaying ROC Curves


Use ROC Curves to use Receiver Operating Characteristic (ROC) Curves to
visualize a classifier’s performance in order to select the proper decision threshold.
The ROC Curves compare a series of rule image classification results for different
threshold values with ground truth information. ENVI can calculate a ROC curve
using either a ground truth image or using ground truth ROIs. A probability of
detection (Pd) versus probability of false alarm (Pfa) curve and a Pd versus threshold
curve are reported for each selected class (rule band).

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 471

Reference:
A. P. Bradley, 1997, “The use of the area under the ROC Curve in the evaluation of
machine learning algorithms,” Pattern Recognition, V. 30, No.7, pp 1145-1159.

Using Ground Truth Image


To display a ROC Curve plot using a ground truth image:
1. From the ENVI main menu bar, select Classification → Post
Classification → ROC Curves → Using Ground Truth Image. The Input
File dialog appears.
2. Select the classification rule image and perform any optional Spatial
Subsetting and/or Spectral Subsetting, then click OK. Each band selected in
the rule image is used to generate a ROC curve. Each rule band is mapped to a
ground truth class.
3. From the Input File dialog, select the ground truth image and perform any
optional Spatial Subsetting, then click OK. The Match Classes Parameters
dialog appears.
4. Match the ground truth classes with the rule image classes by selecting the
matching names in the two lists and clicking Add Combination. The class
combinations display in a list at the bottom of the dialog. If the ground truth
and classification classes have the same names, they are matched
automatically.
To remove a class match from the list, select the combination name. The two
class names reappear in the lists at the top of the dialog.
5. Click OK. The ROC Curve Parameters dialog appears.

ENVI User’s Guide Post Classification


472 Chapter 4: Classification Tools

Figure 4-14: ROC Curve Parameters Dialog

6. Click the Classify by toggle button to select whether to classify the rule image
by minimum value or maximum value. For example, if your rule images are
from the Minimum distance or SAM classifier, classify by minimum value. If
your rule images are from the maximum likelihood classifier, classify by
maximum value.
7. In the Min and Max parameters fields, type minimum and maximum values
for the ROC curve threshold range. Rule images are classified at N (specified
by Points per ROC curve) evenly spaced thresholds between (and including)
the Min and Max values. Each of these classifications is compared to the
ground truth and becomes a single point on a ROC curve. For example, if your
rule images are from the maximum likelihood classifier, the best choice is to
enter a min value of 0 and max value of 1.
8. In the Points per ROC Curve field, enter the number of points in the ROC
curves.
9. In the ROC curve plots per window field, enter the number of plots per
window.
10. Select whether to output probability of detection versus threshold plot by
selecting the Yes or No check box.
11. Click OK. The ROC curves and probability of detection curves appear in plot
windows.

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 473

Figure 4-15: ROC Curves Plot Window

Using Ground Truth Regions of Interest


To display a ROC curve using ROIs for ground truth:
1. From the ENVI main menu bar, select Classification → Post
Classification → ROC Curves → Using Ground Truth ROIs.
2. From the Input File dialog, choose the classification rule image and perform
any optional Spatial Subsetting and/or Spectral Subsetting, then click OK.
Each band selected in the rule image will be used to generate a ROC curve.
Each rule band is mapped to a ground truth ROI. The ground truth ROIs must
be opened and associated with an image of the same size as the selected rule
image. The Match Classes Parameters dialog appears with the ROIs
automatically be loaded into it.
If the ground truth ROIs were defined on an image of a different size, you can
use Basic Tools → Region of Interest → Reconcile ROIs to make them
compatible with your rule image (see “Reconciling ROIs” on page 335).
3. Match the ground truth classes with the rule image classes by selecting the
matching names in the two lists and clicking Add Combination.
The class combinations display in a list at the bottom of the dialog. If the
ground truth and classification classes have the same names, they are matched
automatically.

ENVI User’s Guide Post Classification


474 Chapter 4: Classification Tools

To remove a class match from the list, select the combination name. The two
class names reappear in the lists at the top of the dialog.
4. Click OK. The ROC Curve Parameters dialog appears.
5. Click the Classify by toggle button to select whether to classify the rule image
by minimum value or maximum value. For example, if your rule images are
from the minimum distance or SAM classifier, classify by minimum value. If
your rule images are from the maximum likelihood classifier, classify by
maximum value.
6. In the Min and Max parameters fields, type minimum and maximum values
for the ROC curve threshold range. Rule images are classified at N (specified
by Points per ROC curve) evenly spaced thresholds between (and including)
the Min and Max values. Each of these classifications is compared to the
ground truth and becomes a single point on a ROC curve. For example, if your
rule images are from the maximum likelihood classifier, the best choice is to
enter a min value of 0 and max value of 1.
7. In the Points per ROC Curve field, enter the number of points in the ROC
curves.
8. In the ROC curve plots per window field, enter the number of plots per
window.
9. Select whether to output probability of detection versus threshold plot by
selecting the Yes or No check box.
10. Click OK. The ROC curves and probability of detection curves appear in plot
windows.

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 475

Figure 4-16: ROC and Probability of Detection Curves Window

Generating a Random Sample


It is often helpful to generate a random sampling of points from a classification result,
or from ROIs. Such samplings can be valuable in supporting classification accuracy
assessments and field truthing expeditions.
ENVI offers three types of random samplings:
• Stratified Random: This technique, also called proportional or quota random
sampling, involves dividing the population (the entire classification image or
all of the ROIs) into homogeneous subgroups (the individual classes or ROIs)
then taking a simple random sample in each subgroup. Two types of Stratified
Random sampling are available: proportionate and disproportionate.
Proportionate sampling produces sample sizes that are directly related to the
size of the classes (that is, the larger the class, the more samples will be drawn
from it). Disproportionate sampling allows you to explicitly define each
sample size.
• Equalized Random: This technique also divides the population into
homogeneous subgroups (as in Stratified Random) but ensures that each
class’s (or ROI’s) sample size is exactly the same. That is, the sample size
remains fixed regardless of class size.
• Random: Random sampling does not divide the population into subgroups but
instead draws a random sampling from the entire (heterogeneous) population.

ENVI User’s Guide Post Classification


476 Chapter 4: Classification Tools

For large sample sizes, the distribution of classes (or ROIs) in the sample will
approximate a Stratified Random sampling, but classes with small sizes may
be missed altogether in the random sample.

Using the Generate Random Sample Routines


1. From the ENVI main menu bar, select one of the following:
• Classification → Post Classification → Generate Random Sample →
Using Ground Truth Image or Using Ground Truth ROIs.
• Basic Tools → Statistics → Generate Random Sample → Using
Ground Truth Classification Image or Using Ground Truth ROIs.
The Input File dialog appears.
2. Select either the Classification Image from which to draw the sample, or (for
ROI sampling) the image associated with the ROIs. If sampling from a
Classification Image, perform any optional Spatial Subsetting, then click OK.
The class distributions are computed and the Generate Random Sample from
Ground Truth dialog appears.
Note
When sampling from a large Classification Image, it may take several
seconds to compute the class distributions, and a status reporting dialog will
be displayed.

3. Select the ground truth classes or ROIs to include in the sampling.


4. Click OK. The Generate Random Sample Input Parameters dialog appears.

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 477

Figure 4-17: Generate Random Sample from Ground Truth Dialog

5. Select the sampling type from the drop-down list.


Proportionate Stratified Random Sampling
1. Set the Stratification type radio button to proportionate.
2. Enter the Minimum Sample Size in percent or pixels by clicking the toggle
button. Entering a value for one will automatically update the value for the
other, making it easy to see the relationship between the percentage sample
size and the pixel sample size. The minimum size is one, to ensure that at least
one pixel is included from the smallest class (or ROI).
3. To view the proportionate class sample sizes for the current Minimum Sample
Size Setting, click view class sample sizes. The Proportionate Sample Sizes
dialog must be closed before the Generate Random Sample Input Parameters
dialog becomes active again.
The total sample size displays to the left of the view class sample sizes button and
will update dynamically as new settings are entered.

ENVI User’s Guide Post Classification


478 Chapter 4: Classification Tools

Figure 4-18: Generate Random Sample Input Parameters Dialog – Stratified


Random Sampling View

Disproportionate Stratified Random Sampling


1. Set the Stratification type radio button to disproportionate.
2. To define the sample sizes, click set class sample sizes. The Disproportionate
Sample Sizes dialog appears.

Figure 4-19: Disproportionate Sample Sizes Dialog

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 479

3. Select a class (or ROI) in the list at the top of the dialog. The class (or ROI)
will show up in the field at the bottom left of the dialog under the Edit Sample
Size for Selected Class label.
4. In the white box next to the class (or ROI) name at the bottom right of the
dialog, enter a sample size in pixels. To set the sample size to a percent of the
total class (or ROI) size, enter the percentage value (for example, 15%) then
press Enter. The sample size in pixels will automatically be calculated.
5. Click OK.
The total sample size displays to the right of the set ROI sample sizes button.

Figure 4-20: Generate Random Sample Input Parameters Dialog – Stratified


Random Disproportionate Sampling View

Equalized Random Sampling


1. Set the Sample Size in pixels. The minimum value is one and the maximum
value is equal to the smallest class size (or ROI) in the population.
2. The total sample size displays beneath the Sample Size parameter and updates
automatically when a new sample size is entered.

ENVI User’s Guide Post Classification


480 Chapter 4: Classification Tools

Figure 4-21: Generate Random Sample Input Parameters Dialog – Equalized


Random Sampling View

Random Sampling
1. Set the Sample Size in pixels or percent by clicking the toggle button. Entering
a value for one will automatically update the value for the other, making it easy
to see the relationship between the percentage sample size and the pixel sample
size.
2. The total sample size displays beneath the Sample Size parameter and updates
automatically when a new sample size is entered.

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 481

Figure 4-22: Generate Random Sample Input Parameters Dialog – Random


Sampling View

3. Select output to a Single ROI or Multiple ROIs.


4. The output ROIs containing the random samplings will automatically be saved
in the ENVI session’s memory. If you also wish to save the ROIs to a file, enter
a filename.
5. Click OK. If producing a Random sampling and some of the classes (or ROIs)
are not included in the resulting sample, ENVI displays a warning message.

Majority/Minority Analysis
Use Majority/Minority Analysis to apply majority or minority analysis to a
classification image. Use majority analysis to change spurious pixels within a large
single class to that class. You enter a kernel size and the center pixel in the kernel will
be replaced with the class value that the majority of the pixels in the kernel has. If you
select Minority analysis, then the center pixel in the kernel will be replaced with the
class value that the minority of the pixels in the kernel has.
1. From the ENVI main menu bar, select Classification → Post
Classification → Majority/Minority Analysis. The Input File dialog appears.
2. Select the classification input file and any optional Spatial Subsetting and/or
Spectral Subsetting, then click OK. The Majority/Minority Parameters dialog
appears.

ENVI User’s Guide Post Classification


482 Chapter 4: Classification Tools

3. In the list of classes, select the classes that you want to apply the analysis to.
If the center pixel is from a class that you did not select in the Select Classes
list, ENVI does not change that pixel. However, if the unselected class is the
majority class in the kernel, ENVI can change center pixels of selected classes
into an unselected class.
4. Select the analysis method, by clicking the corresponding toggle button.
5. Enter a kernel size. Kernel sizes are odd and the kernels do not have to be
square. Larger kernel sizes produce more smoothing of the classification
image.
If you select Majority analysis, enter the Center Pixel Weight. The center
pixel weight is the weight used to determine how many times the class of the
center pixel is counted when determining which class is in the majority. For
example, if you enter a weight of 1, ENVI will count the center pixel class only
one time; if you enter 5, ENVI will count the center pixel class five times.
6. Select output to File or Memory.
7. Click OK. ENVI adds the resulting output to the Available Bands List.

Clumping Classes
Use Clump Classes to clump adjacent similar classified areas together using
morphological operators. Classified images often suffer from a lack of spatial
coherency (speckle or holes in classified areas). Low pass filtering could be used to
smooth these images, but the class information would be contaminated by adjacent
class codes. Clumping classes solves this problem. The selected classes are clumped
together by first performing a dilate operation then an erode operation on the
classified image using a kernel of the size specified in the parameters dialog.
1. From the ENVI main menu bar, select Classification → Post
Classification → Clump Classes. The Input File dialog appears.
2. Select a classified image and perform any optional Spatial Subsetting, then
click OK. You can select only classified images (based upon the file type
described in the image’s header). The Clump Parameters dialog appears with
all of the available classes in the image in the Select Classes list.
3. Select the classes on which to perform clumping.
4. Enter the morphological operator size in the Rows and Cols fields.
5. Select output to File or Memory.
6. Click OK.

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 483

Sieving Classes
Use Sieve Classes to solve the problem of isolated pixels occurring in classification
images. Sieving classes removes isolated classified pixels using blob grouping.
Again, low pass or other types of filtering could be used to remove these areas, but
the class information would be contaminated by adjacent class codes. The sieve
classes method looks at the neighboring 4 or 8 pixels to determine if a pixel is
grouped with pixels of the same class. If the number of pixels in a class that are
grouped is less than the value that you enter, those pixels will be removed from the
class. When pixels are removed from a class using sieving, black pixels (unclassified)
will be left.
Tip
Use the Clump Classes function (see “Clumping Classes” on page 482) after
sieving to replace the black pixels.

1. From the ENVI main menu bar, select Classification → Post


Classification → Sieve Classes. The Input File dialog appears.
2. Select a classified image and perform any optional Spatial Subsetting, then
click OK. You can select only classified images (based upon the file type
described in the image’s header).
3. Click OK. The Sieve Parameters dialog appears with all of the available
classes in the image listed in the Select Classes list.
4. Select the classes on which to perform sieving. Any classes not selected for
sieving will be passed to the output image unchanged.
5. Enter the minimum number of pixels contained in a class group in the Group
Min Threshold field. Any groups of pixels smaller than this value will be
removed from the class.
6. Use the toggle button to select the number of neighboring pixels (4 or 8) to
look at when determining the number of pixels in a class group. The four-
neighbor region around a pixel consists of the two adjacent horizontal and two
adjacent vertical neighbors. The eight-neighbor region around a pixel consists
of all the immediately adjacent pixels.
7. Select output to File or Memory.
8. Click OK.

ENVI User’s Guide Post Classification


484 Chapter 4: Classification Tools

Combining Classes
Use Combine Classes to selectively combine classes in classified images. You can
also merge classes using Overlay → Classification from the Display group menu bar
(see “Merging Classes” on page 47 for details).
Combining classes or removing the unclassified class effectively deletes those
individual classes.
1. From the ENVI main menu bar, select Classification → Post
Classification → Combine Classes. The Classification Combine Classes
dialog appears.
2. Select a classified image and perform and any optional Spatial Subsetting, then
click OK. The Combine Classes Parameters dialog appears.
3. Select a class for input from the Input Classes list. The selected class name
appears in the Input Class field.
4. Select an output class by clicking on a class name in the Output Classes list.
5. When both the input and output classes are selected, click Add Combination
to finalize the selection. The new, combined class to create is shown in the
Combined Classes list at the bottom of the dialog. For example, selecting
region 1 as the input and region 3 as the output causes the string region 1 ->
region 3 to appear in the Combined Classes list.

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 485

Figure 4-23: Combine Classes Dialog

To deselect combined classes, select the name in the Combined Classes list.
6. Click OK. The Combine Classes Output dialog appears.
7. Select output to File or Memory. ENVI adds the resulting output to the
Available Bands List.

Overlaying Classes
Use Overlay Classes to produce an image map with a color composite or gray scale
background image and the classes overlaid in color. ENVI creates a three-band RGB
image.
You can also overlay classes using the Overlay menu on the Display group menu bar.
For details, see “Overlaying Classes” on page 44.
Due to the nature of the classification overlay, the background image should be
stretched and saved to byte output images prior to overlay.
1. From the ENVI main menu bar, select Classification → Post
Classification → Overlay Classes. The Input File dialog appears.
2. Select the classification image and any optional Spatial Subsetting, then click
OK. The Input Background RGB Input Bands dialog appears.

ENVI User’s Guide Post Classification


486 Chapter 4: Classification Tools

3. Click sequentially on the red, green, and blue bands to use for the background
image. The input files must be byte images (that is, files containing values
between 0 and 255). If a gray scale background is desired, select the same
spectral band for the RGB inputs.
4. Click OK. The Class Overlay to RGB Parameters dialog appears.
5. Select the classes to overlay on the background image by clicking the toggle
button associated with the class name in the list.
6. Select output to File or Memory.
7. Click OK. ENVI creates the class overlay image. If your display is set to 8-bit
color, the class overlay image may appear incorrect when displayed due to the
color quantization. However, on output, it will be correct.

Calculating Buffer Zone Images


Use Buffer Zone Image to create a buffer zone image from a classified image. In the
buffer zone image every pixel has a floating-point or integer value that is defined as
the distance from that pixel to the nearest pixel of the selected class or classes in units
of pixels. You designate a maximum distance value and the result is that any pixels

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 487

with a distance larger than that value will be set to the maximum distance value. An
example of a buffer zone image is shown in the following figure.

Figure 4-24: Example of a Buffer Zone Image

1. From the ENVI main menu bar, select Classification → Post


Classification → Buffer Zone Image. The Input File dialog appears.
2. Select the input classification file and any optional Spatial Subsetting, then
click OK. The Buffer Zone Image Parameters dialog appears.
3. In the list of classes, select the class names to measure the distance to. If more
than one class is selected, the distance will be from the pixel to the nearest
class.
4. Click the Maximum Distance increase/decrease buttons to set the maximum
distance to measure, or type the value (in pixels) into the corresponding field.
Any pixels with a distance larger than this value will be set to the maximum
distance value.
5. From the Distance Kernel drop-down button, select Floating Point or Integer
output.

ENVI User’s Guide Post Classification


488 Chapter 4: Classification Tools

6. Select output to File or Memory.


7. Click OK.

Creating Segmentation Images


Use Segmentation Image to create a segmentation image from a classified image.
Segmentation partitions a classified image into regions of connected pixels or blobs
of pixels that are contained in the same class. Each connected region is given a unique
DN value. You can specify the minimum number of pixels that must be contained in a
region and you can select whether eight or four neighbors are considered for the
connectivity.
1. From the ENVI main menu bar, select Classification → Post
Classification → Segmentation Image. The Input File dialog appears.
2. Select the input classification file and any optional Spatial Subsetting, then
click OK. The Segmentation Image Parameters dialog appears.
3. In the list of classes, select the classes to use for segmenting the image. All the
selected classes are combined before segmenting.
4. In the Population Minimum field, enter the minimum number of pixels that
must be contained in a region for it to become a segment.
5. Use the toggle button to designate whether to consider eight or four
neighboring pixels for the connectivity.
6. Select output to File or Memory.
7. Click OK. ENVI adds the resulting output to the Available Vectors List, with
each segment having a unique DN value.

Exporting Classes To Vector Layers


To export selected classification classes to vector layers:
1. From the ENVI main menu bar, select Classification → Post
Classification → Classification to Vector. The Raster to Vector Input Band
dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Raster to Vector Parameters dialog appears.
3. Select the class names to convert to vector polygons.
4. Use the toggle button to select whether to output each selected class to a
separate vector layer or to output all of the classes to a single layer. If you

Post Classification ENVI User’s Guide


Chapter 4: Classification Tools 489

output all of the classes to a single layer, attributes that include the class
number, polygon length, and area will be created for each polygon.
5. Select output to File or Memory.
6. Click OK. ENVI makes a polygon vector layer for each class selected. If you
select to output each class to a separate layer, each selected class is saved to a
separate vector file with an _1, _2, and so forth appended to the root name.
The vectors appear to be shifted one half pixel to the Southeast because ENVI
interprets the map coordinate of the vector node to be the upper left hand corner of
the raster pixel (versus treating the address as the center of the pixel).

ENVI User’s Guide Post Classification


490 Chapter 4: Classification Tools

Post Classification ENVI User’s Guide


Chapter 5
Transform Tools

This chapter covers the following topics:

The Transform Menu . . . . . . . . . . . . . . . . . 492 Color Transforms . . . . . . . . . . . . . . . . . . . 527


Image Sharpening . . . . . . . . . . . . . . . . . . . 493 Applying Decorrelation Stretch . . . . . . . . 531
Calculating Band Ratios . . . . . . . . . . . . . . 501 Applying Photographic Stretch . . . . . . . . 532
Principal Component Analysis . . . . . . . . . 504 Applying Saturation Stretch . . . . . . . . . . . 533
Independent Components Analysis . . . . . . 509 Creating Synthetic Color Images . . . . . . . 534
Minimum Noise Fraction Transform . . . . . 516 Calculating Vegetation Indices . . . . . . . . . 535

ENVI User’s Guide 491


492 Chapter 5: Transform Tools

The Transform Menu


Use the Transform menu to access transform functions. Transforms are image
processing operations that change data to another data space, usually by applying a
linear function. The goal of most transformations is to improve the presentation of
information. Transformed images are often more easily interpreted than the original
data.

The Transform Menu ENVI User’s Guide


Chapter 5: Transform Tools 493

Image Sharpening
Use Image Sharpening tools to automatically merge a low-resolution color, multi-,
or hyper-spectral image with a high-resolution gray scale image (with resampling to
the high-resolution pixel size). ENVI uses the following image sharpening techniques
for byte-scaled RGB imagery:
• An HSV transform.
• A color normalization (Brovey) transform.
The images must either be georeferenced or have the same image dimensions. The
RGB input bands for the sharpening should be stretched byte data or selected from an
open color display.
ENVI uses the following image sharpening techniques for spectral imagery:
• A Gram-Schmidt transform.
• A principal components (PC) transform.
• A color normalized (CN) transform.

Using HSV Sharpening


Use HSV sharpening to transform an RGB image to HSV color space, replace the
value band with the high-resolution image, automatically resample the hue and
saturation bands to the high-resolution pixel size using a nearest neighbor, bilinear, or
cubic convolution technique, and finally transform the image back to RGB color
space. The output RGB images will have the pixel size of the input high-resolution
data.
1. From the ENVI main menu bar, select Transform → Image Sharpening →
HSV. The Select RGB Input Bands dialog appears.
2. Select the three color bands to transform from either an open color image
display or from the Available Bands List (for details, see “Color Transforms”
on page 527). The Input File dialog appears.
3. Select the high-resolution input band and perform any optional Spatial
Subsetting, then click OK. The HSV Sharpening Parameters dialog appears.
4. Select the resampling method from the Resampling drop-down list.
5. Select output to File or Memory.
6. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Image Sharpening


494 Chapter 5: Transform Tools

Using Color Normalized (Brovey) Sharpening


Use Color Normalized (Brovey) sharpening to apply a sharpening technique that
uses a mathematical combination of the color image and high resolution data. Each
band in the color image is multiplied by a ratio of the high resolution data divided by
the sum of the color bands. The function automatically resamples the three color
bands to the high-resolution pixel size using one of the techniques you select. The
choices are nearest neighbor, bilinear, or cubic convolution. The output RGB images
will have the pixel size of the input high-resolution data.
Reference:
Vrabel, Jim, 1996, Multispectral Imagery Band Sharpening Study, Photogrammetric
Engineering & Remote Sensing, Vol. 62, No. 9, pp. 1075-1083.
1. From the ENVI main menu bar, select Transform → Image Sharpening →
Color Normalized (Brovey). The Select RGB Input Bands dialog appears.
2. Select the three color bands to transform from either an open color image
display or from the Available Bands List (for details, see “Color Transforms”
on page 527). The Input File dialog appears.
3. Select the high-resolution input band and perform optional Spatial Subsetting,
then click OK. The Color Normalized Sharpening Parameters dialog appears.
4. Select the resampling method from the Resampling drop-down list.
5. Select output to File or Memory.
6. Click OK. ENVI adds the resulting output to the Available Bands List.

Using Gram-Schmidt Spectral Sharpening


Use Gram-Schmidt Spectral Sharpening to sharpen multispectral data using high
spatial resolution data. If both data sets are georeferenced, ENVI additionally co-
registers them on-the-fly.
Pan-sharpening algorithms are used to sharpen multispectral data using high spatial
resolution panchromatic data. An underlying assumption of these algorithms is that
you can accurately estimate what the panchromatic data would look like using lower
spatial resolution multispectral data.
The Gram-Schmidt and PC spectral sharpening tools both create pan-sharpened
images, but using different techniques. Generally speaking, the Gram-Schmidt
method is more accurate than the PC method (see “Using PC Spectral Sharpening”
on page 497) and is recommended for most applications. Gram-Schmidt is typically

Image Sharpening ENVI User’s Guide


Chapter 5: Transform Tools 495

more accurate because it uses the spectral response function of a given sensor to
estimate what the panchromatic data look like.
If you display a Gram-Schmidt pan-sharpened image and a PC pan-sharpened image,
the visual differences are very subtle. The differences are in the spectral information;
compare a Z Profile of the original image with that of the pan-sharpened image to see
the differences in spectral information, or calculate a covariance matrix for both
images. The effect of pan sharpening is best revealed in images with homogenous
surface features (flat deserts or water, for example).
The low spatial resolution spectral bands to use to simulate the panochromatic band
must fall in the range of the high spatial resolution panchromatic band or they will not
be included in the resampling process.
ENVI performs Gram-Schmidt spectral sharpening by:
1. Simulating a panchromatic band from the lower spatial resolution spectral
bands.
2. Performing a Gram-Schmidt transformation on the simulated panchromatic
band and the spectral bands, using the simulated panchromatic band as the first
band.
3. Swapping the high spatial resolution panchromatic band with the first Gram-
Schmidt band.
4. Applying the inverse Gram-Schmidt transform to form the pan-sharpened
spectral bands.
Reference:
Laben et al., Process for Enhancing the Spatial Resolution of Multispectral Imagery
Using Pan-Sharpening, US Patent 6,011,875.
The images you use must either be georeferenced or have the same image
dimensions. If the images are georeferenced, ENVI co-registers the images before
performing the sharpening.

ENVI User’s Guide Image Sharpening


496 Chapter 5: Transform Tools

Note
Ensure that you have adequate disk space before performing a Gram-Schmidt
transformation, because this process creates an output file and several temporary
files. An error message will appear during the process if you do not have adequate
disk space.

To apply Gram-Schmidt spectral sharpening:


1. Select one of the following from the ENVI main menu bar:
• Transform → Image Sharpening → Gram-Schmidt Spectral
Sharpening
• Spectral → Gram-Schmidt Spectral Sharpening
The Input File dialog appears.
2. Select the low resolution multispectral input file and perform optional Spatial
Subsetting, Spectral Subsetting and/or Masking, then click OK. The Input
Band dialog appears.
3. Select the high-resolution input band, then click OK. The Gram-Schmidt
Spectral Sharpen Parameters dialog appears.
4. Choose one of the following methods for the low resolution pan:
• Average of Low Resolution Multispectral File: Simulates a low
resolution panchromatic image by using an average of the multispectral
bands. ENVI simulates a panchromatic image for the corresponding
sensor.
• Select Input File: Select this option, then click Select Low Resolution
Pan File to choose an existing one-band image with the spatial dimensions
of the multispectral image.
• Create By Sensor Type: Simulates a panchromatic image for the selected
sensor. Choose the sensor type from the Select Sensor drop-down list. The
choices are IKONOS, IRS1, Landsat7, QuickBird, SPOT 5,
KOMPSAT-2, RapidEye, and GeoEye-1, and WorldView-2. This option
requires radiometrically calibrated data.
• User Defined Filter Function: Simulates a panchromatic image for the
selected filter function. Select this option, then click Select Input Filter
Function File to choose a specific filter function to use. This option
requires radiometrically calibrated data.

Image Sharpening ENVI User’s Guide


Chapter 5: Transform Tools 497

5. If you applied a mask to the low resolution input data, the Mask Output Value
field appears. Set a value for the pixels in the output masked area.
ENVI uses only non-masked pixels in the calculation of the low resolution
statistics. The mask is applied to the high resolution result and masked pixels
are set to the specified mask output value. The default value is 0.
6. Select the resampling method from the Resampling drop-down list.
7. Select output to File or Memory.
8. Click OK. ENVI adds the resulting output to the Available Bands List.

Using PC Spectral Sharpening


Use PC Spectral Sharpening to sharpen a low spatial resolution multi-band image
using an associated high spatial resolution panchromatic band. The algorithm
assumes that the low spatial resolution spectral bands correspond to the high spatial
resolution panchromatic band. If both data sets are georeferenced, ENVI additionally
co-registers them on the fly.
ENVI applies PC spectral sharpening by:
1. Performing a PC transformation on the multispectral data.
2. Replacing PC band 1 with the high resolution band and scaling the high
resolution band to match the PC band 1, so no distortion of the spectral
information occurs.The PC spectral sharpening method assumes that the first
PC band is a good estimate of the panchromatic data.
3. Performing an inverse transform.
4. Resampling the multispectral data to the high resolution pixel size using a
nearest neighbor, bilinear, or cubic convolution technique.
Reference:
Welch, R. and W. Ahlers, 1987. “Merging Multiresolution SPOT HRV and Landsat
TM Data.” Photogrammetric Engineering & Remote Sensing, 53 (3), pp. 301-303.
The images must be georeferenced or have the same image dimensions. If the images
are georeferenced, ENVI co-register the images before performing the sharpening.
To apply PC spectral sharpening:
1. Select one of the following from the ENVI main menu bar:
• Transform → Image Sharpening → PC Spectral Sharpening
• Spectral → PC Spectral Sharpening

ENVI User’s Guide Image Sharpening


498 Chapter 5: Transform Tools

2. Select an input file and perform optional Spatial Subsetting, Spectral


Subsetting and/or Masking, then click OK. The Input File dialog appears.
3. Select the high-resolution input image and perform any Spatial Subsetting,
then click OK. The PC Spectral Sharpen Parameters dialog appears.
4. If you applied a mask to the low resolution input data, the Mask Output Value
field appears. Set a value for the pixels in the output masked area.
ENVI uses only non-masked pixels in the calculation of the low resolution
statistics. The mask is applied to the high resolution result and masked pixels
are set to the specified mask output value. The default value is 0.
5. Select the resampling method from the Resampling drop-down list.
6. Select output to File or Memory.
7. Click OK. ENVI adds the resulting output to the Available Bands List.

Using CN Spectral Sharpening


CN Spectral Sharpening is an extension of the Color Normalized algorithm often
used to pan sharpen 3-band RGB images. Unlike HSV or Brovey sharpening, you can
use CN spectral sharpening to simultaneously sharpen any number of bands and
retain the input image’s original data type and dynamic range. For example, you can
use the CN spectral sharpening tool to sharpen hyperspectral data using a
multispectral image.
CN Spectral Sharpening’s Color Normalized algorithm, also referred to as the
Energy Subdivision Transform, uses the higher spatial resolution (and lower spectral
resolution) bands from a sharpening image to enhance the lower spatial resolution
(but higher spectral resolution) bands of the input image. ENVI sharpens input bands
only if they fall within the spectral range of one of the sharpening image’s bands; all
other input bands are unchanged in the output. The spectral range of the sharpening
bands are defined by the band center wavelength and full width-half maximum
(FWHM) value, both obtained from the sharpening image’s ENVI header file.
The input image’s bands are grouped into spectral segments defined by the spectral
range of the sharpening bands. The corresponding band segments are processed
together in the following manner. Each input band is multiplied by the sharpening
band, then normalized by dividing by the sum of the input bands in the segment:
References:
Vrabel, J., Doraiswamy, P., McMurtrey, J., and Stern, A (2002). “Demonstration of
the Accuracy of Improved Resolution Hyperspectral Imagery,” SPIE Symposium
Proceedings.

Image Sharpening ENVI User’s Guide


Chapter 5: Transform Tools 499

InputBand × SharpeningBand × ( Num_Bands_In_Segment )


CN_Sharpened_Band = -------------------------------------------------------------------------------------------------------------------------------------------------
-
( ∑ Input_Bands_In_Segment ) + ( Num_Bands_In_Segment )

Vrabel, J., Doraiswamy, P., and Stern, A. (2002). “Application of Hyperspectral


Imagery Resolution Improvement for Site-Specific Farming,” ASPRS 2002
Conference Proceedings.
CN spectral sharpening process has the following input requirements:
• ENVI Header Spectral Information: The input image to sharpen must have
wavelengths defined in its header, and the sharpening image must have both
wavelengths and full-width-half maximum (FWHM) defined. These spectral
data are required because the sharpening can only be applied to low spatial
resolution (input) bands that are within the spectral range of the high spatial
resolution (sharpening) bands. To define spectral data for an ENVI file, see
“Editing Wavelengths or FWHM” on page 198.
• Coregistration or Georeferencing: Successful results require accurate
coregistration of the input and sharpening images. If the input and sharpening
images are already coregistered, then the input (low spatial/high spectra
resolution) image must have been resampled so that its pixel size matches the
sharpening image. If the images are not coregistered but they are
georeferenced, then the CN Sharpening routine will automatically coregister
the two to use the area common to both, using the map projection of the input
image and the pixel size of the sharpening image.
• Data Units: Input and sharpening images must be in the same units (that is,
both in reflectance, radiance, DN, and so on). If the sharpening image does not
have the same scale factor as the input image, select the Sharpening Image
Multiplicative Scale Factor check box in the input parameters to adjust the
scaling to match the input image.
1. From the ENVI main menu bar, select one of the following:
• Transform → Image Sharpening → CN Spectral Sharpening
• Spectral → CN Spectral Sharpening
The Select Low Spatial Resolution Sharpening Image dialog appears.
2. Select the low spatial resolution (high spectral resolution) image to sharpen,
and perform optional Spatial Subsetting and/or Spectral Subsetting, then click
OK. The Select High Spatial Resolution Sharpening Image dialog appears.

ENVI User’s Guide Image Sharpening


500 Chapter 5: Transform Tools

3. Select the high spatial resolution (low spectral resolution) sharpening image,
and perform optional Spatial Subsetting and/or Spectral Subsetting, then click
OK. The CN Spectral Sharpening Parameters dialog appears.
4. Enter a scale factor for the sharpening image in the Sharpening Image
Multiplicative Scale Factor field.
The sharpening image must be in the same units and have the same scale factor
as the input image. For example, if the input image is an integer hyperspectral
file calibrated into units of (reflectance * 10000), but the sharpening image is a
floating-point multispectral file calibrated into reflectance (zero to one), then
enter a scale factor of 10,000. If the input image is in units of radiance of
[μW/(cm2 • nm • sr)], but the sharpening image is in units of radiance of
[μW/(cm2 • m • sr)], then enter a scale factor of 0.001.
5. If the input and sharpening images require resampling or warping to produce a
coregistered pair, and the input image is BIL or BIP interleave, the Output
Interleave option appears. Select an output interleave. (In all other cases the
output interleave is the same as the input image interleave.) Creating BSQ
output is faster, but is often inconvenient for further use of the sharpened
image.
All in-memory results must be BSQ interleave.
6. Select output to File or Memory.
7. Click OK. ENVI adds the resulting output to the Available Bands List. Bands
that were sharpened are easily identified by their band names. The units, data
type, dynamic range, and image geometry match that of the input image. The
pixel size matches that of the sharpening image.

Image Sharpening ENVI User’s Guide


Chapter 5: Transform Tools 501

Calculating Band Ratios


Use Band Ratios to enhance the spectral differences between bands and to reduce the
effects of topography. Dividing one spectral band by another produces an image that
provides relative band intensities. The image enhances the spectral differences
between bands. ENVI can output band ratio images in either floating-point (decimal)
format or byte data format. Floating-point format is the default. You may combine
three ratios into a color-ratio-composite (CRC) image to determine the approximate
spectral shape for each pixel’s spectrum.
To calculate band ratios, you specify a numerator band and a denominator band. The
band ratio is the numerator divided by the denominator. ENVI checks for division-by-
zero errors and sets them to 0. ENVI also allows you to calculate multiple ratios and
output them as multiple bands in one file.
To calculate band ratios:
1. From the ENVI main menu bar, select Transform → Band Ratios. The Band
Ratio Input Bands dialog appears.
2. Select the Numerator band (the first band) and the Denominator band (the
second band) from the list of available bands.
To change the bands you have selected click Clear.

ENVI User’s Guide Calculating Band Ratios


502 Chapter 5: Transform Tools

Figure 5-1: Band Ratio Input Bands Dialog

3. Click Enter Pair to create a new band pair listed in the Selected Ratio Pairs
list. When you select the first pair, only bands with the same spatial size appear
in the Available Bands List. The Numerator and Denominator fields clear.
Create as many ratio combinations as needed by entering additional band pairs.
All ratios in the Selected Ratio Pairs list are output as multiple bands in a
single file.
4. Click OK. The Band Ratios Parameters dialog appears.
5. To select an optional spatial subset, click Spatial Subset. For subsetting
details, see “Spatial Subsetting” on page 215.
6. Select output to File or Memory.

Calculating Band Ratios ENVI User’s Guide


Chapter 5: Transform Tools 503

7. To output the ratio values as byte or floating-point data, select from the Output
Data Type drop-down list. If you select Byte, ENVI stretches the output ratio
values by mapping the values entered in the Min and Max fields to 0 to 255.
8. If you selected an output ratio of Byte, change the byte stretching ratio data
range in the Min and Max values.
9. Click OK. ENVI adds the resulting output to the Available Bands List.

Creating Complex Band Ratios


To use band ratios in second-tier band ratio calculations:
1. Make the single band ratios as described “Calculating Band Ratios” on
page 501.
2. From the ENVI main menu bar, select Transform → Band Ratios. You use
the previously-computed set of ratios in a new band ratio.
For example, if you are using Landsat TM data, you could first calculate the
band 5/band 7 ratio and the band 3/band 1 ratio. ENVI allows you to calculate
a complex ratio of 5/7 divided by 3/1 by selecting the 5/7 ratio from the Band
Ratio Input Bands dialog as the numerator and the 3/1 ratio as the denominator.
3. Select a new Numerator and Denominator.
4. Click Enter Pair.
5. Click OK. ENVI adds the resulting output to the Available Bands List.
Tip
You can also use the Band Math function to calculate these kinds of ratios (see
“Band Math” on page 306).

ENVI User’s Guide Calculating Band Ratios


504 Chapter 5: Transform Tools

Principal Component Analysis


Use Principal Components to produce uncorrelated output bands, to segregate noise
components, and to reduce the dimensionality of data sets. Because multispectral
data bands are often highly correlated, the principal components (PC) transformation
is used to produce uncorrelated output bands. This is done by finding a new set of
orthogonal axes that have their origin at the data mean and that are rotated so the data
variance is maximized.
PC bands are linear combinations of the original spectral bands and are uncorrelated.
You can calculate the same number of output PC bands as input spectral bands. The
first PC band contains the largest percentage of data variance and the second PC band
contains the second largest data variance, and so on. The last PC bands appear noisy
because they contain very little variance, much of which is due to noise in the original
spectral data. principal components bands produce more colorful color composite
images than spectral color composite images because the data is uncorrelated. ENVI
can complete forward and inverse PC rotations.
Reference:
Richards, J.A., 1999. Remote Sensing Digital Image Analysis: An Introduction,
Springer-Verlag, Berlin, Germany, p. 240.

Calculating Forward PC Rotations


The forward PC rotation uses a linear transform to maximize the variance of the data.
When you use forward PC rotation, ENVI allows you to calculate new statistics or to
rotate from existing statistics. You can save the output of either as byte, floating-
point, integer, long integer, or double precision values. You also have the option to
subset the output of the PC rotation based on eigenvalues, and to generate output of
only the PC bands that you need.

Computing New Statistics and Rotating


Use Compute New Statistics and Rotate to calculate the eigenvalue and covariance
or correlation statistics for your data and to calculate the forward PC rotation
transform.
1. From the ENVI main menu bar, select Transform → Principal
Components → Forward PC Rotation → Compute New Statistics and
Rotate. The Input File dialog appears.

Principal Component Analysis ENVI User’s Guide


Chapter 5: Transform Tools 505

2. Select the input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The Forward PC Parameters
dialog appears.
Tip
If you have any bad bands in your dataset, you should use spectral subsetting
to exclude them from PC analysis. When bad bands are set to the same values
as adjacent bands, when they are interpolated from nearby bands, when they
are set to a constant value, or when they contain zero variance or large
outliers, a “singularity” problem is encountered where the band becomes a
near-perfect linear combination of other bands. This may cause the “Too May
Iterations in TQLI” error message to appear when you calculate the forward
PC rotation.

3. Click Stats Subset to calculate the statistics based on a spatial subset or the
area under an ROI. The calculated statistics are applied to the entire file or to a
spatial subset of the file. See “Statistics Subsetting” on page 223 for details.
4. Enter the Stats X/Y Resize Factors less than 1 in the appropriate fields to sub-
sample the data when calculating the statistics. This increases the speed of the
statistics calculations. For example, using a resize factor of 0.1 will use every
10th pixel in the statistics calculations.
5. In the Output Stats Filename [.sta] field, enter a filename for the noise
statistics.
6. Select whether to calculate the PCs based on the Covariance Matrix or
Correlation Matrix using the toggle button. Typically:
• Use Covariance Matrix when calculating the principal components.
• Use Correlation Matrix when the data range differs greatly between
bands and normalization is needed.
7. If you applied a mask, enter a value for the output results in the Output Mask
Value field. ENVI applies the mask for the statistics calculation and the
masked areas of the output dataset are set to the entered mask value.
8. Select output to File or Memory.
9. From the Output Data Type drop-down list, select the data type of the output
file.
10. To use a subset from eigenvalues, use the Select Subset from Eigenvalues
toggle button to select Yes or No.

ENVI User’s Guide Principal Component Analysis


506 Chapter 5: Transform Tools

11. If you chose No to selecting a subset from eigenvalues, select the Number of
Output PC Bands. The default number of output bands is equal to the number
of input bands.
12. Click OK.
If you chose No to selecting a subset from eigenvalues, ENVI performs the
transform and adds the output to the Available Bands List. The PC Eigenvalues
plot window also appears. For information on editing and other options in the
Eigenvalue plot window, see “Using Interactive Plot Functions” on page 106.
If you chose Yes to selecting a subset from eigenvalues, the Select Number of
Output Bands dialog appears. Each band is listed with its corresponding
eigenvalue and the cumulative percentage of data variance contained in each
IC band. Do the following:
A. Select the Number of Output IC Bands. IC Bands with large eigenvalues
contain the largest amounts of data variance, while bands with lower
eigenvalues contain less data information and more noise. Sometimes, it is
best to output only those bands with large eigenvalues to save disk space.
B. Click OK. ENVI performs the transform and adds the output to the
Available Bands List. The output IC rotation contains only the number of
bands that you selected. For example, if you chose 4 as the number of
output bands, only the first four IC bands appear in your output file.

Figure 5-2: PC Eigenvalues Plot Window

Principal Component Analysis ENVI User’s Guide


Chapter 5: Transform Tools 507

Rotating from Existing Statistics


If you have already calculated covariance and eigenvalue statistics for your data, you
can use them as input into the PC rotation. You can use any statistics file in the PC
rotation that contains covariance and eigen statistics for the same number of bands as
your input data. (You may have already calculated these statistics using the Basic
Tools → Statistics option or during a previous PC rotation session.)
Tip
If you need to prevent certain pixels from being used when computing the statistics
for the Principal Components Analysis rotation, first make a mask of the bad pixels,
then use Basic Tools → Statistics to compute the covariance statistics on the
masked image (see “Computing Statistics” on page 274). You can then use this
statistics file to do the principal components analysis.

1. From the ENVI main menu bar, select Transform → Principal


Components → Forward PC Rotation → PC Rotation from Existing
Stats. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Masking,
then click OK. The Enter Statistics Filename dialog appears with all of the
existing statistics files in the current input data directory listed, using the
default file extension .sta.
3. Select the statistics file. The Forward PC Parameters dialog appears.
4. Select whether to calculate the PCs based on the Covariance Matrix or
Correlation Matrix using the toggle button. Typically:
• Use Covariance Matrix when calculating the principal components.
• Use Correlation Matrix when the data range differs greatly between
bands and normalization is needed.
5. Select output to File or Memory.
6. From the Output Data Type drop-down list, select the data type of the output
file.
7. Select the number of output PC bands by using one of the following options:
• To select the number of output bands without examining the eigenvalues,
select No from the Select Subset from Eigenvalues toggle button, then set
the Number of Output PC Bands.

ENVI User’s Guide Principal Component Analysis


508 Chapter 5: Transform Tools

• To select the number of output MNF bands by examining the eigenvalues,


use the following steps:
A. Select Yes from the Select Subset from Eigenvalues toggle button.
B. Click OK. ENVI calculates the statistics and the Select Output PC Bands
dialog appears, with each band listed with its corresponding eigenvalue.
Also listed is the cumulative percentage of data variance contained in each
PC band for all bands.
C. Set the Number of Output PC Bands. For the best results, and to save
disk space, output only those bands with high eigenvalues. Images with
eigenvalues close to 1 are mostly noise.
8. Click OK. When ENVI finishes processing, the PC Eigenvalues plot window
appears and the PC bands are added to the Available Bands List. For
information on editing and other options in the Eigenvalue plot window, see
“Using Interactive Plot Functions” on page 106.

Inversing PC Rotations
Use Inverse PC Rotation to transform principal components images back into their
original data space.
1. From the ENVI main menu bar, select Transform → Principal
Components → Inverse PC Rotation. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Enter Statistics Filename dialog appears with
all of the existing statistics files in the current input data directory listed. The
statistics files appear with the default file extension .sta.
3. Select the statistics file saved from the forward PC rotation. The statistics file
must exist before you select the inverse PC rotation.
4. Select either Covariance Matrix or Correlation Matrix by clicking the
Calculate using toggle button.
If you want to inverse the images back to their original data space, select the
same calculate method that you used in the forward rotation.
5. Select output to File or Memory.
6. From the Output Data Type drop-down list, select the data type of the output
file.
7. Click OK. ENVI adds the resulting output to the Available Bands List.

Principal Component Analysis ENVI User’s Guide


Chapter 5: Transform Tools 509

Independent Components Analysis


Use Independent Components (IC) analysis on multispectral or hyperspectral
datasets to transform a set of mixed, random signals into components that are
mutually independent. IC transformation serves as a tool for blind source separation,
where no prior information on the mixing is available. The transform is based on the
non-Gaussian assumption of the independent sources, and uses higher-order statistics
to reveal interesting features in typically non-Gaussian hyperspectral datasets. IC
transformation can distinguish features of interest even when they occupy only a
small portion of the pixels in the image.
The applications of IC transformation in remote sensing include dimension reduction,
extracting characteristics of the image, anomaly and target detection, feature
separation, classification, endmember extraction, noise reduction, and mapping.
Compared with Principal Component (PC) analysis, IC analysis provides some
unique advantages:
• PC analysis is orthogonal decomposition. It is based on covariance matrix
analysis, which is based on the Gaussian assumption. IC analysis is based on
non-Gaussian assumption of the independent sources.
• PC analysis uses only second order statistics. IC analysis uses higher order
statistics. Higher order statistics is a stronger statistical assumption, revealing
interesting features in the usually non-Gaussian hyperspectral datasets.
• If the feature of interest (such as anomaly) only occupies a small portion of all
pixels, it makes insignificant contribution to covariance matrix. In PC analysis,
the feature of interest will be buried in the noisy bands. In IC analysis, the
features are distinguished from the noisy bands.
With IC analysis, you can calculate forward IC rotations and inverse IC rotations.
The IC forward calculation is a linear transformation for which ENVI does the
following:
1. Centers and whitens the sample data using the mean, eigenvectors, and
eigenvalues of the sample data, and applies PC rotation for data whitening.
2. If you changed the number of output bands, ENVI reduces the dimension of
the data by subsetting the whitened sample data. Dimension reduction is not
recommended for anomaly or target detection, as those signals occupy only a
small portion in the image and could be buried in the noisy bands of PC
rotation during data whitening.

ENVI User’s Guide Independent Components Analysis


510 Chapter 5: Transform Tools

3. Performs negentropy maximization using the whitened sample to estimate the


IC transform matrix.
4. Transforms the input file using the forward IC transform matrix.
5. If you selected to sort the IC bands by 2D spatial coherence, ENVI sorts the
bands in descending order. Components generated by the IC rotation are not
prioritized in the original transform, which could mean a noisy band appears as
the first IC band. When you use 2D spatial coherence sorting, IC bands that
contain spatial structure and most of the information appear first, and IC bands
that contain little spatial structure and more noise appear last.
A 2D spatial coherence measure is the average of two correlation coefficients.
One correlation coefficient is calculated between each spectral band and a
version of itself, offset by one line. The other correlation coefficient is
calculated between each spectral band and a version of itself, offset by one
sample.
You have the option to reduce the dimensions of IC bands based on eigenvalues
during data whitening.
One application of using the inverse IC transform is to remove noise from the data.
You could:
1. Perform a forward transform on all of the bands.
2. Determine which bands contain the coherent images by examining the output
images.
3. Run the inverse IC transform using a spectral subset that contains only the
good bands.
References:
Hyvarinen, A., and E. Oja, Independent component analysis: algorithms and
applications, Neural Networks, vol. 13, no. 4-5, pp. 411-430, 2000.
Hyvarinen, A., Fast and robust fixed-point algorithms for independent component
analysis, IEEE Trans. Neural Networks, vol. 10, no. 3, pp. 626-634, 1999.

Calculating Forward IC Rotations


You can calculate forward transforms by calculating new statistics, by using a
previously calculated statistics file, or by using an existing transform. You also have
the option to reduce the dimension of IC bands, and to generate output of only the IC
bands that you need.

Independent Components Analysis ENVI User’s Guide


Chapter 5: Transform Tools 511

Computing New Statistics and Rotating


Use Compute New Statistics and Rotate to calculate the forward IC rotation
transform.
1. From the ENVI main menu bar, select Transform → Independent
Components → Forward IC Rotation → Compute New Stats and Rotate.
The Input File dialog appears.
2. Select the input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The Forward IC Parameters dialog
appears.
3. Click Sample Spatial Subset to define the sample data based on a spatial
subset or the area under an ROI. Defining a sample spatial subset smaller than
the whole image can fit the IC sample into memory and increase computation
speed, and helps concentrate the IC analysis on the features of interest in the
spatial subset or ROI.
4. If you did not apply masking at file input, enter the Sample X/Y Resize
Factors in the appropriate fields to sub-sample the data when calculating the
IC transform. Sub-sampling reduces the IC sample size to fit into memory and
increases computation speed. This option is valid only on images with an x,y
size greater than 64. A setting of 1 (the default) does not change the data. For
example, on an image with an x,y greater than 64, a resize factor of 0.5 will use
every other pixel in the statistics calculations and the IC sample. Beware that
setting this value to a small number could lose features of interest, as those
pixels may be discarded. The upper limit is 1.0. The lower limit limits x/y size
after downsampling to 64.
5. In the Output Stats Filename [.sta] field, enter a filename for the statistics
output file. You can use this file for future IC calculations. See “Rotating from
Existing Statistics” on page 513.
6. Enter the Change Threshold for IC optimization. If the change of the
independent component is less than this value, then the IC iteration stops. The
default is 0.0001. The allowable range is 10-8 to 10-2. Increasing this value
increases the speed of convergence, but may provide a less optimal solution.
7. Enter the Maximum Iterations to perform for IC optimization using a fixed-
point algorithm. The default is 100. The lower limit is 100. More iterations
helps ENVI find more optimal components; however, each iteration adds to
processing time, depending on the CPU and system load.
8. Enter the Maximization Stabilization Iterations for IC optimization using a
stabilized fixed-point algorithm. When estimating one independent

ENVI User’s Guide Independent Components Analysis


512 Chapter 5: Transform Tools

component, the fixed-point algorithm runs first. If the algorithm does not
converge after maximization iterations, the stabilized fixed-point algorithm
runs to improve convergence. The default value is 100. The lower limit is 0 (no
stabilization step). Enabling stabilization and increasing stabilization iterations
helps ENVI find the optimal components; however, each iteration adds to
processing time, depending on the CPU and system load.
9. Select one of the following from the Contrast Function drop-down list.
• LogCosh (default). If you select LogCosh, you must also enter a value in
the Coefficient field. LogCosh is a good general-purpose contrast
function.
• Kurtosis
• Gaussian
The contrast functions and their first-order derivatives are as follows:

1
LogCosh G 1 ( u ) = ----- log cosh ( a 1 u ) , g 1 ( u ) = tan h ( a 1 u )
a1
2 2
Kurtosis G 2 ( u ) = – exp ( – u ⁄ 2 ) , g 2 ( u ) = u exp ( – u ⁄ 2 )

1 4 3
Gaussian G 3 ( u ) = --- u , g3 ( u ) = u
4

10. If your Contrast Function value is LogCosh, enter the Coefficient. The
default is 1.0. The range is 1.0 to 2.0.
11. To use a subset from eigenvalues, use the Select Subset from Eigenvalues
toggle button to select Yes or No.
12. If you chose No to selecting a subset from eigenvalues, select the Number of
Output IC Bands. The default is the number of input bands.
13. Select output to File or Memory.
14. If you applied a mask, enter a value for the output results in the Output Mask
Value field. ENVI sets the masked areas of the output dataset to the entered
mask value.
15. Enable the Sort Output Bands by 2D Spatial Coherence check box if you
want the output bands to be sorted by decreasing spatial coherence. Use this
option if a noisy band could appear as the first IC.

Independent Components Analysis ENVI User’s Guide


Chapter 5: Transform Tools 513

16. Enter the Output Transform Filename. You can use this file for future IC
calculations on the same image, or on an image with similar features. See
“Rotating from an Existing Transform” on page 514.
17. Click OK.
If you chose No to selecting a subset from eigenvalues, ENVI performs the
transform and adds the output to the Available Bands List.
If you chose Yes to selecting a subset from eigenvalues, the Select Number of
Output Bands dialog appears. Each band is listed with its corresponding
eigenvalue and the cumulative percentage of data variance contained in each
PC whitened band. Do the following:
A. Select the Number of Output IC Bands. If the value is less than the
number of input bands, data dimension is reduced.
B. Click OK. ENVI performs the transform and adds the output to the
Available Bands List. The output IC rotation contains only the number of
bands that you selected, or that met the eigenvalue subset criteria. For
example, if you chose 4 as the number of output bands, only four IC bands
appear in your output file.

Rotating from Existing Statistics


Use IC Rotation from Existing Stats to calculate the forward IC rotation transform
from an existing statistics file.
1. From the ENVI main menu bar, select Transform → Independent
Components → Forward IC Rotation → IC Rotation from Existing Stats.
The Input File dialog appears.
2. Select the input file and perform optional Spatial Subsetting and/or Masking,
then click OK. The Enter Statistics Filename dialog appears.
3. Select the statistics file and click Open. The Forward IC Parameters dialog
appears.
4. Set the parameters in the Forward IC Parameters dialog. See “Calculating
Forward IC Rotations” on page 510, starting at step 3, for details.
Because you are working with an existing statistics file, you will not be
prompted to enter a statistics filename (step 5 in “Calculating Forward IC
Rotations”).

ENVI User’s Guide Independent Components Analysis


514 Chapter 5: Transform Tools

Rotating from an Existing Transform


Use IC Rotation from Existing Transform to calculate the forward IC rotation
transform from an existing transform.
1. From the ENVI main menu bar, select Transform → Independent
Components → Forward IC Rotation → IC Rotation from Existing
Transform. The Input File dialog appears.
2. Select the input file and perform optional Spatial Subsetting and/or Masking,
then click OK. The Enter Transform Filename dialog appears.
3. Select the transform file (.trans) and click Open. The Forward IC
Parameters dialog appears.
4. Select output to File or Memory.
5. If you applied a mask, enter a value for the output results in the Output Mask
Value field. The masked areas of the output dataset are set to the entered mask
value.
6. Enable the Sort Output Bands by 2D Spatial Coherence check box if you
want the output bands to be sorted by decreasing spatial coherence. Use this
option if a noisy band could appear as the first IC.
7. If you enabled the Sort Output Bands by 2D Spatial Coherence check box,
enter the Output Transform Filename. You can use this file for future IC
calculations. See “Rotating from an Existing Transform” on page 514.
8. Click OK.

Calculating Inverse IC Rotations


Use Inverse IC Rotation to transform independent components back into their
original data space.
1. From the ENVI main menu bar, select Transform → Independent
Components → Inverse IC Rotation. The Input File dialog appears.
2. Select the input file (the output file from the forward transform) and perform
optional Spatial Subsetting and/or Spectral Subsetting, then click OK. The
Enter Transform Filename dialog appears.
3. Select the transform file (the output transform file from the forward transform)
and click Open. The Inverse IC Parameters dialog appears.
4. Select output to File or Memory.

Independent Components Analysis ENVI User’s Guide


Chapter 5: Transform Tools 515

5. Select the Output Data Type from the drop-down list. You can save the output
as byte, floating-point, integer, long integer, or double precision values.
6. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Independent Components Analysis


516 Chapter 5: Transform Tools

Minimum Noise Fraction Transform


Use MNF Rotation transforms to determine the inherent dimensionality of image
data, to segregate noise in the data, and to reduce the computational requirements for
subsequent processing (see Boardman and Kruse, 1994).
The MNF transform as modified from Green et al. (1988) and implemented in ENVI,
is a linear transformation that consists of the following separate principal components
analysis rotations:
• 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 in which 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.
You have the option to subset the output of the MNF rotation based on eigenvalues,
which means (with hyperspectral data) that you do not have to generate an output
cube of hundreds of bands (floating-point) when you only need tens of bands.
ENVI also has the option of applying an MNF transform to individual spectra. This
transforms endmember spectra into MNF space for input into mixture tuned matched
filtering (MTMF). For details see “Matched Filtering Results” on page 777.

Minimum Noise Fraction Transform ENVI User’s Guide


Chapter 5: Transform Tools 517

Tip
You can use ENVI’s Spectral Hourglass Wizard to guide you step-by-step through
the ENVI hourglass processing flow, including MNF transforms, to find and map
image spectral endmembers from hyperspectral or multispectral data. For details,
see “Spectral Hourglass Wizard” on page 829.

References:
Green, A. A., Berman, M., Switzer, P., and Craig, M. D., 1988, A transformation for
ordering multispectral data in terms of image quality with implications for noise
removal: IEEE Transactions on Geoscience and Remote Sensing, v. 26, no. 1, p. 65-
74.
Boardman, J. W., and Kruse, F. A., 1994, Automated spectral analysis: a geological
example using AVIRIS data, north Grapevine Mountains, Nevada: in Proceedings,
ERIM Tenth Thematic Conference on Geologic Remote Sensing, Environmental
Research Institute of Michigan, Ann Arbor, MI, pp. I-407 - I-418.

Statistics Files
Unlike principal components analysis, the forward MNF transform produces two
separate statistics files: MNF noise statistics and MNF statistics. While these files
appear to be ordinary ENVI statistics files, they contain information unique to MNF
and omit data typically found in ENVI statistics files.
During a forward MNF rotation, ENVI computes the following statistics:
• The mean for each band of the input image (to normalize the data)
• The covariance statistics of the noise (for the noise rotation and normalization)
• The covariance statistics of the noise-whitened and rescaled input image data
The first rotation stores its complete set of covariance statistics in the MNF noise
statistics file. However, this file contains only the noise covariance statistics, not the
data normally found in ENVI statistics files.
The second rotation stores its eigenvector matrix and eigenvalues in the MNF
statistics file. However, the rest of the covariance statistics for the second rotation are
not saved because the covariance placeholder in the MNF statistics file is used to
store a special “composite” MNF transformation matrix. This matrix describes the
net result of both principal components rotations as well as the band-independent
scaling introduced by the noise normalization. This non-orthogonal, non-unit length,
matrix allows an inverse MNF rotation to be applied in a single step.

ENVI User’s Guide Minimum Noise Fraction Transform


518 Chapter 5: Transform Tools

The following table summarizes the contents of the statistics files generated by the
MNF transform:

MNF Noise
Statistic MNF Statistics File
Statistics File

Mean <null> Of the original input bands


Maximum <null> <null>
Minimum <null> <null>
Standard Deviation <null> <null>
Eigenvalues Of the noise Of the second principal
covariance matrix components rotation
Covariance matrix Of the noise Composite transformation
matrix
Correlation matrix Of the noise Incorrect values. Do not use.
Eigenvectors Of the noise Of the second principal
covariance matrix components rotation

Table 5-1: Summary of Statistics Files Generated by MNF Transform

Calculating Forward MNF Transforms


Use Forward MNF transforms to estimate the noise statistics used in the first
rotation, including estimating the noise from the input data, using noise statistics that
were calculated previously, or calculating the noise statistics from a dark image
associated with the dataset.

Estimating Noise Statistics from the Data


Use Estimate Noise Statistics From Data to estimate noise when you do not have a
dark current image for your data, which is usually the case. ENVI assumes that each
pixel contains both signal and noise, and that adjacent pixels contain the same signal
but different noise. A shift difference is performed on the data by differencing
adjacent pixels to the right and above each pixel and averaging the results to obtain
the “noise” value to assign to the pixel being processed. The best noise estimate is

Minimum Noise Fraction Transform ENVI User’s Guide


Chapter 5: Transform Tools 519

gathered using the shift-difference statistics from a homogeneous area rather than
from the whole image. ENVI allows you to select the subset for statistics extraction.
1. From the ENVI main menu bar, select either:
• Transform → MNF Rotation → Forward MNF → Estimate Noise
Statistics From Data
• Spectral → MNF Rotation → Forward MNF → Estimate Noise
Statistics From Data
The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The Forward MNF Transform
Parameters dialog appears.
3. Click Shift Diff Subset to select a spatial subset or an area under an
ROI/EVF/and so forth on which to calculate the statistics. You can then apply
the calculated results to the entire file (or to the file subset if you selected one
when you selected the input file). For instructions, see “Statistics Subsetting”
on page 223.
When estimating noise from image data using the shift differencing approach,
you should strongly consider choosing a spatial subset that is spectrally
uniform. However, if any band in your dataset has zero variance, you may
encounter a “singularity” problem where the covariance matrix cannot be
inverted, and you may receive a “Too May Iterations in TQLI” error message.
For example, if you use a deep, placid lake for your noise subset, most bands
will have very little variation in the subset, which is what you want. However,
if one band has the same pixel value throughout the entire subset, the band has
zero variance and will cause a singularity in the covariance matrix.
You can find bands that contain zero variance, large outliers, or statistics that
are identical to adjacent bands, by generating and reviewing a statistics report
on the same shift-difference subset of your input image that you plan to choose
for an MNF transform (see “Computing Statistics” on page 274). If you
determine that any band has zero variance, you should choose a slightly
different or larger subset for your noise estimate. The shift-difference spatial
subset must contain more pixels than you have bands in the image you are
transforming. Then, add the bad band(s) to the Bad Bands List in the ENVI
header as described in “Selecting Bad Bands” on page 198. ENVI excludes the
bad bands from numerical processing.
4. In the Enter Output Noise Stats Filename [.sta] field, enter a filename for the
noise statistics.

ENVI User’s Guide Minimum Noise Fraction Transform


520 Chapter 5: Transform Tools

To select a homogeneous area for calculating the noise statistics, click Spatial
Subset to either manually enter a subset or to graphically indicate the area for
statistics extraction (see “Spatial Subsetting” on page 215).
5. In the Output MNF Stats Filename [.sta] field, enter an output file for the
MNF statistics. Be sure that the MNF and noise statistics files have different
names. See “Statistics Files” on page 517 for more information on these two
output files.
6. Select output to File or Memory.
7. Select the number of output MNF bands by using one of the following options:
• To select the number of output bands without examining the eigenvalues,
select No from the Select Subset from Eigenvalues toggle button, then set
the Number of Output MNF Bands.
• To select the number of output MNF bands by examining the eigenvalues,
use the following steps:
A. Select Yes from the Select Subset from Eigenvalues toggle button.
B. Click OK. ENVI calculates the statistics and the Select Output MNF
Bands dialog appears, with each band listed with its corresponding
eigenvalue. Also listed is the cumulative percentage of data variance
contained in each MNF band for all bands.
C. Set the Number of Output MNF Bands. For the best results, and to save
disk space, output only those bands with high eigenvalues. Images with
eigenvalues close to 1 are mostly noise.
8. Click OK. When ENVI finishes processing, the MNF Eigenvalues plot
window appears and the MNF bands are added to the Available Bands List.
See “Interpreting the MNF Eigenvalues Plot” on page 520. For information on
editing and other options in the plot window, see “Using Interactive Plot
Functions” on page 106.
Interpreting the MNF Eigenvalues Plot
When ENVI finishes processing, it adds the MNF bands to the Available Bands List
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 only 50 bands for output, your output only contains the first 50
calculated MNF bands from you input file.
Bands with large eigenvalues (greater than 1) contain data, and bands with
eigenvalues near 1 contain noise. Display the MNF bands from the Available Bands
List and compare with the MNF Eigenvalue plot to determine which bands contain

Minimum Noise Fraction Transform ENVI User’s Guide


Chapter 5: Transform Tools 521

data and which bands contain predominantly noise. In subsequent processing of this
data, spectrally subset the MNF bands to only include those bands where the images
appear spatially coherent and the eigenvalues are above the break in slope of the
MNF Eigenvalue plot. In the example shown in the following figure, you should only
include the first ten to twelve MNF bands.

Figure 5-3: MNF Eigenvalues Plot Window

Estimating from Previous Noise Statistics


Use Previous Noise Statistics to use noise statistics calculated during a previous
MNF transformation. This allows you to use noise statistics from one image with a
second image.
1. From the ENVI main menu bar, select either:
• Transform → MNF Rotation → Forward MNF → Previous Noise
Statistics
• Spectral → MNF Rotation → Forward MNF → Previous Noise
Statistics.
The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Masking,
then click OK. The Enter Noise Statistics Filename dialog appears with all of

ENVI User’s Guide Minimum Noise Fraction Transform


522 Chapter 5: Transform Tools

the existing statistics files in the current input data directory listed. The
statistics files appear with the default file extension .sta.
3. Select a noise statistics file from a previous MNF transform processing session
and click Open. The Forward MNF Transform Parameters dialog appears.
4. In the Enter Output MNF Stats Filename [.sta] field, enter an output
filename for the MNF statistics. See “Statistics Files” on page 517 for more
information on this file.
5. Select output to File or Memory.
6. Select the number of output MNF bands by using one of the following options:
• To select the number of output bands without examining the eigenvalues,
select No from the Select Subset from Eigenvalues toggle button, then set
the Number of Output MNF Bands.
• To select the number of output MNF bands by examining the eigenvalues,
use the following steps:
A. Select Yes from the Select Subset from Eigenvalues toggle button.
B. Click OK. ENVI calculates the noise statistics and the first rotation. The
Select Output MNF Bands dialog appears, with each band listed with its
corresponding eigenvalue. Also listed is the cumulative percentage of data
variance contained in each MNF band for all bands.
C. Set the Number of Output MNF Bands. For the best results, and to save
disk space, output only those bands with high eigenvalues. Images with
eigenvalues close to 1 are mostly noise.
7. Click OK. When ENVI finishes processing, the MNF Eigenvalues plot
window appears and the MNF bands are added to the Available Bands List.
See “Interpreting the MNF Eigenvalues Plot” on page 520. For information on
editing and other options in the plot window, see “Using Interactive Plot
Functions” on page 106.

Minimum Noise Fraction Transform ENVI User’s Guide


Chapter 5: Transform Tools 523

Estimating Noise Statistics from Dark Images


Use Noise Statistics from Dark Image to estimate noise statistics from a dark
image. Some instruments collect a dark image as part of data calibration or
collection. The dark image is the equivalent of a photograph with the lens cap on. In
electronic instruments, there is still a signal that is actually the noise of the
instrument. You can use the dark image to characterize the instrument noise.
1. Select one of the following from the ENVI main menu bar:
• Transform → MNF Rotation → Forward MNF → Noise Statistics
from Dark Image
• Spectral → MNF Rotation → Forward MNF → Noise Statistics from
Dark Image
The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The Input File dialog appears.
3. Select the dark current file and perform spatial subsetting as required, then
click OK. ENVI calculates the noise statistics using the dark current input file.
The Forward MNF Transform Parameters dialog appears.
4. In the Enter Output Noise Stats Filename [.sta] field, enter an output file for
the noise statistics.
5. In the Enter Output MNF Stats Filename [.sta] field, enter an output file for
the MNF statistics. Be sure that the MNF and noise statistics files have
different names. See “Statistics Files” on page 517 for more information on
these two output files.
6. Select output to File or Memory.
7. Select the number of output MNF bands by using one of the following options:
• To select the number of output bands without examining the eigenvalues,
select No from the Select Subset from Eigenvalues toggle button, then set
the Number of Output MNF Bands.
• To select the number of output MNF bands by examining the eigenvalues,
use the following steps:
A. Select Yes from the Select Subset from Eigenvalues toggle button.
B. Click OK. ENVI calculates the noise statistics and the first rotation. The
Select Output MNF Bands dialog appears, with each band listed with its

ENVI User’s Guide Minimum Noise Fraction Transform


524 Chapter 5: Transform Tools

corresponding eigenvalue. Also listed is the cumulative percentage of data


variance contained in each MNF band for all bands.
C. Set the Number of Output MNF Bands. For the best results, and to save
disk space, output only those bands with high eigenvalues. Images with
eigenvalues close to 1 are mostly noise.
8. Click OK. When ENVI finishes processing, the MNF Eigenvalues plot
window appears and the MNF bands are added to the Available Bands List.
See “Interpreting the MNF Eigenvalues Plot” on page 520. For information on
editing and other options in the plot window, see “Using Interactive Plot
Functions” on page 106.

Inversing MNF Transforms


Use Inverse MNF Transform to transform the MNF bands back to their original
data space.
Tip
Smooth noise-dominated images (higher band numbers) before performing the
inverse transform or eliminate the noisy bands during the inverse transform using
spectral subsetting. Smoothing or eliminating noisy bands reduces the noise in the
original data space.

1. From the ENVI main menu bar, select either:


• Transform → MNF Rotation → Inverse MNF Transform
• Spectral → MNF Rotation → Inverse MNF Transform
The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Enter Forward MNF Stats Filename dialog
appears.
3. Enter the name of the forward MNF statistics file.
4. Click OK. The Inverse MNF Transform Parameters dialog appears.
5. Select output to File or Memory.
6. From the Output Data Type drop-down list, select the data type (byte, integer,
unsigned integer, long integer, unsigned long integer, floating-point, double
precision).
7. Click OK. ENVI adds the resulting output to the Available Bands List.

Minimum Noise Fraction Transform ENVI User’s Guide


Chapter 5: Transform Tools 525

Applying Forward MNFs to Spectra


Use Apply Forward MNF to Spectra to transform endmember spectra into MNF
space for use in mixture tuned matched filtering (see “Using Mixture Tuned Matched
Filtering” on page 778). Use the MNF statistics from the mixture tuned matched
filtering input data file for the transform. You can collect the spectra to transform
from plot windows, spectral libraries, ASCII files, ROIs, and statistics files using a
dialog similar to the endmember collection dialog.
1. From the ENVI main menu bar, select Transform → MNF Rotation →
Apply Forward MNF to Spectra. The Forward MNF Statistics Filename
dialog appears.
2. Select the MNF statistics filename that was calculated for the mixture tuned
matched filtering input data file, then click Open. The Forward MNF Convert
Spectra dialog appears.
3. Import spectra into the dialog by selecting Import → file_type from the
Forward MNF Convert Spectra dialog menu bar, or by dragging and dropping
the spectra from the Spectral Library Plots window to the Forward MNF
Convert Spectra dialog (for details, see “Dragging-and-Dropping Spectra” on
page 443, “Importing Spectra” on page 442, and “Endmember Options” on
page 450).
If you are transforming library spectra into forward MNF space to use as
endmembers in mixture tuned matched filtering, the input library spectra must
be scaled identically to the image associated with the MNF statistics being
used to do the forward transformation.
4. To delete a spectrum from the dialog, select the spectrum and click Delete
Spectrum.
5. Click Apply. The transformed spectra appear in the Forward MNF Spectra plot
window and you can input the spectra into the Mixture Tuned Matched
Filtering Endmember Collection dialog.

Creating Transformed Spectra Output


You can print transformed spectral plots or save them as ASCII files, spectral
libraries, IDL variables, PostScript files, or image files. See “Saving Plot Data” on
page 116 for details.

ENVI User’s Guide Minimum Noise Fraction Transform


526 Chapter 5: Transform Tools

Applying Inverse MNFs to Spectra


Use the Apply Inverse MNF to Spectra to transform MNF spectra back to the
original data space. ENVI uses forward MNF statistics from a data file for the
transform. You can collect the spectra to transform from plot windows, spectral
libraries, ASCII files, ROIs, and statistics files using a dialog similar to the
endmember collection dialog.
1. From the ENVI main menu bar, select Transform → MNF Rotation →
Apply Inverse MNF to Spectra. The Forward MNF Statistics Filename
dialog appears.
2. Select the forward MNF statistics filename, then click Open. The Inverse
MNF Convert Spectra dialog appears.
3. Import spectra into the dialog by selecting Import → file_type from the
Forward MNF Convert Spectra dialog menu bar, or by dragging and dropping
the spectra from the Spectral Library Plots window to the Forward MNF
Convert Spectra dialog (for details, see “Dragging-and-Dropping Spectra” on
page 443, “Importing Spectra” on page 442, and “Endmember Options” on
page 450).
4. Click Apply. The transformed spectra appear in the Inverse MNF Spectra plot
window.

Creating Transformed Spectra Output


You can print transformed spectral plots or save them as ASCII files, spectral
libraries, IDL variables, PostScript files, or image files. See “Saving Plot Data” on
page 116 for details.

Minimum Noise Fraction Transform ENVI User’s Guide


Chapter 5: Transform Tools 527

Color Transforms
Use Color Transforms to convert three-band red, green, blue (RGB) images to one
of several specific color spaces and from the selected color space back to RGB.
Adjusting the contrast stretch between the two transforms, you can produce a color-
enhanced color composite image.
Additionally, you can replace the value or lightness band with another band (usually
of higher spatial resolution) to produce an image that merges the color characteristics
of one image with the spatial characteristics of another image. ENVI does this
automatically in HSV Sharpening (see “Image Sharpening” on page 493).
The color spaces supported by ENVI include the hue, saturation, value (HSV), the
hue, lightness, saturation (HLS) and the USGS Munsell.
The Munsell color system is used by soil scientists and geologists to characterize the
color of soils and rocks. This color system has been modified by the U. S. Geological
Survey to describe color in digital images. The transform converts RGB coordinates
into the color coordinates Hue, Saturation, and Value (HSV). Hue ranges from 0-360,
where 0 and 360 = blue, 120 = green, and 240 = red. Saturation ranges from 0 to 208
with higher numbers representing more pure colors. Value ranges from
approximately 0 to 512 with higher numbers representing brighter colors.
Color transforms require three bands for input. These bands should be stretched byte
data or selected from an open color display.
Reference:
Kruse and Raines, A technique for enhancing digital color images by contrast
stretching in Munsell color space, in Proceedings of the ERIM Third Thematic
Conference, Environmental Research Institute of Michigan, Ann Arbor, MI, 1994:
pp. 755-760.

Transforming RGB to HSV, HLS, or USGS Munsell HSV


The following color transform options are available in ENVI to transform an RGB
image into another color space:
• RGB to HSV: Transforms an RGB image into the HSV color space. The input
RGB values must be byte data in the range 0 to 255. You must have either an
input file with at least three bands or a color display open to use this function.
The stretch that is applied in the color display is applied to the input data. The
hues produced are in the range of 0 to 360 degrees (where red is 0 degrees,
green is 120 degrees, and blue is 240 degrees) and saturation and value in the
range 0 to 1 (floating-point).

ENVI User’s Guide Color Transforms


528 Chapter 5: Transform Tools

• RGB to HLS: Transforms an RGB image into the HLS color space. The Hues
produced are in the range of 0 to 360, where 0 = red, 120 = green, and 240 =
blue; and lightness and saturation are in the range 0 to 1 (floating-point). You
must have either an input file with at least three bands or a color display open
to use this function. The input RGB values must be byte data in the range 0 to
255.
• USGS Munsell RGB to HSV: Transforms an RGB image into the USGS
Munsell HSV color space. The input RGB values must be byte data in the
range 0 to 255. You must have either an input file with at least three bands or a
color display open to use this function.
From the ENVI main menu bar, select one of the following:
• Transform → Color Transforms → RGB to HSV
If you do not have a display open, the RGB to HSV Input Bands dialog
appears. See “Selecting Bands from the Input Bands Dialog” on page 528 for
further steps.
If you do have a display open, the RGB to HSV Input dialog appears. See
“Selecting Bands from an Open Display Group” on page 529 for further steps.
• Transform → Color Transforms → RGB to HLS
If you do not have a display open, the RGB to HLS Input Bands dialog
appears. See “Selecting Bands from the Input Bands Dialog” on page 528 for
further steps.
If you do have a display open, the RGB to HLS Input dialog appears. See
“Selecting Bands from an Open Display Group” on page 529 for further steps.
• Transform → Color Transforms → RGB to HSV (USGS Munsell)
If you do not have a display open, the RGB to USGS Munsell HSV Input
Bands dialog appears. See “Selecting Bands from the Input Bands Dialog” on
page 528 for further steps.
If you do have a display open, the USGS Munsell HSV Input dialog appears.
See “Selecting Bands from an Open Display Group” on page 529 for further
steps.
Selecting Bands from the Input Bands Dialog
If you select bands from the Available Bands List in one of the Input Bands dialogs,
ENVI does not apply stretching, and all data is clipped to byte type.

Color Transforms ENVI User’s Guide


Chapter 5: Transform Tools 529

1. In the Input Bands dialog, select the bands to transform from the Available
Bands List. The names of the bands appear in the H, S, and V, (or H, L, and S)
fields.
2. To spatially subset your data, click Spatial Subset. For spatial subsetting
details, see “Spatial Subsetting” on page 215.
3. Click OK. The Parameters dialog appears.
4. Select output to File or Memory.
5. Click OK. ENVI adds the resulting output to the Available Bands List.
Selecting Bands from an Open Display Group
1. In the Input dialog, select one of the following:
• Available Bands List: When you select this option and click OK, the
Input Bands dialog appears. Use the steps in “Selecting Bands from the
Input Bands Dialog” above to select the bands to transform.
• Display #n: This method selects your bands from a color display and uses
the displayed stretch number. When you select this option and click OK,
the Parameters dialog appears.
2. To spatially subset your data, click Spatial Subset. For spatial subsetting
details, see “Spatial Subsetting” on page 215.
3. Select output to File or Memory.
4. Click OK. ENVI adds the resulting output to the Available Bands List.

Transforming HSV, HLS, or USGS Munsell HSV to RGB


The following color transform options are available in ENVI to transform an image
type back to the RGB color space:
• HSV to RGB: Transforms an HSV image back to the RGB color space. The
input H, S, and V bands must have the following data ranges: Hue = 0 to 360,
where 0 and 360 = blue, 120 = green, and 240 = red; Saturation ranges from 0
to 1.0 with higher numbers representing more pure colors; Value ranges from
approximately 0 to 1.0 with higher numbers representing brighter colors. The
RGB values produced are byte data in the range 0 to 255.
• HLS to RGB: Transforms an HLS image back to the RGB color space. The
input H, S, and L bands must have the following data ranges: Hue = 0 to 360,
where 0 = red, 120 = green, and 240 = blue is 240, and Lightness and
Saturation in the range 0 to 1.0 (floating-point). The RGB values produced are
byte data in the range 0 to 255.

ENVI User’s Guide Color Transforms


530 Chapter 5: Transform Tools

• Use USGS Munsell HSV to RGB: Transforms a USGS Munsell HSV image
into the RGB color space. The input H, S, and V bands must have the
following data ranges: Hue = 0 to 360, where 0 and 360 = blue, 120 = green,
and 240 = red; Saturation ranges from 0 to 208 with higher numbers
representing more pure colors; Value ranges from approximately 0 to 512 with
higher numbers representing brighter colors. The RGB values produced are
byte data in the range 0 to 255.
1. From the ENVI main menu bar, select one of the following:
• Transform → Color Transforms → HSV to RGB. The HSV to RGB
Input Bands dialog appears.
• Transform → Color Transforms → HLS to RGB. The HLS to RGB
Input Bands dialog appears.
• Transform → Color Transforms → HSV to RGB (USGS Munsell).
The USGS Munsell HSV to RGB Input Bands dialog appears.
2. Select bands to transform from the Available Bands List. The names of the
bands appear in the H, S, and V, (or H, L, and S) fields.
3. To spatially subset your data, click Spatial Subset. For spatial subsetting
details, see “Spatial Subsetting” on page 215.
4. Click OK. Depending on the transform you are performing, the HSV to RGB
Parameters dialog, the HLS to RGB Parameters dialog, or the USGS Munsell
HSV to RGB Parameters dialog appears.
5. Select output to File or Memory.
6. Click OK. ENVI adds the resulting output to the Available Bands List.

Color Transforms ENVI User’s Guide


Chapter 5: Transform Tools 531

Applying Decorrelation Stretch


Use Decorrelation Stretch to remove the high correlation commonly found in
multispectral data sets and to produce a more colorful color composite image. The
highly correlated data sets often produce quite bland color images. Decorrelation
stretching requires three bands for input. These bands should be stretched byte data or
may be selected from an open color display.
Tip
You can obtain similar results to decorrelation by using a sequence of forward
principal components (PC), contrast stretching, and inverse PC transforms.

From the ENVI main menu bar, select Transform → Decorrelation Stretch.
If you do not have a display open, the Decorrelation Stretch Input dialog appears. See
“Selecting Bands from the Input Bands Dialog” on page 528 for further steps.
If you do have a display open, the Decorrelation Stretch Input dialog appears. See
“Selecting Bands from an Open Display Group” on page 529 for further steps.

ENVI User’s Guide Applying Decorrelation Stretch


532 Chapter 5: Transform Tools

Applying Photographic Stretch


Use Photographic Stretch to enhance the color of a true-color input image to
produce an RGB image that correspond well to the response of the human eye. These
results look more like realistic color photos. The bands of the true-color input image
are nonlinearly scaled then co-added to produce this stretch.
From the ENVI main menu bar, select Transform → Photographic Stretch.
If you do not have a display open, the RGB Photographic Stretch Input Bands dialog
appears. See “Selecting Bands from the Input Bands Dialog” on page 528 for further
steps.
If you do have a display open, the RGB Photographic Stretch Input dialog appears.
See “Selecting Bands from an Open Display Group” on page 529 for further steps.

Applying Photographic Stretch ENVI User’s Guide


Chapter 5: Transform Tools 533

Applying Saturation Stretch


Use Saturation Stretch to enhance the color of a 3-band input image by producing
output bands that have more saturated colors. The input data are transformed from
red, green, and blue (RGB) space to hue, saturation, and value (HSV) space. A
gaussian stretch is performed on the saturation band so the data fills the entire
saturation range. The HSV data are then automatically transformed back to RGB
space.
Saturation stretching requires 3 bands for input. These bands should be stretched byte
data or selected from an open color display.
1. From the ENVI main menu bar, select Transform → Saturation Stretch. The
Saturation Stretch Input dialog appears.
2. Select three bands for input from an open color image display or from the
Available Bands List (for details, see “Selecting Bands from an Open Display
Group” on page 529).
3. Select output to File or Memory.
4. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Applying Saturation Stretch


534 Chapter 5: Transform Tools

Creating Synthetic Color Images


Use the Synthetic Color Image transform to transform a gray scale image into a
synthetic color image. ENVI changes the gray scale image into a color image by
applying high pass and low pass filters to the image to separate high and low
frequency information. Low frequency information is assigned to the hue, and high
frequency information is assigned to the value, and a fixed saturation level is used.
These hue, saturation, and value (HSV) data are transformed into red, green, and blue
(RGB) space, producing a color image.
This transform is often used with radar data to improve the display of subtle large-
scale features while retaining fine detail. It works best for areas with low to moderate
topographical relief. In radar images, it is often difficult to see low frequency
variations because of high frequency features from small scale topography. Low
frequency information is usually due to surface scattering variations from lithology or
vegetation.
Reference:
Daily, M., 1983, Hue-saturation-intensity split-spectrum processing of Seasat radar
imagery, Photogrammetric Engineering and Remote Sensing, Vol. 49, No. 3, pp. 349-
355.
1. Select one of the following options from the ENVI main menu bar:
• Transform → Synthetic Color Image
• Radar → Synthetic Color Image
The Input File dialog appears.
2. Select an input band and perform optional Spatial Subsetting, then click OK.
The Synthetic Color Parameters dialog appears.
3. Set the High Pass Kernel Size and Low Pass Kernel Size for the filters. The
high pass kernel size should be the number of pixels corresponding to the size
of the high frequency slope-dominated scattering. The low pass kernel size
should be the number of pixels corresponding to the size of the low frequency
diffuse scattering.
4. Enter a saturation value from 0 to 1. Higher saturation values produce more
saturated or pure colors.
5. Select output to File or Memory.
6. Click OK. ENVI adds the resulting output to the Available Bands List.

Creating Synthetic Color Images ENVI User’s Guide


Chapter 5: Transform Tools 535

Calculating Vegetation Indices


Use the NDVI and Tassled Cap transforms to calculate vegetation indices from data.

Using NDVI
Use the NDVI to transform multispectral data into a single image band representing
vegetation distribution. The NDVI (Normalized Difference Vegetation Index) values
indicate the amount of green vegetation present in the pixel. Higher NDVI values
indicate more green vegetation. ENVI’s NDVI uses the standard algorithm:
NIR – Red
NDVI = ⎛⎝ ---------------------------⎞⎠
NIR + Red

Valid results fall between -1 and +1. ENVI has pre-set bands for AVHRR, Landsat
MSS, Landsat TM, SPOT, or AVIRIS data or you can enter the bands to use for other
data types.
Reference:
Jensen, J. R., 1986. Introductory Digital Image Processing, Prentice-Hall, New
Jersey, p. 379.
1. From the ENVI main menu bar, select Transform → NDVI. The Input File
dialog appears.
2. Select an input file and perform optional Spatial Subsetting, then click OK.
The NDVI Calculation Parameters dialog appears.

ENVI User’s Guide Calculating Vegetation Indices


536 Chapter 5: Transform Tools

Figure 5-4: NDVI Calculation Parameters Dialog

3. Specify the Input File Type (TM, MSS, AVHRR, and so on) from the drop-
down list. ENVI automatically enters the bands it uses to calculate the NDVI in
the Red and Near IR fields.
To calculate the NDVI for a sensor type not listed in the drop-down list, enter
the band numbers in the Red and Near IR fields.
4. Select output to File or Memory.
5. Select one of the following output types from the Output Data Type drop-
down list.
• Byte: Enter the Min and Max NDVI value in the fields supplied.
• Floating Point
6. Click OK. ENVI adds the resulting output to the Available Bands List.

Calculating Vegetation Indices ENVI User’s Guide


Chapter 5: Transform Tools 537

Using Tasseled Cap


Use Tassled Cap to transform Landsat MSS data, Landsat TM data, or Landsat 7
ETM data. For Landsat MSS data, the tassled cap transform performs an orthogonal
transformation of the original data into a new four-dimensional space consisting of
the soil brightness index (SBI), the green vegetation index (GVI), the yellow stuff
index (YVI), and a non-such index (NSI) associated with atmospheric effects. For
Landsat TM data, the tasseled cap vegetation index consists of three factors:
Brightness, Greenness, and Third. The Brightness and Greenness are equivalent to
the MSS tasseled cap SBI and GVI indices and the third component is related to soil
features, including moisture status. For Landsat 7 ETM data, the tasseled cap
transformation produces 6 output bands: Brightness, Greenness, Wetness, Fourth
(Haze), Fifth, Sixth. This type of transformation should be applied to calibrated
reflectance data rather than applying to raw digital number imagery.
Reference:
Jensen, J. R., 1986. Introductory Digital Image Processing, Prentice-Hall, New
Jersey, p. 379.
Crist, E.P. and R.C. Cicone, 1984 “Application of the Tasseled Cap Concept to
Simulated Thematic Mapper Data,” Photogrammetric Engineering and Remote
Sensing, Vol. 50, pp. 343-352.
Kauth, R.J., P.F. Lambeck, W. Richardson, G.S. Thomas, and A.P. Pentland, 1979.
“Feature Extraction Applied to Agricultural Crops as Seen by Landsat,” Proceedings,
LACIE Symposium, Houston TX, NASA, pp. 705-721.
Huang, C., B. Wylie, L. Yang, C. Homer, and G. Zylstra. “Derivation of a Tasseled
Cap Transformation Based on Landsat 7 At-Satellite Reflectance”. USGS EROS
Data Center White Paper (http://landcover.usgs.gov/pdf/tasseled.pdf).
1. From the ENVI main menu bar, select Transform → Tassled Cap. The Input
File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, then click OK.
The Tasseled Cap Transform Parameters dialog appears.
3. Specify the Input File Type (Landsat TM, Landsat MSS, or Landsat 7
ETM) from the drop-down list.
4. Select output to File or Memory.
5. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Calculating Vegetation Indices


538 Chapter 5: Transform Tools

Calculating Vegetation Indices ENVI User’s Guide


Chapter 6
Filter Tools

This chapter covers the following topics:

The Filter Menu . . . . . . . . . . . . . . . . . . . . . 540 Using Texture Filters . . . . . . . . . . . . . . . . 548


Using Convolution and Morphology Filters . . Using Adaptive Filters . . . . . . . . . . . . . . . 553
541 Using Frequency Filters (FFTs) . . . . . . . . 561

ENVI User’s Guide 539


540 Chapter 6: Filter Tools

The Filter Menu


Use the Filter menu to perform Convolution, Morphological, Texture, Adaptive, and
FFT filtering. Filtering is typically used to enhance images by removing certain
spatial frequencies. Spatial frequency describes the variation of brightness, or DN,
with distance, and images contain many different spatial frequencies. For example,
removing the high frequency variation in an image produces a smoother output
image.
Use Convolution filtering to filter your image in the spatial domain. Use
Morphological filters to process your image on the basis of shape. Use texture filters
to extract information about the textures in your image. Use Adaptive filters to reduce
noise by smoothing while preserving sharp edges. Use Fourier Filtering to filter your
data in the frequency domain.

The Filter Menu ENVI User’s Guide


Chapter 6: Filter Tools 541

Using Convolution and Morphology Filters


Use Convolutions and Morphology to apply convolution filters or morphological
filters to image data.
Convolution filters produce output images in which the brightness value at a given
pixel is a function of some weighted average of the brightness of the surrounding
pixels. Convolution of a user-selected kernel with the image array returns a new,
spatially filtered image. You can select the kernel size and values, producing different
types of filters. Standard convolution filters include:
• High Pass: Removes the low frequency components of an image while
retaining the high frequency (local variations). It can enhance edges between
different regions as well as to sharpen an image. This is accomplished using a
kernel with a high central value, typically surrounded by negative weights.
ENVI’s default high pass filter uses a 3x3 kernel with a value of 8 for the
center pixel and values of -1 for the exterior pixels. High pass filters can only
have odd kernel dimensions.
• Low Pass: Preserves the low frequency components of an image, which
smooths it. ENVI’s low pass filter contains the same weights in each kernel
element, replacing the center pixel value with an average of the surrounding
values. The default kernel size is 3x3.
• Laplacian: A second derivative edge enhancement filter that operates without
regard to edge direction. Laplacian filtering emphasizes maximum values
within the image by using a kernel with a high central value typically
surrounded by negative weights in the north-south and east-west directions and
zero values at the kernel corners. ENVI’s default Laplacian filter uses a 3x3
kernel with a value of 4 for the center pixel and values of -1 for the north-south
and east-west pixels. All Laplacian filters must have odd kernel sizes.
• Directional: A first derivative edge enhancement filter that selectively
enhances image features having specific direction components (gradients). The
sum of the directional filter kernel elements is zero. The result is that areas
with uniform pixel values are zeroed in the output image, while those that are
variable are presented as bright edges.
• Gaussian: Passes a Gaussian convolution function of specified size over the
image. The default is a 3x3 kernel and kernel dimensions must be odd.

ENVI User’s Guide Using Convolution and Morphology Filters


542 Chapter 6: Filter Tools

• Median: Smooths an image, while preserving edges larger than the kernel
dimensions (good for removing salt and pepper noise or speckle). ENVI’s
Median filter replaces each center pixel with the median value (not to be
confused with the average) within the neighborhood specified by the filter size.
The default is a 3x3 kernel.
• Sobel: A non-linear edge enhancement, special case filter that uses an
approximation of the true Sobel function, and is a preset 3x3, non-linear edge
enhancement operator. The size of the filter cannot be changed and no kernel
editing is possible.
• Roberts: A non-linear edge detector filter similar to the Sobel. It is a special
case filter that uses a preset 2x2 approximation of the true Roberts function, a
simple, 2D differencing method for edge-sharpening and isolation. The size of
the filter cannot be changed and no kernel editing is possible.
• User-Defined Convolution: You can define custom convolution kernels
(including rectangular rather than square filters) by selecting and editing a user
kernel.
Mathematical morphology filtering is a non-linear method of processing digital
images on the basis of shape. Its primary goal is the quantification of geometrical
structures.
Reference:
Haralick, Sternberg, and Zhuang, Image Analysis Using Mathematical Morphology,
IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. PAMI-9, No.
4, July 1987, pp. 532-550.
Morphological kernels used in ENVI are just the structuring element and should not
be confused with convolution kernels. Morphology filter types include the following:
• Dilate: Commonly known as fill, expand, or grow, fills holes smaller than the
structural element (kernel) in a binary or gray scale image. Use only with
unsigned byte, unsigned long-integer, or unsigned integer data.
• Erode: Commonly known as shrink or reduce, removes islands of pixels
smaller than the structural element (kernel) in a binary or gray scale image.
Use only with unsigned byte, unsigned long-integer, or unsigned integer data.
• Opening: Smooth the contours, break narrow isthmuses, and eliminate small
islands and sharp peaks or capes in an image. The opening of an image is
defined as the erosion of the image followed by subsequent dilation using the
same structural element.

Using Convolution and Morphology Filters ENVI User’s Guide


Chapter 6: Filter Tools 543

Tip
Using the Erode filter followed by using the Dilate filter produces the same
result as using an Opening filter.

• Closing: Smooth the contours, fuse narrow breaks and long thin gulfs,
eliminate small holes, and fill gaps in the contours of an image. The closing of
an image is defined as the dilation of the image followed by subsequent
erosion using the same structural element.
Tip
Using the Dilate filter followed by using the Erode filter produces the same
result as using the Closing filter.

Using Convolution Filters


1. From the ENVI main menu bar, select Filter → Convolutions and
Morphology. The Convolutions and Morphology Tool dialog appears (see
Figure 6-1).
2. From the Convolutions and Morphology Tool dialog menu bar, select
Convolutions → filter_type. The dialog parameters that are available vary
with your filter type selection.
If you select Directional, enter the filter angle when the Directional Filter
Angle dialog appears. North (up) is zero degrees and the other angles are
measured in the counterclockwise direction.
3. Specify the Kernel Size. Some specialized filters have default sizes that cannot
be changed, such as Sobel and Roberts.
The kernel sizes are in odd-number increments. Left-click to increase/decrease
the value by 2, middle-click to increase/decrease the value by 10, and right-
click to set the kernel size back to 3x3.
By default, the kernel size is set to a square kernel. To change to a non-square
kernel, deselect Options → Square kernel from the Convolutions and
Morphology Tool dialog menu bar. The Low Pass (average) and Median filters
are always square. To edit individual kernels, see “Editing Kernels” on
page 544.

ENVI User’s Guide Using Convolution and Morphology Filters


544 Chapter 6: Filter Tools

4. Enter an add back value in the Image Add Back (0-100%) field. Adding back
part of the original image to the convolution filter results helps preserve the
spatial context and is typically done to sharpen an image. The Image Add
Back value is the percentage of the original image that is included in the final
output image. For example, if you enter 40%, then 40% of the original image is
added to 60% of the convolution filter image to produce the final result.
5. Select Quick Apply or Apply to File as described in “Applying Filter Results”
on page 545.

Figure 6-1: Convolution and Morphology Tool Dialog

Editing Kernels
1. In the Convolutions and Morphology Tool dialog, double-click within the
Editable Kernel field of the value to edit. The line cursor appears.
2. Highlight the value and enter a new one.
3. Press Enter.

Saving Kernels to Files


1. In the Convolutions and Morphology Tool dialog, select File → Save Kernel.
The Output Kernel to File dialog appears.

Using Convolution and Morphology Filters ENVI User’s Guide


Chapter 6: Filter Tools 545

2. Enter an output filename. Use the extension .ker.


3. Click OK.

Restoring Saved Kernel Files


1. In the Convolutions and Morphology Tool dialog, select File → Restore
Kernel.
2. Select the saved kernel file.

Applying Filter Results


You can apply your filter results to a temporary display or to an existing file. Use the
Quick Apply method to try different filter parameters and to view the filter results
quickly. You can make changes as needed and re-display the image. Use the Apply to
File method to apply the final result to a specific image file and to output the result.

Viewing Filter Results Quickly


1. In the Convolutions and Morphology Tool dialog, click Quick Apply to apply
the selected filter to a single image band. The Convolution Quick-Apply Input
Band dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The resulting file appears in a display group. The
file displayed is a temporary file placed in the default temporary ENVI
directory. The display group and the file are automatically deleted when you
close the Convolutions and Morphology Tool dialog.
If you change any parameters in the Convolutions and Morphology Tool
dialog, click Quick Apply again. The new parameters overwrite the existing
results.
Changing the Quick Apply Input Band
1. From the Convolutions and Morphology Tool dialog menu bar, select
Options → Change Quick-Apply Input Band. The Convolutions Input File
dialog appears.
2. Select an input band and perform optional Spatial Subsetting, then click OK.
3. Click OK.

ENVI User’s Guide Using Convolution and Morphology Filters


546 Chapter 6: Filter Tools

Saving Quick Apply Results


1. From the Convolutions and Morphology Tool dialog menu bar, select File →
Save Quick Result to File. The Output Convolution Filename dialog appears.
2. Enter an output filename.
3. Click OK.

Applying Filters to Files


In the Convolutions and Morphology Tool dialog, use the Apply to File button to
apply the current filter to a file and to output the results.
1. Click Apply to File. The Convolution Input File dialog appears.
2. Select an input band and perform optional Spatial Subsetting, then click OK.
The Convolution Parameters dialog appears.
3. Select output to File or Memory.
4. Click OK. ENVI adds the resulting output to the Available Bands List.

Using Morphology Filters


1. From the ENVI main menu bar, select Filter → Convolutions and
Morphology. The Convolutions and Morphology Tool dialog appears.
2. From the Convolutions and Morphology Tool dialog menu bar, select
Morphology → filter_type.
3. Specify the Kernel Size.
The kernel sizes are in odd-number increments. Left-click to increase/decrease
the value by 2, middle-click to increase/decrease the value by 10, and right-
click to set the kernel size back to 3x3.
By default, the kernel size is set to a square kernel. To change to a non-square
kernel, deselect Options → Square kernel from the Convolutions and
Morphology Tool dialog menu bar. The Low Pass (average) and Median filters
are always square. To edit individual kernels, see “Editing Kernels” on
page 544.
4. Enter the number of iterations of the filter in the Cycles field.

Using Convolution and Morphology Filters ENVI User’s Guide


Chapter 6: Filter Tools 547

5. Select a filter style of Binary, Gray, or Value.


• Binary: Produces output pixels in either black or white.
• Gray: Preserves gradients.
• Value: Allows the kernel value to be either added (dilate) or subtracted
(erode) from the selected pixels.
6. Select Quick Apply or Apply to File as described in “Applying Filter Results”
on page 545.
A status message appears. If no image tiling is required, the status message does not
advance gradually. It goes abruptly from 0 to 100% after a short wait because the
operation is being performed on the entire image array. ENVI adds the resulting
output to the Available Bands List.

ENVI User’s Guide Using Convolution and Morphology Filters


548 Chapter 6: Filter Tools

Using Texture Filters


Use Texture to apply occurrence- or co-occurrence-based texture filters. Many
images contain regions characterized by variation in brightness rather than any
unique value of brightness. Texture refers to the spatial variation of image tone as a
function of scale. To be defined as a distinct textural area, the gray levels within the
area must be more homogeneous as a unit than areas having a different texture. ENVI
supports several textural filters based on either occurrence measures or co-occurrence
measures.

Applying Occurrence-Based Filters


Use Occurrence Measures to apply any of five different texture filters that are based
on occurrence measures. The occurrence filters available are data range, mean,
variance, entropy, and skewness. Occurrence measures use the number of occurrences
of each gray level within the processing window for the texture calculations.
Reference:
Anys, H., A. Bannari, D. C. He, and D. Morin, 1994. “Texture analysis for the
mapping of urban areas using airborne MEIS-II images,” Proceedings of the First
International Airborne Remote Sensing Conference and Exhibition, Strasbourg,
France, Vol. 3, pp. 231-245.
1. From the ENVI main menu bar, select Filter → Texture → Occurrence
Measures. The Texture Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Occurrence Texture Parameters dialog appears.
3. Specify texture images to create by selecting the check boxes next to the
texture type in the Textures to Compute area of the dialog.

Using Texture Filters ENVI User’s Guide


Chapter 6: Filter Tools 549

Figure 6-2: Occurrence Texture Parameters Dialog

4. Enter the size of the processing window in the Rows (Y) and Cols (x) fields to
set the area to consider for the texture evaluation.
5. Select output to File or Memory.
6. Click OK. ENVI adds the resulting output to the Available Bands List.

Applying Co-occurrence-Based Filters


Use Co-Occurrence Measures to apply texture filters that are based on the co-
occurrence matrix. These filters include mean, variance, homogeneity, contrast,
dissimilarity, entropy, second moment, and correlation. A setting for gray scale
quantization levels is also available, to reduce the number of shades of gray required
to represent the image (which also reduces processing time).
Co-occurrence measures use a gray-tone spatial dependence matrix to calculate
texture values. This is a matrix of relative frequencies with which pixel values occur
in two neighboring processing windows separated by a specified distance and
direction. It shows the number of occurrences of the relationship between a pixel and
its specified neighbor. For example, the co-occurrence matrix shown in Figure 6-3
was produced using each pixel and its horizontal neighbor (shift values of x=1, Y=0)

ENVI User’s Guide Using Texture Filters


550 Chapter 6: Filter Tools

for a 3x3 window. The pixels in the 3 x 3 base window and the pixels in a 3x3
window that was shifted by 1 pixel are used to create the co-occurrence matrix.
Reference:
Haralick, R. M., Shanmugan, K., and Dinstein, I., 1973, “Textural Features for Image
Classification,” IEEE Transactions on Systems, Man, and Cybernetics, Vol. 3, No. 6,
pp. 610-621.
Anys, H., A. Bannari, D. C. He, and D. Morin, 1994. “Texture analysis for the
mapping of urban areas using airborne MEIS-II images,” Proceedings of the First
International Airborne Remote Sensing Conference and Exhibition, Strasbourg,
France, Vol. 3, pp. 231-245.

Figure 6-3: Co-occurrence Matrix

Using Texture Filters ENVI User’s Guide


Chapter 6: Filter Tools 551

Figure 6-4: Co-occurrence Texture Parameters Dialog

1. From the ENVI main menu bar, select Filter → Texture → Co-occurrence
Measures. The Texture Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Co-occurrence Texture Parameters dialog
appears.
3. Specify the texture images to create by selecting the check boxes next to the
texture types in the Textures to Compute area of the dialog.
4. Enter the size of the processing window in the Rows (y) and Cols (x) fields.
5. Enter the x and y shift values to use to calculate the co-occurrence matrix (see
Figure 6-3).
6. Select the gray scale quantization levels (up to 64) to use to calculate the co-
occurrence matrix. This setting is useful if the gray values of the image are
spread over a broad range (versus being clustered in a certain range).

ENVI User’s Guide Using Texture Filters


552 Chapter 6: Filter Tools

7. Select output to File or Memory.


8. Click OK. ENVI adds the resulting output to the Available Bands List.

Using Texture Filters ENVI User’s Guide


Chapter 6: Filter Tools 553

Using Adaptive Filters


Use Adaptive filters to apply various adaptive type filters. Adaptive filtering uses the
standard deviation of those pixels within a local box surrounding each pixel to
calculate a new pixel value. Typically, the original pixel value is replaced with a new
value calculated based on the surrounding valid pixels (those that satisfy the standard
deviation criteria). Unlike a typical low-pass smoothing filter, the adaptive filters
preserve image sharpness and detail while suppressing noise.
Note
These filters may be slow to process.

Applying Lee Filters


Use Lee filters to smooth noisy (speckled) data that have an intensity related to the
image scene and that also have an additive and/or multiplicative component. Lee
filtering is a standard deviation based (sigma) filter that filters data based on statistics
calculated within individual filter windows. Unlike a typical low-pass smoothing
filter, the Lee filter and other similar sigma filters preserve image sharpness and detail
while suppressing noise. The pixel being filtered is replaced by a value calculated
using the surrounding pixels.
Reference:
Lee, Jong-Sen, “Digital Image Enhancement and Noise Filtering by Use of Local
Statistics,” IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol
PAMI-2, No.2, March 1980, pp. 165-168.
1. From the ENVI main menu bar, select Filter → Adaptive → Lee. The Input
File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Lee Filter Parameters dialog appears.
3. Enter the Filter Size.
4. Select the Noise model from the drop-down list. The choices are: Additive,
Multiplicative, or Both. Typically, speckle in radar images is multiplicative.
5. To change the Additive Noise Mean and Multiplicative Noise Mean default
values of 0.0 and 1.0, respectively (the typical noise means), enter values in the
appropriate fields. Larger noise mean values will produce less smoothing.

ENVI User’s Guide Using Adaptive Filters


554 Chapter 6: Filter Tools

6. To change the Noise Variance value, enter a new value in the field. The Noise
Variance parameter is set to the additive noise variance when Additive and
Both noise models are chosen. It is set to the multiplicative noise when the
Multiplicative noise model is chosen.
Tip
To estimate the noise variance, calculate the data variance over a flat area,
such as a lake or smooth playa, in the image. For multiplicative noise in radar
data, estimate the noise variance by 1/(number of looks).

7. Select output to File or Memory.


8. Click OK. ENVI adds the resulting output to the Available Bands List.

Applying Enhanced Lee Filters


Use Enhanced Lee filters to reduce speckle in radar imagery while simultaneously
preserving texture information. The Enhanced Lee filter is an adaptation of the Lee
filter and similarly uses local statistics (coefficient of variation) within individual
filter windows. Each pixel is put into one of three classes, which are treated as
follows:
• Homogeneous: The pixel value is replaced by the average of the filter window.
• Heterogeneous: The pixel value is replaced by a weighted average.
• Point target: The pixel value is not changed.
Reference:
Lopes, A., R. Touzi, and E. Nezry, 1990. “Adaptive Speckle Filters and Scene
Heterogeneity,” IEEE Transactions on Geoscience and Remote Sensing, Vol. 28, No.
6, pp. 992-1000.
1. From the ENVI main menu bar, select Filter → Adaptive → Enhanced Lee.
The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Enhanced Lee Filter Parameters dialog
appears.
3. Enter the filter size in the Filter Size field.
4. Enter a Damping Factor that inversely defines the extent of the exponential
damping in the weighted average for the heterogeneous class. A larger
damping factor produces less averaging.

Using Adaptive Filters ENVI User’s Guide


Chapter 6: Filter Tools 555

5. Enter values that define the class cutoffs for the homogeneous (coefficient of
variation ≤ Cu), heterogeneous (Cu < coefficient of variation < C max), and point
target (coefficient of variation ≥ Cmax) classes.
Estimate the cutoff values based on the number of looks (L) of the radar image.

0.523
C u ≅ ------------- and C max ≅ 1 + --2-
L L

6. Select output to File or Memory.


7. Click OK. ENVI adds the resulting output to the Available Bands List.

Figure 6-5: Enhanced Lee Filter Parameters Dialog

Applying Frost Filters


Use Frost filters to reduce speckle while preserving edges in radar images. The Frost
filter is an exponentially damped circularly symmetric filter that uses local statistics.
The pixel being filtered is replaced with a value calculated based on the distance from
the filter center, the damping factor, and the local variance.

ENVI User’s Guide Using Adaptive Filters


556 Chapter 6: Filter Tools

Reference:
Zhenghao Shi and Ko B. Fung, “A Comparison of Digital Speckle Filters,”
Proceedings of IGARSS 94, August 8-12, 1994, pp. 2129-2133.
1. From the ENVI main menu bar, select Filter → Adaptive → Frost.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Frost Filter Parameters dialog appears.
3. Enter the Filter Size.
4. Enter the value in the Damping Factor field. The damping factor determines
the amount of exponential damping and the default value of 1 is sufficient for
most radar images. Larger damping values preserve edges better but smooth
less, and smaller values smooth more. A damping value of 0 results in the same
output as a low pass filter.
5. Select output to File or Memory.
6. Click OK. ENVI adds the resulting output to the Available Bands List.

Applying Enhanced Frost Filters


Use Enhanced Frost filters to reduce speckle in radar imagery while simultaneously
preserving texture information. The Enhanced Frost filter is an adaptation of the Frost
filter and similarly uses local statistics (coefficient of variation) within individual
filter windows. Each pixel is put into one of three classes, which are treated as
follows:
• Homogeneous: The pixel value is replaced by the average of the filter window.
• Heterogeneous: An impulse response is used as a convolution kernel to
determine the pixel value.
• Point target: The pixel value is not changed.
Reference:
Lopes, A., R. Touzi, and E. Nezry, 1990. “Adaptive Speckle Filters and Scene
Heterogeneity,” IEEE Transactions on Geoscience and Remote Sensing, Vol. 28, No.
6, pp. 992-1000.
1. From the ENVI main menu bar, select Filter → Adaptive → Enhanced
Frost.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK.

Using Adaptive Filters ENVI User’s Guide


Chapter 6: Filter Tools 557

3. Enter the filter size in the Filter Size field.


4. Enter a Damping Factor that inversely defines the extent of the exponential
damping in the weighted average for the heterogeneous class. A larger
damping factor produces less averaging.
5. Enter values that define the class cutoffs for the homogeneous (coefficient of
variation ≤ Cu), heterogeneous (Cu < coefficient of variation < C max), and point
target (coefficient of variation ≥ Cmax) classes.
Estimate the cutoff values based on the number of looks (L) of the radar image.
0.523
C u ≅ ------------- and C max ≅ 1 + --2-
L L
6. Click OK. ENVI adds the resulting output to the Available Bands List.

Applying Gamma Filters


Use Gamma filters to reduce speckle while preserving edges in radar images. The
Gamma filter is similar to the Kuan filter but assumes that the data is gamma
distributed (see “Applying Kuan Filters” on page 558). The pixel being filtered is
replaced with a value calculated based on the local statistics.
Reference:
Zhenghao Shi and Ko B. Fung, “A Comparison of Digital Speckle Filters,”
Proceedings of IGRASS 94, August 8-12, 1994, pp. 2129-2133.
1. From the ENVI main menu bar, select Filter → Adaptive → Gamma. The
Input File dialog appears.

ENVI User’s Guide Using Adaptive Filters


558 Chapter 6: Filter Tools

2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Gamma Filter Parameters dialog appears.
3. Enter the Filter Size.
4. Enter the Number of Looks in the field provided. ENVI uses he Number of
Looks parameter to calculate the noise variance by 1/(number of looks).
5. Select output to File or Memory.
6. Click OK. ENVI adds the resulting output to the Available Bands List.

Applying Kuan Filters


Use Kuan filters to reduce speckle while preserving edges in radar images. It
transforms the multiplicative noise model into an additive noise model. This filter is
similar to the Lee filter but uses a different weighting function. The pixel being
filtered is replaced with a value calculated based on the local statistics.
Reference:
Zhenghao Shi and Ko B. Fung, “A Comparison of Digital Speckle Filters,”
Proceedings of IGARSS 94, August 8-12, 1994, pp. 2129-2133.
1. From the ENVI main menu bar, select Filter → Adaptive → Kuan.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Kuan Filter Parameters dialog appears.
3. Enter the Filter Size.
4. Enter the Number of Looks in the appropriate field. The Number of Looks
parameter is used to calculate the noise variance by 1/(number of looks).
5. Select output to File or Memory.
6. Click OK. ENVI adds the resulting output to the Available Bands List.

Using Adaptive Filters ENVI User’s Guide


Chapter 6: Filter Tools 559

Applying Local Sigma Filters


Use Local Sigma filters to preserve fine detail (even in low contrast areas) and to
reduce speckle significantly. The Local Sigma filter uses the local standard deviation
computed for the filter box to determine valid pixels within the filter window. It
replaces the pixel being filtered with the mean calculated using only the valid pixels
within the filter box.
Reference:
Eliason, Eric M. and McEwen, Alfred S., “Adaptive Box Filters for Removal of
Random Noise from Digital Images,” Photogrammetric Engineering & Remote
Sensing, April, 1990, V56 No. 4, p. 453.
1. From the ENVI main menu bar, select Filter → Adaptive → Local Sigma.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Localized Sigma Filter Parameters dialog
appears.
3. Enter the filter size in pixels.
4. Enter the number of standard deviations to consider valid in the Sigma Factor
field. ENVI uses the Sigma Factor to determine which pixels are valid by
calculating a minimum and maximum pixel value based on the number of
standard deviations (sigma) entered and the local statistics.
The pixel being filtered will be replaced by the average of surrounding valid
pixels
5. Select output to File or Memory.
6. Click OK. ENVI adds the resulting output to the Available Bands List.

Applying Bit Error Filters


Use Bit Error filters to remove bit-error noise, which is usually the result of spikes in
the data caused by isolated pixels that have extreme values unrelated to the image
scene. The noise typically gives the image a salt-and-pepper appearance. Bit-error
removal in ENVI uses an adaptive algorithm to replace spike pixels with the average
of neighboring pixels. The local statistics (mean and standard deviation) within the
filter box are used to set a threshold for valid pixels.

ENVI User’s Guide Using Adaptive Filters


560 Chapter 6: Filter Tools

Reference:
Eliason, Eric M. and McEwen, Alfred S., “Adaptive Box Filters for Removal of
Random Noise from Digital Images,” Photogrammetric Engineering & Remote
Sensing, April, 1990, V56 No. 4, p. 453.
1. From the ENVI main menu bar, select Filter → Adaptive → Bit Errors.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Bit Error Removal Parameters dialog appears.
3. Enter the Filter Size in pixels.
4. Enter a Sigma Factor for the number of standard deviations to use for
determining valid pixels.
5. Enter a Tolerance (in data values). Pixels are only considered bad if they have
a value greater than the tolerance. A pixel is classified as a bit error when the
pixel value minus the filter box mean is greater than the Sigma Factor times
the localized standard deviation and greater than the tolerance. The bad pixels
will be replaced by the average of surrounding valid pixels by default.
6. To set bad pixels to zero instead of replacing them with an average, click Yes
for Zero Bit Errors?.
7. Optionally, enter the minimum and maximum values to consider as valid data
for the mean determination in the Valid Data Min and Valid Data Max fields.
8. Select output to File or Memory.
9. Click OK. ENVI adds the resulting output to the Available Bands List.

Using Adaptive Filters ENVI User’s Guide


Chapter 6: Filter Tools 561

Using Frequency Filters (FFTs)


Use FFT Filtering (Fast Fourier Transform filtering) to transform image data into a
complex output image showing its various spatial frequency components,
interactively build a frequency filter, apply the filter to the transformed data, and
inverse FFT transform the filtered data to the original data space. FFT processing
does not use the ENVI tiling procedures, so the size of image that you can process is
limited by the available system memory.
Note
FFT images that have a Complex data type use eight times the memory of a byte
image of similar size.

Applying Forward FFT Filters


Use Forward FFT filters to produce an image that shows both the horizontal and
vertical spatial frequency components. The average brightness value of the image
(zero frequency component) is shown in the center of the transformed image. Pixels
away from the center represent increasing spatial frequency components of the
image. You can design a filter that will remove particular frequency components and
apply the filter to the forward FFT data, then perform an inverse transform back to the
original data space to remove those frequency components from the image (see
“Defining FFT Filters” on page 562).
Note
If your input dataset has an odd number of samples and/or lines, the forward FFT
output will not include the Nyquist frequency, which means it cannot be correctly
inversed. You may see wide, dark/light striping in the resulting inverse FFT image.

1. From the ENVI main menu bar, select Filter → FFT Filtering → Forward
FFT. The Forward FFT Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Forward FFT Parameters dialog appears.
To ensure your input dataset has an even number of samples and lines (see
Note above), you should select an even-dimensioned spatial subset of the
image.
3. Select output to File or Memory. Selecting file output is recommended.

ENVI User’s Guide Using Frequency Filters (FFTs)


562 Chapter 6: Filter Tools

4. Click OK. A status window displays the progress of the operation. ENVI
processes the entire FFT without tiling, so processing is limited by the system
memory or your machine. The status goes quickly from 0 to 100%. ENVI adds
the resulting output to the Available Bands List.
When you display a forward FFT image, ENVI displays is the natural log of the
magnitude of the complex pixel values (see “Using the Complex Lookup Function”
on page 208).

Defining FFT Filters


Use Filter Definition to interactively define FFT filters directly or to draw the filter
on a displayed forward transformed image. Filter types include circular pass and cut,
band pass and cut, and user-drawn pass and cut. Use ENVI’s Annotation function to
define user-drawn filters.
1. From the ENVI main menu bar, select Filter → FFT Filtering → Filter
Definition. The Filter Definition selection dialog appears.
2. Select one of the following options:
• If an FFT image displays, select the display number containing the FFT
image or select No Display to indicate that the filters will not be associated
with a particular display.
• If no image displays, specify the filter size by entering values into the
Samples and Lines fields.
3. From the Filter Definition dialog menu bar, select Filter_Type → filter_type.
4. Select from the following options to set the filter parameters (depending upon
the type of filter selected):
• For Circular Pass or Circular Cut filter types (low pass or high pass
filters, respectively), enter a filter radius, in pixels, in the Radius field.
• For Band Pass or Band Cut filter types, enter values, in pixels, in the
Inner Radius and Outer Radius fields.

Using Frequency Filters (FFTs) ENVI User’s Guide


Chapter 6: Filter Tools 563

• For User Defined Pass and User Defined Cut filters, you can load ENVI
annotation (polygons and shapes only) into the filter (see “Loading
Annotations into User-Defined Filters” on page 565).

Figure 6-6: Filter Definition Dialog

5. Enter the Number of Border Pixels to use to taper the filter (smooth the edges
of the filter). A value of zero indicates no smoothing.

ENVI User’s Guide Using Frequency Filters (FFTs)


564 Chapter 6: Filter Tools

Figure 6-7: From left to right: Circular Pass (low pass), Circular Cut (high pass),
Band Pass, Band Cut, and User Defined Filters

The images above depict, from left to right, Circular Pass (low pass), Circular
Cut (high pass), Band Pass, Band Cut, and User Defined filters. The diagonal
lines in the first four images and the grid lines in the fifth image represent the
area that will be filtered out.
6. Select output to File or Memory.
7. Click Apply. ENVI adds the resulting output to the Available Bands List. The
filter is a single band image of the specified dimensions.
Tip
Because of the limited range of the filter DN values (0 or 1), a contrast stretch
without histogram clipping (for example, a quick linear stretch) must be used to
properly display the filter image.

Using Frequency Filters (FFTs) ENVI User’s Guide


Chapter 6: Filter Tools 565

Loading Annotations into User-Defined Filters


If you select User Defined Cut or User Defined Pass filters in the Filter Definition
Dialog, you can load ENVI annotation into the filter using the following procedure.
The default is set to use the annotation on the current display (typically the FFT
image) to build the filter:
1. Display the forward transformed FFT image.
2. Select Overlay → Annotation from the Display group menu bar (see
“Annotating Images and Plots” on page 31).
3. Draw either polygons or shapes on the FFT image that outline specific noise
occurrences (typically, bright spots, lines, or wedges on the FFT image may
represent noise).
4. To build a proper symmetric FFT filter, select Options → Turn Mirror On
from the Annotation window menu bar. The displayed annotation will be used
as the filter definition.
To restore a filter from a previously saved annotation file, click Ann File and
select an input annotation file.

Applying Inverse FFT Transforms


The ENVI Inverse FFT procedure is actually a two step operation that applies both a
filter in the FFT domain, and inverts the FFT image back to the original data space.
1. From the ENVI main menu bar, select Filter → FFT Filtering → Inverse
FFT. The Inverse FFT Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Inverse FFT Filter File dialog appears.
3. Select the filter image to apply. The filter image must have been generated
previously using the filter definition procedures described in “Defining FFT
Filters” on page 562.
4. Click OK. The Inverse FFT Parameters dialog appears.
5. Select output to File or Memory.
6. Select the Output Data Type (byte, integer, floating-point, and so forth) from
the drop-down list.
7. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Using Frequency Filters (FFTs)


566 Chapter 6: Filter Tools

Using Frequency Filters (FFTs) ENVI User’s Guide


Chapter 7
Spectral Tools

This chapter covers the following topics:

The Spectral Menu . . . . . . . . . . . . . . . . . . 569 Vegetation Suppression . . . . . . . . . . . . . . 812


SPEAR Tools . . . . . . . . . . . . . . . . . . . . . . . 570 Finding Targets with BandMax . . . . . . . . 814
THOR Workflows . . . . . . . . . . . . . . . . . . . 653 RX Anomaly Detection . . . . . . . . . . . . . . 827
Target Detection Wizard . . . . . . . . . . . . . . 723 Spectral Hourglass Wizard . . . . . . . . . . . . 829
Spectral Libraries . . . . . . . . . . . . . . . . . . . . 739 Spectral Analyst . . . . . . . . . . . . . . . . . . . . 845
Spectral Slices . . . . . . . . . . . . . . . . . . . . . . 746 Multi Range SFF . . . . . . . . . . . . . . . . . . . 851
MNF Rotation . . . . . . . . . . . . . . . . . . . . . . 748 Extracting Endmembers with SMACC . . 853
Pixel Purity Index . . . . . . . . . . . . . . . . . . . 749 Spectral Math . . . . . . . . . . . . . . . . . . . . . . 857
The n-D Visualizer . . . . . . . . . . . . . . . . . . 754 Gram-Schmidt Spectral Sharpening . . . . . 864
Mapping Methods . . . . . . . . . . . . . . . . . . . 771 PC Spectral Sharpening . . . . . . . . . . . . . . 865
Spectral Tools References . . . . . . . . . . . . . 794 CN Spectral Sharpening . . . . . . . . . . . . . . 866
Vegetation Analysis . . . . . . . . . . . . . . . . . . 799 EFFORT Polishing . . . . . . . . . . . . . . . . . . 867

ENVI User’s Guide 567


568 Chapter 7: Spectral Tools

Generating Image Cubes . . . . . . . . . . . . . 872


Preprocessing Utilities . . . . . . . . . . . . . . . 874

ENVI User’s Guide


Chapter 7: Spectral Tools 569

The Spectral Menu


Use the Spectral menu to access specialized tools for analyzing multispectral and
hyperspectral images and other spectral data types. The tools include building,
resampling, and viewing spectral libraries; extracting spectral slices; performing
spectral math; determining spectral endmembers; visualizing spectral data in n-
dimensions; spectral classification; Linear Spectral Unmixing; Matched Filtering;
Continuum Removal; and Spectral Feature Fitting.

ENVI User’s Guide The Spectral Menu


570 Chapter 7: Spectral Tools

SPEAR Tools
The Spectral Processing Exploitation and Analysis Resource (SPEAR) tools provide
a series of Wizards that walk you through the steps ENVI requires to process
imagery. Basic instructions are included on each Wizard dialog and can be displayed
or hidden using the arrow button on the left side of the dialog. A Show informational
dialogs between steps check box is located on the bottom of some Wizard dialogs.
By default, this check box is not enabled. If you enable it, information dialogs display
at certain times during the Wizard to provide guidance. To proceed in the Wizard, you
must close the information dialog. Detailed information on any process can be
accessed using the Help button at the bottom of each Wizard dialog.
The following Wizards are available:
• SPEAR Anomaly Detection
• SPEAR Change Detection
• Google Earth Bridge
• SPEAR Image to Map Registration
• SPEAR Independent Components Analysis
• Lines of Communication (LOC) - Roads
• Lines of Communication (LOC) - Water
• SPEAR Metadata Browser
• SPEAR Orthorectification
• SPEAR Pan Sharpening
• Relative Water Depth
• Spectral Analogues
• TERCAT
• SPEAR Vegetation Delineation
• Vertical Stripe Removal
• Watercraft Finder

SPEAR Anomaly Detection


Anomaly detection provides a way to search for anything that is spectrally different
from the background (spectral anomalies). ENVI utilizes the Reed-Xiaoli Detector

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 571

(RXD) algorithm to detect and extract targets that are spectrally distinct from the
image background. For more information on this algorithm, see “RX Anomaly
Detection” on page 827.
The SPEAR Anomaly Detection Wizard steps you through the process of running the
RXD algorithm on your image and provides the following:
• Since vegetation is spectrally anomalous in regions like arid areas, the SPEAR
Anomaly Detection Wizard includes an option to suppress vegetation
anomalies.
• The SPEAR Anomaly Detection Wizard provides the ability to set thresholds
to minimize false positives.
• The SPEAR Anomaly Detection Wizard provides a way to filter, review, and
rate detected anomalies.
• Once you are satisfied with the detected anomalies, you can export them (by
rating) to vector shapefiles.
To run the SPEAR Anomaly Detection Wizard:
1. From the ENVI main menu bar, select Spectral → SPEAR Tools → Anomaly
Detection. The SPEAR Anomaly Detection Wizard displays the File Selection
panel.
2. Click Select Input File, choose a file, then click OK. The input image should
be a multispectral file in any format readable by ENVI.
3. To optionally process only a portion of the scene, click Select Subset. A small
Select Spatial Subset dialog appears.
4. Click Spatial Subset. The standard Select Spatial Subset dialog appears. See
“Spatial Subsetting” on page 215. When finished, click OK to return to the
File Selection panel.
5. By default, output files are saved to the same directory and use the same
rootname as the input file, minus any extension. Output files are appended with
a unique suffix. To change the directory and/or root filename, click Select
Output Root Name.
6. Click Next. The Select Parameters dialog appears.
7. Select an algorithm from the drop-down list provided. For detailed information
on each of these algorithms, see “RX Anomaly Detection” on page 827. The
following options are available:
• RXD: Standard RXD algorithm.

ENVI User’s Guide SPEAR Tools


572 Chapter 7: Spectral Tools

• UTD: Uniform Target Detector. UTD and RXD work exactly the same, but
instead of using a sample vector from the data (as with RXD), UTD uses
the unit vector. UTD extracts background signatures as anomalies and
provides a good estimate of the image background.
• RXD-UTD: A hybrid of the RXD and UTD methods. Subtracting UTD
from RXD suppresses the background and enhances the anomalies of
interest. The best condition to use RXD-UTD is when the anomalies have
an energy level that is comparable to, or less than, that of the background.
8. Using the Mean Source toggle button, specify whether the mean spectrum
should be derived from the full dataset (Global) or from a localized kernel
around the pixel (Local). If you choose Local, the Local Kernel Size field
appears. Specify a kernel size, in pixels, that will be used to create a mean
spectrum around a given pixel. The default value is 15.
9. Optionally, enable the Suppress vegetation anomalies checkbox to suppress
vegetative anomalies in the RXD results. This option is best used when
vegetation is a minor component of the image. It works by calculating a
Normalized Difference Vegetation Index (NDVI) for the input image, then
rescaling the RXD results inversely proportional to the NDVI. For more
information on NDVI, see “Normalized Difference Vegetation Index” on
page 1225.
10. Click Next. A processing status dialog appears and ENVI adds the resulting
output to the Available Bands List. The Filter Results dialog appears.
The original image in natural color and the RXD results in grayscale are
opened in the display and are dynamically linked for comparison. Bright pixels
in the output image represent targets that are spectrally distinct from the image
background.
11. Change the display of the reference image using the Reference Display drop-
down list.
12. If you selected to suppress vegetation anomalies, use the Anomaly Display
drop-down list to toggle between the RXD results and the vegetation-
suppressed results.
13. Optionally, select a threshold to segment the image into anomalous and non-
anomalous regions. The threshold should be set low enough to minimize false
positives without omitting real anomalies. Click on the dotted bar in the
histogram window or enter values in the fields at the top of the histogram
window to explore different thresholding options. Use Auto-Flicker to
examine your results (for detailed information on using this tool, see “Auto-
Flicker” on page 585). Once a suitable threshold has been determined, click

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 573

Retrieve Value on the SPEAR Wizard to automatically populate the anomaly


threshold value field.
14. Click Next. The Manage Anomalies dialog appears, along with the Available
Vectors List.
15. Change the display of the reference image using the Reference drop-down list.
16. If you selected to suppress vegetation anomalies, use the Anomaly drop-down
list to toggle between the RXD results and the vegetation suppressed results.
The Review Anomalies section provides tools to manage the detected anomalies. To
manage anomalies in the list, click on the row number to select a row or use the Ctrl
or Shift keys to select multiple rows. Selected anomalies will be highlighted and
centered (as selected) in the display. By default, all anomalies are initially flagged as
“Pending.” Optionally, flag anomalies as “Good,” “Bad,” or “Pending” using the
buttons provided.
17. Filter the list of anomalies using the Show Anomalies and Sort by drop-down
lists. Sorting options include:
• Default: Anomalies are listed in the order in which they were detected.
Normally, this is from top-to-bottom and left-to-right.
• Pixels: Anomalies are listed in order of size with the largest anomalies at
the top of the list.
• Strength: Anomalies are listed by the strength of the anomaly, measured
by taking the mean of the RXD score.
18. Click Display and Filter Options to change the color and/or fill of different
anomaly types and to change the filter settings for the minimum or maximum
anomaly size.
19. Click Next. The Export Vectors dialog appears.
20. You can optionally export the detected anomalies to vector files. If you do not
want to export the anomalies, enable the Do not export vectors checkbox. By
default, anomalies flagged as “Good” are exported. Select anomaly types by
flag in the Select Anomaly Type(s) to Export drop-down list to export
anomaly types to separate files. Each exported anomaly type will result in the
following files being created:
• ENVI vector file (.evf) in the native image projection
• ENVI vector file (.evf) in Geographic/WGS84 projection
• Shapefile (.shp) in Geographic/WGS84 projection

ENVI User’s Guide SPEAR Tools


574 Chapter 7: Spectral Tools

• Keyhole markup language file (.kml) in Geographic/WGS84 projection


for use in Google Earth
21. To save the detected anomalies to a geodatabase, select the vector layer name
in the Available Vectors List and select File → Export Layers to ArcGIS
Geodatabase from the Available Vectors List menu bar. The Select Output
Geodatabase dialog appears. See “Selecting an Output Geodatabase” on
page 226 for instructions for saving files to a geodatabase.
22. By default, output files are saved to the same directory and use the same
rootname as the input file, minus any extension. Output files are appended with
a unique suffix. To change the directory and/or root filename, click Select
Vector Rootname.
23. When you are finished exporting results, click Next in the Export Vectors
panel, then click Finish to exit the Wizard.

SPEAR Change Detection


The SPEAR Change Detection tool provides a way to compare imagery collected
over the same area at different times and to highlight features that have changed.
There are two forms of change detection: absolute and relative. Absolute change
detection highlights specifically what has changed, e.g. forest to grassland. Relative
change detection shows that something has changed but does not specify what that
change is. Relative change detection provides a faster method for quickly comparing
images.
The SPEAR Change Detection tool performs the following types of relative change
detection:
• Transform: Input datasets are stacked into one image cube, then an image
transform (principle component analysis, minimum noise fraction, or
independent components analysis) is applied in order to extract the feature
correlating to change.
• Subtractive: Normalized Difference Vegetation Index (NDVI), red/blue ratio,
and man-made ratio are calculated for the input datasets. The resulting ratios
and input bands are subtracted from the input images to create difference
images.
• Two Color Multi-View (2CMV): One band from the Time 1 image is
displayed in the red band, and the same band in the Time 2 image is displayed
in the green and blue bands. Objects that display a difference that is brighter
from one image to the other appear in cyan. Objects that display a difference

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 575

that is darker from one image to the other appear in red. The colors can then be
used to indicate potential areas of change.
For best results, use images with similar view geometries. Different view geometries
may cause objects such as trees and structures to “lean” in different directions.
Because these issues cannot be resolved in coregistration, they cause artifacts in the
results.
References:
Unsalan, Cem., and K. L. Boyer. (2004). A system to detect houses and residential
street networks in multispectral satellite images. Proceedings of the 17th
International Conference on Pattern Recognition (ICPR ‘04), Volume 3.
The SPEAR Change Detection tool is intended for multispectral images. If
panchromatic images are selected, 2CMV will be the only change detection method
available.
1. From the ENVI main menu bar, select Spectral → SPEAR Tools → Change
Detection. The Change Detection Wizard displays the File Selection panel.
2. Time #1 and Time #2 images do not need to be in chronological order. One
will be used as the base image, and the other will be warped to match that
image. To preserve as much information as possible, use the highest resolution
image for the Time #1 image. Click Select Time #1 File, choose a file for the
base image, then click OK. The Auto Tie Points Matching Band dialog
appears.
3. Select the band to use for auto tie point matching, then click OK.
4. Click Select Time #2 File, choose a file for the warp image, then click OK.
The Auto Tie Points Matching Band appears.
5. Select the band to use for auto tie point matching, then click OK.
6. To optionally process only a portion of the scene, click Select Subset. A small
Select Spatial Subset dialog appears. Subsetting is applied to both images. See
“Spatial Subsetting” on page 215 for detailed instructions on selecting a
subset. When finished, click OK to return to the File Selection panel.
7. By default, the output file is saved to the same directory and uses the same
filename as the Time #2 input file, minus any extension. The filename is
appended with change_pca. To change the directory and/or filename, click
Select Output Root Name.
8. Click Next. The Method Selection panel appears with coregistration
parameters. See “Coregistration” on page 580 for detailed instructions on
setting the coregistration parameters. Click Next. The next two dialogs: the

ENVI User’s Guide SPEAR Tools


576 Chapter 7: Spectral Tools

Review Tie Points dialog and the Check Coregistration dialog allow you to
check the accuracy of the coregistration and fix tie points if needed. When
complete, click Next on each dialog. The Method Selection dialog appears.
9. Enable the checkboxes for each change detection method you elect to use.
10. Click Show Advanced Options to set advanced parameters for the Image
Transform and/or Subtractive methods.
• For the Image Transform method, select the desired transform algorithm to
use: Principal Components (see “Principal Component Analysis” on
page 504 for more information), Minimum Noise Fraction (see
“Minimum Noise Fraction Transform” on page 516 for more information),
or Independent Components (see “Independent Components Analysis”
on page 509 for more information).
• For the Subtractive method, select whether you wish to perform dark
object subtraction and/or radiometric normalization. Dark object
subtraction removes haze and performs atmospheric correction.
Radiometric normalization normalizes the overall brightness of the Time
#2 image to the Time #1 image based on bands. If a pixel is unchanged
between the two images, the digital number (DN) difference will be zero.
11. Click Next to begin processing. Processing may take several minutes; when it
is complete, the Examine Results dialog appears.
The change detection results and the input images (in natural color) are opened
in the display and are dynamically linked for comparison. For the Image
Transform and Subtractive methods, bright pixels in the output image indicate
changed areas. For the 2CMV method, red or cyan colors in the output image
indicate changed areas.
12. Change the display of the method results using the See results for drop-down
list. Changing the method displayed will provide different visualization
options in the Wizard. Each is described below.
Optionally, click on the dotted bar in the histogram window or enter values in
the fields at the top of the histogram window to aid in visualizing areas of
change. Use Auto-Flicker to examine your results (for detailed information on
using this tool, see “Auto-Flicker” on page 585).
• 2CMV: The display group on the left contains an RGB image composite in
which red or cyan colors indicate changed areas. The Time #1 image is
displayed in the red band, and the Time #2 image in the green and blue bands.
The color depends on the relative brightness of the changed object. Changed

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 577

areas are highlighted as bright and/or dark pixels in one of the transformed
bands.
The 2CMV image can only display one band at a time. To select another band,
use the See 2CMV for drop-down list, then click Load Image. Toggle the
colors displayed using the 2CMV Colors option.
Optionally save the results using Export to NITF and/or Save to Graphic.
Or, click Export Image to ArcGIS Geodatabase to save the results to a
geodatabase. The Select Output Geodatabase dialog appears. See “Selecting an
Output Geodatabase” on page 226 for instructions on saving images to a
geodatabase.
• Image Transform: The display group on the left contains one of the
transformed bands in grayscale. Transform attempts to segregate different
image features into different bands. One of the transform result bands
highlights changes; however, it can be any one of the transformed bands.
Typically, changes are in the second or third band, but it varies depending on
scene content and the amount of change. The display groups are dynamically
linked for ease of comparison. To explore different transformed bands, use the
Transform band drop-down list, then click Load Image.
• Subtractive: The display group on the left contains one of the difference
images in grayscale. The display groups are dynamically linked for ease of
comparison. To explore difference images, use the See change for drop-down
list, then click Load Image.
Select new color tables using the Color Tables list, then click Apply Color
Table. Use the Stretch Bottom and Stretch Top slider bars to adjust how the
color table is applied.
Optionally save the file. See “Saving to Image Files” on page 18 for details.

ENVI User’s Guide SPEAR Tools


578 Chapter 7: Spectral Tools

Figure 7-1: Difference in NDVI between Time 1 and Time 2 Dark Areas Indicate Areas
Stripped Bare of Vegetation (left) Time 1 Image (center) and Time 2 Image (right)

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 579

Figure 7-2: Bright Pixels (left) Show Changed Areas between Time 1 (center) and
Time 2 (right)

13. When you are finished examining results, click Next in the Examine Results
panel, then click Finish to exit the Wizard.

ENVI User’s Guide SPEAR Tools


580 Chapter 7: Spectral Tools

Coregistration
Coregistration occurs within the SPEAR Change Detection and SPEAR Pan
Sharpening tools. For change detection or pan sharpening to be effective, the images
of interest must be closely aligned. The native georeferencing information that comes
with the imagery is typically not accurate enough for this purpose. Instead, you must
select tie points marking the same features on both images. ENVI warps one image
based on these tie points to match the base image.
Using the Ground Control Points dialog to select tie points is the simplest method;
however, it can be challenging in areas with few obvious features, and it is time
consuming. To assist tie point selection, ENVI automatically scans both images to
locate common features. For best results, manually provide three to five seed points
to assist ENVI in finding tie points.
Though ENVI can select tie points much faster than a human operator, you should
check automatically chosen tie points before proceeding. Automatically generated tie
points may fall on clouds or cloud shadows, on rooftops, or on other elevated objects
and are not suitable. Slight time differences between image collections may generate
sub-optimal tie points.

Creating Tie Points


1. Select one of the following coregistration options:
• Manual: “Image-to-Image Ground Control Points” on page 878 describes
how to select tie points. When you are finished selecting GCPs, click Next.
The Review Tie Points dialog appears. Proceed to “Reviewing Tie Points”
on page 582 for details.
• Automatic: Use the steps that follow to select tie points.
• Images already coregistered: Coregister images using their native
georeferencing information. The accuracy of native georeferencing often is
not sufficient enough to achieve precise coregistration.
2. To use seeds points, ensure the Use Seed Points check box is enabled.
3. Select seed points either manually or automatically. Choose one of the
following:
• To automatically generate four seed points, click Auto-Generate Seed
Points. ENVI selects four seed points. The auto-generated seed points may
not fall precisely on the same feature. This is acceptable, as long as they
are relatively close. These seed points are discarded when tie point
selection is complete. Click Select Seed Points, then ENVI opens the

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 581

Time #1 and #2 images in display groups, and the Ground Control Points
Selection dialog appears listing the automatically selected points.
• To manually select seed points, click Select Seed Points. ENVI opens the
Time #1 and #2 images in display groups and the Ground Control Points
Selection dialog appears. Select three to five seed points using the steps in
“Image-to-Image Ground Control Points” on page 878.
When manually selecting seed points, you can switch the Geographic
Link toggle to On to move the cursor to the same area in both images, then
switch the Geographic Link toggle to Off to fine tune the location.
4. If you manually selected seed points, click Retrieve Points. If you need to
clear the seed points and start again, click Clear Points.
5. Click Show Advanced Options if you want to set additional parameters for
area-based image matching methods. Typically, the default settings provide the
best results, but you can edit the parameters as needed. See “Area-Based
Matching Parameters” on page 896 for parameter descriptions.
• Number of Tie Points
• Search Window Size
• Moving Window Size
• Area Chip Size
• Minimum Correlation
• Point Oversampling
• Interest Operator
6. Click Next to continue. The following appears:
• One display group contains the base image.
• One display group contains the image to warp.
• The Ground Points Selection dialog.
• If you selected automatic tie points, the points show in the display groups,
the GCP Selection dialog shows how many points exist and the Root Mean
Square (RMS) error, and the Image to Image GCP List shows the
individual points.
• The Review Tie Points panel appears.
7. Review tie points, as described in “Reviewing Tie Points” on page 582.

ENVI User’s Guide SPEAR Tools


582 Chapter 7: Spectral Tools

8. When you are finished reviewing tie points, choose one of the following for the
warp Method in the Review Tie Points panel. “Warping and Resampling
Image-to-Image” on page 904 describes each parameter.
• Polynomial
• Triangulation
• RST
9. Choose one of the following for the warp Interpolation. The interpolation is
the manner in which the image is resampled to the warped grid. “Warping and
Resampling Image-to-Image” on page 904 describes the resampling choices.
• Nearest Neighbor
• Cubic Convolution
• Bilinear
For pan-sharpening, a nice looking image is paramount, so Cubic
Convolution is the best choice.
10. Click Next. The following appears:
• One display group contains the base image
• One display group contains the warped image.
• The two display groups are dynamically linked.
• The Check Co-Registration panel.
11. See “Checking Coregistration Accuracy” on page 584 for the final steps of
coregistration.

Reviewing Tie Points


When reviewing tie points, use the Image to Image GCP List to turn individual points
on or off, to delete points, and to view RMS errors for individual points.
Tips for selecting good tie points:
• When selecting seed or tie points, switch the Geographic Link toggle to On to
get the crosshairs in the two images to approximately the same location. Once
a good feature is identified, switch the Geographic Link toggle to Off, fine
tune the crosshair positions, and add the point.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 583

• When using any object with height above the ground, use the base of the
structure rather than the top. Parallax caused by different viewing geometries
(even for “simultaneous” panchromatic/multispectral imagery) makes these tie
points sub-optimal.
• Distribute tie points as evenly as possible across the entire scene. Try not to
leave large areas without any tie points.
• The more tie points the better. There is eventually a point of diminishing
returns. A good number is 50 tie points, although you can obtain excellent
results from as few as 10, depending on the scene.
• If you used manual tie point selection:
• Use the Ground Control Points Selection dialog to pick tie points.
• See “Image-to-Image Ground Control Points” on page 878 for assistance.
For tips on fixing tie points see “Fixing Tie Points” on page 583.
• If you used automatic tie point selection:
• The tie points automatically display. Tie points are colored indicating
good, satisfactory, and poor RMS error values. Look at the RMS Error in
the Ground Control Points Selection dialog. This number should be as
small as possible. Less than one is excellent, but anything less than three
should produce acceptable results.
• Enlarge the Image to Image GCP List dialog so you can see the RMS
column.
• From the Image to Image GCP List dialog menu bar, select Options →
Order Points by Error to sort the tie points by the highest RMS. For tips
on fixing tie points see “Fixing Tie Points” on page 583.

Fixing Tie Points


• Fix the tie point: Select the tie point in the Image to Image GCP List dialog to
jump to that point. Adjust the location of the crosshairs to the desired location.
Click Update in the Image to Image GCP List to update the location of that
point. ENVI immediately calculates and displays a new RMS error.
• Turn the tie point off: Select the tie point in the Image to Image GCP List
dialog. Click On/Off. The point turns green to indicate that it is off and no
longer being used, and the RMS error is updated. Turn the point back on by
clicking On/Off again.

ENVI User’s Guide SPEAR Tools


584 Chapter 7: Spectral Tools

• Delete the tie point: Select the tie point in the Image to Image GCP List
dialog. Click Delete. The point is removed from the dialog list, and the RMS
error is updated.
• Use SPEAR to automatically turn off bad tie points: In the Review Tie
Points panel, set the Maximum allowable RMS per GCP parameter to the
desired RMS threshold, then click Apply. The tie points with the greatest RMS
errors are turned off until no tie point has an RMS greater than the set value.
This is a quick way to remove the greatest errors. To turn the points back on,
select them in the Image to Image GCP List dialog, then click On/Off.

Checking Coregistration Accuracy


When warping is complete, check the accuracy of the coregistration.
1. Roam around the dynamically linked images and check the accuracy of the
coregistration. When flickering between the images, there should be little shift
between features. If there is a shift, it could be due to several reasons:
• Inaccurate Tie Points: Inaccurate tie points cause poor coregistration. In
this case, re-review tie points for accuracy. Add more if needed.
• Elevated Features: Because of parallax caused by collection with
different view geometries (even for panchromatic and multispectral images
collected “simultaneously”), objects with height above the ground “lean”
in different directions on the two images. In this case, coregistration is
impossible to achieve. The taller the object, the greater the degree of error.
• Topography: Topography and elevated features are related. Topography
viewed from different directions “leans” different ways in the images, and
is therefore difficult to impossible to coregister. You can use triangulation
as the warping method to partially mitigate parallax in images with
topography to create a better coregistration. However, to properly
coregister an image with topography, you must orthorectify the images
first using detailed digital elevation models, which is beyond the scope of
SPEAR. When flickering between the images, if the image appears to shift
in different directions in different areas, the cause is most likely
topography. The only solution in SPEAR is to coregister small areas that
do not include much variable topography.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 585

2. If you are performing coregistration for the Change Detection - Subtractive


tool, additional parameters for Radiometric Processing appear. The two
images collected at different times will have different radiometric (brightness)
properties because of different atmospheric conditions, solar elevation and
azimuth differences, and so forth. Removing these radiometric differences
allows the subsequent processing to focus on relevant changes instead of
irrelevant atmospheric and solar changes. Select one or both of the following:
• Perform dark object subtraction: Performs a basic haze correction for
atmospheric effects.
• Perform radiometric normalization: Balances the overall brightness
(band-by-band) between the two collections.
3. When coregistration accuracy is confirmed, click Next. The tool continues
with the selected Wizard.

Auto-Flicker
The SPEAR Auto-Flicker tool provides a way to compare two dynamically linked
images. Auto-flicker toggles between images at a desired speed using one of three
methods: blend, flicker, or swipe. The auto-flicker playback can be saved to an
animated GIF to examine and share results.
1. Select a display method using the provided drop-down list.
2. Control the operation using Play, Stop, and the speed slider.
3. Optionally, click Save to save the operation as an animated GIF.
• Because GIFs are saved in a maximum of 256 colors, animated GIFs may
experience color loss.
• The speed at which the saved GIF animation plays in ENVI may not match
its speed in other applications.
• Animated GIFs can contain many frames and therefore can be large in
size.

Google Earth Bridge


The SPEAR Google Earth Bridge provides a simple way to export images and/or
vectors from ENVI to Google Earth. Google Earth (available for free at
http://earth.google.com) is a powerful data visualization tool which allows imagery to
be placed in a regional or global context. The Google Earth Bridge creates a Keyhole
Markup Language (.kml) file containing vector data (including image footprints). If

ENVI User’s Guide SPEAR Tools


586 Chapter 7: Spectral Tools

image thumbnails are selected, ancillary data files associated with the .kml file will
also be exported.
Note
Google Earth is not supported on Solaris.

Google Earth does not directly support georeferenced images. Images are placed on
the Earth according to four corner points and a rotation defined in the .kml file. To
ensure images overlay accurately, the Google Earth Bridge georectifies input images
to a North up orientation. If available, Rapid Positioning Coordinates (RPCs) will be
applied (via orthorectification) using the mean elevation for the image as determined
by a global elevation dataset. If RPCs are not available, the four corner points of the
image will be used as ground control points to warp the image to a North up
orientation.
You can export vectors and/or images as thumbnails and/or footprints to Google
Earth using the SPEAR Google Earth Bridge.

Exporting Vectors and/or Images to Google Earth


1. From the ENVI main menu bar, select Spectral → SPEAR Tools → Google
Earth Bridge. The SPEAR Google Earth Wizard displays the File Selection
panel.
2. Enable the Do not export any images option if you only want to export
vectors, and click Next. The Select Vectors dialog appears.
• Vector layers opened in ENVI will be available in the Select Layers to
Export list. Use Refresh List to refresh the list of vectors opened in
ENVI.
• Select the vector layers to export and click Next. The Vector Properties
dialog appears.
• Each vector layer selected for output is represented by one column in the
Vector Parameters table. Click on the table rows to set properties for each
vector layer, then click Next. The Select Output dialog appears.
3. Click Add Files to select images to be exported. You can select any
georeferenced image, and you can select more than one file at a time using the
Shift or Ctrl keys. To remove files from the Image List, select the files to be
removed and click Remove Files.
If the input image is in NITF format, and the metadata includes the collection
date and time as well as sensor and solar geometry information, that
information will be extracted. The collection date and time will be recorded in

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 587

the .kml file. This enables the display of images collected between user-
defined start and stop dates using the Google Earth time slider. The sensor and
solar geometry information will be used to create small line segments
extending from the center of the image towards the sensor and the sun,
respectively. The sensor line will be the same color as the footprint color, and
the sun line will be colored yellow. These “geometry stubs” may be turned on
or off in Google Earth independently from the footprints and thumbnails.
Once you have selected the images for export, click Next. The Image
Properties dialog appears.
4. Select thumbnails, footprints, or both from the Output Type drop-down list.
Exporting footprints is nearly instantaneous, while exporting thumbnails may
take several minutes depending on the image size.
5. Image footprints are vector polygons depicting the spatial extent of the
selected image. Select the desired color for the footprints using the Color
drop-down list. If more than one image is being exported, the Sequential
option will cycle through the colors in the list (other than black and white) for
each footprint.
6. Select a fill type using the Fill drop-down list. Type a number in the
Transparency field or use the arrow key adjacent to the field to set the
transparency for semi-transparent fills. For a solid fill, set the transparency to
0%.
7. The Line Width field controls the width for the line around the edge of the
footprint.
8. Select an available format from the Output Format drop-down list. For PNG,
black fill pixels are set to transparent. This option is only available for
thumbnails.
9. The Image Size drop-down list indicates the approximate size of the resulting
thumbnail.
10. Google Earth can import 8-bit grayscale or 24-bit color images. Set the stretch
parameters using the Thumbnail Parameters section of the dialog.
11. Enable the Do not export any vectors option if you do not want to export
vectors and click Next. To export vectors, select the vector layers to export and
click Next.
• Vector layers opened in ENVI will be available in the Select Layers to
Export list. Use Refresh List to refresh the list of vectors open in ENVI.

ENVI User’s Guide SPEAR Tools


588 Chapter 7: Spectral Tools

• Select the vector layers to export and click Next. The Vector Properties
dialog appears.
• Each vector layer selected for output is represented by one column in the
Vector Parameters table. Click on the table rows to set properties for each
vector layer, then click Next. The Select Output dialog appears.
12. Click Select Output File to set output options. If you export thumbnails, one
graphic per thumbnail will be written to the directory specified. Thumbnails
will need to be in the same directory as the .kml file that refers to them.
Enable the Open in Google Earth when done option to automatically load the
file(s) to Google Earth.
Note
Google Earth also supports .kmz format, which is a zipped file containing
the .kml file and the associated images. Using a zip file tool, zip the files,
then replace the .zip extension with .kmz. Google Earth can open this file
format directly, and it is a convenient way to keep multiple related files
together.

13. Processing is complete; click Finish to exit the Wizard. If exported images had
collection day and time metadata, you may need to adjust the time slider in
Google Earth to display all of the images.

Google Earth Image Tools


Use Google Earth tools directly from the ENVI Image window. From the Image
window menu bar, select Tools → SPEAR → Google Earth. The following tools are
available:
• Jump to Location: Google Earth will launch, if not already open, and fly to
the location of the cursor in the ENVI Image window.
• Export Footprint: Google Earth will launch, if not already open, and display
the spatial extent of the image (as a vector polygon) in the ENVI Image
window.
• Export Image: The image displayed in the ENVI Image window will be
exported to Google Earth. You will be given the option to choose a subset and
to define the output name of the exported .kml file. If present, RPCs will be
applied using the mean elevation for the image. RPCs allow Google Earth to
display the image in a North up orientation with equal pixels across the image.
Google Earth will launch, if not already open, and tile the image into a Google
Earth super overlay. The image will be displayed with the current stretch
applied. If the image is not visible in Google Earth, zoom in on the image.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 589

Note
Because Google Earth super overlays tile images at multiple resolution
levels, they often generate a large number of files. It is recommended that
upon selecting the .kml output name, you create a new directory to contain
these overlay files.

SPEAR Image to Map Registration


The SPEAR Image-to-Map Registration tool provides a simplified way to warp an
input image to match the map information of a base image, while retaining the
original spatial resolution. This tool can be used to warp images to match a
Controlled Image Base (CIB), a database of orthophotos providing a consistent
baseline for map information. By tieing all images to the CIB, extracted features can
be visualized in GIS systems and compared to imagery of the same area collected at
different times. In areas with significant terrain, consider using the SPEAR
Orthorectification tool and setting ground control points for better results.
1. From the ENVI main menu bar, select Spectral → SPEAR Tools → Image-
to-Map Registration. The SPEAR Image-to-Map Registration Wizard
displays the File Selection panel.
2. You will select two images: one will be used as the base image and the other
will be warped to match that image. Click Select Base Image, choose a file for
the base image, then click OK.
3. Click Select Image to Warp, choose a file for the warp image, then click OK.
The Band Matching Choice dialog appears.
4. Select the band to use for auto tie point matching, then click OK. Select the
band that most closely mimics the base image. In most cases, the visible red
band is appropriate.
5. To optionally process only a portion of the scene, click Select Subset. A small
Select Spatial Subset dialog appears. Subsetting is applied to both images. See
“Spatial Subsetting” on page 215 for detailed instructions on selecting a
subset. When finished, click OK to return to the File Selection panel.
6. By default, output files are saved to the same directory and use the same
rootname as the input file, minus any extension. The filename is appended with
_imagetomap. To change the directory and/or filename, click Select Output
File.
7. Click Next. The Method Selection dialog appears with coregistration
parameters. See “Coregistration” on page 580 for detailed instructions on

ENVI User’s Guide SPEAR Tools


590 Chapter 7: Spectral Tools

setting the coregistration parameters. Click Next. The next two dialogs: the
Review Tie Points dialog and the Check Coregistration dialog allow you to
check the accuracy of the coregistration and to fix tie points if needed. When
complete, click Next on each dialog.
8. Processing is complete, click Finish to exit the Wizard.

SPEAR Independent Components Analysis


SPEAR Independent Components (IC) analysis is similar to Principal Component
(PC) analysis in that an input dataset is transformed into a new dataset containing
new bands comprised of a linear combination of the input bands. Unlike PC, which
produces uncorrelated output bands, IC transforms a set of mixed, random signals
into components that are mutually independent. The benefit compared to PC is that
IC can distinguish features of interest even when they occupy only a small portion of
the pixels in the image.
The applications of IC in remote sensing include dimension reduction, extracting
characteristics of the image, anomaly and target detection, feature separation,
classification, endmember extraction, noise reduction, and mapping.
For detailed information, see “Independent Components Analysis” on page 509.
1. From the ENVI main menu bar, select Spectral → SPEAR Tools →
Independent Component Analysis. The SPEAR Independent Component
Analysis Wizard displays the File Selection panel.
2. Click Select Input File, choose a file, then click OK. The input image should
be a multispectral file in any format readable by ENVI.
3. To optionally process only a portion of the scene, click Select Subset. A small
Select Spatial Subset dialog appears.
4. Click Spatial Subset. The standard Select Spatial Subset dialog appears. See
“Spatial Subsetting” on page 215. When finished, click OK to return to the
File Selection panel.
5. Apply an optional mask to the data by clicking Select Mask Band and
selecting the desired mask image. For details on mask selection, see
“Masking” on page 224.
6. By default, output files are saved to the same directory and use the same
rootname as the input file, minus any extension. Output files are appended with
a unique suffix. To change the directory and/or root filename, click Select
Output Filename.
7. Click Next. The Select Parameters dialog appears.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 591

8. The Number of Output ICs field defaults to the number of input bands. Fewer
IC bands will speed up processing but may exclude minor features. It is
recommended that you accept the default for multispectral imagery. For
hyperspectral imagery, you can modify this number to speed up processing.
9. If you did not apply masking at file input, enter the Sample X/Y Resize
Factors in the appropriate fields to sub-sample the data when calculating the
IC transform. Sub-sampling reduces the IC sample size to fit into memory and
increases computational speed. This option is valid only on images with an x,y
size greater than 64. A setting of 1 (the default) does not change the data. For
example, on an image with an x,y size greater than 64, a resize factor of 0.5
will use every other pixel in the statistics calculations and the IC sample.
Setting this value to a small number could lose features of interest, as those
pixels may be discarded. The upper limit is 1.0. The lower value limits x,y size
after downsampling to 64. Required processing memory and available memory
are displayed on the Wizard screen.
10. Optionally, click Show Advanced Parameters to define additional settings.
Detailed information on these settings can be found in “Independent
Components Analysis” on page 509.
11. Click Next. The Examine Results dialog appears.
The original image in natural color and the IC results in grayscale are opened
in the display and are dynamically linked for comparison.
12. Cycle through the IC bands using the ICA Result drop-down list or the Show
Prev and Show Next buttons. Entries appended with “Dark” and “Bright”
highlight the darkest or brightest pixels in the chosen IC band. Use the
Animate ICA Bands option to examine the results. For detailed information
on animation in ENVI, see “Creating Animations” on page 140.
13. Optionally, click on the dotted bar in the histogram window or enter values in
the fields at the top of the histogram window to explore different stretching
options. Use Auto-Flicker to examine your results (for detailed information on
using this tool, see “Auto-Flicker” on page 585).
14. Click Next after examining your results. Processing is complete; click Finish
to exit the Wizard.

Lines of Communication (LOC) - Roads


The SPEAR LOC - Roads tool streamlines spectral processing for mapping road lines
of communication (LOCs) using multispectral data.

ENVI User’s Guide SPEAR Tools


592 Chapter 7: Spectral Tools

This tool highlights roads to aid manual digitizing. Depending on your level of
knowledge of road locations within the scene, you can process the scene using one of
two different workflows:
• Use the supervised spectral processing workflow if you can manually identify
roads of different types in the image. Road types that have been trained are
mapped throughout the scene using spectral algorithms.
• Use the unsupervised spectral processing workflow when you cannot manually
identify roads of different types in the image. This method uses Principal
Components Analysis and/or a red soil algorithm to highlight roads.

Running the LOC - Roads Wizard


1. From the ENVI main menu bar, select Spectral → SPEAR Tools → LOC -
Roads. The LOC - Roads Wizard displays the File Selection panel.
2. Click Select Input File, choose a file, then click OK. The input image should
be a multispectral file in any format readable by ENVI.
3. If wavelengths are not embedded in the image header, a series of Select Band
dialogs appear. Select the Blue band, Green band, Red band, and NIR band,
then click OK after each selection.
4. To optionally process only a portion of the scene, click Select Subset. A small
Select Spatial Subset dialog appears.
5. Click Spatial Subset. The standard Select Spatial Subset dialog appears. See
“Spatial Subsetting” on page 215. When finished, click OK to return to the
File Selection panel.
6. By default, output files are saved to the same directory and use the same
rootname as the input file, minus any extension. Output files are appended with
a unique suffix. To change the directory and/or root filename, click Select
Output Root Name.
7. Click Next. The Method Selection panel appears.
8. Select one of the following processing methods, then click Next:
• Supervised (Spectral Matching). See “Supervised (Spectral Matching)”
on page 596 for steps.
• Unsupervised (PCA, RedSoil). See “Unsupervised (PCA, Red Soil)” on
page 597 for steps.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 593

9. In the Digitize LOCs panel, select result to display. For example, if you select
Principal Components from the Examine Result for drop-down list, there is
a list of PC images to select from (one per input spectral band).
10. Click Load image type to load the image. The following appear:
• One display group contains a natural color composite of the input image,
to use as reference.
• One display group contains the selected spectral processing result. This
display group is dynamically linked to the natural color window. Use the
dynamic overlay tool to see how the spectral processing result relates to
the natural color reference image.
• Optionally, click on the dotted bar in the histogram window or enter values
in the fields at the top of the histogram window to explore different
stretching options. For MF/SAM Ratio, MF, and Red Soil results, roads
are always bright. For SAM, roads are dark. For PC, you must manually
load each image to search for the one that highlights roads. The roads may
be either bright or dark. Use Auto-Flicker to examine your results (for
detailed information on using this tool, see “Auto-Flicker” on page 585).
• The Vector Parameters dialog, containing the three default vector layers
(Primary, Secondary, and Tertiary).

ENVI User’s Guide SPEAR Tools


594 Chapter 7: Spectral Tools

Figure 7-3: Unstretched Image (right) and Stretched Image (left) Highlights Red
Soil Roads (Imagery Courtesy of DigitalGlobe)

11. Use the Vector Parameters dialog to add new road vectors. See “Adding New
Vectors” on page 1019 for details. Assign the roads within the image to the
three default vector layers as desired.
• To create a new vector layer for digitization, click Create, in the Digitize
LOCs panel and enter a descriptive layer name and a filename.
• To import an existing vector layer so that new LOCs may be added to it,
click Import. (The vector layer to import must already be open in ENVI.)
• To remove a vector layer, select the layer to remove, then click Remove.
You cannot remove the default layers.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 595

• At any time during digitizing, you can use the histogram to stretch the
display group containing the spectrally processed result, or display a
different result using the controls in the Display Results dialog.
• Vectors are saved automatically each time the displayed image changes, or
before you move to the next step.

Figure 7-4: Digitized Roads (Imagery Courtesy of DigitalGlobe)

12. When digitizing LOCs is complete, click Next. The Export Vectors panel
appears.
13. Optionally, select vector layers to export to separate files from the Vector
Output list. The vectors you digitized are stored in separate files in ENVI
vector file (.evf) format. These vectors remain in the projection and datum of
the input image. Each exported vector will result in the following files being
created:

ENVI User’s Guide SPEAR Tools


596 Chapter 7: Spectral Tools

• ENVI vector file (.evf) in the native image projection


• ENVI vector file (.evf) in Geographic/WGS84 projection
• Shapefile (.shp) in Geographic/WGS84 projection
• Keyhole markup language file (.kml) in Geographic/WGS84 projection
for use in Google Earth
14. Click Export Selected Layer(s). By default, output files are saved to the same
directory and use the same rootname as the input file, minus any extension.
Output files are appended with a unique suffix. Separate files are written for
the Primary, Secondary, and Tertiary LOC layers, plus any layers you created
or imported.
15. Optionally, click Export Selected Layer(s) to ArcGIS Geodatabase. The
Select Output Geodatabase dialog appears. See “Selecting an Output
Geodatabase” on page 226 for further instructions.
16. When you are finished exporting results, click Next in the Export Vectors
panel, then click Finish to exit the Wizard.
Supervised (Spectral Matching)
1. When you select Supervised (Spectral Matching), then click Next in the
Method Selection panel, the Atmospheric Correction panel appears.
2. Use the steps in “SPEAR Atmospheric Correction” on page 598 for details.
Dark object subtraction produces good results with minimal user input.
3. When atmospheric correction is complete, click Next. A natural color
composite image is loaded into a display group, the ROI dialog appears, and
the Select Training Pixels panel appears.
4. Use the ROI Tools dialog to create a new ROI for each road type to map. See
“Defining ROIs” on page 323 for details. You need enough ROIs to accurately
represent the different types of road LOCs that occur within the scene, such as
road types that are spectrally different from each other (gravel, asphalt, red
soil, etc.). Choose multiple pixels for each ROI to represent variability within
that type of road.
5. Click Next. The ROI Selection dialog appears.
6. Select one or more ROIs to map, then click OK. The Spectral Processing panel
appears.
7. Select one or more Spectral Processing Parameters:

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 597

• Spectral Processing (MF, SAM, and MF/SAM Ratio): “Using Matched


Filtering” on page 776 and “Applying Spectral Angle Mapper
Classification” on page 412 describe the MF and SAM classification
methods. MF/SAM Ratio suppresses false positives that may be present in
one, but not the other, while enhancing true positives. For example, a pixel
containing a road has a high MF value and low SAM value. A high value
divided by a low value results in a very large value, therefore enhancing
the positive result. Conversely, if the MF product has a high value for a
false positive, but the SAM correctly maps it as non-road so it has a high
value, the high value divided by high value results in a smaller value,
suppressing the false positive.
• Principal Component (PC): “Principal Component Analysis” on
page 504 describes the PCA transform.
• Independent Components: “Independent Components Analysis” on
page 509 describes the IC transform.
• Red Soil: The Red Soil transform works in the same manner as the
common NDVI transform used to map vegetation. Red Soil produces a
single grayscale image where red soil (and anything else that is red) is
bright. Some other features may also appear bright in the Red Soil result,
such as clouds.
8. Click Next. The Digitize LOCs panel appears. See step 9 in “Running the LOC
- Roads Wizard” on page 592 for details on manually digitizing LOCs.
Unsupervised (PCA, Red Soil)
1. When you select Unsupervised (PCA, Red Soil), then click Next in the
Method Selection panel, the Spectral Processing panel appears.
2. Select one or more Spectral Processing Parameters:
• Principal Components Analysis (PC)
• Independent Components Analysis (IC)
• Red Soil
See descriptions of these parameters in the previous section “Supervised
(Spectral Matching)”.
3. Click Next. The Digitize LOCs panel appears. See step 9 in “Running the LOC
- Roads Wizard” on page 592 for details on manually digitizing LOCs.

ENVI User’s Guide SPEAR Tools


598 Chapter 7: Spectral Tools

SPEAR Atmospheric Correction


Atmospheric Correction is available within many of the SPEAR tools. For most
spectral processing applications, working with atmospherically corrected data
produces the most accurate results.
Atmospheric correction methods available in SPEAR include:
• Dark object subtraction
• Flat field correction
• Internal average relative reflectance
• Log residuals
• Empirical line calibration
Rigorous, model-based methods (such as FLAASH) are not available in SPEAR.
The best method to use depends on your skill level, scene content, desired
application, and available ancillary data. Dark object subtraction is the simplest
method, requires no user input, and often produces good results. Conversely, the best
possible results may be obtained with empirical line calibration. However, you must
have good knowledge of the scene content and a spectral library containing signatures
for materials contained within the scene.
Descriptions of the atmospheric correction types follow.

None/Already Corrected
Select this option if you do not want atmospheric correction, or if the input file is
already atmospherically corrected.

Dark Object Subtraction


Dark object subtraction searches each band for the darkest pixel value. Assuming that
dark objects reflect no light, any value greater than zero must result from atmospheric
scattering. The scattering is removed by subtracting this value from every pixel in the
band. This simple technique is effective for haze correction in multispectral data, but
it should not be used for hyperspectral data.
If you select dark object subtraction, additional settings are available by clicking
Show Advanced Parameters. Dark objects can be determined by:
• Band Minimums: Indicates whether to search for the dark objects in just the
subsetted area, or in the entire image. Searching the entire image may take
longer, but creates more accurate results. If the data contains black-filled

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 599

pixels, enter the value of these pixels for the Data ignore value and enable the
Use ignore data value check box.
• User Values: Click Edit Values and manually enter values to subtract from
each band in the Enter User Values dialog.

ENVI User’s Guide SPEAR Tools


600 Chapter 7: Spectral Tools

Flat Field Calibration


Flat field calibration produces relative reflectance by dividing the mean spectrum of a
user-defined ROI into the spectrum of each pixel in the image. ROIs you define
should be a spectrally flat material within the wavelength range of the sensor. Beach
sand and concrete are popular choices. Materials with spectral features, such as
vegetation, are a poor choice. Since the mean spectrum of the ROI is divided into
each pixel, the relative reflectance for pixels within the ROI will be flat and have a
value around 1.0.
1. To perform flat field calibration, click Create Flat Field ROI. A display group
opens with the input image loaded, and the ROI Tool dialog appears.
1. Use the ROI Tool (described in “Defining ROIs” on page 323) to define an
ROI for the desired flat field.
2. Click Choose Flat Field ROI on the Atmospheric Correction panel.
3. Select the ROI you created from the ROI Selection dialog list, then click OK.

Internal Average Relative Reflectance


Internal average relative reflectance (IARR) is similar to flat field calibration in that a
reference spectrum is divided into each pixel in the image to generate relative
reflectance. The reference spectrum for IARR is the mean spectrum of the entire
image, rather than that of a user-defined ROI. IARR requires no user input.

Log Residuals
The log residuals method produces a pseudo-reflectance dataset by dividing each
pixel’s spectrum by the spectral geometric mean and the spatial geometric mean. No
user input is required to run this method. Log residuals is generally effective for
analyzing absorption features present in hyperspectral data.

Empirical Line Calibration


Empirical line calibration forces the image spectra to match reflectance spectra
collected from the field. This method is capable of producing the most accurate
results possible, but it requires ground truth information. In SPEAR, empirical line
calibration requires a dark and bright target.
1. To create bright and dark targets, use the Available Bands List to load the
reference image into a new display group.
2. From the Display group menu bar, select Overlay → Region of Interest. The
ROI Tool dialog appears.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 601

3. Create an ROI for both a dark and bright target, then select pixels with
available ground truth spectra.
4. When the ROIs are defined for dark and bright targets, click Select Data ROI
on the Atmospheric Correction panel. The ROI Selection dialog appears.
5. Select the appropriate ROI from the list, then click OK.
6. In the Atmospheric Correction panel, click Select Library Spectrum. The
Library Selection dialog appears.
By default, the spectral libraries in ENVI are available. These libraries contain
generic spectra for many man-made materials, vegetation, soils, rocks, and
minerals. To use a custom spectral library, it must be already loaded in the
Available Bands List.
7. Select the spectral library from the list of open files, then click OK. The
Spectrum Selection dialog displays.
8. Select the spectrum to use, then click OK. Select the spectral library
containing ground truth spectra, then select ground truth spectrum within the
library for the designated target.

Example Atmospheric Correction Results


The figures that follow show comparisons of the different atmospheric correction
techniques applied to the same dataset. For the flat field calibration, an ROI on a
bright, sandy beach was used. For empirical line calibration, asphalt and concrete
from the pre-defined spectral libraries were used.
For the spectral processing that SPEAR performs, having the correct spectral shape
for an object is more important than obtaining the correct absolute reflectance values.
Empirical line calibration is the most accurate method for both spectral shape and
absolute reflectance values; however, it requires ground truth knowledge that is not
always available. Dark object subtraction usually provides good spectral shape, but
does not provide correct absolute reflectance values. Since the latter is not important
for SPEAR’s processing, though, dark object subtraction typically provides the best
balance between accuracy and simplicity.

ENVI User’s Guide SPEAR Tools


602 Chapter 7: Spectral Tools

Figure 7-5: Comparison of Atmospheric Correction Methods for Vegetation

Figure 7-6: Comparison of Atmospheric Correction Methods for Soil

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 603

Lines of Communication (LOC) - Water


The SPEAR LOC - Water tool streamlines spectral processing for mapping open and
obscured waterway lines of communication (LOCs) using multispectral data.
This tool highlights open and obscured waterways to aid manual digitization.
Depending on your level of knowledge of water locations within the scene, you can
process the scene using one of two different workflows:
• Use the supervised spectral processing workflow if you can manually identify
water of different types in the image. ENVI uses the training data to locate
every pixel that is spectrally similar to the identified water.
• Use the unsupervised spectral processing workflow when you cannot manually
identify water of different types in the image. This method uses Principal
Components Analysis and/or a Normalized Difference Water Index algorithm
to highlight areas containing water in the image.

Running the LOC - Water Wizard


1. From the ENVI main menu bar, select Spectral → SPEAR Tools → LOC -
Water. The LOC - Water Wizard displays the File Selection panel.
2. Click Select Input File, choose a file, then click OK. The input image should
be a multispectral file in any format readable by ENVI.
3. If wavelengths are not embedded in the image header, a series of Select Band
dialogs appear. Select the Blue band, Green band, Red band, and NIR band,
then click OK after each selection.
4. To optionally process only a portion of the scene, click Select Subset. A small
Select Spatial Subset dialog appears.
5. Click Spatial Subset. The standard Select Spatial Subset dialog appears. See
“Spatial Subsetting” on page 215. When finished, click OK to return to the
File Selection panel.
6. By default, output files are saved to the same directory and use the same
rootname as the input file, minus any extension. Output files are appended with
a unique suffix. To change the directory and/or root filename, click Select
Output Root Name.
7. Click Next. The Method Selection panel appears.

ENVI User’s Guide SPEAR Tools


604 Chapter 7: Spectral Tools

8. Select one of the following processing methods, then click Next:


• Supervised (Spectral Matching): See “Supervised (Spectral Matching)”
on page 607 for details.
• Unsupervised (PCA, NDWI): See “Unsupervised (PCA, NDWI)” on
page 608 for details.
9. In the Digitize LOCs panel, select the image within the processing method to
display. For example, if you select Principal Components from the Examine
Result for drop-down list, there is a list of PCA images to select from (one per
input spectral band).
10. Click Load image type to load the image. The following appear:
• One display group contains a natural color composite of the input image,
to use as reference.
• One display group contains the selected spectral processing result. This
display group is dynamically linked to the natural color window. Use the
dynamic overlay tool to see how the spectral processing result relates to
the natural color reference image.
• A histogram window appears for the spectral processing result display
group to allow for adjusting the stretch to highlight water. For MF/SAM
Ratio, MF, and NDWI results, water is always bright. For SAM, water is
dark. For PCA, you must manually load each image to search for the one
that highlights water. The water may be either bright or dark. Use Auto-
Flicker to examine your results (for detailed information on using this
tool, see “Auto-Flicker” on page 585).
• The Vector Parameters dialog, containing one default vector layer (Water
LOCs).

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 605

Figure 7-7: Unstretched Image (right) and Stretched Image (left) Highlighting
Water in the Spectral Processing (Imagery Courtesy of DigitalGlobe)

11. Use the Vector Parameters dialog to add new water vectors. See “Adding New
Vectors” on page 1019 for details.
• To create a new vector layer for digitization, click Create, in the Digitize
LOCs panel and enter a descriptive layer name and a filename.
• To import an existing vector layer so that new LOCs may be added to it,
click Import. (The vector layer to import must already be open in ENVI.)
• To remove a vector layer, select the layer to remove, then click Remove.
You cannot remove the default layers.

ENVI User’s Guide SPEAR Tools


606 Chapter 7: Spectral Tools

• At any time during digitizing, you can use the histogram to stretch the
display group containing the spectrally processed result, or display a
different result using the controls in the Display Results dialog.
• Vectors are saved automatically each time the displayed image changes, or
before you move to the next step.

Figure 7-8: Digitized Water (Imagery Courtesy of DigitalGlobe)

12. When digitizing LOCs is complete, click Next. The Export Vectors panel
appears.
13. Optionally, select vector layers to export to separate files from the Vector
Output list. The vectors you digitized are stored in separate files in ENVI
vector file (.evf) format. These vectors remain in the projection and datum of
the input image. Each exported vector will result in the following files being
created:
• ENVI vector file (.evf) in the native image projection
• ENVI vector file (.evf) in Geographic/WGS84 projection

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 607

• Shapefile (.shp) in Geographic/WGS84 projection


• Keyhole markup language file (.kml) in Geographic/WGS84 projection
for use in Google Earth
14. Click Export Selected Layer(s). By default, output files are saved to the same
directory and use the same rootname as the input file, minus any extension.
Output files are appended with a unique suffix. Separate files are written for
the Water LOC layer, plus any layers you created or imported.
15. Optionally, click Export Selected Layer(s) to ArcGIS Geodatabase. The
Select Output Geodatabase dialog appears. See “Selecting an Output
Geodatabase” on page 226 for further instructions.
16. When you are finished exporting results, click Next in the Export Vectors
panel, then click Finish to exit the Wizard.
Supervised (Spectral Matching)
1. When you select Supervised (Spectral Matching), then click Next in the
Method Selection panel, the Atmospheric Correction panel appears.
2. Use the steps in “SPEAR Atmospheric Correction” on page 598 for details.
Dark object subtraction produces good results with minimal user input.
3. When atmospheric correction is complete, click Next. A natural color
composite image is loaded into a display group, the ROI dialog appears pre-
loaded with default ROIs (Muddy Water and Dark Water), and the Select
Training Pixels panel appears.
4. Use the ROI Tools dialog to add pixels to the ROIs. See “Defining ROIs” on
page 323 for details. You do not have to use both pre-loaded ROIs. For
instance, if no dark water is visible, you may be leave this ROI empty. You can
create new ROIs as needed through the ROI Tool dialog and populate them
with pixels that represent some other class of water. You need enough ROIs to
accurately represent the different types of water that occur within the scene.
Different types of water would be those that are spectrally different from each
other. Each ROI should have at least a few points to represent variability within
that type of water.
5. Click Next. The ROI Selection dialog appears.
6. Select one or more ROIs to map, then click OK. The Spectral Processing panel
appears.
7. Select one or more Spectral Processing Parameters:

ENVI User’s Guide SPEAR Tools


608 Chapter 7: Spectral Tools

• Spectral Processing (MF, SAM, and MF/SAM Ratio): “Using Matched


Filtering” on page 776 and “Applying Spectral Angle Mapper
Classification” on page 412 describe the MF and SAM classification
methods. MF/SAM Ratio suppresses false positives that may be present in
one, but not the other, while enhancing true positives. For example, a pixel
containing water has a high MF value and low SAM value. A high value
divided by a low value results in a very large value, therefore enhancing
the positive result. Conversely, if the MF product has a high value for a
false positive, but the SAM correctly maps it as non-water so it has a high
value, the high value divided by high value results in a smaller value,
suppressing the false positive.
• Principal Components Analysis (PCA): “Principal Component
Analysis” on page 504 describes the PCA transform.
• Normalized Difference Water Index (NDWI): NDWI works in the same
manner as the common NDVI transform used to map vegetation. NDWI
produces a single grayscale image, where water is bright. Some other
features may also appear bright in the NDWI result, such as certain
buildings and clouds. NDWI has proven to be effective in quickly
highlighting water that is both non-obscured and obscured. Examine the
NDWI results first, as they are typically more accurate and easier to
interpret than the PCA results.
8. Click Next. The Digitize LOCs panel appears. See step 10 in “Running the
LOC - Water Wizard” on page 603 for details on manually digitizing LOCs.
Unsupervised (PCA, NDWI)
1. When you select Unsupervised (PCA, NDWI), then click Next in the Method
Selection panel, the Spectral Processing panel appears.
2. Select one or more Spectral Processing Parameters:
• Principal Components Analysis (PCA)
• Normalized Difference Water Index (NDWI)
See descriptions of these parameters in the previous section “Supervised
(Spectral Matching)”.
3. Click Next. The Digitize LOCs panel appears. See step 10 in “Running the
LOC - Water Wizard” on page 603 for details on manually digitizing LOCs.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 609

SPEAR Metadata Browser


The SPEAR Metadata Browser extracts key metadata from National Imagery
Transmission Format (NITF) images and displays it in a simple-to-read format. In
addition, this tool provides a way to compare multiple images for use in change
detection, and to view a 3D graphic of the sensor's and sun's geometry at the time of
collection.
1. From the ENVI main menu bar, select Spectral → SPEAR Tools →
Metadata Browser. The SPEAR Metadata Browser Wizard displays the File
Selection panel.
2. Click Add Files to select images to be exported. The input image should be a
panchromatic or multispectral file in NITF format. Select more than one file at
a time using the Shift or Ctrl keys. To remove files from the Input File List,
select the files to be removed and click Remove Files.
3. Click Next. The Examine Results dialog appears.
4. The File Info table contains raw metadata displayed in one column per input
image. Resize columns by clicking and dragging the edges of any column
header. Information (if present in the metadata) may include the information
below. If the metadata is not present, fields will display as blank or will be
populated with a question mark.
• Image Title: Title of the image.
• Image Date: Acronym for the image type. Includes: VIS (Visible Imagery,
usually panchromatic), MAP (maps), SAR (synthetic aperture radar), IR
(infrared), and MS (multispectral).
• Target ID: Primary target for the image. If present, the first 10 digits
correspond to the BE (Basic Encyclopedia) identifier: five characters of
functional category code, followed by the two-character country code.
• Source: Alphanumeric acronym for the image source. For example,
'QB02' refers to DigitalGlobe QuickBird 2 imagery.
• Classification: Image security classification level.
• GSD: The mean ground sampling distance (GSD) in inches.
• NIIRS: The National Image Interpretability Rating Scale (NIIRS) value.
• Sensor Az/Elev: The azimuth and elevation angle (degrees above horizon)
to the sensor from the center of the image.

ENVI User’s Guide SPEAR Tools


610 Chapter 7: Spectral Tools

• Solar Az/Elev: The azimuth and elevation angle (degrees above horizon)
to the sun from the center of the image.
5. The Difference table displays image pair suitability for change detection
analysis. The table lists the angular difference between sensor vectors as well
as solar vectors (in order). Cells display the sum of the angular differences by
color:
• 0-30 degrees: Highly suitable for change detection (green).
• 30-60 degrees: Moderately suitable for change detection (yellow).
• 60+ degrees: Poorly suited for change detection (red).
6. Click on a cell in the Difference table to display the Time Difference between
two collections.
7. When a cell for a valid image pair is selected in the Difference table, a 3D
graphic at the bottom of the SPEAR dialog updates to show the relative sensor
and solar geometries. Click and drag the graphic to change the view
perspective. Green cubes indicate sensor positions, yellow spheres indicate
solar positions, and red and blue lines indicate which sensor and solar vector
pair belong to each other.
To view a single image, select the row or column header for that image.
8. Optionally, right-click and select Save Image to File to save the image to a
graphic file.
9. When you are finished viewing the metadata, click Finish to exit the Wizard.

SPEAR Orthorectification
An orthorectified image (or orthophoto) is one where each pixel represents a true
ground location and all geometric, terrain, and sensor distortions have been removed
to within a specified accuracy. Orthorectification transforms the central perspective of
an aerial photograph or satellite-derived image to an orthogonal view of the ground,
which removes the effects of sensor tilt and terrain relief. Scale is constant throughout
the orthophoto, regardless of elevation, thus providing accurate measurements of
distance and direction. Geospatial professionals can easily combine orthophotos with
other spatial data in a geographic information system (GIS) for city planning,
resource management, and other related fields.
The SPEAR Orthorectification Wizard allows you to orthorectify images using
rational polynomial coefficients (RPCs), elevation and geoid information, and
optional ground control points (GCPs). RPCs and elevation information do not
provide enough details to build a rigorous model representing the path of light rays

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 611

from a ground object to the sensor. Use the ENVI Orthorectification Module for
rigorous orthorectification. This add-on module requires an additional license in your
installation; contact your ENVI sales representative to obtain a license.
1. From the ENVI main menu bar, select Spectral → SPEAR Tools →
Orthorectification. The SPEAR Orthorectification Wizard displays the File
Selection panel.
2. Click Select Image to Ortho, choose a file, then click OK. The input image
must contain RPCs and can be in any format readable by ENVI.
3. To optionally process only a portion of the scene, click Select Subset. A small
Select Spatial Subset dialog appears.
4. Click Spatial Subset. The standard Select Spatial Subset dialog appears. See
“Spatial Subsetting” on page 215. When finished, click OK to return to the
File Selection panel.
5. Select an elevation source. In flat areas or when only general correction is
needed, select Z Value. Use Auto Retrieve to retrieve the mean elevation for
the area covered by the input image. Click Select Elevation File to select a file
with elevation data. The elevation file must contain map information and can
be in any format readable by ENVI.
6. By default, output files are saved to the same directory and use the same
rootname as the input file, minus any extension. Output files are appended with
a unique suffix. To change the directory and/or root filename, click Select
Output Root Name.
7. Click Next. The Select Method dialog appears.
8. Select Normal or Fast mode. Normal mode is more accurate and calculates an
orthorectified coordinate for every pixel in the image. Fast mode calculates an
orthorectified coordinate for pixels laying on a grid with user-defined spacing,
then triangulates the position of all of the points within each grid cell. In
relatively flat areas, Fast mode will produce accurate results with faster
processing.
9. Optionally, collect GCPs to refine the georeferencing accuracy of the
orthorectified image. For detailed information on collecting GCPs, see
“Collecting Ground Control Points (Image-to-Image)” on page 879.
10. Click Next. The Orthorectification Parameters dialog appears.
11. Click Show Ortho Params to optionally modify the following default
parameters:

ENVI User’s Guide SPEAR Tools


612 Chapter 7: Spectral Tools

• X Pixel Size and Y Pixel Size values default to the resolution of the input
file.
• The Image Resampling Method determines the pixel values in the input
image when it is converted from its current orientation into the new
orientation. The choices are Nearest Neighbor, Bilinear, and Cubic
Convolution. The default is Bilinear.
• The Image Background allows you to set a value for pixels in the output
image that are outside the boundary of the source image.
• DEM Resampling defines the method to be used to resample the DEM to
the resolution of the input or base image.
• DEM to Geoid Offset is a constant value that is added to every value in
the DEM to account for the difference between a spheroid mean sea level
(used in most available DEM data) and the constant geopotential surface
known as the geoid. The RPC coefficients are created based on geoid
height, and this information must be used to provide accurate
orthorectification.
For example, if the geoid is 10 m below mean sea level at the location of
your image, enter a value of -10.
Many institutions doing photogrammetric processing have their own
software for geoid height determination. You can also obtain software
from NGA, USGS, NOAA, and other sources. A geoid height calculator is
located at:
http://www.ngs.noaa.gov/cgi-bin/GEOID_STUFF/geoid99_prompt1.prl.
• Grid Spacing is available for Fast mode. Fast mode calculates an
orthorectified coordinate for pixels laying on a grid with this spacing
value, then triangulates the position of all of the points within each grid
cell.
12. Click Next. The Examine Results dialog appears.
The orthorectified image is displayed. If GCPs were selected, the base image
will be displayed and geographically linked to the orthorectified image so that
you can examine the georeferencing accuracy.
13. When you are finished examining your results, click Finish to exit the Wizard.

SPEAR Pan Sharpening


Pan Sharpening is an image fusion method in which high-resolution panchromatic
data is fused with lower resolution multispectral data to create a colorized high-

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 613

resolution dataset. The resulting product should only serve as an aid to literal analysis
and not for further spectral analysis.

Figure 7-9: Pan-sharpened Product, High-Resolution Panchromatic Image


Fused with Lower Resolution Multispectral Image (IKONOS Imagery Courtesy of
GeoEye, Copyright 2007)

1. From the ENVI main menu bar, select Spectral → SPEAR Tools → Pan
Sharpening. The SPEAR Pan Sharpening Wizard displays the File Selection
panel.
2. Click Select High Res File, select a panchromatic image, select the input band
to use, then click OK.
3. Click Select Low Res File, select a multispectral image, select the input band
to use, then click OK. Simultaneous image collections are not required but will
produce better results.
4. To optionally process only a portion of the scene, select the High Res or Low
Res image as the subset source, then click Select Subset. A small Select
Spatial Subset dialog appears.
5. Click Spatial Subset. The standard Select Spatial Subset dialog appears. See
“Spatial Subsetting” on page 215. When finished, click OK to return to the
File Selection panel.
6. By default, output files are saved to the same directory and use the same
rootname as the input file, minus any extension. Output files are appended with
a unique suffix. To change the directory and/or root filename, click Select
Output Root Name.

ENVI User’s Guide SPEAR Tools


614 Chapter 7: Spectral Tools

7. Click Next. The Method Selection panel appears with coregistration


parameters.
8. See “Coregistration” on page 580 for instructions to set the coregistration
parameters. Even if the images were acquired simultaneously, the
georeferencing accuracy is seldom good enough to allow a straight fusion.
Check the accuracy of the coregistration and fix tie points if needed.
9. Use Auto-Flicker to examine your results (for detailed information on using
this tool, see “Auto-Flicker” on page 585).
10. If you are coregistering for the Pan Sharpening tool, set the sharpening method
to use. “Image Sharpening” on page 493 describes each method.
• Gram-Schmidt
• Principal Components
• Hue, Saturation, Value (HSV)
• Color Normalized (Brovey)
11. When coregistration is complete, click Next. The Processing Complete panel
appears.
12. The Spectral Quality Indices that appear on the Processing Complete panel are
a way to gauge the degradation of the spectral properties of the multispectral
bands due to the pan-sharpening process. For instance, Gram-Schmidt results
in higher spectral quality indices than the Brovey Transform. The algorithm
measures the correlation coefficient, brightness, and contrast between the input
and output bands. Perfect spectral correspondence would result in a value of 1.
These indices are for informational purposes.
13. Optionally, Export Image to NITF.
14. Optionally, click Export Image to ArcGIS Geodatabase. The Select Output
Geodatabase dialog appears. See “Selecting an Output Geodatabase” on
page 226 for further instructions.
15. When you are finished examining results, click Finish in the Processing
Complete panel to exit the Wizard.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 615

Figure 7-10: Pan Sharpening Results using Different Methods (IKONOS Imagery
Courtesy of GeoEye, Copyright 2007)

Relative Water Depth


The Relative Water Depth tool enables you to quickly generate a product depicting
relative water depths for a region of interest. This tool uses a bottom albedo-
independent Bathymetry algorithm developed by Stumpf and Holderied (2003). The
bottom albedo-independent nature of the algorithm means that sea floor covered with
dark sea grass or bright sand is shown to be at the same depth when they are at the
same depth.
The water depth results are relative since they do not depict absolute depths (the
results are scaled from zero to one). The intent of these results is to provide a general
feel for the Bathymetry; they are not to be used for navigational purposes.
Reference:
Stumpf, R.P., K. Holderied, 2003, Determination of Water Depth with High-
Resolution Satellite Imagery Over Variable Bottom Types, Liminology and
Oceanography, 48(1):547-556.
1. From the ENVI main menu bar, select Spectral → SPEAR Tools → Relative
Water Depth. The ENVI Relative Water Depth Wizard displays the File
Selection panel.

ENVI User’s Guide SPEAR Tools


616 Chapter 7: Spectral Tools

2. Click Select Input File, choose a file, then click OK. The input file must be
multispectral, with at least blue, green, and near infrared bands.
3. If wavelengths are not embedded in the image header, a series of Select Band
dialogs appear. Select the Blue band, Green band, Red band, and NIR band,
then click OK after each selection.
4. To optionally process only a portion of the scene, click Select Subset. A small
Select Spatial Subset dialog appears.
5. Click Spatial Subset. The standard Select Spatial Subset dialog appears. See
“Spatial Subsetting” on page 215. When finished, click OK to return to the
File Selection panel.
6. By default, output files are saved to the same directory and use the same
rootname as the input file, minus any extension. Output files are appended with
a unique suffix. To change the directory and/or root filename, click Select
Output Root Name.
7. Click Next. The Atmospheric Correction panel appears.
8. Use the steps in “SPEAR Atmospheric Correction” on page 598 to optionally
perform atmospheric correction. For calculating relative water depths, it is
typically best to not perform atmospheric correction. Atmospheric correction
of littoral or marine areas often alters the data such that calculating water
depths may produce anomalous and unsatisfactory results. Unless there is a
specific need to perform atmospheric correction and the implications are
understood, it is best to skip this step.
9. Click Next. The Method Selection panel appears.
10. Select the desired Bathymetry method:
• Log Ratio Transform
• Principal Component: “Principal Component Analysis” on page 504
describes the PC transform
• Independent Components: “Independent Components Analysis” on
page 509 describes the IC transform
Log Ratio Transform typically produces better results. If you use Principal
Components, you need to examine each resulting Principal Component image
to find the one corresponding to water depth. Even then, water depth may not
be entirely decorrelated from bottom albedo or other sources of error.
11. If you selected Log Ratio Transform, click Show Advanced Options to see
additional parameter settings. The following are available:

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 617

• Median Filter: The default setting is 3x3 to remove high frequency noise
that often occurs in the water depth results. If desired, select a different
kernel size for the filter or turn filtering off from the drop-down list.
Setting the median filter to larger sizes creates smoother results, but may
smooth over small submerged features.
• Calibrate to absolute depth: Enable this check box to calibrate the
relative depths to absolute depths by using ground truth information. A
display group opens and a Calibration Points table for the ground truth
points appears in the Method Selection panel. You need to add at least
three ground truth points.
To enter ground truth points manually, move the cursor in to the pixel with
the known depth. In the Method Selection panel, click Add Current
Location as New Point. A new row is added to the Calibration Points
table with the column and row location of the selected pixel. Select the
value in the Depth column and enter the depth value, in meters. Repeat
this process for each ground truth point.
You can also import ground truth points from ASCII files. The ASCII file
must contain three columns: x coordinate, y coordinate, and depth. The x
and y coordinates may be in any defined map projection, such as
Geographic or UTM, and the columns may be in any order. To import a
file, click Import ASCII in the Method Selection panel. Select the text file
containing the ground truth data. A dialog appears asking you to identify
the three columns, and to select the map projection that the x and y
coordinates are defined as. When finished, all the points in the ASCII file
that fall within the image’s bounds are entered into the table.

ENVI User’s Guide SPEAR Tools


618 Chapter 7: Spectral Tools

Figure 7-11: Example Water Depths Using Different Median Kernel Sizes,
Left = None, Center = 5x5, Right = 13x13 (Imagery Courtesy of DigitalGlobe)

12. Click Next. ENVI processes the imagery.


• If you did not select Calibrate to absolute depth, the Examine Results
dialog appears. See “Examining the Relative Water Depth Results” on
page 620.
• If you selected Calibrate to absolute depth, the Absolute Depth
Calibration plot appears. Use this plot to select a model to fit the ground
truth information.
In most cases, ground truth points follow a pattern. Shallow pixels show a
wide range in Log Ratio Transform values. As the water gets deeper, it
becomes uniformly dark so it has a narrow range of log ratio transform
values. A pixel with a log ratio transform of 1 could be either 20, 100, or
even 1,000 meters deep. It is better to choose a model that fits the shallow
pixels well than the deep pixels, as the deep pixels are prone to error (due
to no light being reflected back to the sensor). By selecting a
Measurement Errors value other than Equal (1.0) in the Absolute Depth
Calibration plot, the model focuses on the shallow pixels when fitting the
model. Click Update in the Absolute Depth Calibration plot when you
change the Type of Fit or Measurement Errors value. A measure of how
well the model fits the data shows as the R-Squared value in the area
below the plot.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 619

Figure 7-12: Absolute Depth Calibration Plot

ENVI User’s Guide SPEAR Tools


620 Chapter 7: Spectral Tools

Figure 7-13: Exponential Models using SQRT(Y) (left) and Equal(1.0) (right)
Measurement Errors

13. Click OK in the Absolute Depths Calibration dialog. The Examine Results
panel appears. See “Examining the Relative Water Depth Results” for details.

Examining the Relative Water Depth Results


ENVI loads a single display group with a natural color composite. This is the
reference image.
1. To change the reference image to a false-color composite or to water
reflectance, select the appropriate choice in the Reference Image drop-down
list, then click Load.
2. To change the source of the Bathymetry data used to display water depths,
select an item from the Bathymetry Source drop-down list. This list contains
either or both of the log ratio transform results and the Principal Component
bands, depending on what was processed.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 621

3. To load a water depth image with a color table applied, select the Color Table
tab. See “Color Table” on page 621 for details.
4. To load a density sliced image with the default parameters, select the Density
Slice tab. A new display group opens with the density sliced image. The new
display group is dynamically linked to the reference image display group. See
“Density Slice” on page 623 for details about the density slice settings.
5. Use Auto-Flicker to examine your results (for detailed information on using
this tool, see “Auto-Flicker” on page 585).
6. When you are finished examining results, click Next in the Examine Results
panel, then click Finish to exit the Wizard.
Color Table
1. Select a color table from the Color Tables list, then click Apply Color Table.
A new display group opens with the colorized image. The new display group is
dynamically linked to the reference image display group.
2. To preview new color tables, select the desired color table in the list, then click
Apply Color Table.
3. Use the Stretch Bottom and Stretch Top slider bars to change the way the
color table is applied. See Figure 7-14 for an example. Move the slider bar
positions to reverse the color table order if needed.

ENVI User’s Guide SPEAR Tools


622 Chapter 7: Spectral Tools

Figure 7-14: Changing Color Table Appearance with Slider Bars (Imagery
Courtesy of DigitalGlobe)

4. To save the displayed color table image to a graphics file suitable for use in a
briefing or report, click Save to File. The Output Display to Image File dialog
appears. See “Saving to Image Files” on page 18 for details.
5. To create an output file showing the applied color table overlaid on the
reference image, click Create Overlay Mosaic. Non-water pixels (black in the
color table image) are transparent, allowing the underlying reference image to
show through. ENVI prompts you to select an output filename, then adds the
mosaic to the Available Bands List.
6. To export the overlay mosaic to a graphics file suitable for use in a report or
brief, load the image into a display group, then select File → Save Image
As → Image File. The Output Display to Image File dialog appears. See
“Saving to Image Files” on page 18 for details.
7. To export the overlay mosaic to a geodatabase, click Export Mosaic to
ArcGIS Geodatabase. This button appears below the color table list. The
Select Output Geodatabase dialog appears. See “Selecting an Output
Geodatabase” on page 226 for further instructions.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 623

Figure 7-15: Overlay Mosaic (Imagery Courtesy of DigitalGlobe)

Density Slice
1. Select the Base Image to use from the drop-down list, then click Load Image.
A new display group opens with the density slice, dynamically linked to the
base image type you selected.
2. There are four display ranges available for use. Default depth ranges are
general rules of thumb that apply in many, but not all, cases. Adjust the ranges
to suit your particular data by entering new values or using the up/down
arrows. The ranges are as follows:
• Very Shallow
• Shallow
• Moderate
• Deep
The numbers shown for each range indicate the bottom depth threshold. For
example, the default for Shallow are pixels with a depth between 3.0 and 10.0
meters when calibration to absolute depths is performed.
The default ranges differ depending on whether or not the Bathymetry was
calibrated to absolute depths. If the depths are relative, the results range from 0
to 1. Otherwise, the results range between whatever the calibrated depths are.
3. Adjust the color for each range by right-clicking on the color box and selecting
a new color.

ENVI User’s Guide SPEAR Tools


624 Chapter 7: Spectral Tools

4. To turn off a range to show the Base Image beneath it, clear the On/Off check
box for that particular range.

Figure 7-16: Natural Color Reference Image (left), Density Sliced Image (center), with
corresponding parameters (right) (Imagery Courtesy of DigitalGlobe)

5. To restore the Density Slice parameters to their original state, click Restore
Defaults in the Examine Results panel.
6. To save the density slice image to a graphics file suitable for use in a briefing
or report, click Save to File in the Examine Results panel. The Output Display
to Image File dialog appears. See “Saving to Image Files” on page 18 for
details. Density slices may be exported to shapefiles or regions of interest
(ROIs) by clicking the buttons provided.

Spectral Analogues
The Spectral Analogues tool maps the occurrence throughout an image of some
desired material. Spectral Analogues uses spectral matching algorithms that compare
the spectrum of each pixel to the mean spectrum of user-specified training pixels. You
must know at least one location in the image where the desired material exists,
usually through visual observation or prior knowledge, so that it can be used for
training. The Spectral Analogues tool is designed for use with multispectral data.
1. From the ENVI main menu bar, select Spectral → SPEAR Tools → Spectral
Analogues. The ENVI Spectral Analogues Wizard displays the File Selection
panel.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 625

2. Click Select Input File, choose a file, then click OK. The input image should
be a multispectral file in any format readable by ENVI.
3. To optionally process only a portion of the scene, click Select Subset. A small
Select Spatial Subset dialog appears.
4. Click Spatial Subset. The standard Select Spatial Subset dialog appears. See
“Spatial Subsetting” on page 215. When finished, click OK to return to the
File Selection panel.
5. By default, output files are saved to the same directory and use the same
rootname as the input file, minus any extension. Output files are appended with
a unique suffix. To change the directory and/or root filename, click Select
Output Root Name.
6. Click Next. The Atmospheric Correction panel appears.
7. Use the steps in “SPEAR Atmospheric Correction” on page 598 to perform
atmospheric correction. Dark object subtraction provides good results with
minimal user input.
8. When atmospheric correction is complete, click Next. A natural color
composite image is loaded into a display group, the ROI dialog appears, and
the Select Training Pixels SPEAR dialog appears.
9. Use the ROI Tools dialog to add pixels to the ROIs. See “Defining ROIs” on
page 323 for details. You can create new ROIs as needed through the ROI Tool
dialog, and populate them with pixels that represent some other class. Choose
multiple pixels for each ROI to represent variability within that type.
10. Click Next. The ROI Selection dialog appears.
11. Select one or more ROIs to map, then click OK. The Spectral Processing panel
appears.
12. Select one or more Spectral Processing Parameters:
• Spectral Angle Mapper: “Applying Spectral Angle Mapper
Classification” on page 412 describes the SAM classification method.
• Matched Filter: “Using Matched Filtering” on page 776 describes the MF
classification method.
• MF/SAM Ratio: Suppresses false positives that may be present in one
method, but not the other, while enhancing true positives. For example, a
pixel containing water has a high MF value and low SAM value. A high
value divided by a low value results in a very large value, therefore
enhancing the positive result. Conversely, if the MF product has a high

ENVI User’s Guide SPEAR Tools


626 Chapter 7: Spectral Tools

value for a false positive, but the SAM correctly maps it as non-water so it
has a high value, the high value divided by high value results in a smaller
value, suppressing the false positive.
• Normalized Euclidean Distance: Calculates the distance between two
vectors in the same manner as Euclidean Distance, but normalizes the
vectors first. Normalization is performed by dividing each vector by its
mean.
Note
You cannot disable the Spectral Angle Mapper and Matched Filter options
when MF/SAM Ratio is enabled.

13. Click Next. The Examine Results panel appears.


14. Select the image within the processing method to display from the Examine
Result for drop-down list. For example, if four different ROIs were used as
input for spectral processing, the list contains four separate rule images.
15. Click Load image type to load the image. The following appear:
• One display group contains a natural color composite of the input image,
to use as reference.
• One display group contains the selected spectral processing result. This
display group is dynamically linked to the natural color display group. Use
the dynamic overlay tool to see how the spectral processing result relates
to the natural color reference image.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 627

• A histogram window appears for the spectral processing result display


group to allow for adjusting the stretch to highlight positive matches. For
MF/SAM Ratio and MF results, positive matches are always bright. For
SAM, positive matches are dark. For Normalized Euclidean Distance,
bright pixels indicate better matches.
16. When you are finished examining results, click Next in the Examine Results
panel, then click Finish to exit the Wizard.

Figure 7-17: Unstretched Rule Image (left), Stretched Rule Image (right) for
SAM Results Highlighting Aircraft and Spectrally Similar Materials

ENVI User’s Guide SPEAR Tools


628 Chapter 7: Spectral Tools

TERCAT
The Terrain Categorization (TERCAT) tool creates an output product in which pixels
with similar spectral properties are clumped into classes. These classes may be either
user-defined, or automatically generated by the classification algorithm. The
TERCAT tool provides all of the standard ENVI classification algorithms, plus an
additional algorithm called Winner Takes All.
1. From the ENVI main menu bar, select Spectral → SPEAR Tools →
TERCAT. The ENVI TERCAT Wizard displays the File Selection panel.
2. Click Select Input File, choose a file, then click OK. The input image should
be a multispectral file in any format readable by ENVI.
3. To optionally process only a portion of the scene, click Select Subset. A small
Select Spatial Subset dialog appears.
4. Click Spatial Subset. The standard Select Spatial Subset dialog appears. See
“Spatial Subsetting” on page 215. When finished, click OK to return to the
File Selection panel.
5. By default, output files are saved to the same directory and use the same
rootname as the input file, minus any extension. Output files are appended with
a unique suffix. To change the directory and/or root filename, click Select
Output Root Name.
6. Click Next. The Atmospheric Correction panel appears.
7. Use the steps in “SPEAR Atmospheric Correction” on page 598 to perform
atmospheric correction.
8. When atmospheric correction is complete, click Next. The Method Selection
panel appears.
9. Select the classification methods to use:
• Unsupervised: These methods do not require training data to create a
TERCAT, though the classes will not be labelled. “Unsupervised
Classification” on page 425 provides descriptions for each method.
• Supervised: These methods require you to train the algorithms by creating
ROIs that include representative pixels of the desired classes. “Supervised
Classification” on page 401 provides descriptions for each method. The
Winner Takes All (TERCAT) classification method classifies each pixel
to the most commonly occurring class for all supervised methods
performed. You must select at least two other supervised methods to run
Winner Takes All.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 629

10. When method selection is complete, click Next. The Select Training Pixels
panel appears.
• If you selected any supervised classification methods, a natural color
composite image is loaded into a display group, and the ROI dialog
appears.
• If you selected only unsupervised classification methods, you do not need
to select training pixels. Click Next to go to the TERCAT Parameters panel
(step 13).
11. For supervised classification, use the ROI Tools dialog to add pixels to the
ROI. See “Defining ROIs” on page 323 for details. Create a new ROI for each
class to map. Try to collect training pixels uniformly across the image. Give
the ROIs descriptive names and representative colors to make them easy to
identify.
12. For supervised classification, click Next. The ROI Selection dialog appears.
Select one or more ROIs to map, then click OK. The TERCAT Parameters
panel appears.
13. Each TERCAT method has its own set of advanced parameters that you can
adjust, to change the way to run the algorithm. To view the advanced
parameters, click Show Advanced Options, then click on the desired tab. In
most cases, using the default values produces satisfactory results. For more
information on the parameters, refer to “Classification Tools” on page 399 for
the TERCAT classification method of interest.
For Winner Takes All, you can apply a weighting to each selected supervised
classification method g. By default, each method is set to 1.0 which means
each method is treated equally. Optionally, adjust the weights so that favored
algorithms have larger values.
14. To save the rule images created during TERCAT processing, select the Output
rule Images? check box available when you show the advanced parameters.
The rule images are opened in the Available Bands Lists before processing, but
are not used again by the Wizard.
15. Click Next. The Examine Results panel appears. See “Examining the
TERCAT Results” on page 629 for details.
16. When you are finished examining results, click Next in the Examine Results
panel, then click Finish to exit the Wizard.

Examining the TERCAT Results


After processing is complete, two dynamically linked display groups appear:

ENVI User’s Guide SPEAR Tools


630 Chapter 7: Spectral Tools

• One display group contains the reference image.


• One display group contains the TERCAT results.
Change the image loaded in each display group by selecting a new image from the
Reference Display and Results Display #1 drop-down lists. You can also load a third
dynamically linked image into a display group for comparison by selecting an image
from the Results Display #2 drop-down list.

Figure 7-18: Reference Image (left) and Two Results Display Groups (center and
right) for comparison of Results (Imagery Courtesy of DigitalGlobe)

The Winner Takes All result is determined by choosing the class for each pixel by the
majority vote of all supervised TERCAT methods you chose to run. For example, if
three TERCATs determined a pixel was asphalt and two determined it was concrete,
the Winner Takes All result is asphalt. In the case of a tie, the majority class of the
neighboring pixels are used to classify the pixel in question.
In addition to the TERCAT product, ENVI creates a Winner Takes All (Probability)
layer. This layer indicates the level of confidence for each pixel’s classification. In
asphalt/concrete example, the probability would be:
3 -⎞
⎛ -----------
⎝ 3 + 2⎠ = 0.6

The probability for a pixel in which all TERCATs agreed would be 1.0. Therefore,
brighter pixels in the probability layer indicate high confidence, and dark pixels
indicate low confidence. If many low confidence pixels remain, you could select

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 631

more training pixels to better represent the low confidence land cover, and you could
additionally add a new land cover class.

Figure 7-19: Reference Image (left), Winner Takes All (TERCAT) (center), and
Winner Takes All (Probability) (right) (Imagery Courtesy of DigitalGlobe)

Post-classification processing techniques in ENVI are available directly from the


Examine Results panel.
1. From the TERCATs to process list, select the TERCAT(s) on which to
perform the desired processing.
2. In the Classes to process list, select the class(es) on which to perform the
desired processing.
3. Select the Processing to perform from the drop-down list. Depending on the
method you choose, parameters may appear in the area below the Processing
to perform drop-down list. The following are available:
• Majority Analysis: “Majority/Minority Analysis” on page 481 describes
this process. Set the Kernel Size parameter. Larger kernels result in
“cleaner” results, though will remove small, legitimate classes. The
majority results are appended to the lists in the Display Results section.
• Clump Classes: “Clumping Classes” on page 482 describes this process.
Set the Operator Size. The clumping results are appended to the lists in
the Display Results section.

ENVI User’s Guide SPEAR Tools


632 Chapter 7: Spectral Tools

• Sieve Classes: “Sieving Classes” on page 483 describes this process. Set
the Group Min Threshold value to the maximum sized cluster to sieve
from the results. The Number of Neighbors value indicates the type of
neighborhood examined for determining clusters. Sieved pixels are
assigned to the Unclassified class. The sieving results are appended to the
lists in the Display Results section.
• Class Statistics: “Statistics” on page 274 describes this process. This
method creates a report that shows general statistics about the selected
TERCAT(s) and classes, including mean spectra, area covered, and so
forth.
• Class Overlay: “Overlaying Classes” on page 485 describes this process.
The new image is loaded into a new display group.
4. Click Go to begin processing.

Figure 7-20: Examples of Different Post-classification Filtering Options using


Default Parameters

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 633

Figure 7-21: Class Statistics Dialog Showing Mean Spectrum for Each Class
and General Statistical Information, Such as Area Covered by Each Class

ENVI User’s Guide SPEAR Tools


634 Chapter 7: Spectral Tools

Figure 7-22: Example Class Overlay Image with Trees, Roads, and Reservoir
Class Overlaid on Natural Color Reference Image (Imagery Courtesy of
DigitalGlobe)

SPEAR Vegetation Delineation


The Vegetation Delineation tool enables you to quickly identify the presence of
vegetation and to visualize its level of vigor. The Wizard also provides tools to
facilitate creating graphics for use within reports and briefings.
The Vegetation Delineation tool is intended for multispectral data. If you have
hyperspectral data, use the tools described in “Vegetation Analysis” on page 799.
1. From the ENVI main menu bar, select Spectral → SPEAR Tools →
Vegetation Delineation. The ENVI Vegetation Delineation Wizard displays
the File Selection panel.
2. Click Select Input File, choose a file, then click OK. The input image should
be a multispectral file in any format readable by ENVI.
3. To optionally process only a portion of the scene, click Select Subset. A small
Select Spatial Subset dialog appears.
4. Click Spatial Subset. The standard Select Spatial Subset dialog appears. See
“Spatial Subsetting” on page 215.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 635

5. By default, output files are saved to the same directory and use the same
rootname as the input file, minus any extension. Output files are appended with
a unique suffix. To change the directory and/or root filename, click Select
Output Root Name.
6. Click Next. The Atmospheric Correction panel appears.
7. Use the steps in “SPEAR Atmospheric Correction” on page 598 to perform
atmospheric correction. Dark object subtraction produces good results with
minimal user input.
8. When atmospheric correction is complete, click Next. The Examine Results
panel appears. See “Examining the Vegetation Delineation Results” for details.
9. When you are finished examining results, click Next in the Examine Results
panel, then click Finish to exit the Wizard.

Examining the Vegetation Delineation Results


ENVI loads a single display group with a natural color composite. This is the
reference image.
1. To change the reference image to a false color composite, select the
appropriate choice from the Reference Image drop-down list, then click
Load.
2. Optionally, use Auto-Flicker to examine your results (for detailed information
on using this tool, see “Auto-Flicker” on page 585)
3. To load a vegetation image with a color table applied, select the Color Table
tab. See “Color Table” for details.
4. To load a density sliced image with the default parameters, select the Density
Slice tab. A new display group opens with the density sliced image. The new
display group is dynamically linked to the reference image display group. See
“Density Slice” on page 638 for details about the density slice settings.
5. When you are finished examining results, click Next in the Examine Results
panel, then click Finish to exit the Wizard.
Color Table
1. Select a color table from the Color Tables list, then click Apply Color Table.
A new display group opens with the colorized image. The new display group is
dynamically linked to the reference image display group.
2. To preview new color tables, select the desired color table in the list, then click
Apply Color Table.

ENVI User’s Guide SPEAR Tools


636 Chapter 7: Spectral Tools

3. Use the Stretch Bottom and Stretch Top slider bars to change the way the
color table is applied. See Figure 7-23 for an example. Move the slider bar
positions to reverse the color table order if needed.

Figure 7-23: Changing Color Table Appearance with Slider Bars (Imagery
Courtesy of DigitalGlobe)

4. To save the displayed color table image to a graphics file suitable for use in a
briefing or report, click Save to File. The Output Display to Image File dialog
appears. See “Saving to Image Files” on page 18 for details.
5. Pixels with no vegetation are masked using the Veg Mask parameter so that
analysis is focused on vegetated pixels. Change the Veg Mask threshold if
needed. Higher values mask more pixels, lower values mask fewer pixels. You
can change the color of the mask by right-clicking the color patch and
selecting a new color. Turn off the mask by clearing the On/Off check box.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 637

Figure 7-24: Example of Adjusting Vegetation Mask by Changing the Veg Mask
Threshold (Imagery Courtesy of DigitalGlobe)

6. To create an output file showing the applied color table overlaid on the
reference image, click Create Overlay Mosaic. Pixels masked out with the
Veg Mask parameter are transparent, allowing the underlying reference image
to show through. ENVI prompts you to select an output filename, then adds the
mosaic to the Available Bands List.
7. To export the overlay mosaic to a graphics file suitable for use in a report or
brief, load the image into a display group, then select File → Save Image
As → Image File. The Output Display to Image File dialog appears. See
“Saving to Image Files” on page 18 for details.

ENVI User’s Guide SPEAR Tools


638 Chapter 7: Spectral Tools

Figure 7-25: Overlay Mosaic (Imagery Courtesy of DigitalGlobe)

Density Slice
1. Select the Base Image to use from the drop-down list, then click Load Image.
A new display group opens with the density slice, dynamically linked to the
base image type you selected.
2. There are four display ranges available for use. The default NDVI ranges are
general rules of thumb that apply in many, but not all cases. Adjust the ranges
to suit your particular data by entering new values or using the up/down
arrows. The ranges are as follows:
• No Veg
• Sparse Veg
• Moderate Veg
• Dense Veg
The numbers displayed for each range indicate the bottom NDVI threshold.
For example, the default for No Veg are pixels with an NDVI value falling
between -1.0 and 0.249.
The Normalized Difference Vegetation Index (NDVI) generates an image that
ranges from -1.0 to 1.0. Pixels with no vegetation tend towards -1.0, while
pixels with vigorous vegetation tend towards 1.0.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 639

3. Adjust the color for each range by right-clicking on the color box and selecting
a new color.
4. To turn off a range to show the Base Image beneath it, clear the On/Off check
box for that particular range.

Figure 7-26: Density Sliced Image (left) with Corresponding Parameters (right)
with No Veg range Turned Off to Display the Base Image (Natural Color)
Beneath (Imagery Courtesy of DigitalGlobe)

5. To restore the Density Slice parameters to their original state, click Restore
Defaults in the Examine Results panel.
6. To save the density slice image to a graphics file suitable for use in a briefing
or report, click Save to File in the Examine Results panel. The Output Display
to Image File dialog appears. See “Saving to Image Files” on page 18 for
details.

Vertical Stripe Removal


Images in homogeneous areas may display vertical striping artifacts where pixel
brightness varies relative to other nearby pixels. The striping artifacts make images
difficult to visualize, and they may negatively impact image processing algorithms.

ENVI User’s Guide SPEAR Tools


640 Chapter 7: Spectral Tools

The SPEAR Vertical Stripe Removal tool is best used when the image background is
relatively homogenous (consistent brightness level throughout image). Because it can
cause artifacts, using this tool on heterogeneous images (like coastal images
containing bright land and dark water) is not recommended.
1. From the ENVI main menu bar, select Spectral → SPEAR Tools → Vertical
Stripe Removal. The Vertical Stripe Removal Wizard displays the File
Selection panel.
2. Click Select Input File, choose a file, then click OK. The input image should
be a multispectral file in any format readable by ENVI. EO and thermal-
infrared files may also be used.
3. To optionally process only a portion of the scene, click Select Subset. A small
Select Spatial Subset dialog appears.
4. Click Spatial Subset. The standard Select Spatial Subset dialog appears. See
“Spatial Subsetting” on page 215. When finished, click OK to return to the
File Selection panel.
5. By default, output files are saved to the same directory and use the same
rootname as the input file, minus any extension. Output files are appended with
a unique suffix. To change the directory and/or root filename, click Select
Output Root Name.
6. Click Next. The Create Mask dialog appears.
7. Apply an optional mask to the data by clicking Input Band and selecting the
desired mask image. For details on mask selection, see “Masking” on
page 224.
The darkest and brightest 5% of the image will be masked by default. Dark
pixels are displayed as blue, and bright pixels as red. Modify the red and blue
percentages to include more or fewer pixels in the mask.
Right-click on the red or blue color boxes to change the colors used to
represent the dark and bright pixels. To remove the highlighted pixels from the
display, disable the Show checkboxes. The highlighted pixels will not be
displayed, but will be available for statistical calculations.
8.Click Next. The Examine Results dialog appears.
The original image and the image with vertical striping removed are opened in
the display and are dynamically linked for comparison. Use Auto-Flicker to
examine your results (for detailed information on using this tool, see “Auto-
Flicker” on page 585).

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 641

9. When you are finished examining your results, click Next in the Examine
Results panel, then click Finish to exit the Wizard.

Watercraft Finder
The Watercraft Finder tool streamlines processing to detect the presence of moving or
non-moving watercraft in open water environments using high-resolution
multispectral data. While the tool is also applicable for detecting watercraft in littoral
zones, the false positive rate will be elevated.
The premise of the tool is that watercraft, which reflect in the near infrared
wavelengths, will appear as anomalous clusters of pixels in near infrared absorbing
water. Several algorithms within the tool make use of this premise to aid you in
rapidly detecting watercraft. The algorithms ENVI uses depend upon which of the
following two processing workflows you choose:
• Use the texture-based processing workflow to work on all pixels in the scene
simultaneously, using the fact that the desired watercraft will occur as isolated
clusters of anomalous pixels in an otherwise uniform background (this is the
expected “texture” of the results). This is typically the most appropriate
workflow to use.
• Use the two-dimensional scatterplot workflow to operate only on the area of
the image currently visible in the Image window to manually select pixels for
occurrence of watercraft. This workflow is not efficient for exploitation of
large areas; use it instead for analysis of small areas or exploratory analysis of
larger areas.

Running the Watercraft Finder Wizard


1. From the ENVI main menu bar, select Spectral → SPEAR Tools →
Watercraft Finder. The SPEAR Watercraft Finder Wizard displays the File
Selection panel.
2. By default, output files are saved to the same directory and use the same
rootname as the input file, minus any extension. Output files are appended with
a unique suffix. To change the directory and/or root filename, click Select
Output Root Name.
3. If you are processing only a portion of the scene, or if the scene contains areas
of land or dense clouds, click Create New AOI. The ROI Tool dialog appears.
4. Use the ROI Tool (described in “Defining ROIs” on page 323) to create a
polygon containing the portion of the image to process. Create an ROI that
contains only open water. Any land surfaces or dense clouds remaining inside

ENVI User’s Guide SPEAR Tools


642 Chapter 7: Spectral Tools

the ROI could lead to false positives. Much like watercraft, the clouds and land
surfaces are relatively reflective in the near infrared wavelengths.
5. Click Select Area of Interest to select the ROI containing the polygon you just
created. The AOI Selection dialog appears.
6. Select the ROI to use, then click OK.
7. In the File Selection panel, click Next. The Method Selection panel appears.
8. Select one of the following methods, then click Next:
• Texture Based Search. See “Texture Based Search” on page 645 for
steps.
• Two Band Scatterplot. See “Two Band Scatterplot” on page 649 for
steps.
9. Your results may still contain false positives after filtering if the false positives
are about the same size as watercraft, or if you did not perform filtering.
Optionally, click Display Eraser ROI.
10. The result loads into a new display group, and the ROI Tool dialog appears
with an Eraser ROI entry.
11. Select the Eraser ROI to make it active, then use standard ROI drawing
methods (described in “Defining ROIs” on page 323) to cover over any
observed false positives.
12. Click Next. The Eraser ROI Selection dialog displays.
13. Select the Eraser ROI to use, then click OK to remove the false positives from
the results. The Export Vectors panel appears.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 643

Figure 7-27: Drawing Polygons to Cover False Positives to Remove from the Results
(right) (Imagery Courtesy of DigitalGlobe)

Figure 7-28: Designated False Positives No Longer Present After Applying


Eraser ROI (right) (Imagery Courtesy of DigitalGlobe)

14. Optionally, select vector layers to export to separate files from the Vector
Output list. The vectors you digitized are stored in separate files in ENVI
vector file (.evf) format. These vectors remain in the projection and datum of
the input image. Each exported vector will result in the following files being
created:
• ENVI vector file (.evf) in the native image projection

ENVI User’s Guide SPEAR Tools


644 Chapter 7: Spectral Tools

• ENVI vector file (.evf) in Geographic/WGS84 projection


• Shapefile (.shp) in Geographic/WGS84 projection
• Keyhole markup language file (.kml) in Geographic/WGS84 projection
for use in Google Earth
15. Click Export Selected Layer(s). By default, output files are saved to the same
directory and use the same rootname as the input file, minus any extension.
Output files are appended with a unique suffix. Separate files are written for
the Water LOC layer, plus any layers you created or imported.
16. Optionally, enable the Export result to ArcGIS Geodatabase option to save
vector results to a geodatabase. See “Selecting an Output Geodatabase” on
page 226 for further instructions.

Figure 7-29: Input Image with Detected Watercraft Overlaid (Imagery Courtesy
of DigitalGlobe)

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 645

Figure 7-30: Full Resolution Image with Detected Watercraft Overlaid (Imagery
Courtesy of DigitalGlobe)

17. When you are finished examining results, click Finish in the Processing
Complete panel to exit the Wizard.
Texture Based Search
1. When you select Texture Based Search, then click Next in the Method
Selection panel. The Processing Method panel appears.
2. Select one of the following:
• Perform PCA processing: “Principal Component Analysis” on page 504
describes the PCA transform. In this case, it creates a new dataset in which
the watercraft stand out from the water more than in the original dataset,

ENVI User’s Guide SPEAR Tools


646 Chapter 7: Spectral Tools

therefore leading to fewer false positives. Performing PCA over very dark
areas, such as open water, often enhances the noise, which may also lead to
false positives.
• Skip PCA processing: Because the contrast between watercraft and water
is typically fairly high in the original image, the default is not to use PCA.
Change this option if you find that the variance in the result within the
image was not sufficient to accurately detect watercraft without numerous
false positives.
3. Click Next. The Texture Processing panel appears. If you selected to perform
PCA processing, ENVI performs the processing.
4. Select the image band to use for texture processing.
• If PCA processing was not performed, select the NIR band (frequently
Band 4), as this band has the best contrast between watercraft and water.
• If PCA was performed, select the PCA band that shows the best contrast
between watercraft and water. This is typically PCA Band 2, but may
depend on the content of the scene.
5. Select one of the following texture measure types:
• Data Range (typically the best choice)
• Variance
6. Click Create and Display Texture Image to create the texture image and to
load it into a new display group. A histogram window also appears.
7. Optionally, select a threshold to detect watercraft. The threshold should be set
low enough to minimize false positives without omitting real watercraft. Click
on the dotted bar in the histogram window or enter values in the fields at the
top of the histogram window to explore different thresholding options. When
you are satisfied with the threshold, click Retrieve Value in the Texture
Processing panel to register the selected threshold. Use Auto-Flicker to
examine your results (for detailed information on using this tool, see “Auto-
Flicker” on page 585).

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 647

Figure 7-31: Thresholding Set to Eliminate Noise, but Watercraft Remain (Imagery
Courtesy of DigitalGlobe)

ENVI User’s Guide SPEAR Tools


648 Chapter 7: Spectral Tools

Figure 7-32: Land and Cloud Areas Remaining in ROI, Highlighted in Texture
Image (Imagery Courtesy of DigitalGlobe)

8. Click Next. The Filter Results panel appears.


9. Your results may have false positives due to the presence of land, clouds, or
some other reason. These false positives are often smaller or larger than typical
watercraft. For instance, noise frequently occurs as single pixels or small
clusters of pixels. Conversely, false positives such as land and clouds are often
much larger than watercraft, occurring in clusters with thousands of pixels. Set
the Min blob size and Max blob size to values corresponding to the smallest
and largest cluster sizes you would expect for watercraft. Ensure that the value
ranges are sufficient enough that watercraft are not accidentally filtered out. To
skip filtering, disable the Filter results check box.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 649

Figure 7-33: Results Before Filtering (center), and After Filtering (right); some
false positives remain (Imagery Courtesy of DigitalGlobe)

10. Click Next. The Edit Results panel appears. See step 9 in “Running the
Watercraft Finder Wizard” on page 641 for details.
Two Band Scatterplot
1. When you select Two Band Scatterplot, then click Next in the Method
Selection panel, the 2-D Scatterplot panel appears.
2. Scatterplots plotting the near infrared band versus the red band are normally
the most effective for detecting watercraft. This is the default selection. To
change the bands to plot, click Show Band Selection and select the bands.
3. Click Load Scatterplot to load the image to a display group and to show the
scatterplot. The water pixels dominating the image in the display group form a
dense cloud of points in the lower left quadrant of the scatterplot. If any
watercraft (or other near infrared reflecting objects) are present, data points
extend upwards and to the right of the data cloud.
4. To select data points, click and drag a circle around them in the scatterplot.
Right-click to close the circle and register the points. The circled points in the
scatterplot and their corresponding pixels in the display group turn red.

ENVI User’s Guide SPEAR Tools


650 Chapter 7: Spectral Tools

5. Continue selecting points in the scatterplot until the entire watercraft is


highlighted. To clear selected points, right-click in the scatterplot and select
Clear Class. To register the highlighted points, right-click in the scatterplot
and select Export Class. Otherwise, the selected points are lost when the
image display is moved.
6. Because scatterplots only work on the portion of the image currently
displayed, you must repeat the above process for every part of the image where
you desire watercraft detection.
Tip
To simplify the process, enlarge the Image window as much as possible
(while keeping the scatterplot window visible), and use the scroll bars on the
Image window to increment one image width at a time. If the Image window
does not have scroll bars, right-click in the display, and select Toggle Display
Scroll Bars.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 651

Figure 7-34: Scatterplot of Water with No Watercraft (left), Scatterplot with


Watercraft (Imagery Courtesy of DigitalGlobe)

7. To select a watercraft, circle the extension of data points, right-click, and select
Export Class. Repeat this process for each portion of the image as it is viewed
at full resolution in the Image window.

ENVI User’s Guide SPEAR Tools


652 Chapter 7: Spectral Tools

Figure 7-35: Selecting the Entire Extension in the Scatterplot Highlights the
Entire Watercraft (right) (Imagery Courtesy of DigitalGlobe)

8. When all the watercraft are selected, click Next. The ROI Selection dialog
appears.
9. Select all the ROIs that were exported during the previous steps, then click
OK. SPEAR combines the results into a single layer. The Edit Results panel
appears. See step 9 in “Running the Watercraft Finder Wizard” on page 641 for
details.

SPEAR Tools ENVI User’s Guide


Chapter 7: Spectral Tools 653

THOR Workflows
The Tactical Hyperspectral Operations Resource (THOR) workflows are designed to
process hyperspectral imagery. The following workflows are available:
• THOR Anomaly Detection
• THOR Atmospheric Correction
• THOR Change Detection
• THOR LOCs - Water and Trails
• THOR Stressed Vegetation
• THOR Target Detection
Each workflow uses a different combination of shared tools, referred to as panels.
Each panel includes basic instructions, which you can show or hide by using the
arrow button on the right side of the dialog. A Show informational dialogs between
steps check box is located on the bottom of some panels. By default, this check box is
not enabled. To proceed to the next step in each panel, you must close the information
dialog. Click the Help button at the bottom of each panel for more detailed
information on the current workflow.
Many of the panels also invoke a separate application called the THOR Viewer,
which is a graphical user interface for viewing input imagery and reviewing target
detections. See “Using the THOR Viewer” on page 663 for more information.
Click the Next button to proceed to the next panel in a workflow.

THOR Anomaly Detection


The Anomaly Detection workflow is used to locate objects within an image that are
spectrally different from the background. THOR uses ENVI's Reed-Xiaoli (RX)
algorithm. After THOR detects the anomalies, the workflow will guide you through
reviewing each anomaly to determine whether it is of interest or not. You can attempt
to identify the anomaly by using the Material Identification tool.
For information about the RX anomaly detection algorithm, see “RX Anomaly
Detection” on page 827.
1. From the ENVI main menu bar, select Spectral → THOR Workflows →
Anomaly Detection. The THOR Anomaly Detection dialog appears.
2. Select an input file. See “File Selection” on page 671.

ENVI User’s Guide THOR Workflows


654 Chapter 7: Spectral Tools

3. Perform atmospheric correction. See “THOR Atmospheric Correction” on


page 654.
4. Reduce dataset dimensionality and select bands. See “Dimensionality
Reduction and Band Selection” on page 685.
5. When the Anomaly Methods panel appears, select the RX (Reed Xiaoli)
detection algorithm.
6. Perform rule thresholding. See “Rule Thresholding” on page 705.
7. Perform spatial filtering. See “Spatial Filtering” on page 708.
8. Review the detections. See “Review Detections” on page 711.
9. Export targets. See “Export Targets” on page 721.

THOR Atmospheric Correction


Use the Atmospheric Correction workflow to correct hyperspectral imagery for
atmospheric effects. Atmospheric correction is essential for hyperspectral image
processing when you want to detect the presence of targets using a reference spectral
library (spectral libraries are nearly always in units of reflectance). Atmospheric
correction also provides limited benefits when using in-scene derived signatures for
target detection.
Atmospheric correction methods available in THOR include Flat Field calibration,
Internal Average Relative Reflectance (IARR), Log Residuals, Empirical Line
calibration, FLAASH (if licensed), and QUAC (if licensed). Dark object subtraction
is available as a pre-processing step for Flat Field, IARR, and Log Residuals. (To use
FLAASH and QUAC methods, you must purchase a separate license for the
Atmospheric Correction Module: QUAC and FLAASH.)
The best method to use depends on your skill level, scene content, desired
application, and available ancillary data. When using a spectral library to detect
targets, a rigorous, model-based solution (such as QUAC or FLAASH) is normally
best. When using in-scene signatures, an in-scene based correction method is
sufficient (if needed at all). The IARR method, pre-processed with dark object
subtraction, is the simplest method because it requires no user input and often
produces good results.

Starting Atmospheric Correction


1. From the ENVI main menu bar, select Spectral → THOR Workflows →
Atmospheric Correction. The Atmospheric Correction dialog appears.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 655

Note
Atmospheric Correction is also available as a panel in many workflows, in
addition to being available as a stand-alone tool.

THOR extracts a rough estimate of the image’s mean spectrum and compares it
to a generalized radiance spectrum using Spectral Angle Mapper (SAM) to
determine whether the input image is radiance or reflectance. If THOR
determines that the input is reflectance, it automatically selects None /
Already corrected as the correction method and warns you if you try to apply
a correction method. However, the initial screening is only an estimate, so you
can still proceed with an atmospheric correction method if needed.
2. Select a method from the Atmospheric Correction Method drop-down list,
and specify the required parameters (described in the following sections). Then
click the green Run Process button. You cannot proceed to the next step until
you run at least one correction method or select the None / Already corrected
option.
3. You can also run more than one correction method and compare the results
side-by-side. Click Compare Results, select which methods to compare, then
click OK. ENVI opens the resulting images from each correction method into
separate display groups, with the displays linked and Z-profiles displayed.

Dark Object Subtraction


This method is available as a pre-processing step for several of the in-scene based
atmospheric correction methods. Dark object subtraction searches each band for the
darkest pixel value. Assuming that dark objects reflect no light, any value greater than
zero must result from atmospheric scattering. ENVI removes the scattering by
subtracting this value from every pixel in the band. This simple technique is effective
for haze correction and normally produces improved results for in-scene atmospheric
correction in the shorter wavelengths where scattering dominates.
To perform dark object subtraction as a pre-processing step, refer to the Atmospheric
Correction Parameters section near the bottom of the Atmospheric Correction dialog:
1. Select the Perform dark object subtraction option, if available for your
correction method.
2. Select the radio button to have the dark objects determined by Band
Minimums or by User Values.
• Band Minimums: Indicate whether ENVI should search for the dark
objects in the entire scene or just the subsetted area. Searching the entire
image may take longer, but it will yield more accurate results. If the image

ENVI User’s Guide THOR Workflows


656 Chapter 7: Spectral Tools

contains black background pixels (for example, in a warped image), enter


these pixel values in the Data ignore value field and check the Use ignore
data value option.
• User Values: Click the Edit Values button. The Enter User Values dialog
appears. Enter pixel values to be subtracted from each band, then click
OK.

Flat Field Calibration


Flat Field calibration produces relative reflectance by dividing the mean spectrum of
a user-defined region of interest (ROI) into the spectrum of each pixel in the image.
The ROI should be a spectrally flat material within the wavelength range of the
sensor. Beach sand and concrete are popular choices. Materials with spectral features
such as vegetation are poor choices. Since the mean spectrum of the ROI is divided
into each pixel, the relative reflectance for pixels within the ROI will be flat and have
a value around 1.0.
To perform Flat Field calibration:
1. From the Atmospheric Correction drop-down list, select Flat Field
Calibration.
2. Click Create Flat Field ROI. A display group appears with a greyscale
(single-band) version of the input image, along with the ROI Tool dialog.
3. Use the ROI Tool dialog to define an ROI for a spectrally flat area, as described
in “Drawing ROIs” on page 323.
4. Click Choose Flat Field ROI. The ROI Selection dialog appears.
5. Select the Flat Field ROI that you just defined, and click OK.
6. Click Run Process.

Internal Average Relative Reflectance


The IARR method is similar to Flat Field calibration in that a reference spectrum is
divided into each pixel in the image to generate relative reflectance. However, the
reflectance spectrum for IARR is the mean spectrum of the entire image versus a
user-defined ROI. IARR requires no input from you.
1. From the Atmospheric Correction Method drop-down list, select Internal
Average Relative Reflectance.
2. Click Run Process.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 657

Log Residuals
The Log Residuals method produces a pseudo reflectance dataset by dividing each
pixel’s spectrum by the spectral geometric mean and the spatial geometric mean. No
user input is required to run this method. Log residuals is usually most effective for
analyzing absorption features present in hyperspectral data.
1. From the Atmospheric Correction Method drop-down list, select Log
Residuals.
2. Click Run Process.

Empirical Line Calibration


Empirical Line calibration forces the image spectra to match reflectance spectra
collected from the field. This method can produce the most accurate results possible,
but it requires ground truth information. Empirical Line calibration in THOR requires
a dark and bright target.
1. From the Atmospheric Correction Method drop-down list, select Empirical
Line Calibration.
2. Click Load Image and Create ROIs. A display group appears with a
greyscale (single-band) version of the input image, along with the ROI Tool
dialog.
3. The ROI Tool lists Dark Target and Bright Target ROIs. First, select the Dark
Target ROI and draw a polygon in the display group inside a group of dark
pixels for which ground truth spectra are available (see “Drawing ROIs” on
page 323 for further instructions).
4. In the Atmospheric Correction panel, click Select Data ROI in the Dark
Target section. The ROI Selection dialog appears.
5. Select the Dark Target ROI, and click OK.
6. With Empirical Line calibration, you should use a custom library with spectra
collected in the field at the same time as the sensor overpass. To use a custom
spectral library, load it into the Available Bands List.
7. Click Select Library Spectrum in the Dark Target section of the Atmospheric
Correction panel.
8. Select a custom spectral library from the Available Bands List, then select a
spectrum from the Library Selection dialog. Click OK.
9. Repeat Steps 3-8 for the Bright Target ROI, using the appropriate buttons
under the Bright Target section of the Atmospheric Correction dialog.

ENVI User’s Guide THOR Workflows


658 Chapter 7: Spectral Tools

10. Click Run Process.

QUAC
The QUick Atmospheric Correction (QUAC) method is an in-scene based correction
method that can produce results as accurate as the first-principles based Fast Line-of-
sight Atmosphere Analysis of Spectral Hypercubes (FLAASH) method with no user
input. QUAC works best when the input image has a reasonably diverse set (at least
10) of endmembers. Refer to the Atmospheric Correction Module User’s Guide for
more information on QUAC. To use the QUAC method, you must purchase a separate
license for the Atmospheric Correction Module: QUAC and FLAASH.
1. From the Atmospheric Correction Method drop-down list, select QUAC.
2. From the Sensor Type drop-down list, select the sensor from which your
hyperspectral input image was captured. If you do not know the sensor, select
Unknown and QUAC will attempt to figure out the sensor based on the bands
of the input imagery.
3. Click Run Process.

FLAASH
The Fast Line-of-sight Atmosphere Analysis of Spectral Hypercubes (FLAASH)
method is a physics-based approach to atmospheric correction that utilizes various
metadata about time, location, and many other parameters to generate a radiative
transfer model using MODTRAN4. FLAASH is capable of producing extremely
accurate surface reflectance results, but it requires a lot of user input. THOR attempts
to simplify this process by filling in as many of the parameters as possible using the
input image's metadata.
1. From the Atmospheric Correction Method drop-down list, select FLAASH
(Rigorous).
2. THOR automatically populates the various parameter fields based on the
image metadata. You can edit these values as needed. Refer to the Atmospheric
Correction Module User’s Guide for more information on these parameters. To
use the FLAASH method, you must purchase a separate license for the
Atmospheric Correction Module: QUAC and FLAASH.
3. Click Run Process.

THOR Change Detection


The Change Detection workflow is used to identify features that have changed
between two images collected over the same area at different times. Input files must

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 659

have the same number of spectral bands. THOR is intended for use with
hyperspectral data, but input files are only required to have at least two bands. The
input files must at least partially cover the same area on the ground, but they do not
need to be georeferenced. The two images will be co-registered later in the Change
Detection workflow.
1. From the ENVI main menu bar, select Spectral →THOR Workflows →
Change Detection. The Change Detection dialog appears.
2. Click Select Time #1 File. A file selection dialog appears.
3. Select a multi-band image and perform optional Spatial Subsetting.
4. Click Select Time #2 File. A file selection dialog appears.
5. Select a multi-band image to be compared with the Time #1 file. The Time #1
and #2 images do not necessarily need to be in chronological order. The Time
#1 file will serve as the base image that the Time #2 image is warped to for
purposes of co-registration. The desired spatial subset for change detection is
based on the Time #1 image.
6. You can choose to process a subset of spectral bands by clicking one of the
following buttons:
• Graphically: The THOR Spectral Subsetting dialog appears. See “Using
the THOR Spectral Subsetting Dialog” on page 672 for details.
• By List: The File Spectral Subset dialog appears. See “Spectral
Subsetting” on page 220 for further instructions.
7. By default, the output rootname will be change. Miscellaneous output files
produced during the workflow will use this rootname, plus other words as
needed, such as _subset. To change the rootname to something else, click
Select Output Root Name.
By default, the output file is written to the same directory as the input file. You
can choose another output directory, but if it is a read-only directory, ENVI
will default to the Temp Directory specified in your ENVI Preferences (see
“Default Directory Preference Settings” on page 1146).
8. Click Next.
9. Select tie points for the images. See “THOR Coregistration” on page 674.
10. Perform atmospheric correction on the Time #1 and Time #2 images. See
“THOR Atmospheric Correction” on page 654.
11. In the Change Detection Methods panel, select Spectral Angle. This is
currently the only option available. This method computes the spectral angle

ENVI User’s Guide THOR Workflows


660 Chapter 7: Spectral Tools

on a pixel-by-pixel basis from the two co-registered input images. The larger
the spectral angle, the greater the change.
12. Perform rule thresholding. See “Rule Thresholding” on page 705.
13. Perform spatial filtering. See “Spatial Filtering” on page 708.
14. Export targets. See “Export Targets” on page 721.

THOR LOCs - Water and Trails


The Lines of Communication (LOC) - Water and Trails workflow is identical to the
Target Detection tool except that you provide signatures of the water or trails of
interest, either from a spectral library or from the image. The Unsupervised Water
Detection (UWD) method is available to find water without the use of signatures.
UWD is identical in form to a normalized difference vegetation index (NDVI), except
it uses bands centered at 450 nm and 2250 nm. THOR also uses other target detection
methods as needed to search for LOCs. After you map the LOCs, the workflow will
guide you through combining the rule images from each target detection algorithm
into a single detection overlay for each LOC type.
1. From the ENVI main menu bar, select Spectral → THOR Workflows →
LOC - Water and Trails. The LOC - Water and Trails dialog appears.
2. Select an input file. See “File Selection” on page 671.
3. Perform atmospheric correction. See “THOR Atmospheric Correction” on
page 654.
4. Select target signatures. See “Target Signature Selection” on page 680.
5. Select background signatures. See “Background Signature Selection” on
page 682.
6. Reduce dataset dimensionality and select bands. See “Dimensionality
Reduction and Band Selection” on page 685.
7. Perform signature matching. See “Signature Matching” on page 693.
8. Perform rule thresholding. See “Rule Thresholding” on page 705.
9. Perform spatial filtering. See “Spatial Filtering” on page 708.
10. Export targets. See “Export Targets” on page 721.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 661

THOR Stressed Vegetation


The Stressed Vegetation tool streamlines the use of ENVI's Vegetation Analysis tools.
This workflow will guide you through the process of creating a mask to define
vegetated pixels, choosing vegetation indices to use for examining vegetation health,
and reviewing the results.
1. From the ENVI main menu bar, select Spectral → THOR Workflows →
Stressed Vegetation. The Stressed Vegetation dialog appears.
2. Select an input file. See “File Selection” on page 671.
3. Perform atmospheric correction. See “THOR Atmospheric Correction” on
page 654.
4. Define a mask that delineates vegetated from non-vegetated pixels. See the
masking steps in “Rule Thresholding” on page 705; the process is identical
except that vegetation is the target and the NDVI is the only rule image.
5. Perform spatial filtering. See “Spatial Filtering” on page 708.
6. Use the Vegetation Indices panel to select which indices to use. The indices
quantify different properties of vegetation such as greenness, water and
nitrogen content, light use, and much more. While the vegetation indices are
useful to examine on an individual basis, they may also be combined to
generate colorized products for specific applications, including Agricultural
Stress, Forest Health, and Fire Fuel.
The number of vegetation indices that are available depends upon the spectral
bands present in the input file. By default, THOR selects a core subset of
vegetation indices to generate the colorized products. To select more
vegetation indices, click Select Veg Indices. The Select Veg Indices dialog
appears.
7. Select the desired indices and click OK. Refer to “Vegetation Analysis” on
page 799 for more information on each index.
8. To enforce biophysical cross-checking, select the Perform biophysical cross-
checking option. Biophysical cross-checking validates the results of each
index by cross-checking the results with other indices. If the results do not
agree, then those pixels are blanked out.
9. In the Vegetation Indices panel, click Agricultural Stress, Forest Health, or
Fire Fuel to view or edit which vegetation indices are used to create that
colorized product. From the drop-down lists provided, select other vegetation
indices that will be used to create the colorized product. Even if you have not

ENVI User’s Guide THOR Workflows


662 Chapter 7: Spectral Tools

already selected indices (described in Step 6), they will still be calculated as
needed.
10. Click Next.
11. Use the Review Veg Stress Results panel to review the vegetation indices and
colorized products that you just created. The results are displayed in the THOR
Viewer. (See “Using the THOR Viewer” on page 663 for instructions.) The
available images for display are listed in a tree view; images include the input
file, the atmospherically corrected image (if any), the individual vegetation
indices, and the colorized, application-specific products.
12. Click on the desired image to load it in the THOR Viewer. For colorized
products, a legend is displayed to help identify what the colors mean.
Following is an example of a colorized image:

Figure 7-36: Example showing the colorized product results for Agricultural
Stress.

THOR Target Detection


The Target Detection workflow is used to locate objects within an image that match
the signatures of in-scene regions. THOR uses a variety of target detection algorithms
to search for targets. After the targets are detected, the workflow will guide you
through combining the rule images from each target detection algorithm into a single
detection overlay for each target.
1. From the ENVI main menu bar, select Spectral → THOR Workflows →
Target Detection. The Target Detection dialog appears.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 663

2. Select an input file. See “File Selection” on page 671.


3. Perform atmospheric correction. See “THOR Atmospheric Correction” on
page 654.
4. Select target signatures. See “Target Signature Selection” on page 680.
5. Select background signatures. See “Background Signature Selection” on
page 682.
6. Reduce dataset dimensionality and select bands. See “Dimensionality
Reduction and Band Selection” on page 685.
7. Perform signature matching. See “Signature Matching” on page 693.
8. Perform rule thresholding. See “Rule Thresholding” on page 705.
9. Perform spatial filtering. See “Spatial Filtering” on page 708.
10. Export targets. See “Export Targets” on page 721.

Using the THOR Viewer


The THOR Viewer is a separate graphical user interface that allows you to easily pan,
rotate, and zoom the loaded image. The THOR Viewer provides a simple mechanism
for you to review and refine target detection results, and it is a common tool among
several THOR tasks.

ENVI User’s Guide THOR Workflows


664 Chapter 7: Spectral Tools

The THOR Viewer consists of four areas, shown in the following figure:

Figure 7-37: Overview of the THOR Viewer interface

Viewing Area
The Viewing Area is where the loaded image and target overlays (if any) are
displayed. Clicking in the Viewing Area performs various functions depending on
what is currently selected in the Control Bar.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 665

Control Bar
The Control Bar has a number of different functions, described as follows:

Button Description

Select button. When the Crosshairs or Z-profile button is


enabled, click the Select button in the Viewing Area to update
the crosshair position or the location the Z-profile is extracted
from.
Pan button. Click and drag in the Viewing Area to adjust the
image’s position.
Rotate button. Click and drag in the Viewing Area to rotate
the image. The center point for rotation is always the center of
the Viewing Area.
User Defined Zoom In Box button. Click and drag in the
Viewing Area to define a box that the image will be zoomed
into.
User Defined Zoom Out Box button. Click and drag in the
Viewing Area to define a box that the image will be zoomed
out of.
Crosshairs button. Click to toggle crosshairs on and off in the
Viewing Area.
Z-profile button. Click to toggle the Z-profile window on and
off. The Z-profile window behaves the same as ENVI’s Z-
profile tool. Clicking the Z-profile button also turns on the
crosshairs. The pixel currently under the crosshair is the one
displayed in the Z-profile window. To change the pixel used
for the Z-profile, click the Select button, then click on the
desired location.
Zoom In button. Click to zoom in by small increments. You
can also use the mouse scroll wheel to zoom in and out of the
image.
Zoom Out button. Click to zoom out by small increments.

Table 7-1: Control Bar buttons

ENVI User’s Guide THOR Workflows


666 Chapter 7: Spectral Tools

Button Description

Global button. Click to use the global image statistics when


performing image stretches.
Local button. Click to use image statistics from the image
extent that is currently displayed in the Viewing Area, when
performing image stretches.

Table 7-1: Control Bar buttons


Use the Stretch drop-down list to select a stretch type. The image statistics used for
the stretch will be based on the last selection of either the Global or Local stretch
options. If Local, the image extent at the time the Local button was pressed will
determine the stretch statistics, regardless of the currently displayed image extent.
Use the Filter drop-down list to select a filter type for the displayed image.

Status Bar
The Sample and Line fields in the Status Bar display the current pixel address
underneath the cursor. The upper-left corner of the first pixel is (1,1). If the image is
georeferenced, the Map X and Map Y fields will display the geographic position for
the pixel. The lower-right part of the Status Bar indicates the progress of any
processes running in the background, such as generating image statistics. You can
still interact with the THOR Viewer while background processes are running.

Target Controller
The Target Controller may or may not be visible, depending on your THOR
workflow tasks. When present, the Target Controller is used to control how targets are
defined through the use of one or more rule images. The upper part of the Target
Controller contains the list of current targets. The colored box next to the target
names indicates the color of the target layer overlaid on the image. Clicking on the
target name shows or hides its histogram panel. To change the order in which layers
are drawn in the Viewing Area, click and drag the list items into the desired order.
The top item in the list is drawn on top.
The Snapshot button below the Target Controller will create a JPEG image of the
current Viewing Area contents.
When two or more targets are being examined, select the Co-Targets option to see
where those targets co-occur. Use the M of N Targets slider to indicate how many
targets must co-occur in the same pixel to display it as a co-target. Use the ROI

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 667

Color box to set the color used to indicate co-targets. The Opacity slider adjusts the
opacity of the co-target layer (100 is completely opaque, 0 is completely transparent).

Figure 7-38: The Co-targets tool shows pixels (displayed in white here) that are
designated as valid targets by more than one target layer, potentially indicating
target confusion.

Histogram Panel
Use the Histogram Panel to adjust the target overlay. Each target has one target
overlay that is displayed in the Viewing Area. That target overlay may be generated

ENVI User’s Guide THOR Workflows


668 Chapter 7: Spectral Tools

from one or more rule images. Each available rule image is represented by one
histogram in the Histogram Panel. Each target will have its own Histogram Panel.

Figure 7-39: The Histogram Panel controls each target layer’s appearance.

Use the Overlay Controls within the Histogram Panels to change the selected target
layer's appearance. Check the Hide box to hide the layer. Check the Flicker box to
flicker the layer on and off, making it easier to see its distribution. Use the M of N

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 669

Rule Images slider to control how the rule images are combined into a single target
overlay. Use the ROI Color box to control the layer's color. Clicking on the box will
cycle through the colors. Right-clicking on the box allows you to select the desired
color from a list. The Opacity slider controls the opacity of the layer (100 is
completely opaque, 0 is completely transparent).
Each histogram corresponds to one rule image for that target. An abbreviated name
for the algorithm that generated the rule image is displayed at the bottom of the
histogram. Each histogram has a colored Target Threshold bar that divides the
histogram into Included Areas and Excluded Areas. Included Areas are the parts of
the histogram where pixels are designated as valid targets, whereas Excluded Areas
indicate non-target pixels. Note that Excluded Areas are shaded on the histogram plot
so that they are easily distinguished from Included Areas. Some target detection
algorithms have better matches with lower scores (like Spectral Angle Mapper),
whereas other algorithms have better matches with higher scores (like Matched
Filter).
The Target Threshold is set by default to include the tail of the histogram. This
works well for sparse targets, but you will need to adjust it for targets that cover larger
portions of the image (such as land cover classes). You can adjust the Target
Threshold by left-clicking and dragging in the histogram plot. The target overlay in
the Viewing Area will be adjusted dynamically. Several numbers are displayed next
to the threshold bar. The top number indicates the threshold value in rule image
space. The percentage to the left of the bar indicates the portion of the image below
the threshold, and the percentage to the right indicates the portion of the image above
the threshold (these two numbers sum to 100%).
You can zoom into a histogram plot by right-clicking and dragging the area to zoom
into. Reset the plot to the original range by either middle-clicking in the plot area or
clicking the Reset button.
The M of N Rule Images slider determines how the multiple rule images are
combined into a single target overlay. N represents the total number of included rule
images, and M represents the number of rule images the target must be within the
Included Area to be considered a valid target. For example, if the slider is set to 7
when there are seven included rule images, pixels are only designated as valid targets
and displayed in the target overlay if they occur within the Included Area on all seven
rule image histograms. If the slider is adjusted to 1, targets will be included in the
overlay even if they are only in the Included Area of one histogram. By setting the
slider to higher values, you can be more confident that the targets in the overlay are

ENVI User’s Guide THOR Workflows


670 Chapter 7: Spectral Tools

valid, and not false positives. By default, the M of N Rule Images slider is set at 50%
of the number of rule images.

Figure 7-40: Example images showing the resulting target overlays for M of N
values of 1 (left), 4 (center), and 9 (right).

You can easily adjust the results for each rule image independently of other rule
images by selecting the Show This Rule Only option under the desired histogram.
The target overlay switches to show the results based on only that rule image. Adjust
the Target Threshold as desired, then uncheck the box to return to the target overlay
being determined by a combination of rule images. If the results for a rule image are
unsatisfactory, uncheck the Include box so that it will no longer be included in the
combination results.

Pop-Up Windows
Pop-up windows provide more information about a particular pixel or target. Right-
clicking on the image will bring up a pop-up window. When right-clicking on a
target, pop-up windows contain an ancillary image chip corresponding to the clicked
location (if an ancillary image was selected), a spectral plot, and text information
about the target ID, target size, and confidence level in the target.
The spectral plot contains the mean spectrum of the target blob in white, and the
reference spectrum used to find that target (in relevant color). Double-clicking on the
ancillary image chip will load the ancillary image in an ENVI display group, centered
on the clicked location (or it will move the display group to that location if the image
is already displayed). Double-clicking the spectral plot will create an ENVI spectral
plot window with the spectra loaded. When right-clicking on a non-target pixel, the
pop-up window will display a spectral plot with the selected pixel's spectrum
displayed. To preserve an existing pop-up window while creating more windows,
hold down the Ctrl key while right-clicking.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 671

Shared Tools
Each workflow uses a different combination of shared tools, referred to as panels.

File Selection
Use the File Selection panel to select input files for processing, to provide an output
rootname, and to select any ancillary files for processing.
1. Click Select Input File. The Select Input File dialog appears.
2. Select a hyperspectral image that has wavelength information defined for each
band. Click OK.
3. In the File Selection panel, click Spatial Subset to perform Spatial Subsetting.
4. You can choose to process a subset of spectral bands by clicking one of the
following buttons in the File Selection panel:
• Graphically: The THOR Spectral Subsetting dialog appears. See “Using
the THOR Spectral Subsetting Dialog” on page 672 for details.
• By List: The File Spectral Subset dialog appears. See “Spectral
Subsetting” on page 220 for further instructions.
5. By default, the output rootname will be the same as that of the input file.
Miscellaneous output files produced during the workflow will use this
rootname, plus other identifiers as needed (for example, _subset). Click
Select Output Root Name to change the rootname and directory for the
output files.
By default, the output file is written to the same directory as the input file. You
can choose another output directory, but if it is a read-only directory, ENVI
will default to the Temp Directory specified in your ENVI Preferences (see
“Default Directory Preference Settings” on page 1146).
6. In the context of THOR, an ancillary file is a high-resolution panchromatic
image of the same area covered by the hyperspectral image; it will be used
later in the Review Detections step. Ancillary files are not applicable to all
workflows, so the option to select one will not always be available from the
File Selection panel. You can only select an ancillary file if the input
hyperspectral image is georeferenced. The ancillary file must also be
georeferenced.

ENVI User’s Guide THOR Workflows


672 Chapter 7: Spectral Tools

Using the THOR Spectral Subsetting Dialog


The Spectral Subsetting dialog provides a graphical alternative to selecting a band
subset from a list of bands. This tool allows you to select good and bad bands by
clicking and dragging on a spectral plot using thumbnails of the bands as a guide. The
Spectral Subsetting dialog is used in THOR for several purposes, including spectral
subsetting and selecting transformed bands for subsequent processing (see
“Dimensionality Reduction and Band Selection” on page 685).
The left side of the dialog displays a plot of the mean spectrum of the image. Green
areas represent good bands, while red areas represent bad bands. If the input file has a
pre-defined bad-bands list, those bands appear red by default. To designate bands as
“bad,” click the Bad Bands button, then click and drag in the plot over the desired
bands. If you make a mistake, click Good Bands and drag in the plot to reset the
bands to “good.”

Figure 7-41: Example of the initial state of the THOR Spectral Subsetting dialog.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 673

There are several ways to determine whether a band is “good” or “bad.” A vertical
blue line in the plot window (initially set at the first band on top of the y-axis)
indicates the band position of the thumbnail image displayed in the right part of the
dialog. Click and drag the blue bar to view thumbnails of other bands. Those bands
that are noisy or contain bad data should be marked as “bad.” You can also control the
displayed thumbnail image by using the Displayed Band slider. Mark the band
appropriately, using the Good Bands or Bad Bands button. This method is often
simpler and more precise than clicking and dragging in the plot area.
You can animate the thumbnail images by clicking the Play button. Click the Pause
button to pause the animation. The Speed field controls the speed of the animation.
You can export a snapshot of the good and bad bands to a bad-bands list (for use
elsewhere in ENVI) by clicking Output to Bad Bands List and selecting an output
filename.

ENVI User’s Guide THOR Workflows


674 Chapter 7: Spectral Tools

You can modify the range of the plot’s y-axis by clicking Set Y Scale. Enter the new
minimum and maximum range values, and click OK.

Figure 7-42: Example of the THOR Spectral Subsetting dialog after marking bad
bands. The vertical blue bar at band number 196 indicates the band currently
displayed in the animation window (right).

THOR Coregistration
Coregistration occurs within the THOR Change Detection tool. For change detection
to be effective, the images of interest must be closely aligned. The native
georeferencing information that comes with the imagery is typically not accurate
enough for this purpose. Instead, you must select tie points marking the same features
on both images. ENVI warps one image based on these tie points to match the base
image.
Using the Ground Control Points dialog to select tie points is the simplest method;
however, it can be challenging in areas with few obvious features, and it is time
consuming. To assist tie point selection, ENVI automatically scans both images to

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 675

locate common features. For best results, manually provide three to five seed points
to assist ENVI in finding tie points.
Though ENVI can select tie points much faster than a human operator, you should
check automatically chosen tie points before proceeding. Automatically generated tie
points may fall on clouds or cloud shadows, on rooftops, or on other elevated objects
and are not suitable. Slight time differences between image collections may generate
sub-optimal tie points.
Creating Tie Points
1. Select one of the following coregistration options:
• Select tie points manually: “Image-to-Image Ground Control Points” on
page 878 describes how to select tie points. When you are finished
selecting GCPs, click Next. The Review Tie Points dialog appears.
Proceed to “Reviewing Tie Points” on page 678 for details.
• Select tie points automatically: See “Automatic Tie Point Selection” on
page 677.
2. To use seed points, ensure that the Use Seed Points check box is enabled.
3. Select seed points either manually or automatically. Choose one of the
following:
• To automatically generate four seed points, click Auto-Generate Seed
Points. ENVI selects four seed points. The auto-generated seed points may
not fall precisely on the same feature. This is acceptable, as long as they
are relatively close. These seed points are discarded when tie point
selection is complete. Click Select Seed Points, then ENVI opens the
Time #1 and #2 images in display groups, and the Ground Control Points
Selection dialog appears listing the automatically selected points.
• To manually select seed points, click Select Seed Points. ENVI opens the
Time #1 and #2 images in display groups and the Ground Control Points
Selection dialog appears. Select three to five seed points using the steps in
“Image-to-Image Ground Control Points” on page 878.
When manually selecting seed points, you can switch the Geographic
Link toggle to On to move the cursor to the same area in both images, then
switch the Geographic Link toggle to Off to fine tune the location.
4. If you manually selected seed points, click Retrieve Points. If you need to
clear the seed points and start again, click Clear Points.
5. Click Show Advanced Options if you want to set additional parameters for
area-based image matching methods. Typically, the default settings provide the

ENVI User’s Guide THOR Workflows


676 Chapter 7: Spectral Tools

best results, but you can edit the parameters as needed. See “Area-Based
Matching Parameters” on page 896 for parameter descriptions.
• Number of Tie Points
• Search Window Size
• Moving Window Size
• Area Chip Size
• Minimum Correlation
• Point Oversampling
• Interest Operator
6. Click Next to continue. The following appears:
• One display group contains the base image.
• One display group contains the image to warp.
• The Ground Points Selection dialog.
• If you selected automatic tie points, the points show in the display groups,
the GCP Selection dialog shows how many points exist and the Root Mean
Square (RMS) error, and the Image to Image GCP List shows the
individual points.
• The Review Tie Points panel appears.
7. Review tie points, as described in “Reviewing Tie Points” on page 678.
8. When you are finished reviewing tie points, choose one of the following for the
warp Method in the Review Tie Points panel. “Warping and Resampling
Image-to-Image” on page 904 describes each parameter.
• Polynomial
• Triangulation
• RST
9. Choose one of the following for the warp Interpolation. The interpolation is
the manner in which the image is resampled to the warped grid. “Warping and
Resampling Image-to-Image” on page 904 describes the resampling choices.
• Nearest Neighbor
• Cubic Convolution
• Bilinear

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 677

For pan-sharpening, a nice looking image is paramount, so Cubic


Convolution is the best choice.
10. Click Next. The following appears:
• One display group contains the base image
• One display group contains the warped image.
• The two display groups are dynamically linked.
• The Check Co-Registration panel.
11. See “Checking Coregistration Accuracy” on page 679 for the final steps of
coregistration.
Automatic Tie Point Selection
1. From the Tie point method drop-down list, select one of the following
options:
• ENVI Standard - Area based: See Step 3 under “Creating Tie Points” on
page 675 for instructions for automatically selecting seed points.
• AGATE - Feature based: AGATE is an automatic tie point tool that often
finds more tie points than the ENVI standard automatic tie point tool.
AGATE is optimized to utilize all system resources and requires that the
input image be georeferenced. The Feature-based method searches for
unique contrast-based features at multiple scales to find tie points.
• AGATE - Area based: This method is similar to ENVI’s standard
automatic tie point tool; it compares image subsets to find tie points.
• AGATE - Frequency based: This method transforms image subsets into
frequency space using Fast Fourier Transforms, maximizes correlation,
then creates tie points.
2. From the Tiling method drop-down list, select a method for reprojecting
image tiles when doing comparisons. When sensor model information is
available, reprojecting image tiles according to the DEM helps improve tie
point accuracy.
• Reproject tiles w/out DEM: Reproject image tiles without the use of a
digital elevation model (DEM).
• Reproject tiles w/ DEM: Using a DEM in rugged areas can dramatically
improve the quality of tie points. If you select this option, you are
prompted to select a DEM when you click Next.

ENVI User’s Guide THOR Workflows


678 Chapter 7: Spectral Tools

3. The Num Processors parameter is automatically set to the number of


processors available on your system. To reserve one or more processors (if
more than one is available) for other activities while AGATE is running, reduce
this setting.
4. Click Next to proceed to the next step.
Reviewing Tie Points
When reviewing tie points, use the Image to Image GCP List to turn individual points
on or off, to delete points, and to view RMS errors for individual points.
Tips for selecting good tie points:
• When selecting seed or tie points, switch the Geographic Link toggle to On to
get the crosshairs in the two images to approximately the same location. Once
a good feature is identified, switch the Geographic Link toggle to Off, fine
tune the crosshair positions, and add the point.
• When using any object with height above the ground, use the base of the
structure rather than the top. Parallax caused by different viewing geometries
(even for “simultaneous” panchromatic/multispectral imagery) makes these tie
points sub-optimal.
• Distribute tie points as evenly as possible across the entire scene. Try not to
leave large areas without any tie points.
• The more tie points the better. There is eventually a point of diminishing
returns. A good number is 50 tie points, although you can obtain excellent
results from as few as 10, depending on the scene.
• If you used manual tie point selection:
• Use the Ground Control Points Selection dialog to pick tie points.
• See “Image-to-Image Ground Control Points” on page 878 for assistance.
For tips on fixing tie points see “Fixing Tie Points” on page 679.
• If you used automatic tie point selection:
• The tie points automatically display. Tie points are colored indicating
good, satisfactory, and poor RMS error values. Look at the RMS Error in
the Ground Control Points Selection dialog. This number should be as
small as possible. Less than 1 is excellent, but anything less than 3 should
produce acceptable results.
• Enlarge the Image to Image GCP List dialog so you can see the RMS
column.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 679

• From the Image to Image GCP List dialog menu bar, select Options →
Order Points by Error to sort the tie points by the highest RMS. For tips
on fixing tie points see “Fixing Tie Points” on page 679.
Fixing Tie Points
• Fix the tie point: Select the tie point in the Image to Image GCP List dialog,
and click Goto to jump to that point. Adjust the location of the crosshairs to the
desired location. Click Update in the Image to Image GCP List to update the
location of that point. ENVI immediately calculates and displays a new RMS
error.
• Turn the tie point off: Select the tie point in the Image to Image GCP List
dialog. Click On/Off. The point turns green to indicate that it is off and no
longer being used, and the RMS error is updated. Turn the point back on by
clicking On/Off again.
• Delete the tie point: Select the tie point in the Image to Image GCP List
dialog. Click Delete. The point is removed from the dialog list, and the RMS
error is updated.
• Use THOR to automatically turn off bad tie points: In the Review Tie
Points panel, set the Maximum allowable RMS per GCP parameter to the
desired RMS threshold, then click Apply. The tie points with the greatest RMS
errors are turned off until no tie point has an RMS greater than the set value.
This is a quick way to remove the greatest errors. To turn the points back on,
select them in the Image to Image GCP List dialog, then click On/Off.
Checking Coregistration Accuracy
When warping is complete, check the accuracy of the coregistration.
1. Roam around the dynamically linked images and check the accuracy of the
coregistration. When flickering between the images, there should be little shift
between features. If there is a shift, it could be due to several reasons:
• Inaccurate Tie Points: Inaccurate tie points cause poor coregistration. In
this case, re-review tie points for accuracy. Add more if needed.
• Elevated Features: Because of parallax caused by collection with
different view geometries (even for panchromatic and multispectral images
collected “simultaneously”), objects with height above the ground “lean”
in different directions on the two images. In this case, coregistration is
impossible to achieve. The taller the object, the greater the degree of error.
• Topography: Topography and elevated features are related. Topography
viewed from different directions “leans” different ways in the images, and

ENVI User’s Guide THOR Workflows


680 Chapter 7: Spectral Tools

is therefore difficult to impossible to coregister. You can use triangulation


as the warping method to partially mitigate parallax in images with
topography to create a better coregistration. However, to properly
coregister an image with topography, you must orthorectify the images
first using detailed digital elevation models, which is beyond the scope of
THOR. When flickering between the images, if the image appears to shift
in different directions in different areas, the cause is most likely
topography. The only solution in THOR is to coregister small areas that do
not include much variable topography.
2. If you are performing coregistration for the Change Detection - Subtractive
tool, additional parameters for Radiometric Processing appear. The two
images collected at different times will have different radiometric (brightness)
properties because of different atmospheric conditions, solar elevation and
azimuth differences, and so forth. Removing these radiometric differences
allows the subsequent processing to focus on relevant changes instead of
irrelevant atmospheric and solar changes. Select one or both of the following:
• Perform dark object subtraction: Performs a basic haze correction for
atmospheric effects.
• Perform radiometric normalization: Balances the overall brightness
(band-by-band) between the two collections.
3. When coregistration accuracy is confirmed, click Next.

Target Signature Selection


Use the Target Signature Selection panel to define the targets to search within the
hyperspectral image. Target signatures can be derived from spectral libraries and/or
image-derived regions of interest (ROIs).
Selecting Targets from Spectral Libraries
1. Select the Spectral Library tab. The Library Signatures list is blank unless
other spectral libraries from previous tasks have already been loaded into
THOR.
2. To load a spectral library, click the Select Library drop-down button and
select one of the following options:
• Select MRSL Library: Select a Metadata Rich Spectral Library (MRSL)
file (.msl). The MRSL format is specific to THOR and accommodates
variable-range and variable-resolution spectra with metadata for each
signature.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 681

• Select SLI Library: Select any spectral library file.


The drop-down list may also show all libraries that are included in the
speclib directory in the ENVI installation path. You can copy your own
libraries to this directory so they are included in this list by default.
Select a spectral library file, and click Open. The Library Signatures list in the
Target Signature Selection panel shows the spectral libraries you selected.
3. Double-click a spectral library name (in the Library Signatures list) to display
its spectrum in a plot window. You can also right-click on one or more
signatures and select Plot selected signatures to plot their spectra. If a
signature contains metadata (only available in MRSL libraries), you can right-
click on the signature and select Display metadata. (Or, click Show Info and
select Plot spectrum or Display metadata.)
Query Library
4. If you load an MRSL library file that contains metadata, use the Query Library
section of the Target Signature Selection panel to narrow down the list of
signatures that meet your query criteria.
Signatures are typically categorized by Group, Class, and Sub-Class; and each
has a Country of Origin. Select the desired metadata values from the lists, and
click Run Query. Signatures that contain metadata matching the query will
appear in the Library Signatures list. You can also search for keywords using
the Keyword Search field. THOR will search every metadata field for the
word or phrase you enter. THOR must find all of the query fields within a
signature's metadata for it to appear in the Library Signatures list.
5. To designate signatures as targets to search for in the hyperspectral image,
select the desired signatures and click the arrow button to move them to the
Target Signatures list. To remove an item from the Target Signatures list, select
the signature name and click Remove Signatures. Or, right-click the
signature(s) and select Remove selected target or Remove all targets.
If your target signatures have different wavelength units, THOR will convert
them to the same units as the input image before performing spectral matching
later in the workflow.
Selecting Targets from Image-Derived ROIs
1. Select the Image tab. The input image or atmospherically corrected image is
loaded into a display group, and the ROI Tool appears. The Available ROIs list
in the Target Signature Selection panel and the list of ROIs in the ROI Tool are
synchronized so that when one list changes, the other updates too.

ENVI User’s Guide THOR Workflows


682 Chapter 7: Spectral Tools

2. Use the ROI Tool to define ROIs for each desired target, and draw the ROIs as
described in “Drawing ROIs” on page 323. Name the ROIs so that you will
recognize them later in the workflow. As you create ROIs, they will appear in
the Available ROIs list in the Target Signature Selection panel.
3. Click Plot Signature(s) to plot the mean signatures for the selected ROIs.
Click ROI Options to create new ROIs, delete ROIs, or save the ROIs to a file.
You can also perform these functions through the ROI Tool. If you accidentally
close the image or the ROI Tool, click Reload Image and ROIs.
4. To designate ROIs as targets, select the desired ROIs in the Available ROIs list,
then click the arrow button to move them to the Target ROIs list. You can
remove ROIs from the Target ROIs list by clicking Remove ROIs or by right-
clicking the desired ROIs and selecting the appropriate option. This will
remove them from the Target ROIs list, but it will not delete them.

Figure 7-43: Example of selecting target signatures from image-derived ROIs.


ROIs in the ROI Tool appear in the Available ROIs list and may be designated as
Target ROIs.

Confirming Your Selections


When you click Next, THOR will display the selected target signatures (from
spectral libraries and ROIs) and will prompt you to confirm before proceeding. Click
Yes to confirm or No to go back and change your selections.

Background Signature Selection


Use the Background Signature Selection panel to define the background clutter that
can interfere with searching for target signatures in the hyperspectral image. This is
an optional task in most cases. Background signatures are required as input into the

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 683

BandMax or Advanced Signature Optimization band selection methods (see


“Dimensionality Reduction and Band Selection” on page 685), or if you intend to use
the TCIMF or OSP target detection methods.
To define background signatures, unselect the Skip background signature selection
option. You can select background signatures by defining regions of interest (ROIs)
on the input or atmospherically corrected image, or you can let THOR automatically
derive background signatures using various unsupervised methods.
Selecting Backgrounds Using ROIs
To select background signatures by manually defining ROIs, click the Regions of
Interest tab. The atmospherically corrected (or input) image loads into a display
group, and the ROI Tool appears. The Available ROIs list on the Background
Signature Selection panel and the list of ROIs in the ROI Tool are synchronized so
that when one list changes, the other list updates too.
Use the ROI Tool to define ROIs for each desired background, and draw the ROIs as
described in “Drawing ROIs” on page 323. Name the ROIs so that you will recognize
them later in the workflow. As you create ROIs, they will appear in the Available
ROIs list in the Background Signature Selection panel.
Click Plot Signature(s) to plot the mean signatures for the selected ROIs. Click ROI
Options to create new ROIs, delete ROIs, or save the ROIs to a file. You can also
perform these functions through the ROI Tool. If you accidentally close the image or
the ROI Tool, click Reload Image and ROIs.
To designate ROIs as backgrounds, select the desired ROIs in the Available ROIs list,
then click the arrow button to move them to the Background ROIs list. You can
remove ROIs from the Background ROIs list by clicking Remove ROIs or by right-

ENVI User’s Guide THOR Workflows


684 Chapter 7: Spectral Tools

clicking the desired ROIs and selecting the appropriate option. This will remove them
from the Background ROIs list, but it will not delete them.

Figure 7-44: Defining ROIs of Background Signatures

Automatically Deriving Background Signatures


To automatically derive background signatures, select the Auto-Derive tab. Use the
Processing Method drop-down list to select whether signatures should be auto-
derived using SMACC or K-Means classification (see “Extracting Endmembers with
SMACC” on page 853 and “Using K-Means Classification” on page 427 for more
information).
These processes should ideally run on a reduced-resolution version of the input image
to save processing time. Set the Spatial scale factor to the desired value for spatial
reduction. For example, a value of 0.25 means that every fourth pixel will be used.
Set the Number of background signatures to the number of background signatures
you wish to generate. For SMACC, you may also change the default value for the
SAM threshold (in units of radians). SMACC generates a set of signatures, which
THOR then uses in a Spectral Angle Mapper (SAM) classification so you can see the
distribution of the backgrounds within the image. Smaller SAM threshold values
mean that image pixels must be closer to the background signatures to be classified as
that background type.
Click Process when you are ready to generate the background signatures. When
processing is finished, the reduced-resolution versions of the input image and
background classification image will be displayed, along with a plot window showing
the derived background signatures. In addition, the Select Background Signatures
list in the Background Signature Selection panel will be populated with the derived
signatures. After examining the images and signatures, select the signatures you want

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 685

to designate as background signatures (if any) from the Select Background


Signatures list.

Figure 7-45: Auto-deriving background signatures displays the input image,


classification image generated from the derived background signatures, and a
plot showing the generated background signatures.

Confirming Your Selections


When you click Next, THOR will display the selected background signatures (both
from ROIs and auto-derived) and ask you to confirm before proceeding. Click Yes to
confirm or No to go back and change your selections.

Dimensionality Reduction and Band Selection


Use the Dimensionality Reduction and Band Selection panel to reduce the amount of
spectral data to process in THOR. Hyperspectral data is largely redundant, with data
from one band to the next generally changing very little. By reducing the data in an
intelligent manner, you can shorten processing times and improve target detection
accuracy. THOR can reduce spectral data in two ways: dimensionality reduction and
band selection.
Dimensionality reduction generally refers to applying a mathematical transformation
to the input dataset to create a new dataset in which the output bands are a linear

ENVI User’s Guide THOR Workflows


686 Chapter 7: Spectral Tools

combination of every input band. The leading bands in the transformed data generally
contain the unique content in the image, while the latter bands contain mostly noise
and otherwise redundant information.
Band selection refers to selecting a discrete subset of input bands to continue
processing with. You can select bands manually, or you can let ENVI automatically
attempt to identify the most important bands for differentiating targets from
background signatures. Each of these methods is discussed in more detail below.
In the Dimensionality Reduction and Band Selection panel, select a dimensionality
reduction method from the Method drop-down list. The options are None (proceed
with all bands of the input or atmospherically corrected image), Image Transform,
Automated band selection, and Manual band selection. The area below the drop-
down list will change to show the relevant parameters for the selected method.
Note
The Automated band selection method is only available if you selected
background signatures using the Background Signature Selection panel.

Image Transform
Each of the available transforms creates an output dataset where each output band is a
linear combination of all the input bands. Follow these steps to continue:
1. From the Transform Method drop-down list, select a method. The choices are
as follows:
• Independent Component Analysis: The ICA method works well with
hyperspectral data because it is more likely to treat sparse targets as
important features, compared with the PCA or MNF methods. However,
ICA can take a significantly longer time to process.
Click Transform Params. The ICA Parameters dialog appears. See
“Independent Components Analysis” on page 509 for more information on
the parameters required for ICA. Reducing the Number of Output IC
Bands value will result in faster processing, but at the risk of omitting
some subtle features. ICA is a memory-intensive process. If you receive a
memory allocation error during processing, reduce the X Sampling and Y
Sampling values to reduce the memory usage. However, this can
potentially change the statistics such that you miss sparse targets.
• Principal Component Analysis: The PCA method creates a number of
PC bands, which are linear combinations of the original spectral bands that
are uncorrelated. You can calculate the same number of output PC bands
as input spectral bands. The first PC band contains the largest percentage

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 687

of data variance and the second PC band contains the second largest data
variance, and so on.
Click Transform Params. The PCA Parameters dialog appears. Refer to
“Principal Component Analysis” on page 504 for more information on the
required parameters for PCA.
• Minimum Noise Fraction: The MNF transform is a linear transformation
that uses separate PCA rotations to segregate noise in the data and to
reduce the dimensionality of the original dataset.
Click Transform Params. The MNF Parameters dialog appears. Refer to
“MNF Rotation” on page 748 for more information about the required
parameters for MNF.
2. The use of masks is recommended along with image transforms in cases where
the image contains large areas that you are not interested in processing (such as
water or black-fill pixels). In the Parameters dialog for each image transform
method is a Mask Information section. From the Masking Method drop-down
list, select one of the following options:
• None: Select this option if you do not want to use a mask.
• Mask user-specified value: Select this option to mask out certain pixels
within an image. In the Fill Value field, enter the pixel value for the pixels
you want to exclude from processing. When you apply a mask, the mask is
used to generate transform coefficients. Yet the coefficients are applied to
every pixel in the input image, whether a mask was used or not. Set the
Zero Out Masked Pixels toggle button to Yes to apply the mask to the
transform image so that masked values are 0.
• User-defined mask file: Select this option to apply a separate mask file to
the hyperspectral image. The mask file should be a binary image
consisting of values of 0 and 1, and it must have the same spatial extent
and projection as the hyperspectral image. Click Choose, and select a
mask file. Set the Zero Out Masked Pixels toggle button to Yes to apply
the mask to the transform image so that masked values are 0.
3. Click Run Transform. When processing is complete, the results appear in the
Dimensionality Reduction and Band Selection panel.
4. Review the transformed image bands to determine which bands contain useful
information. While the example discussed here is for ICA results, the same
applies to PCA and MNF.
The ICA Results section of the Dimensionality Reduction and Band Selection
panel lists every transformed band. Double-click a band or click Display Band

ENVI User’s Guide THOR Workflows


688 Chapter 7: Spectral Tools

to open the selected band in a display group. Click Animate Bands to launch
ENVI's animation tool, which provides a convenient way to quickly review all
the bands.
For ICA, click Plot 2D Coherence to see a plot of the spatial coherence for
each transformed band. For PCA and MNF, click Plot Data Variance and
select a plot to view. The choices are: Plot Variance (ENVI), Plot Variance
(Log axis, IDL), Plot Eigenvalues (ENVI), and Plot Eigenvalues (Log axis,
IDL).
Advanced users may explore transformed results further by clicking Plot Band
Weights. The Band Weightings dialog appears. This dialog provides some
insight into how much each input spectral band contributes to each
transformed image band. For more information, see “Transform Band
Weights” on page 715.
5. Select the transformed bands you wish to keep by clicking one of the following
buttons:
• Select Graphically: The THOR Spectral Subsetting dialog appears. See
“Using the THOR Spectral Subsetting Dialog” on page 672 for details.
• Select by List: The File Spectral Subset dialog appears. See “Spectral
Subsetting” on page 220 for further instructions.
THOR will automatically apply the selected transform to the target and background
(if any) signatures before spectral matching is performed later in your workflow.
Automated Band Selection
From the Method drop-down list in the Dimensionality Reduction and Band
Selection panel, select Automated band selection.
Note
The Automated band selection method is only available if you selected
background signatures using the Background Signature Selection panel. See
“Background Signature Selection” on page 682 for details.

Use automated band selection to identify spectral bands that best differentiate target
signatures from background signatures. You can use the BandMax or Advanced
Signature Optimization algorithm to perform automated band selection. Select one of
these methods from the Selection Method drop-down list.
BandMax:

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 689

When you select this option, a plot window opens with the target and background
signatures displayed. The grey plot curve (usually low in value) represents Band
Significance. Following is an example:

Click and
drag the red
bar to set
the threshold

Figure 7-46: BandMax Results Plot Window

The red, horizontal line on the plot represents the threshold used to define which
bands are significant (shaded blue on the plot) and which are not. You can change the
threshold by clicking and dragging the threshold bar in the plot window, or by using

ENVI User’s Guide THOR Workflows


690 Chapter 7: Spectral Tools

the Band Significance Threshold slider in the Dimensionality Reduction and Band
Selection panel.

Figure 7-47: Use the slider bars to set the threshold and number of significant
bands.

Adjusting the Significant Bands slider also controls the threshold position by setting
it to force a specific number of significant bands to be selected. The bands deemed
significant are shaded blue in the plot window and listed in the Dimensionality
Reduction and Band Selection panel.
You can fine-tune the band selection by clicking Edit Band Selection and selecting
or unselecting specific bands in the list. If you change the threshold further after
editing these values, the threshold changes will be lost.
Click Output Bands to ASCII to save a bad bands list to a text file.
Advanced Signature Optimization:
The Advanced Signature Optimization method works differently than BandMax in
that you evaluate each target/background signature pair separately. After selecting
Advanced Signature Optimization from the Selection Method drop-down list, follow
these steps to continue:
1. Click Add. The Select Signature Pairs dialog appears.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 691

2. Select a target from the Target Signatures list.


3. Select a background from the Background Signatures list.
4. Click the arrow button to add the target/background pair to the New Signature
Pairs list.
5. Click OK when you are finished adding target/background pairs. You can
define as many pairs as needed. When you define at least one pair, an ASO
Bands plot appears. The grey plot curve (usually low in value) represents Band
Significance.
The red, horizontal line on the plot represents the threshold used to define
which bands are significant (shaded green on the plot) and which are not.

Figure 7-48: Click and drag the red horizontal line to set the threshold.

ENVI User’s Guide THOR Workflows


692 Chapter 7: Spectral Tools

You can change the threshold by clicking and dragging the threshold bar in the
plot window, or by using the Threshold slider in the Dimensionality Reduction
and Band Selection panel.

Figure 7-49: Use the Threshold slider to set the threshold.

The bands deemed significant are shaded green in the plot window and listed
in the Dimensionality Reduction and Band Selection panel.
6. If you determine that certain target/background pairs are more important than
others, you can skew the band significance plot for that pair relative to the
others. First, select the desired pair in the Target/Background Signature
Pairs list. Then, adjust the Target Priority (%) slider to change the scale
factor applied to that pair's band significance plot.
7. You can fine-tune the band selection by clicking Edit Band Selection and
selecting or unselecting specific bands in the list. If you change the threshold
further after editing these values, the threshold changes will be lost.
8. Click Output Bands to ASCII to save a bad bands list to a text file.
Manual Band Selection
Manual band selection allows you to define which bands should be used for further
processing. At a minimum, you should remove bands in the 1400 nm and 1900 nm

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 693

wavelength regions (due to atmospheric water absorption), in addition to any noisy or


otherwise bad bands.
1. From the Method drop-down list in the Dimensionality Reduction and Band
Selection panel, select Manual band selection.
2. The Input Bands list lists every band in the image. Double-click a band, or
click Display Band to open the selected band in a display group. Click
Animate to launch ENVI’s animation tool, which provides a convenient way
to quickly review all of the bands.
3. Select the bands to keep for further processing by clicking one of the following
buttons:
• Select Graphically: The THOR Spectral Subsetting dialog appears. See
“Using the THOR Spectral Subsetting Dialog” on page 672 for details.
• Select By List: The File Spectral Subset dialog appears. See “Spectral
Subsetting” on page 220 for further instructions.
Confirming Your Selections
You may have explored different dimensionality reduction methods, so before
proceeding to the next task, be sure you have selected your preferred method from the
Method drop-down list. Click Next. THOR will display your selection and ask you
to confirm before proceeding. Click Yes to confirm or No to go back and change your
selection.

Signature Matching
Use the Signature Matching panel to select the spectral matching methods used to
detect occurrences of the selected target signatures. If you selected one or more target
signatures from spectral libraries, this panel is also used to set the proper scale factor
needed to scale the library signatures into the same space as the input image.
The Spectral Matching Algorithms section lists the available spectral matching
methods. Select which method(s) you want to run:
• Spectral Angle Mapper (SAM): See “Spectral Angle Mapper Classification”
on page 771 for details.
• Matched Filter (MF): See “Using Matched Filtering” on page 776 for details.
• Adaptive Coherence Estimator (ACE): See “Using Adaptive Coherence
Estimator” on page 782 for details.

ENVI User’s Guide THOR Workflows


694 Chapter 7: Spectral Tools

• Normalized Euclidean Distance (NED): This method calculates the distance


between two vectors in the same manner as a Euclidean Distance method, but
it normalizes the vectors first by dividing each vector by its mean.
• Spectral Similarity Mapper (SSM): This method is derived from the Spectral
Similarity Scale described by Granahan and Sweet (2001). SSM calculates two
numbers for each pixel. The first is the Euclidean distance between the pixel’s
spectrum and the reference spectrum. The second is a correlation value, which
measures the similarity in shape between the pixel’s spectrum and reference
spectrum, much like SAM does. SSM is a hybrid approach combining
elements of both the SAM and Minimum Distance classifier methods into a
single measure.
• Spectral Information Divergence (SID): See “Spectral Information
Divergence Classification” on page 771 for details.
• Constrained Energy Minimization (CEM): See “Using Constrained Energy
Minimization” on page 781 for details.
• Orthogonal Subspace Projection (OSP): See “Using Orthogonal Subspace
Projection” on page 784 for details.
• Target-Constrained Interference-Minimized Filter (TCIMF): This method
detects the desired targets, eliminates non-targets, and minimizes interfering
effects in one operation. TCIMF is constrained to eliminate the response of
non-targets rather than minimizing their energy, just like other interferences in
CEM. Previous studies show that if the spectral angle between the target and
the non-target is significant, TCIMF can potentially reduce the number of false
positives over CEM results.
• Unsupervised Water Detection (UWD): This method is identical in form to a
normalized difference vegetation index (NDVI), except it uses bands centered
at 450 nm and 2250 nm.
You will be given the opportunity to review and disregard results from each method
in the next step. The OSP and TCIMF are not available for use if you did not select
any background signatures and have only one target signature, since they need more
than one signature as input.
If you set the Use subspace stats toggle button to Yes (located at the bottom of the
Spectral Matching Algorithms list), the covariance-based methods will use
background statistics based on non-anomalous pixels as determined by running the
RX anomaly detection algorithm, which may improve detection performance.
Reference:

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 695

Granahan, J. C., and J. N. Sweet, 2001. An evaluation of atmospheric correction


techniques using the spectral similarity scale. Geoscience and Remote Sensing
Symposium, IGARSS ‘01, Vol. 5, pp. 2022-2024.
Scale Factors
If you selected one or more target signatures from a spectral library, a scale factor is
needed to scale the target signatures into the same space as the input image. If the
Scale Factor section is not visible, then all your target signatures were collected from
image-based ROIs, which do not require scaling.
The mean image spectrum is displayed in the left plot, with the y-axis spanning the
input image's data range. Your library-based target signatures are displayed in the
right plot, which has the same y-axis range as the left plot. THOR attempts to
automatically determine the proper scale value. When the correct scale value is
selected, the target signatures should span approximately the same range as the mean
image spectrum. If the target signatures are located at the top or bottom of the plot,
then you need to adjust the Scale factor value. You can select a value from the drop-
down list, or type in a custom value.

ENVI User’s Guide THOR Workflows


696 Chapter 7: Spectral Tools

Figure 7-50: Example of scale factor that is correct (top), too low (middle), and
too high (bottom).

Import Signatures
Use the Import Signatures panel to import spectral signatures from multiple sources
in order to create a new spectral library for the Spectral Library Builder.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 697

Importing Signatures from SLEF Files


The following are steps to import signatures from Spectral Library Exchange Format
(SLEF) text files.
1. From the Import signatures from drop-down list, select one of the following
options:
• SLEF (Directory): This option will import multiple SLEF files from a
directory. You can enable the Search directory recursively option to
search every directory within the selected directory.
• SLEF (Individual Files): This option will import individual SLEF files.
2. Click Import Signatures. A file selection dialog appears. If you selected
SLEF (Directory), select a directory that contains SLEF files and click OK. If
you selected SLEF (Individual Files), select an SLEF file and click OK. The
SLEF Importer dialog appears.
The SLEF Importer dialog is divided into three areas: a list of input SLEF files
(left), a query metadata area (center), and a list of signatures to be imported
(right).
The Input SLEF Files list shows all of the SLEF files that were manually
selected or found in the selected directory. The Spectra to Import list contains
the list of signatures that will be imported into the new library.
3. By default, all of the input SLEF files will be imported. To remove signatures
from the list so that they will not import, select one or more signatures and
click Remove Selected.
4. To clear the list, click Clear All.
5. To view metadata for a signature, select the signature from the list and click
Show Metadata.
6. Plot the spectral signature by clicking Spectral Plot.
Note
You can also perform most of these functions by right-clicking the signature
name and selecting the appropriate option.

7. You can use metadata queries to determine which of the input SLEFs will be
imported. SLEF files are typically categorized by Group, Class, and Sub-Class;
and each has a Country of Origin. Select the desired metadata values from
these groups, and click Run Query. Only those signatures that contain
metadata matching the query will appear in the Spectra to Import list. You can

ENVI User’s Guide THOR Workflows


698 Chapter 7: Spectral Tools

also enter search terms in the Keyword Search field. The query must find all
of the entered metadata query fields within a signature's metadata for it to
appear in the Spectra to Import list.
8. When you are finished selecting the signatures to import, click OK. The
signature data will be extracted from the SLEF files, and the signatures will be
added to the Imported Signatures list.
Importing Signatures from ENVI Spectral Libraries
The following are steps to import signatures from ENVI spectral library (also called
SLI) files.
1. From the Import signatures from drop-down list, select ENVI Spectral
Library (.sli).
2. Click Import Signatures. The Select Spectral Library dialog appears.
3. Select one or more spectral library files (.sli), and click OK. The SLI
Importer dialog appears.
Note
Your ENVI installation includes several spectral library files (.sli), located in
the spec_lib directory.

The SLI Importer dialog is divided into two areas: a list of available signatures
(left), and a list of signatures to import (right).
4. To plot a signature, select the signature in the Available Signatures List and
perform one of the following actions:
• Double-click
• Right-click and select Plot Selected Spectra
• Click the Plot Selected Entries button
5. To import the selected signatures, click the arrow button to move them to the
Signatures to Import list.
6. To remove signatures from the list so that they will not import, select one or
more signatures and click Remove Selected. To clear the list, click Clear All.
7. When finished selecting signatures to import, click OK. The signature data
will be extracted from the spectral library file(s) and the signatures will be
added to the Imported Signatures list in the Import Signatures panel.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 699

Importing Signatures from MRSL Files


The following are steps to import signatures from Metadata Rich Spectral Library
(MRSL) files. The MRSL format is specific to THOR and accommodates variable-
range and variable-resolution spectra with metadata for each signature.
1. From the Import signatures from drop-down list, select MRSL.
2. Click Import Signatures. The Select Spectral Library File dialog appears.
3. Select one or more MRSL files, and click Open. The MRSL Importer dialog
appears.
The MRSL Importer dialog is divided into two areas: a query metadata area
(left) and a list of signatures to be imported (right).
4. By default, all of the signatures from the MRSL file you selected will be
imported. To remove signatures from the list so that they will not import, select
one or more signatures and click Remove Selected.
5. To clear the list, click Clear All.
6. To view metadata for a signature, select a signature from the list and click
Show Metadata.
7. Plot a spectral signature by clicking Spectral Plot.
Note
You can also perform most of these functions by right-clicking the signature
name and selecting the appropriate option.

8. You can use metadata queries to determine which of the input MRSL
signatures will be imported. MRSL files are typically categorized by Group,
Class, and Sub-Class; and each has a Country of Origin. Select the desired
metadata values from these groups, and click Run Query. Only those
signatures that contain metadata matching the query will appear in the Spectra
to Import list. You can also enter search terms in the Keyword Search field.
The query must find all of the entered metadata query fields within a
signature's metadata for it to appear in the Spectra to Import list.
9. When you are finished selecting the signatures to import, click OK. The
signature data will be extracted from the MRSL files, and the signatures will
be added to the Imported Signatures list.

ENVI User’s Guide THOR Workflows


700 Chapter 7: Spectral Tools

Material Identification
Use the Material Identification tool to attempt to identify unknown spectral
signatures by comparing them to spectral libraries. Follow these steps to continue:
1. Choose one of the following options to run Material Identification:
• Click Identify Material in the Review Detections panel.
• Select Spectral → THOR Workflows → Tools → Material
Identification from the ENVI main menu bar.
The Material Identification panel appears.

Figure 7-51: Overview of the Material Identification panel before adding an


unknown signature.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 701

By default, the Material Identification tool will compare an unknown signature


to every signature within THOR's embedded spectral libraries, located in the
speclib directory of ENVI’s installation path. You can also add your own
libraries (either MRSL or SLI) to this directory to make them available for
immediate use. To add your own libraries to this list, click Add Library and
select an MRSL or SLI spectral library file.
2. Select one or more spectral libraries (under Select Libraries to Search) from
which you want to search for an unknown signature.
3. To designate an unknown signature for identification, click Select New
Signature. A Material Identification dialog appears, with a list of all
signatures currently open in plot windows.
4. Select a signature name, then click OK. The Material Identification tool will
then attempt to automatically determine the proper scale factor needed to scale
the unknown signature into the same scale as the reflectance libraries. It will
use the Spectral Angle Mapper (SAM) algorithm to compare the unknown
signature to every signature in the designated spectral libraries.
You can adjust the scale factor by entering a new value in the Input signature
scale field and pressing the <Enter> key. The matching results are displayed in
the bottom portion of the Material Identification panel, sorted with the best
matches on top (smaller spectral angles are better matches). The results are
colored to provide a quick visual glance of the good and bad matches.

Figure 7-52: Spectral angle thresholds used for coloring the results table.

The plot area displays the unknown signature in red, the currently selected
library signature in the results table in green, and the band importance in blue.
The band importance signifies how important each spectral band is relative to
the others for differentiating the unknown and library signatures. The larger the
band importance, the more effect that band has on enlarging the spectral angle
between the unknown and library signature. You can turn off the band
importance by unchecking the Plot band importance option.

ENVI User’s Guide THOR Workflows


702 Chapter 7: Spectral Tools

5. Click Export to ENVI Plot to export the plots to a standard ENVI plot
window.

Figure 7-53: Example of initial results after adding an unknown signature.

6. At times, you may want the Material Identification tool to ignore certain noisy
or otherwise bad bands when comparing signatures. To designate which bands
should be ignored, select the Edit bad bands option. The plot area will be
shaded green for "good" bands and red for "bad" (ignored) bands. Click the red
Bad Bands button, then click and drag in the plot area to designate those bands
as "bad." Click the green Good Bands button, then click and drag in the plot
area to designate those bands as "good."

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 703

7. After specifying bad bands, uncheck the Edit bad Bands option to compare
signatures using the new set of good bands. Bad bands are blanked out in the
plot area.

Figure 7-54: Original band selection (left), new bad band selection (middle), and
final results with the bad bands blanked out (right).

ENVI User’s Guide THOR Workflows


704 Chapter 7: Spectral Tools

Figure 7-55: Updated results for the same signature after specifying bad bands.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 705

8. To view metadata for the selected signature in the results table, click View
Metadata. The Spectrum Metadata dialog appears.

Figure 7-56: Spectrum Metadata dialog

9. You can export the results table to an ASCII text file by clicking Export Table.

Rule Thresholding
Use the Rule Thresholding panel to review rule images that result from processes
such as spectral matching and anomaly detection. The input image will load into the
THOR Viewer, which is used to adjust the target thresholds. (See “Using the THOR
Viewer” on page 663 for details.) Use the Rule Thresholding panel to change the
band combination or image displayed in the THOR Viewer.
Changing the Displayed Image
The Rule Thresholding panel lists the different images that are available to display in
the THOR Viewer. The images include the original input image and the
atmospherically corrected image. Other images are displayed, depending on which
module is running. For Target Detection, this includes the transform images and rule
images for each target signature.

ENVI User’s Guide THOR Workflows


706 Chapter 7: Spectral Tools

For images with multiple spectral bands, you can load several default band
combinations with a single click. These include Natural Color Composite, False
Color Composite, and SWIR Color Composite.

Figure 7-57: Use the Rule Thresholding panel to change the band combination
or image displayed in the THOR Viewer.

If the selected image does not have the necessary bands to create that composite,
THOR will display a warning. To load a single band or color composite of your
choice, click Select Another Base Image. The Select Bands to View dialog appears.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 707

Select the Gray Scale or RGB Color radio button, then select the desired bands.
When done, click OK to have the selected band(s) display in the THOR Viewer.

Figure 7-58: Table showing center wavelengths used for finding bands for the
default color composite.

Figure 7-59: Examples of different band combinations

ENVI User’s Guide THOR Workflows


708 Chapter 7: Spectral Tools

Figure 7-60: Example of displaying a rule image for a target.

Setting Thresholds
Use the THOR Viewer and associated histogram panels to set the thresholds as
needed. See “Using the THOR Viewer” on page 663 for more information.

Spatial Filtering
Use the Spatial Filtering panel to filter the detection overlays produced by the Rule
Thresholding panel. The THOR Viewer is displayed along with the existing detection
overlays. (See “Using the THOR Viewer” on page 663 for more information.)
1. To continue in a workflow without performing spatial filtering, select the Do
not perform spatial filtering option.
2. Select one or more layers in the Select Layers to be Filtered list that the filter
will apply to. You can apply one set of filtering parameters to certain layers
and another set of parameters to other layers by utilizing this list.
3. Spatial filtering consists of clumping and/or sieving. If both clumping and
sieving are selected, clumping occurs first, then sieving. Select the Clump
Results and/or Sieve Results options to indicate whether each will be
performed.
Clumping groups nearby isolated detections into one cohesive blob. The larger
the Clump operator size parameter, the further apart the isolated detections
that will be grouped.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 709

Sieving removes detections that are smaller than the Min Blob Size or larger
than the Max Blob Size. The Pixel Neighbor Scheme determines how blob
sizes are calculated. By default, all eight neighboring pixels are considered as
part of the blob. Alternatively, only four neighboring pixels may be considered
for blob grouping.
4. Click Apply Filter to preview the filtered results. Click Flicker Results to
better see the changes. This will alternate the original, non-filtered detection
overlay with the filtered overlay.

Spectral Library Viewer


Use the Spectral Library Viewer to view data from Metadata Rich Spectral Library
(MRSL) files that were created in the THOR Spectral Library Builder. MRSL files
provide several advantages over ENVI’s standard spectral libraries such as the ability
to store signatures with variable spectral ranges and band spacings, as well as
unlimited metadata for each signature. The THOR Spectral Library Viewer is
essentially identical to ENVI's Spectral Library Viewer, except that it also displays
metadata associated with the selected signature.
1. From the ENVI main menu bar, select Spectral → THOR Workflows →
Tools → Spectral Library Viewer. The Select Spectral Library File dialog
appears.
2. Open a spectral library file. If you select a standard ENVI spectral library
(.sli), ENVI's Spectral Library Viewer will launch. If you select an MRSL
library, THOR's Spectral Library Viewer will launch.
The left side of the Spectral Library Viewer dialog lists all the signatures
within the selected library. The right side of the viewer uses tabs to display
metadata for the selected signature (if any) and query parameters.
3. To plot a signature, click on the desired signature in the list. If a plot window is
not already open, a new one will be created and the signature added to it.
Otherwise, the signature will be plotted in the open window. The metadata for
the selected signature (if any) will appear in the Metadata tab. Clicking on a

ENVI User’s Guide THOR Workflows


710 Chapter 7: Spectral Tools

metadata cell displays its contents in the text box below the table, making it
easier to read long fields.

Figure 7-61: Click on signatures to plot them and view their metadata.

4. In some cases, you may want to compare library signatures to image signatures
that have different wavelength units or y-axis scaling. Enter the desired values
in the X Scale and/or Y Scale boxes. The next time you select a signature from
the list, these scale factors will be applied to the signature. You can then drag
these signatures into a plot window displaying an image signature for direct
comparison.
5. It is possible to list only those signatures in the library that match certain
metadata criteria. Click the Query Parameters tab to show the metadata query
parameters. See “Query Library” on page 681 for more information on queries.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 711

THOR Spectral Library Builder


Use the THOR Spectral Library Builder to build spectral libraries in the Metadata
Rich Spectral Library (MRSL) format from a variety of input signature sources. The
MRSL library format is specific to THOR and accommodates variable-range and
variable-resolution spectra with metadata for each signature.
This workflow allows you to add, edit, or delete metadata associated with each
signature.
1. From the ENVI main menu bar, select Spectral → THOR Workflows →
Tools → Spectral Library Builder. The Spectral Library Builder dialog
appears.
2. Import signatures. See “Import Signatures” on page 696.
3. Edit metadata. See “Edit Metadata” on page 713.
4. Export the spectral library. See “Export Library” on page 719.

Review Detections
Use the Review Detections panel to review and flag target detections resulting from
the Anomaly Methods panel. The Review Detections panel provides a simple and
quick way to review each detection by allowing you to plot its mean spectrum and
attempting to identify it using the Material Identification tool. You can export targets
of interest using the Export Targets panel. The following steps describe how to use
the Review Detections panel.
1. To skip reviewing detections, click the Do not review detections option in the
Review Detections panel. THOR will export all detected targets to a single
class in the Export Targets panel. Otherwise, leave this option unchecked.
2. The THOR Viewer is displayed with the detections overlaid. The THOR
Viewer target list will have four layers loaded: Pending, Good, Bad, and the
input detection layer (Anomalies in the example below). The input detection
layer is initially hidden. By default, all detections are placed in the Pending
layer. You can adjust the properties of these layers by clicking the layer name.

ENVI User’s Guide THOR Workflows


712 Chapter 7: Spectral Tools

See “Using the THOR Viewer” on page 663 for more information on setting
layer properties.

Figure 7-62: Overview of the Review Detections panel. THOR Viewer is shown
at right.

3. You can change the reference image in the THOR Viewer using the Reference
Image drop-down list. Depending on the input image bands available, several
different color composites will be available in addition to rule images used to
create the detection overlay.
4. The detection list lists all of the detections (clusters of pixels) in the detection
overlay along with several properties. Detection list fields include ID (numeric
identifier for detections), Pixels (the number of pixels in the detection),
Strength (the mean value of the rule image used to generate the detection), and
State (Pending, Good, or Bad). Clicking on a row header will select the
detection and center the THOR Viewer on that detection. Clicking on a column
header will sort the table by that column. You can sort the table by selecting the
desired field from the Sort by drop-down list. Use the List Detections drop-
down list to view all or only certain types of flagged detections.
5. For each detection, determine whether it is Good (of interest) or Bad (not of
interest). You may examine the detections visually, use Plot Spectrum to view
the mean spectrum for the detection, or Identify Material to use the Material
Identification panel to attempt to identify the detection. Data must be in units
of reflectance to properly use the Material Identification panel. When you have
determined whether the detection is of interest or not, click on the
appropriately colored flag to mark it. The detection will change color both in

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 713

the THOR Viewer and in the table. The next detection will then automatically
be selected and the THOR Viewer will center over it, so you can review it. You
may also use the Next and Prev buttons to manually navigate through the
detection table.

Figure 7-63: Example of the Review Detections panel and THOR Viewer while
reviewing detections.

Edit Metadata
Use the Edit Metadata panel to add or edit metadata for spectral signatures being
imported into a spectral library via the THOR Spectral Library Builder.

ENVI User’s Guide THOR Workflows


714 Chapter 7: Spectral Tools

The available signatures (derived from the Import Signatures panel) are displayed at
the top. Any available metadata for the selected signature are displayed at the bottom.
Above the metadata table is a row of buttons that perform various functions.

Figure 7-64: Overview of the Edit Metadata panel.

Adding Fields
1. To add a new metadata field, select the signature you want to add metadata to.
2. Click Add Field. You can add a new field for just the selected signature, or for
all signatures.
3. Enter the new field name (required) and field contents (optional) in the Add
Field to Metadata field.
4. Click Accept. The new field is added to the selected signature(s).
Removing Fields
1. To remove a metadata field, select the signature whose metadata you want to
edit.
2. Select the metadata field to delete.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 715

3. Click Delete Field. You can delete the field for just the selected signature, or
for all signatures.
4. Click Accept.
Editing Field Names and Content
1. Select the signature whose metadata you want to edit.
2. Select the metadata field to edit.
3. Click View/Edit Field Contents. The View/Edit Field dialog appears.
4. Edit the field name and contents as desired, then click Accept.
5. To view the spectrum for any signature, select the signature name and click
Plot Spectrum.

Transform Band Weights


The Transform Band Weights tool allows advanced users to visualize the contribution
of the various spectral bands to each output band of an image transform. Image
transforms such as Principal Component Analysis (PCA), Minimum Noise Fraction
(MNF), and Independent Component Analysis (ICA), are commonly used to:
• Reduce the dimensionality of the input dataset to reduce processing time
• Focus processing on the information of interest within the input file
• Remove noise
Each output band of a transformed image is a linear combination of every input
image. The Transform Band Weights tool provides a convenient interface to see
which input bands contributed to each output band, thus helping to identify those
spectral bands that are most important for finding targets of interest, or which bands
contribute the most noise.
Follow these steps to run the Transform Band Weights tool.
1. Choose one of the following options to start the Transform Band Weights tool:
• Click Plot Band Weights in the Dimensionality Reduction and Band
Selection panel. The transform data file will automatically pass into the
tool.
• Select Spectral → THOR Workflows → Tools → Transform Band
Weights from the ENVI main menu bar. The Select Statistics File dialog
appears. Select a statistics file from the PCA, MNF, or ICA results. You
will also be asked whether you would like to select the input data file that
the transform was derived from so that its wavelength information can be

ENVI User’s Guide THOR Workflows


716 Chapter 7: Spectral Tools

used in plotting. Otherwise, band numbers will be used. If selecting the


input file, its number of bands must match the number of bands used to
form the transformed image bands stored in the statistics file.
2. The Transform Band Weightings list appears. This list contains each
transformed band from the statistics file. Click on one of the transformed
bands in the list to display a plot window. The x-axis shows the input spectral
band number (or wavelength). The y-axis shows the percentage that each input
spectral band contributed to the selected transformed image band. The sum of
all values in the plot is 100%. Larger values on the plot indicate that those
bands contributed the most to the selected transformed band.

Figure 7-65: Example of selecting a single transformed band to see how each
input spectral band contributed to it.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 717

You can also select several transformed bands by clicking and dragging in the
list, or by holding down the Ctrl or Shift key while selecting from the list. The
resulting plot will be the mean of all the plots for the selected bands.

Figure 7-66: Example of selecting multiple transformed bands to see the mean
of all input spectral band contributions.

ENVI User’s Guide THOR Workflows


718 Chapter 7: Spectral Tools

Figure 7-67: Transform band weights can reveal interesting information about the
input dataset.

Setting the first toggle button in the Transform Band Weightings dialog to
Create new window will display a new plot window each time you select a
new transform band. Otherwise, the currently active plot window will be used.
Leaving the bottom toggle button at Replace existing plot will replace the
previous band selection with the new selection. If you select Accumulate

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 719

plots, the new selection will overlay with the previous selections in the same
plot window.

Figure 7-68: Example of accumulating plots for multiple transform bands in the
same plot window.

Export Library
Use the Export Library panel to write a new spectral library to disk from within the
THOR Spectral Library Builder. You can export the library to Metadata Rich Spectral
Library (MRSL) format or to the standard ENVI spectral library (.sli) format.
When exporting to a standard ENVI spectral library, all signatures will be resampled
to the same spectral range and band spacing, and all metadata beyond signature
names will be removed.
Exporting to MRSL Format
1. From the Output Format drop-down list, select Metadata Rich Spectral
Library (.msl).
2. Choose an output filename and location. The file will be appended with an
.msl extension. The output MRSL file will preserve each signature's spectral
range, band spacing, and metadata.

ENVI User’s Guide THOR Workflows


720 Chapter 7: Spectral Tools

Note
ENVI cannot read MRSL files; only THOR can read these files. Use the
THOR Spectral Library Viewer to view MRSL files.

Exporting to ENVI Spectral Library Format


1. From the Output Format drop-down list, select ENVI Spectral Library (.sli).
2. Select an output filename and location. The file will be appended with a .sli
extension.
3. From the Output Wavelengths drop-down list, select a method for resampling
the signatures so that they all have the same spectral range and band spacing.
All metadata (except the signature name) will be lost upon output. Each of the
output options is described below. For all options, the Output Wavelengths list
displays the wavelengths that the input signatures will be resampled to.
• Based on input signatures (band union): This method examines the
signature wavelengths to determine the output range and band spacing.
The minimum value of the output range is set to the minimum wavelength
that occurs in any of the input signatures. The maximum value of the
output range is set to the maximum wavelength that occurs in any of the
input signatures. Signatures that do not span this entire range are padded
with zeros for those bands that are outside their native range. The signature
with the most bands is used as the basis for output band spacing.
• Based on input signatures (band intersection): This method examines
the signature wavelengths to determine the output range and band spacing.
The output range is set to the minimum and maximum wavelength that all
the signatures have in common. The signature with the most bands
between this spectral range is used as the basis for output band spacing.
• Based on data file: Click Select Data File to select an image or spectral
library that contains wavelength information. The output wavelengths will
match those of the selected file. For those input signatures that do not span
the entire wavelength range, zeros are used to pad the ends. This option is
useful if you want your library to match a particular sensor's spectral
characteristics.
• Set manually: This method allows you to specify the Min and Max
wavelength values and the Band Spacing to use. For those input
signatures that do not span the entire wavelength range, zeros are used to
pad the ends.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 721

Export Targets
Use the Export Targets panel to export target detection overlays produced by the Rule
Thresholding panel to regions of interest (ROIs) or vector files. If you previously
used the Spatial Filtering panel, then the filtered results will be exported.
First, select the layers that you want to export from the Target List. Then select one of
the following options.
Exporting to ROIs
ENVI uses ROIs for a number of processes. Since ROIs are pixel-based, the input
image does not need to be georeferenced for this option to be available.
1. Click Export to ROIs. The input image is loaded into a display group, and the
new ROIs are added to the ROI Tool dialog. The new ROI names are appended
with (THOR derived target) to differentiate them from ROIs you may
have created as training sets.
2. The exported ROIs only exist in memory at this point. To save them to disk for
future use, select File → Save ROIs from the ROI Tool menu bar.
Exporting to ENVI Vector Format
1. Click Export to EVFs. This option is only available when the input image is
georeferenced.
2. Enter a root name for the output EVF files. One EVF file will be created per
layer with an extension of _.evf. If the input image projection is not
Geographic Lat/Lon, all vectors will be converted to Geographic Lat/Lon
when each EVF is created. Once processing is complete, the exported layers
appear in ENVI's Available Vectors List. From there, you can load the vectors
into a vector or image window.
Exporting to Shapefiles
1. Click Export to Shapefiles. This option is only available when the input
image is georeferenced.
2. Enter a root name for the output shapefiles. One shapefile (along with ancillary
files) will be created per layer with an extension of _.shp. If the input image
projection is not Geographic Lat/Lon, all vectors will be converted to
Geographic Lat/Lon when each shapefile is created. Once processing is
complete, the exported layers will be written to the output directory but will
not be loaded into ENVI (as this would require a conversion back to EVF).

ENVI User’s Guide THOR Workflows


722 Chapter 7: Spectral Tools

Exporting to KML Files


Keyhole Markup Language (KML) format files are used by Google Earth®.
1. Click Export to KML. This option is only available when the input image is
georeferenced. The KML Output dialog appears.
2. Choose one of the following output options, and click OK.
• One KML with all targets (default): Each layer will maintain its
individual properties when combined into one KML file. Enter an output
KML filename.
• One KML per target: Enter a rootname for the KML output files.

THOR Workflows ENVI User’s Guide


Chapter 7: Spectral Tools 723

Target Detection Wizard


The Target Detection Wizard guides you through the process to find targets in
hyperspectral or multispectral images. The targets may be a material or mineral of
interest (such as Alunite) or they may be man-made objects (such as military
vehicles).
The Wizard guides you through the following target detection steps:
1. Select Input/Output Files: Select the input image and the root name for output
images.
2. Perform Atmospheric Correction: Optionally convert the image into
reflectance through atmospheric correction.
3. Select Target Spectra: Select one or more target spectra for the analysis from
spectral libraries, individual spectral plots, text files, Regions Of Interest
(ROIs), or statistics files.
4. Select Non-Target Spectra: Optionally select one or more spectra to suppress
from processing.
5. Apply MNF Transform: Optionally apply the Minimum Noise Fraction (MNF)
transform before target detection analysis.
6. Select Target Detection Methods: Choose up to eight target detection methods
for processing.
7. Load Rule Images and Preview: Load the output rule images and preview the
binary results.
8. Filter Targets: Select from different filter options and parameters for each
target to clean up mis-detected pixels and false positives.
9. Export Results: Export results to one shapefile and/or ROI per target detection
method.
10. View Statistics and Report: View target detection statistics for each selected
method and a report of settings used in the Wizard.
References:
X. Jin, S. Paswaters, and H. Cline, "A comparative study of target detection
algorithms for hyperspectral imagery," In Algorithms and Technologies for
Multispectral, Hyperspectral, and Ultraspectral Imagery XV. Proceedings of SPIE,
Vol. 7334, pp. 73341W1-73341W12.

ENVI User’s Guide Target Detection Wizard


724 Chapter 7: Spectral Tools

C.-I Chang, J.-M. Liu, B.-C. Chieu, C.-M. Wang, C. S. Lo, P.-C. Chung, H. Ren,
C.-W. Yang, and D.-J. Ma, “A generalized constrained energy minimization approach
to subpixel target detection for multispectral imagery,” Optical Engineering, vol. 39,
no. 5, pp. 1275-1281, May 2000. (CEM)
H. Ren and C.-I Chang, “Target-constrained interference-minimized approach to
subpixel target detection for hyperspectral imagery,” Optical Engineering, vol. 39, no.
12, pp. 3138-3145, December 2000. (TCIMF)
S. Johnson, “Constrained energy minimization and the target-constrained
interference-minimized filter,” Optical Engineering, vol. 42, no. 6, pp. 1850-1854,
June 2003. (CEM and TCIMF)
S. Kraut, L. L. Scharf, and R. W. Butler, “The adaptive coherence estimator: a
uniformly most-powerful-invariant adaptive detection statistic,” IEEE Trans. on
Signal Processing, vol. 53, no. 2, pp. 427-438, 2005. (ACE)
D. Manolakis, D. Marden, and G. A. Shaw, “Hyperspectral image processing for
automatic target detection applications,” Lincoln Laboratory Journal, vol. 14, pp. 79-
116, 2003. (ACE)
J. C. Harsanyi and C.-I Chang, “Hyperspectral image classification and
dimensionality reduction: an orthogonal subspace projection approach,” IEEE Trans.
On Geoscience and Remote Sensing, vol. 32, no. 4, pp. 779-785, 1994. (OSP)
C.-I Chang, “Further results on relationship between spectral unmixing and subspace
projection,” IEEE Trans. on Geosciences and Remote Sensing, vol. 36, pp. 1030-
1032, May 1998. (OSP)
C.-I Chang, “Hyperspectral Imaging: Techniques for Spectral Detection and
Classification,” Kluwer Academic Publishers, Dordrecht. 2003. (OSP, CEM, TCIMF)
J. W. Boardman, “Leveraging the high dimensionality of AVIRIS data for improved
sub-pixel target unmixing and rejection of false positives: mixture tuned matched
filtering,” In: 7th JPL Airborne Geoscience Workshop, pp. 55-56, 1998. (MTMF)

Using the Target Detection Wizard


From the ENVI main menu bar, select Spectral → Target Detection Wizard. The
Target Detection Wizard appears.

Target Detection Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 725

Figure 7-69: Target Detection Wizard

The first panel in the Target Detection Wizard, the Introduction panel, explains the
overall workflow of the Wizard.
Click Next to proceed to the next panel, where you provide input for the first step in
the workflow. When that panel appears, you will see that it shows Wizard settings
only; the Wizard description text is hidden, as in the following figure.

ENVI User’s Guide Target Detection Wizard


726 Chapter 7: Spectral Tools

Click to show text in


left panel

Figure 7-70: Select Input/Output Files Panel with Wizard Text Hidden

To show the text next to the settings, click Show Text. The following figure shows the
Select Input/Output Files panel with the Wizard text visible.

Target Detection Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 727

Figure 7-71: Select Input/Output Files Panel with Wizard Text Shown

To hide the left panel again, click Hide Text.


Each panel contains Next for continuing to the next step and Prev for reverting to the
previous step. Next is only enabled if you provide enough information to continue in
the workflow. In some cases, a processing status dialog appears before the next panel
is initialized. You can also use the Next and Prev buttons to loop back through the
Wizard and repeat a series of steps.

Select Input/Output Files


Step 1 of the Target Detection Wizard is to select the input file for processing, and to
provide a root name for all output files generated during target detection analysis.
1. Click Select Input File. The Input File dialog appears.
2. Select an input file, then click OK. The file should contain more than one
spectral band.

ENVI User’s Guide Target Detection Wizard


728 Chapter 7: Spectral Tools

3. Click Select Output Root Name. The Output Files dialog appears.
4. Enter a File name to use as the root name of all output files generated by the
target detection analysis, then click OK. ENVI appends a descriptive extension
to the output filename: _mnf for MNF transform results, _mf for Matched
Filtering rule images, _cem for Constrained Energy Minimization rule images,
_mf_target for Matched Filtering binary decision, _mf_target.shp for
Matched Filtering shapefile output, _mf_target.roi for Matched Filtering
ROI output, and so forth.
Note
If files with the specified root name already exist, ENVI prompts you to
delete the existing files before continuing. If you select No, you need to enter
a different output root filename.

5. Click Next in the Wizard. The Atmospheric Correction panel appears.

Perform Atmospheric Correction


In Step 2 of the Target Detection Wizard, you can optionally perform atmospheric
correction on the input image. Most images should be converted to reflectance
through atmospheric correction before running target detection, especially if library
spectra or other external spectra are used to define targets in the process. If external
spectra are not used in the processing, you can use radiance or uncalibrated data as
input.
If your image is already corrected, or if you choose to use ROIs as target spectra,
select None / Already Corrected to skip this step.
1. Select one of the following atmospheric correction methods:
• QUick Atmospheric Correction (QUAC): (Requires a licensed
installation of the Atmospheric Correction Module.) Determines the
atmospheric compensation parameters directly from the information
contained within the scene using the observed pixel spectra. This method
assumes that the average reflectance of a collection of diverse material
spectra, such as the endmember spectra in a scene, is effectively scene-
independent. This enables the retrieval of reasonably accurate reflectance
spectra even with radiometrically uncalibrated data. Select the Sensor
Type from the drop-down list. If the sensor type is not available, select
Unknown. If the sensor type is in the data header file and supported in the
drop-down list, ENVI selects it by default.

Target Detection Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 729

• IAR Reflectance: Normalizes images to a scene average spectrum. This is


particularly effective for reducing spectral data to relative reflectance when
little is known about the scene. It works best for arid areas with no
vegetation. If you selected a spatial subset in the input file, you can choose
to compute the Average Area over the spatial subset or the entire image.
• Log Residuals: Creates a pseudo reflectance image that is useful for
analyzing mineral-related absorption features. The logarithmic residuals of
a dataset are defined as the input spectrum divided by the spectral
geometric mean, then divided by the spatial geometric mean.
• Dark Subtraction: Subtracts the dark noise from the image. The digital
number to subtract from each band can be either Band Minimums, or
User Values for each band. If you select Band Minimums, you can
choose a Dark Search Area over the spatial subset or, if you selected a
spatial subset at file input, over the entire image. You can also specify a
Data Ignore Value. If you select User Values, you can edit Current
Subtraction Values for each band.
• Flat Field: Similar to the IAR Reflectance method, Flat Field normalizes
images to an area of known “flat” reflectance. This is particularly effective
for reducing hyperspectral data to relative reflectance. You can create a
Flat Field ROI, or select an existing Flat Field ROI. The average spectrum
from the ROI is used as the reference spectrum, which is then divided into
the spectrum at each pixel of the image.
• Empirical Line: Forces the image spectra to match selected field
reflectance spectra. A linear regression is used for each band to equate DN
and reflectance. This method is capable of producing the most accurate
results, but it requires ground truth information. You need to select at least
one Spectra Pair to continue. See “Empirical Line Calibration” on
page 366 for details.
2. Click Next in the Wizard. The Select Target Spectra panel appears.

Select Target Spectra


In Step 3 of the Target Detection Wizard, select the spectra to use as the desired target
signatures in the target detection analysis.
To perform Orthogonal Subspace Projection (OSP), Target-Constrained Interference-
Minimized Filter (TCIMF), and Mixture Tuned Target-Constrained Interference-
Minimized Filter (MTTCIMF) target detection analysis, you need to select more than

ENVI User’s Guide Target Detection Wizard


730 Chapter 7: Spectral Tools

one target spectra and you need to select non-target spectra in the next step in the
Wizard.
1. Enter target spectra from spectral libraries, individual spectral plots, text files,
ROIs, or statistics files. See “Importing Spectra” on page 442 for details.
Tip
If using radiance or uncalibrated data as input, or if you applied an
atmospheric correction that gives relative reflectance, spectra derived directly
from the image data usually produce better results than selecting library
targets. The image spectra more accurately account for any errors in
calibration or atmospheric correction, the scales of mixing that occur in your
data, and sensor response effects.

Tip
If you are importing ROIs as targets, the average calculated from each region
is used as the target spectrum.

2. When importing spectra is complete, choose the spectra to use by selecting one
or more rows in the table, or by clicking Select All. ENVI uses only the spectra
you select for target detection processing. If you do not select any rows, ENVI
uses all spectra.
Note
If you select only one target spectrum and do not specify non-target spectra
in the next step, the OSP, TCIMF, and MTTCIMF target detection methods
will not be available as target detection methods in a later step.

3. Click Next in the Wizard. The Select Non-Target Spectra panel appears.

Select Non-Target Spectra


In Step 4 of the Target Detection Wizard, you can optionally select non-target spectra
to improve the detection result.
To perform Orthogonal Subspace Projection (OSP), Target-Constrained Interference-
Minimized Filter (TCIMF), and Mixture Tuned Target-Constrained Interference-
Minimized Filter (MTTCIMF) target detection analysis, you need to select non-target
spectra. Providing non-target spectra can potentially reduce the number of false
positives by suppressing response from the non-target signatures.
1. To specify non-target spectra, toggle Select Non-Target Spectra to Reject? to
Yes.

Target Detection Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 731

2. Enter non-target spectra from spectral libraries, individual spectral plots, text
files, ROIs, or statistics files. To import the non-target spectra, see “Importing
Spectra” on page 442.
Tip
If you are importing ROIs as non-targets, the average calculated from each region is
used as the non-target spectrum; therefore, you want to include each separate
material as a separate ROI.

3. When importing spectra is complete, choose the spectra to use by selecting one
or more rows in the table, or by clicking Select All. ENVI uses only the spectra
you select for target detection processing.
4. Click Next in the Wizard. The Apply MNF Transform panel appears.

Apply MNF Transform


In Step 5 of the Target Detection Wizard, you can optionally perform an MNF
transform on the input image. ENVI uses the MNF transform to segregate and
equalize the noise in the data, and to reduce the data dimensionality for target
detection processing. The resulting bands of the MNF transformed data are sorted by
spatial coherence in descending order. Lower MNF bands typically have spatial
structure and contain most of the information. Higher MNF bands typically have little
spatial structure and contain most of the noise.
For more details about the MNF transform, see “Calculating Forward MNF
Transforms” on page 518.
Note
If you choose not to apply the MNF transform, the Mixture Tuned Matched Filter
(MTMF) and Mixture Tuned Target-Constrained Interference-Minimized Filter
(MTTCIMF) target detection methods will not be available in the next step. MTMF
and MTTCIMF perform Matched Filtering (MF) or Target-Constrained
Interference-Minimized Filter (TCIMF) and add an infeasibility band to the results.
The infeasibility band is used to reduce the number of false positives that are
sometimes found when using MF or TCIMF alone

1. To apply the MNF transform, leave the Apply MNF Transform? toggle at
Yes. If you toggle to No, click Next to proceed.
2. If you wish to set advanced parameters for MNF transformation, click Show
Advanced Options. Otherwise, click Next to proceed. The next steps are for
the advanced settings.

ENVI User’s Guide Target Detection Wizard


732 Chapter 7: Spectral Tools

3. To use only some of the MNF transformed bands in target detection


processing, enter the Number of Selected MNF Bands.
Tip
It is recommended that you use the default number of bands to preserve the
full data dimensionality.

4. Click Noise Stats Shift Diff Spatial Subset to select a spatial subset or an area
under an ROI/EVF or an image or file on which to calculate the statistics. You
can then apply the calculated results to the entire file (or to the file subset, if
you selected one when you selected the input file).
5. Click Next in the Wizard. The Target Detection Methods panel appears.

Select Target Detection Methods


In Step 6 of the Target Detection Wizard, you select the methods to use to find the
spatial location (and, for some methods, abundance) of each of the selected targets.
The availability of the methods depends on the selections you made in the previous
steps, for example:
• If you did not apply the MNF transform (“Apply MNF Transform” on
page 731), the ACE method is selected by default and the MTMF and
MTTCIMF methods are not available.
• If you did apply the MNF transform, the MTMF method is selected by default.
• If you did not specify non-target spectra (“Select Non-Target Spectra” on
page 730) and provided only one target spectrum (“Select Target Spectra” on
page 729), the OSP, TCIMF, and MTTCIMF methods are not available.
You can select multiple methods and compare the results later. If you are certain
which method is suitable for your application, you can make just one selection.
1. Select one or more target detection methods to use for processing from the
following. To select all available methods, click Select All.
• Matched Filtering (MF): Finds the abundance of targets using a partial
unmixing algorithm. This technique maximizes the response of the known
spectra and suppresses the response of the composite unknown
background, therefore matching the known signature. It provides a rapid
means of detecting specific materials based on matches to target spectra
and does not require knowledge of all the endmembers within an image
scene.

Target Detection Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 733

• Constrained Energy Minimization (CEM): Similar to ACE and MF,


CEM does not require knowledge of all the endmembers within a scene.
Using a specific constraint, CEM uses a finite impulse response (FIR)
filter to pass through the desired target while minimizing its output energy
resulting from backgrounds other than the desired targets. A correlation or
covariance matrix is used to characterize the composite unknown
background. In a mathematical sense, MF is a mean-centered version of
CEM, where the data mean is subtracted from all pixel vectors.
• Adaptive Coherence Estimator (ACE): Derived from the Generalized
Likelihood Ratio (GLR) approach, ACE is invariant to relative scaling of
input spectra and has a Constant False Alarm Rate (CFAR) with respect to
such scaling. As with CEM and MF, ACE does not require knowledge of
all the endmembers within a scene.
• Spectral Angle Mapper (SAM): Matches image spectra to reference
target spectra in n dimensions. SAM compares the angle between the
target spectrum (considered an n-dimensional vector, where n is the
number of bands) and each pixel vector in n-dimensional space. Smaller
angles represent closer matches to the reference spectrum. When used on
calibrated data, this technique is relatively insensitive to illumination and
albedo effects.
Note
Lower values in SAM rule images represent closer matches to the target
spectrum and higher probability of being a target.

• Orthogonal Subspace Projection (OSP): OSP first designs an orthogonal


subspace projector to eliminate the response of non-targets, then applies
MF to match the desired target from the data. OSP is efficient and effective
when target signatures are distinct. When the spectral angle between the
target signature and the non-target signature is small, the attenuation of the
target signal is dramatic and the performance of OSP could be poor. This
method is only available if you provided more than one target spectra in
Step 3, or you provided non-target spectra in Step 4.
• Target-Constrained Interference-Minimized Filter (TCIMF): TCIMF
detects the desired targets, eliminates non-targets, and minimizes
interfering effects in one operation. TCIMF is constrained to eliminate the
response of non-targets rather than minimizing their energy, just like other
interferences in CEM. Previous studies show that if the spectral angle
between the target and the non-target is significant, TCIMF can potentially
reduce the number of false positives over CEM results. This method is

ENVI User’s Guide Target Detection Wizard


734 Chapter 7: Spectral Tools

only available if you provided more than one target spectra in Step 3, or
you provided non-target spectra in Step 4.
• Mixture Tuned Target-Constrained Interference-Minimized Filter
(MTTCIMF): This method combines the Mixture Tuned technique and
TCIMF target detector. It uses a Minimum Noise Fraction (MNF)
transform input file to perform TCIMF, and it adds an infeasibility image
to the results. The infeasibility image is used to reduce the number of false
positives that are sometimes found when using TCIMF alone. The output
of MTTCIMF is a set of rule images corresponding to TCIMF scores and a
set of images corresponding to infeasibility values. The infeasibility results
are in noise sigma units and indicate the feasibility of the TCIMF result.
Correctly mapped pixels have a high TCIMF score and a low infeasibility
value. If non-target spectra were specified, MTTCIMF can potentially
reduce the number of false positives over MTMF. This method is only
available if you provided more than one target spectra in Step 3 or you
provided non-target spectra in Step 4, and you applied the MNF transform
in Step 5.
• Mixture Tuned Matched Filtering (MTMF): MTMF uses an MNF
transform input file to perform MF, and it adds an infeasibility image to the
results. The infeasibility image is used to reduce the number of false
positives that are sometimes found when using MF alone. Pixels with a
high infeasibility are likely to be MF false positives. Correctly mapped
pixels will have an MF score above the background distribution around
zero and a low infeasibility value. The infeasibility values are in noise
sigma units that vary in DN scale with an MF score. This method is only
available if you applied the MNF transform in Step 5.
2. If you wish to set advanced parameters for the target detection methods, click
Show Advanced Options. Otherwise, click Next to proceed. The next steps
pertain to the advanced settings.
3. If you selected the CEM and/or TCIMF method(s), you need to model the
composite unknown background with statistics such as a covariance or
correlation matrix. The reference target signature is generally only present in a
small number of pixels in a scene, so the background statistics are usually
computed over the whole scene. Click the toggle button to select using the
Covariance Matrix or Correlation Matrix for the calculation.
4. If you selected the ACE, CEM, MF, TCIMF, MTMF, and/or MTTCIMF
method(s), you can model the scene background by removing anomalous
pixels before calculating background statistics. To model the subspace
background, enable the Use Subspace Background check box. By better

Target Detection Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 735

characterizing the subspace background, you achieve greater target-to-


background separation and can potentially improve ACE, CEM, MF, TCIMF,
MTMF, and/or MTTCIMF detection results, particularly in scenes that contain
a lot of clutter or man-made objects.
5. If Use Subspace Background is enabled, specify the Background Threshold
to use for calculating the subspace background statistics. This value indicates
the fraction of the background in the anomalous image to use. The allowable
range is 0.500 to 1.000 (the entire image).
6. Click Next in the Wizard. ENVI generates one file per method, with a
corresponding suffix in the filename. Each file includes one rule image per
target. For MF, CEM, OSP, and TCIMF, the value in the rule image represents
the sub-pixel abundance of the target in each pixel. For MTMF and
MTTCIMF, the file also includes an infeasibility band for each target.
When processing is complete, the Load Rule Images and Preview Results
panel appears.

Load Rule Images and Preview


In Step 7 of the Target Detection Wizard, you load the rule images that ENVI created
during target detection processing.
The first rule image listed in the Target and Method columns is automatically loaded
into a display group with a Square Root stretch applied. Binary Preview mode is
automatically enabled, and you should see detected target pixels highlighted in the
color you specified in Step 3 (Select Target Spectra). The Target Pixel Count tells
you how many pixels ENVI found that matched your target spectra.
Tip
If you are viewing very large images, you may want to disable the Binary Preview
check box.

To display other output, do the following. Any selections you make are automatically
reflected in the display group.
1. Select one Target from the column.
2. Select one Method from the column.
The new target and/or method are loaded into the display group. When you
select MTMF and MTTCIMF results, a 2D Full Band Scatter Plot opens.
When viewing results that include a Full Band Scatter Plot, a good region to visualize
is one defined by high detection scores and low infeasibility values.

ENVI User’s Guide Target Detection Wizard


736 Chapter 7: Spectral Tools

Though similar to the 2D Scatter Plot, the Full Band 2D Scatter Plot view is
constructed from the entire band, not just the data visible in the Image window. When
the view in the Image window changes, the view in the Full Band Scatter Plot does
not. When you select different regions in the Full Band Scatter Plot, the highlighted
pixels in the Image, Scroll, and Zoom windows update.
Dancing pixels, density slice, and menus are not available. Use the following mouse
buttons in the 2D plot:
• Draw polygons using the left mouse button. Left-click in the scatter plot to
define the vertices of a new polygon that will select pixels. Right-click to close
the polygon.
Note
Clicking the middle mouse button before you close the polygon erases it.

• Resize the scatter plot using the middle mouse button. Click the middle mouse
button, grab the corner of the window and drag to the desired size. To reset the
plot to its default size, middle-click anywhere on the plot.
Note
Resizing the scatter plot causes any drawn polygon(s) to be reset.

• Erase all drawn polygons by clicking the middle mouse button outside of the
scatter plot.
To further refine the display, you can do the following:
• To apply a different stretch to the display, select from the Default Stretch
drop-down list. Square Root is typically a good stretch when the target pixels
occupy a small population of the image.
• For MF, CEM, ACE, SAM, OSP, and TCIMF: ENVI uses a default
thresholding value. To apply a different Rule Threshold, move the slider or
enter a new value. If the rule value is larger than the threshold, the pixel is
highlighted in the display. Adjust the threshold to a higher value to select fewer
pixels, and vice versa.
Note
Threshold settings behave in the opposite manner for SAM since lower
values represent a high probability of being a target in the SAM rule image.

• To change the color of the detected target pixels in the display, see “Editing
ROI Attributes” on page 326.

Target Detection Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 737

When you have finished loading and previewing the output images, click Next. The
Target Filtering panel appears.

Filter Targets
In Step 8 of the Target Detection Wizard, you have the opportunity to use different
filtering options to clean up mis-detected pixels and false positives. Sometimes a
single target object can be separated into multiple objects by only several mis-
detected pixels, and sometimes false positives are detected as a blob with a single or a
few pixels.
1. Select the target to filter from the Select Target drop-down list.
2. Choose from the following Filter Options:
• Clumping: Groups the separated pixels into one object. The target pixels
are clumped together by first performing a morphological dilate operation
then by an erode operation using a kernel of the size specified in the
clumping parameters.
• Sieving: Removes small isolated objects. It looks at the neighboring four
or eight pixels to determine if a target pixel is grouped with other target
pixels. If the number of target pixels that are grouped is less than the
Group Min Threshold value, ENVI removes those pixels from the output
image.
3. If you are using the Clumping filter, set the morphological Operator Size for
Rows and Columns.
4. If you are using the Sieving filter, set the minimum number of pixels contained
in a class group in the Group Min Threshold field. ENVI removes any groups
of pixels smaller than this value from the class.
5. For Sieving, toggle the Number of Neighbors button to select 4 or 8 as the
neighboring pixels to look at when determining the number of pixels in a class
group. The four-neighbor region around a pixel consists of the two adjacent
horizontal and two adjacent vertical neighbors. The eight-neighbor region
around a pixel consists of all the immediately adjacent pixels.
6. Click Next to filter the display. The Export Results panel appears.

Export Results
In Step 9 of the Target Detection Wizard, you select whether to export the target
detection results to one shapefile and/or ROI per target detection method.

ENVI User’s Guide Target Detection Wizard


738 Chapter 7: Spectral Tools

For shapefile output, ENVI performs raster-to-vector conversion for each of the
selected target detection methods and lists the output in the Available Vectors List.
The shapefiles and ROIs are saved to the directory you specified with the output root
name at file input.
If you are exporting to ROIs, enable Display ROI to have ENVI automatically
display the ROI Tools dialog after the ROIs are created.
After you make your selection, click Next. When ENVI is done producing export
files, the View Statistics and Report panel appears.
If you exported to Shapefiles, the Available Vectors List appears, listing the
Shapefiles ENVI created.
If you exported to ROIs and enabled the Display ROIs check box, the ROI Tools
dialog appears. Use the ROI Tools dialog to find and delete false positives. Navigate
to target objects that are false positives and click Delete Part.

View Statistics and Report


In Step 10 of the Target Detection Wizard, the Statistics tab in the View Statistics and
Report panel shows statistics for each of the selected target detection methods.
The statistic report columns include Target Name, Method, Target Count, Total Area
(in input map units), Statistics are available only when you exported an ROI and/or
shapefile in the previous step. Average Area (in input map units). To save the
summary report, click Save Target Detection Summary and enter a filename and
path in the Output Report Filename dialog that appears.
The Report tab shows a summary of the setup you used to generate the target
detection results.

Target Detection Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 739

Spectral Libraries
Use Spectral Libraries to build and maintain personalized libraries of material
spectra, and to access several public-domain spectral libraries. ENVI provides
spectral libraries developed at the Jet Propulsion Laboratory for three different grain
sizes of approximately 160 “pure” minerals from 0.4 to 2.5 μm. ENVI also provides
public-domain U.S. Geological Survey (USGS) spectral libraries with nearly 500
spectra of well-characterized minerals and a few vegetation spectra, from a range of
0.4 to 2.5 μm. Spectral libraries from Johns Hopkins University contain spectra for
materials from 0.4 to 14 μm. The IGCP 264 spectral libraries were collected as part
of IGCP Project 264 during 1990. They consist of five libraries measured on five
different spectrometers for 26 well-characterized samples. Spectral libraries of
vegetation spectra were provided by Chris Elvidge, measured from 0.4 to 2.5 μm. See
“ENVI Spectral Libraries” on page 1183 for more information and references.
ENVI spectral libraries are stored in ENVI’s 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 Libraries” on page 1183). You can display and enhance ENVI
spectral libraries.

Opening Spectral Libraries


Use the Spectral Library Viewer to open and view the contents of a spectral library
and to plot individual library spectra.
1. From the ENVI main menu bar, select Spectral → Spectral Libraries →
Spectral Library Viewer. The Input File dialog appears.
2. Select the name of a spectral library.
3. Click OK. The Spectral Library Viewer dialog appears. You can also open the
Spectral Library Viewer from the right-click menu of a spectral library shown
in the Available Bands List.

Plotting Library Spectra


1. To plot a spectrum, select an individual spectrum name in the Spectral Library
Viewer dialog (Figure 7-72). A Spectral Library plot window appears with a
plot of that spectrum.

ENVI User’s Guide Spectral Libraries


740 Chapter 7: Spectral Tools

2. To plot multiple spectra at the same time, select multiple spectrum names.
Each new spectrum is plotted in the same Spectral Library plot window as a
new color.
3. To show the names and colors of the plotted spectra, right-click inside the
Spectral Library plot window and select Plot Key.
4. To scale the library spectra by a constant, from the Spectral Library Viewer
menu bar, select Options → Edit (x,y) Scale Factors, then enter a value in the
X Multiplier and Y Multiplier fields.
5. Click OK. The spectral library spectra are multiplied by that value. Scale
factors are used to compare library spectra to image spectra that are scaled into
integers, or to convert wavelength units between microns and nanometers.

Plotting Other Spectra


To plot spectra from other plot windows with the spectral library entries:
1. Right-click in the Spectral Library plot window and select Plot Key to show
the plot names.
2. Left-click and drag a plot name (shown in color) to another Spectral Library
plot window (see “Moving Plots to Another Plot Window” on page 106).

Spectral Libraries ENVI User’s Guide


Chapter 7: Spectral Tools 741

Figure 7-72: Spectral Library Viewer Dialog (left) Showing Individual Spectra and
Spectral Library Plot Window (right)

Editing and Managing Spectral Library Plots


To interact with and edit spectral library plots, use the procedures described in “Using
Interactive Plot Functions” on page 106.

Resampling Spectral Libraries


Use Spectral Library Resampling to resample spectral libraries to match either the
response of a known instrument (for example, TM, MSS, or AVIRIS), a user-defined
filter function, an ASCII wavelength file (with or without FWHM information), or
the wavelengths of a specific image input file. The resampling method you use
depends on the input information. If you only provide wavelengths (band centers),
ENVI assumes critical sampling and uses a Gaussian model with a FWHM equal to
the band spacings. If you provide wavelengths and FWHM information, ENVI uses a
Gaussian model using the FWHM spacings. If you provide a filter function, ENVI
uses that for the resampling.
1. From the ENVI main menu bar, select Spectral → Spectral Libraries →
Spectral Library Resampling. The Input File dialog appears.

ENVI User’s Guide Spectral Libraries


742 Chapter 7: Spectral Tools

2. Select the name of a spectral library.


3. Click OK.

Selecting Resampling Types


1. Select the appropriate Resample Wavelength to radio button.
2. Enter a Set Bad Values to value.
Bands that fall outside the input wavelength range are considered bad values,
and the value you enter will be used for these bands. No extrapolation is
performed. For example, if your input data ranges from 0.4-2.4 μm and you
resample to 0.3-2.5 μm, the bands between 0.3-0.4 and 2.4-2.5 μm will contain
the Set Bad Values to value.
3. Select output to File or Memory.
4. Click OK.
An additional dialog may appear, depending on the type of resampling selected.
Resampling from Data Files
If you select Input Data File as the resampling method in the Spectral Resampling
Parameters dialog, the File Containing Output Wavelength dialog appears.
The data file must contain wavelength values used for the resampling in its associated
header. If FWHM values are present in the file header, they are also used in the
resampling.
1. Select the filename.
2. Click OK. ENVI adds the resulting output to the Available Bands List.
Resampling from ASCII Files
If you select Input ASCII File as the resampling method in the Spectral Resampling
Parameters dialog and click OK, the Enter File Containing Output Wavelength dialog
appears.
1. Select the ASCII wavelength file. The Input ASCII File dialog appears.
2. Specify the Wavelength Column.
• If you know the units of the wavelengths contained in the file, select the
units from the Wavelength Units drop-down list.
• If the ASCII file also contains FWHM values, specify the FWHM
Column.

Spectral Libraries ENVI User’s Guide


Chapter 7: Spectral Tools 743

3. Click OK. ENVI adds the resulting output to the Available Bands List.
If the input and output wavelength ranges do not overlap completely, and you
did not specify output wavelength units, ENVI prompts you to specify the
output wavelength units to perform the conversion.
Resampling from User-Defined Filter Functions
If you select User Defined Filter Function as the resampling method in the Spectral
Resampling Parameters dialog, the Input Filter Function Spectral Library dialog
appears.
The user-defined filter function must take the form of an ENVI spectral library with
each sample of the image representing a wavelength value and each line of the image
representing an individual filter function. The value at each wavelength must be a
weight between 0 and 1, which is used as a multiplicative factor when applied to the
library being resampled. To see an example filter function file, navigate to the
filt_func directory of your ENVI installation, open the Landsat TM file tm.sli
as a spectral library file, and plot the filter functions.
1. In the Input Filter Function Spectral Library dialog, select the filter function.
2. Click OK. ENVI adds the resulting output to the Available Bands List.
Note
You should not resample from a low resolution to a high-resolution spectrum; the
results may be false.

Resampling from Pre-Defined Filter Functions


If you select Pre-Defined Filter Function as the resampling method in the Spectral
Resampling Parameters dialog, the Sensor drop-down list appears.
Select a supported sensor type. ENVI adds the resulting output to the Available Bands
List.
Note
The SPOT-1 filter functions included in spot.sli correspond to the HRV-1
instrument. The SPOT-4 filter functions included in spot.sli correspond to the
HRVIR-1 instrument. (For the Vegetation instrument, bands 2, 3, and 4 are the same
as HRVIR-1 but band 1 is not provided.) The SPOT-5 filter functions included in
spot.sli correspond to the HRG-1 instrument.

ENVI User’s Guide Spectral Libraries


744 Chapter 7: Spectral Tools

Building Spectral Libraries


Use the Spectral Library Builder to create ENVI spectral libraries from a variety of
spectra sources, including ASCII files, spectral files produced by ASD spectrometers,
other spectral libraries, ROI means, and spectral profiles and plots. The collected
spectra are automatically resampled to an input wavelength space using FWHM
information, if available.

Adding Wavelength Data


1. From the ENVI main menu bar, select Spectral → Spectral Libraries →
Spectral Library Builder. The Spectral Library Builder dialog appears.
2. Select the input file containing the wavelengths and optional FWHM values.
• If you select Input Data File, the wavelengths and FWHM values (if
present) are read from the ENVI header file. Click OK. The Spectral
Library Builder dialog appears.
• If you select Input ASCII File, the Enter File Containing Output
Wavelength dialog appears. Select an ASCII file. The Input ASCII File
dialog appears. Specify the Wavelength Column. If you know the units of
the wavelengths contained in the file, select the units from the Wavelength
Units drop-down list. If the ASCII file also contains FWHM values,
specify the FWHM Column. Click OK. The Spectral Library Builder
dialog appears.
• If you select First Input Spectrum, the Spectral Library Builder dialog
appears. Click OK.

Spectral Libraries ENVI User’s Guide


Chapter 7: Spectral Tools 745

Figure 7-73: Spectral Library Builder Dialog

Collecting Spectra
Use the Spectral Library Builder dialog to collect endmember spectra from a variety
of sources. All spectra are automatically resampled to the selected wavelengths. For
details, see “Importing Spectra” on page 442 and “Managing Endmember Spectra”
on page 453.

Writing Spectral Libraries


After collecting your spectra, select an output option to build the spectral library:
• To create an ASCII file containing all of the spectra, select File → Save
Spectra As → ASCII from the Spectral Library Builder menu bar. Specify an
output filename and click OK.
• To create an ENVI spectral library either as an output file or in memory, select
File → Save Spectra As → Spectral Library.

ENVI User’s Guide Spectral Libraries


746 Chapter 7: Spectral Tools

Spectral Slices
Use Spectral Slices to extract a combined spatial and spectral profile from a multi-
band image. You can slice images in the following way:
• Horizontally: All of the bands for a single line of the image
• Vertically: All of the bands for a single pixel column of the image
• Arbitrarily: You define the direction by selecting an ROI polyline (see
“Drawing ROIs” on page 323).
Slices in ENVI are saved as gray scale images, with the following characteristics:
• The line direction (y) corresponds to the spatial dimension of the image being
sliced. For a horizontal slice, the number of lines is equal to the number of
samples. For a vertical slice, the number of lines is equal to the number of
lines. For an arbitrary slice, the number of lines is equal to the total number of
pixels along the ROI polyline.
• The sample direction (x) corresponds to the spectral dimension, or the number
of bands in the sliced image.
• The gray scale image shows the spectral intensity (reflectance, radiance, and so
forth), depending on the calibration of the data.

Extracting Horizontal Slices


Use Horizontal Slice to show the image spectra for all of the pixels in a line of the
input image data. You can pre-determine the position for the slice by selecting
Tools → Cursor Location/Value from the Display group menu bar (see “Cursor
Location/Value Reporting Options” in ENVI Help).
1. From the ENVI main menu bar, select Spectral → Spectral Slices →
Horizontal Slice. The Input File dialog appears.
2. Select an input file and perform optional Spectral Subsetting, then click OK.
The Spectral Slice Parameters dialog appears.
3. Enter a Line value for the horizontal slice.
4. Select output to File or Memory.
5. Click OK. ENVI adds the resulting output to the Available Bands List.

Spectral Slices ENVI User’s Guide


Chapter 7: Spectral Tools 747

Extracting Vertical Slices


Use Vertical Slice to show the image spectra for a single column of input image data.
You can pre-determine the position for the slice by selecting Tools → Cursor
Location/Value from the Display group menu bar (see “Cursor Location/Value
Reporting Options” in ENVI Help).
1. From the ENVI main menu bar, select Spectral → Spectral Slice → Vertical
Slice. The Input File dialog appears.
2. Select an input file and perform optional Spectral Subsetting, then click OK.
The Spectral Slice Parameters dialog appears.
3. Enter a Sample value for the vertical slice.
4. Select output to File or Memory.
5. Click OK. ENVI adds the resulting output to the Available Bands List.

Extracting Arbitrary Slices


Use Arbitrary Slice to show the image spectra for an ROI that you previously
defined. You typically define an arbitrary slice using the Polyline option for defining
ROIs, but you can also use polygons or points. All of the pixels included in the ROI
are used to make the spectral slice.
1. From the ENVI main menu bar, select Spectral → Spectral Slice →
Arbitrary Slice. The Input File dialog appears.
2. Select an input file and perform optional Spectral Subsetting, then click OK.
The Spectral Slice Parameters dialog appears with the file characteristics and
processing options listed.
• If only one ROI is currently defined, it is automatically used for the
arbitrary slice.
• If more than one ROI exists, you can select the ROI to use for the slice by
selecting the name of the desired region in the Select Region for Spectral
Slice list.
3. Select output to File or Memory.
4. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Spectral Slices


748 Chapter 7: Spectral Tools

MNF Rotation
Use MNF Rotation to determine the inherent dimensionality of image data, to
segregate noise in the data, and to reduce the computational requirements for
subsequent processing. For more information, see “Minimum Noise Fraction
Transform” on page 516.

MNF Rotation ENVI User’s Guide


Chapter 7: Spectral Tools 749

Pixel Purity Index


Use Pixel Purity Index (PPI) to find the most spectrally pure (extreme) pixels in
multispectral and hyperspectral images. These typically correspond to mixing
endmembers. The PPI is computed by repeatedly projecting n-D scatter plots on a
random unit vector. ENVI records the extreme pixels in each projection (those pixels
that fall onto the ends of the unit vector) and it notes the total number of times each
pixel is marked as extreme. A Pixel Purity Image is created where each pixel value
corresponds to the number of times that pixel was recorded as extreme.
The PPI function can create a new output band or continue its iterations and add the
results to an existing output band. The PPI is typically run on an MNF transform
result, excluding the noise bands (see “Minimum Noise Fraction Transform” on
page 516). The results of the PPI are usually used as input into ENVI’s n-D
Visualizer (see “The n-D Visualizer” on page 754).
Tip
See “Spectral Hourglass Wizard” on page 829 for instructions on the ENVI
hourglass processing flow, including the PPI, to find and map image spectral
endmembers from hyperspectral or multispectral data.

FAST Pixel Purity Index


You can choose a disk-based PPI method or a FAST PPI method. The FAST PPI
method places the image data into memory and performs the computations in
memory, which is much faster than the disk-based PPI method, but requires adequate
memory. Use spatial and spectral subsetting or a more sparse array of the data
(through subsampled resolution) to fit the image data into memory. ENVI informs
you of the amount of memory necessary to perform the FAST PPI and prompts you
for continuation. When using FAST PPI, you also have the option to create a new
output file or to add to an existing output band.

ENVI User’s Guide Pixel Purity Index


750 Chapter 7: Spectral Tools

Selecting Input Files


Use New Output Band the first time you run the PPI. ENVI creates an output band
containing the number of times each pixel was found to be extreme (pure). You can
use this as input into ENVI’s n-D Visualizer (see “The n-D Visualizer” on page 754).
1. From the ENVI main menu bar, select Spectral → Pixel Purity Index → New
Output Band or [FAST] New Output Band. The Input File dialog appears.
2. Select the input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK.
Tip
You typically run the PPI on an MNF transform result and use spectral
subsetting to exclude noise bands based on the eigenimages and eigenvalue
plot (see “Calculating Forward MNF Transforms” on page 518).

3. Click OK. The Pixel Purity Index Parameters or FAST Pixel Purity Index
Parameters dialog appears, depending on which menu item you selected in
step 1.

Figure 7-74: Pixel Purity Index Parameters (left) and Fast Pixel Purity Index
Parameters (right) Dialogs

Pixel Purity Index ENVI User’s Guide


Chapter 7: Spectral Tools 751

Setting the Number of Iterations


1. Enter a Number of Iterations value. With more iterations, ENVI does a better
job of finding the extreme pixels. Balance the number of iterations against the
time available, as each iteration can take some time depending on the CPU and
system load. Typically, thousands of iterations are required for imaging
hyperspectral data. The resulting image header file will list the number of
iterations run.
2. The Iterations per Block field, which appears only in the Pixel Purity Index
Parameters dialog, indicates how many iterations ENVI should perform at
once, and it determines the resolution of the PPI plot. Specifying a block size
means that data points are plotted every nth iteration instead of each iteration.
The default value of 250 provides reasonable performance; you should not
change this value.

Setting the Threshold Factor


Enter a Threshold Factor value in data units for extreme pixel selection.
For example, a value of 2 flags all pixels greater than two DNs from the extreme
pixels (both high and low) as extreme. This threshold selects the pixels on the ends of
the projected vector. The threshold should be approximately two to three times the
noise level in the data. Landsat TM data, for example, typically have less than 1 DN
of noise, so a threshold value of 2 or 3 works well. When using MNF data, which
normalizes the noise, a DN is equivalent to one sigma, so a threshold value of 2 or 3
works well. Larger thresholds cause the PPI to find more extreme pixels, but they are
less likely to be pure endmembers.

Subsampling the Data


The X Resize Factor and Y Resize Factor fields are only available when you select
the [FAST] New Output Band option. To subsample the data and help fit them into
memory, enter X Resize Factor and Y Resize Factor values less than 1. For
example, a resize factor of 0.5 uses every other pixel. However, you should not
subsample less than 0.25 (every fourth pixel) because extreme pixels may be
discarded.

Starting the Processing


1. In the Pixel Purity Index Parameters dialog, select output to File or Memory.
2. Click OK. If you are using the FAST PPI, a dialog appears that indicates the
amount of memory needed and prompts you to continue if that amount of
memory is acceptable.

ENVI User’s Guide Pixel Purity Index


752 Chapter 7: Spectral Tools

A processing status dialog appears with the PPI plot. This plot shows the total
number of extreme pixels satisfying the threshold criterion found by the PPI
processing as a function of the number of iterations. It should asymptotically
approach a flat line (zero slope) when all of the extreme pixels are found.

Figure 7-75: Pixel Purity Index Plot

Restarting or Continuing PPI


Use Existing Output Band or [FAST] Existing Output Band if you clicked Cancel
and PPI was interrupted during processing, or use either option if you want to
continue additional iterations on a PPI result.
1. From the ENVI main menu bar, select Spectral → Pixel Purity Index →
Existing Output Band or [FAST] Existing Output Band.
2. Select an input file (a spectrally subsetted MNF is recommended).
3. Click OK. The Pixel Purity Index Previous Result dialog appears.
4. Select a previous PPI image as the input file.
5. Click OK. The Pixel Purity Index Parameters dialog appears.
6. Enter the parameters as described in “Setting the Number of Iterations” on
page 751 and “Setting the Threshold Factor” on page 751.

Pixel Purity Index ENVI User’s Guide


Chapter 7: Spectral Tools 753

7. Click OK. A processing status dialog and Pixel Purity Index Plot appear.
ENVI adds the resulting output to the Available Bands List.

Using PPI Images for Endmember Selection


1. Display the PPI image. Brighter pixels represent more spectrally pure and
extreme hits. Darker pixels are less spectrally pure.
2. Select Window → Cursor Location/Value from the ENVI main menu bar, or
select Tools → Cursor Location/Value from the Display group menu bar to
determine the range of values present in the image.
Tip
Use interactive density slicing for a better visual representation of the high
values.

3. From the Display group menu bar, select Overlay → Region of Interest to
open the ROI Tool dialog.
4. From the ROI Tool menu bar, select Options → Band Threshold to ROI to
create an ROI containing only the pixels with high PPI values (see “Converting
Band Values to ROIs” on page 337)
You should specify a minimum threshold. For example, a minimum value of 10
includes all pixels with PPI values greater than 10 in the ROI. However, if bad data
points exist in the PPI image, you can use both a minimum and maximum threshold.
When you have created an ROI containing the high PPI values, you can use the n-D
Visualizer to interactively define the image endmembers.

ENVI User’s Guide Pixel Purity Index


754 Chapter 7: Spectral Tools

The n-D Visualizer


Use the n-D Visualizer to locate, identify, and cluster the purest pixels and the most
extreme spectral responses in a dataset. The n-D Visualizer was designed to help you
visualize the shape of a data cloud that results from plotting image data in spectral
space (with image bands as plot axes). You typically use the n-D Visualizer with
spatially subsetted Minimum Noise Fraction (MNF) data that use only the purest
pixels determined from the Pixel Purity Index (PPI).
You can also use the n-D Visualizer to check the separability of your classes when
you use ROIs as input into supervised classifications (see “Exporting ROIs to the n-D
Visualizer” on page 344). The n-D Visualizer is an interactive tool to use for selecting
the endmembers in n-D space.
An option to start the n-D Visualizer with a pre-clustered result gives you a starting
point for interactively rotating and refining the clusters of pixels into class groups.
When using the n-D Visualizer, you can interactively rotate data in n-D space, select
groups of pixels into classes, and collapse classes to make additional class selections
easier. You can export the selected classes to ROIs and use them as input into
classification, Linear Spectral Unmixing, or Matched Filtering techniques.
Tip
See “Spectral Hourglass Wizard” on page 829 for instructions on the ENVI
hourglass processing flow, including the n-D Visualizer, to find and map image
spectral endmembers from hyperspectral or multispectral data.

Background
This discussion provides a brief introduction to plotting spectra in n-D space. To
bypass this and to begin using the n-D Visualizer, skip to “Starting the n-D
Visualizer” on page 757.
Think of spectra as points in an n-D scatter plot, where n is the number of bands. The
coordinates of the points in n-D space consist of n spectral radiance or reflectance
values in each band for a given pixel. You can use the distribution of these points in n-
D space to estimate the number of spectral endmembers and their pure spectral
signatures.
Endmembers are pure spectrally unique materials that occur in a scene. Using a linear
unmixing model, you can reconstruct every spectrum in the image as some
combination of image endmember spectra.

The n-D Visualizer ENVI User’s Guide


Chapter 7: Spectral Tools 755

The n-D Visualizer was designed to receive region of interest (ROI) input containing
the spectrally purest pixels in a scene, and to allow you to segregate these pure pixels
into their respective endmembers. ROIs are used because interactively rotating all of
the data in a full image is too computationally intensive. A pure pixel is one that is the
closest to containing only one spectrally unique endmember material. Defining an
ROI that contains the purest pixels in an image is easy when you use ENVI's PPI tool.
(See “Pixel Purity Index” on page 749.) You can also import an ROI to the n-D
Visualizer that is not based on the purest pixels in the image. However, doing so
means that some endmembers may not be represented in the resulting n-D scatter
plot.

Locating Endmembers in a Spectral Data Cloud


When pixel data are plotted in a scatter plot that uses image bands as plot axes, the
spectrally purest pixels always occur in the corners of the data cloud, while spectrally
mixed pixels always occur on the inside of the data cloud.
Consider two pixels, where one is in a park with uniform grass, and the other is in a
lake. Now, consider another pixel that consists of 50 percent each of grass and lake.
This pixel will plot exactly between the previous two pixels. Now, if a pixel is 10
percent filled with grass and 90 percent filled with lake, the pixel should plot much
closer to the pixel containing 100 percent lake. This is shown in the following figure.

Figure 7-76: Scatter Plot Showing Pure Pixels and Mixing Endmembers

ENVI User’s Guide The n-D Visualizer


756 Chapter 7: Spectral Tools

Now consider a third pixel that is 100 percent filled with sand. This pixel creates a
third corner to the data cloud. Any pixel that contains a mixture of sand, water, and
grass, will fall inside the triangle defined by connecting the three pure pixels together:

Figure 7-77: Pure Pixels Defining the Corners of the Scatter Plot

Any pixel that contains only two of the three materials falls on the edge of the
triangle, but only the pure pixels fall in the corners of the triangle. In this example, the
data cloud forms a triangle. This example considers only a 2D scatter plot with three
endmembers, but even in scatter plots using any number of dimensions with data
containing any number of endmembers, pure pixels always plot in the corners of the
data cloud, and mixed pixels will fall within the shape defined by these corners.
Once you have started the n-D Visualizer, you can display scatter plots with as many
dimensions as you have bands in your input image. When you display a scatter plot
with more than three dimensions, you may notice that as the data cloud rotates, it
occasionally folds in on itself in a manner that is difficult to comprehend. This is a
result of plotting more dimensions than you can visualize (since we live in a 3D
world!) However, understanding the direction of the rotations is not necessary in
order to derive useful information from the n-D Visualizer.
Unlike ENVI’s 2D Scatter Plots tool, the n-D Visualizer scatter plots are arranged so
that the mean of each image band falls in the center of the plot. The origin of the
scatter plot is therefore in the center of the data cloud.

The n-D Visualizer ENVI User’s Guide


Chapter 7: Spectral Tools 757

Starting the n-D Visualizer


1. From the ENVI main menu bar, select Spectral → n-Dimensional
Visualizer → Visualize with New Data.
To restore a saved state, select Spectral → n-Dimensional Visualizer →
Visualize with Previously Saved Data (see “Managing n-D Visualizer States”
on page 770).
The Input File dialog appears.
2. Select the file to extract the n-D scatter plots from (typically an MNF file).
If the input file is an MNF result, spectrally subset the MNF data to exclude
noise bands determined by reviewing the eigenimages and eigenvalue plot (see
“Minimum Noise Fraction Transform” on page 516).
3. Click OK.
4. For speed and clarity, an ROI is used to limit the number of pixels that are
input into the n-D Visualizer. You should compute the ROI as a threshold from
the PPI results (see “Using PPI Images for Endmember Selection” on
page 753). If only one ROI is present for the input image, it is automatically
used as input to the n-D Visualizer. If more than one ROI is present, the n-D
Visualizer Input ROI dialog appears. Select the ROI to use.
Note
If the ROI imported into the n-D Visualizer was defined using the PPI, then
the data cloud shows only the corners of the data cloud. Normally, mixed
pixels occupy the center of the data cloud, but mixed pixels are not included
in an ROI defined using the PPI:

5. A status box appears while the ROI is loaded. The n-D Visualizer and n-D
Controls dialogs appear.

ENVI User’s Guide The n-D Visualizer


758 Chapter 7: Spectral Tools

Starting the n-D Visualizer with a Pre-clustered


Result
Starting the n-D Visualizer with a pre-clustered result gives you a starting point for
interactively rotating and refining the clusters of pixels into class groups. To use this
feature, you must have MNF and PPI files for your data.
The pre-clustered result is a “first cut” selection of potential endmembers, shown as
colored points in the data cloud. The pre-clustering operation attempts to find the
corners of the data cloud in n-D space, based on the shape of the scatter plot and the
related PPI scores of the pixels. Since the purest pixels are at the convex corners of
the data cloud, based on the linear mixed pixel model, these are the pixels you want to
identify and group together.
The algorithm first finds the pixel with the highest PPI score, using it as the seed for
the first cluster. Then it iteratively creates more clusters until either the number of
clusters is one more than the number of MNF bands used, or the inherent
dimensionality of the data is reached. A second phase of clustering groups pixels that
are near these corner points, reconciles clusters that may need to be joined, and
checks the dimensionality of the simplex formed by the cluster means.
While pre-clustering is a useful tool, it cannot outperform a skilled human willing to
take the time to understand the data, interactively explore it, and define corner
clusters manually. As such, you should look at the results of the pre-clustering as a
starting point for interactive validation, editing, and modification. Rotate the data
cloud in the n-D Visualizer and modify the endmembers, as needed, using the tools
described in “The n-D Visualizer” on page 754.
1. From the ENVI main menu bar, select Spectral → n-Dimensional
Visualizer → Auto Cluster. The n-D Precluster Input MNF File dialog
appears.
2. Select the MNF input file. Click OK. The n-D Precluster Input PPI Band
dialog appears.
3. Select the PPI input file. Click OK. The n-D Precluster Parameters dialog
appears.
4. Enter a Maximum Number of Input Pixels value to use in the n-D Visualizer.
Smaller numbers animate faster in the n-D Visualizer and show only the purest
pixels; larger numbers give a better overall picture of the scatter plot, but they
animate more slowly and may make selection of the corners more difficult. A
threshold is automatically applied to the PPI image to obtain the best PPI
pixels to use in the n-D Visualizer without exceeding the selected maximum.

The n-D Visualizer ENVI User’s Guide


Chapter 7: Spectral Tools 759

The n-D Visualizer and n-D Controls dialogs appear. The precluster results are
shown as colored pixels in the n-D Visualizer.
5. Rotate the data cloud to assess the results and modify them as needed.

General n-D Visualizer Plot Window Functions


The n-D Visualizer is a plot window that shows an n-D scatter plot of data selected
for visualization (Figure 7-78). It is a projection of the n-D data onto a 2D plane.
• The n-D Visualizer can contain data (plotted as white pixels), axes, and color-
coded classes, depending on the options you select in the n-D Controls dialog.
• You can highlight individual or groups of pixels and group them into an ROI.
• When you select the bands to plot (see “General n-D Controls Dialog
Functions” below), left-click in the n-D Visualizer to start the polygon, left-
click on each vertex of the polygon, and right-click to close the polygon.
• You can rotate the scatter plot in n-D space to isolate specific groups of pixels.

General n-D Controls Dialog Functions


The n-D Controls dialog contains representations of all of the bands that you selected
during the file selection. The bands are represented by numbered boxes that initially
appear black.
Tip
If you have more bands than the n-D Visualizer can display, middle-click or right-
click to toggle through groups containing those bands.

ENVI User’s Guide The n-D Visualizer


760 Chapter 7: Spectral Tools

Figure 7-78: n-D Visualizer (left) and n-D Controls dialog (right)

• Clicking an individual band number in the n-D Controls dialog turns the band
number white and displays the corresponding band pixel data in the n-D scatter
plot. You must select at least two bands to view a scatter plot.
• Clicking the same band number again turns it black and turns off the band
pixel data in the n-D scatter plot.
• Selecting two bands in the n-D Controls dialog produces a 2D scatter plot;
selecting three bands produces a 3D scatter plot, and so on. You can select any
combination of bands at once.

Selecting Dimensions and Rotating


Rotate data points by stepping between random projection views. You can control the
speed and stop the rotation at any time. You can move forward and backward step-by-
step through the projection views, which allows you to step back to a desired
projection view after passing it.

The n-D Visualizer ENVI User’s Guide


Chapter 7: Spectral Tools 761

1. In the n-D Controls dialog, click the band numbers (thus the number of
dimensions) you want to project in the n-D Visualizer. If you select only two
dimensions, rotation is not possible. If you select 3D, you have the option of
driving the axes, or initiating automatic rotation. If you select more than 3D,
only automatic random rotation is available.
2. Select from the following options.
• To drive the axes, select Options → 3D: Drive Axes from the n-D
Controls menu bar. Click and drag in the n-D Visualizer to manually spin
the axes of the 3D scatter plot.
• To display the axes themselves, select Options → Show Axes from the n-
D Controls menu bar.
• To start or stop the rotation, click Start or Stop in the n-D Controls dialog.
• To control the rotation speed, enter a Speed value in the n-D Controls
dialog. Higher values cause faster rotation with fewer steps between views.
• The information in the View status box in the n-D Controls dialog tells you
the number of steps you are moving through between the random
projection views.
• To move step-by-step through the projection views, click <- to go
backward and -> to go forward.
• To display a new random projection view, click New in the n-D Controls
dialog.

Identifying Endmembers
When using the n-D Visualizer, your goal is to visually identify and distinguish the
purest pixels in the image. The purest pixels always form the very tip of a corner in
the data cloud. Each corner corresponds to one spectrally unique material in the
image. Therefore, you should try to find all the corners of the data cloud and assign
each corner a different color. Once you separate the purest pixels into different
classes this way, you can use the pixel spectra from those classes as the endmembers
for spectral analysis (such as Linear Spectral Unmixing or Matched Filtering).
To determine which pixels correspond to different image endmembers, watch the data
cloud rotate until the pixels form a protrusion, or arm, out of the data cloud. When a
distinct corner becomes visible, stop the animation, select a class color from the
Class menu, and circle the most extreme corner pixels to signify that they represent
one endmember. It is best not to circle all of the pixels that cluster into a corner. If
possible, you should try to identify only the few pixels in that corner that form the
most extreme tip of the corner. These pixels contain the largest fraction of that

ENVI User’s Guide The n-D Visualizer


762 Chapter 7: Spectral Tools

particular endmember material. The less extreme pixels contain larger fractions of
other materials. A corner may consist of tens of clustered pixels or only one or two
similar pixels.
After you have colored the corner pixels, watch the data cloud rotate, and make sure
that the pixels you selected stay together in all projections. You should change the
bands used in the scatter plot periodically, so that every band is ultimately included in
the scatter plot. This ensures that all of the pixels you have identified as being in the
same class really do have similar values at all wavelengths. If the pixels do not cluster
in all projections, they do not correspond to the same material. If you find that some
of the pixels separate from the rest of the class in some projections, then you can
delete those pixels from the class by choosing White as the class color and circling
the errant pixels.

Defining Classes
Typically, classes are defined when groups of pixels stay together during rotation and
are separated from the rest of the pixels. You can define multiple classes at once. Use
the Z Profile option to help define classes (see “n-D Visualizer/Controls Options” on
page 766).
1. Click Stop in the n-D Controls dialog to stop the rotation when a group of
pixels is isolated from the main body of pixels plotted in the n-D Visualizer.
Or, use the arrow buttons to go to a particular projection view.
2. Highlight the desired pixels on the n-D Visualizer by left-clicking to set
vertices, and right-clicking to close the polygon.
3. From the n-D Controls menu bar, select Class and choose a color for the class.
To automatically use the next available class color for the next ROI, select
Class → New from the n-D Controls menu bar (or right-click in the n-D
Visualizer and select New Class).
4. Click Start to rotate the scatter plot until additional groups of pixels are
isolated, and repeat the class definition process.

Interacting with Classes


Use the n-D Class Controls dialog to interact with individual classes. The 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.

The n-D Visualizer ENVI User’s Guide


Chapter 7: Spectral Tools 763

From the n-D Controls menu bar, select Options → Class Controls.
All of the defined classes appear in the dialog. The white class contains all of the
unclustered or unassigned points. The number of points in each class is shown in the
fields next to the colored squares.
Turning Classes On/Off
To turn a class off in the n-D Visualizer, de-select the On check box for that class in
the n-D Class Controls dialog. Click again to turn it back on.
To turn all but one of the classes off in the n-D Visualizer, double-click the colored
box at the bottom of the n-D Class Controls dialog representing the class that you
want to remain displayed. Double-click again to turn the other classes back on.
Selecting the Active Class
To designate a class as the active class, click once on the colored square (at the
bottom of the n-D Class Controls dialog) corresponding to that class.
The color appears next to the Active Class label in the n-D Class Controls dialog, and
any functions you execute from the n-D Class Controls dialog affect only that class.
You may designate a class as the active class even though it is not enabled in the n-D
Visualizer.
Changing Plot Symbols
In the n-D Class Controls dialog, click Symbol and select the desired symbol.
Producing Spectral Plots
To produce spectral plots for the active class:
1. Click the Stats, Mean, or Plot button on the n-D Class Controls dialog. The
Input File Associated with n-D Data dialog appears.
• Stats: Display the mean, minimum, maximum, and standard deviation
spectra of the current class in one plot. These should be derived from the
original reflectance or radiance data file.
• Mean: Display the mean spectrum of the current class alone. This should
be derived from the original reflectance or radiance data file.
• Plot: Display the spectrum of each pixel in the class together in one plot.
This should be derived from the original reflectance or radiance data file.
2. Select the input file that you want to calculate the spectra from.

ENVI User’s Guide The n-D Visualizer


764 Chapter 7: Spectral Tools

If you select a file with different spatial dimensions than the file you used as
input into the n-D visualizer, enter the x and y offset values for the n-D subset
when prompted.
Note
If you select Plot for a class that contains hundreds of points, the spectra for all the
points will be plotted and the plot may be unreadable.

Clearing Classes
To remove all points from a class, click Clear on the n-D Class Controls dialog, or
right-click in the n-D Visualizer and select Clear Class or Clear All.
Exporting Classes
To export the points to an ROI, click Export on the n-D Class Controls dialog, or
right-click in the n-D Visualizer and select Export Class or Export All.
Designating Classes to Collapse
To include the statistics from a class when calculating the projection used to collapse
the data, select the Clp check box next to that class name in the n-D Class Controls
dialog.
If the data are in a collapsed state, they will be recollapsed using the selected classes
when you select any of the Clp check boxes (see “Collapsing Classes” on page 764).

Collapsing Classes
You can collapse the classes by means or by variance to make class definition easier
when the dimensionality of a dataset is higher than four or five. With more than four
or five dimensions, interactively identifying and defining many classes becomes
difficult. Both methods iteratively collapse the data cloud based on the defined
classes.
To collapse the data, calculate a projection (based either on class means or
covariance) to minimize or hide the space spanned by the pre-defined classes and to
maximize or enhance the remaining variation in the dataset. The data are subjected to
this special projection and replace the original data in the n-D Visualizer.
Additionally, an eigenvalue plot displays the residual spectral dimension of the
collapsed data. The collapsed classes should form a tight cluster so you can more
readily examine the remaining pixels. The dimensionality of the data, shown by the
eigenvalue plot, should decrease with each collapse.

The n-D Visualizer ENVI User’s Guide


Chapter 7: Spectral Tools 765

1. From the n-D Controls menu bar, select Options → Collapse Classes by
Means or Collapse Classes by Variance (see the descriptions in the following
sections).
An eigenvalue plot displays, showing the remaining dimensionality of the data
and suggesting the number of remaining classes to define. The n-D Selected
Bands widget changes color to red to indicate that collapsed data are displayed
in the n-D Visualizer.
2. Use the low-numbered bands to rotate and to select additional classes.
3. From the n-D Controls menu bar, select Options → Collapse Classes by
Means or Collapse Classes by Variance again to collapse all of the defined
classes.
4. Repeat these steps until you select all of the desired classes.
Collapsing Classes by Means
You must define at least two classes before using this collapsing method. The space
spanned by the spectral mean of each class is derived through a modified Gram-
Schmidt process. The complementary, or null, space is also calculated. The dataset is
projected onto the null space, and the means of all classes are forced to have the same
location in the scatter plot. For example, if you have identified two classes in the data
cloud and you collapse the classes by their mean values, ENVI arranges the data
cloud so that the two means of the identified classes appear on top of each other in
one place. As the scatter plot rotates, ENVI only uses the orientations where these
two corners appear to be on top of each other.
Collapsing Classes by Variance
With this method, ENVI calculates the band-by-band covariance matrix of the
classified pixels (lumped together regardless of class), along with eigenvectors and
eigenvalues. A standard principal components transformation is performed, packing
the remaining unexplained variance into the low-numbered bands of the collapsed
data. At each iterative collapsing, this process is repeated using all of the defined
classes. The eigenvalue plot shows the dimensionality of the transformed data,
suggesting the number of remaining classes to define.
The full dataset is projected onto the eigenvectors of the classified pixels. Each of
these projected bands is divided by the square root of the associated eigenvalue. This
transforms the classified data into a space where they have no covariance and one
standard deviation.
You should have at least nb * nb/2 pixels (where nb is the number of bands in the
dataset) classified so that ENVI can calculate the nb*nb covariance matrix.

ENVI User’s Guide The n-D Visualizer


766 Chapter 7: Spectral Tools

ENVI calculates a whitening transform from the covariance matrix of the classified
pixels, and it applies the transform to all of the pixels. Whitening collapses the
colored pixels into a fuzzy ball in the center of the scatter plot, thereby hiding any
corners they may form. If any of the unclassified pixels contain mixtures of the
endmembers included among the classified pixels, those unclassified pixels also
collapse to the center of the data cloud. Any unclassified pixels that do not contain
mixtures of endmembers defined so far will stick out of the data cloud much better
after class collapsing, making them easier to distinguish.
Collapsing by variance is often used for partial unmixing work. For example, if you
are trying to distinguish very similar (but distinct) endmembers, you can put all of the
other pixels of the data cloud into one class and collapse this class by variance. The
subtle distinctions between the unclassified pixels are greatly enhanced in the
resulting scatter plot.
UnCollapsing Classes
To uncollapse the data and return to the original dataset, select Options →
UnCollapse from the n-D Controls menu bar.
All defined classes are shown in the n-D Visualizer, and the band numbers return to a
white color in the n-D Controls menu bar.

n-D Visualizer/Controls Options


Select Options from the n-D Controls menu bar to access the n-D Class Controls
dialog, to annotate the n-D Visualizer, to start a Z Profile window, to import, delete,
and edit library spectra, to collapse classes, to clear classes, to export classes to ROIs,
to calculate mean spectra, and to turn the axes graphics on or off.

Opening the Class Controls Dialog


To access the n-D Class Controls dialog, select Options → Class Controls from the
n-D Controls menu bar. For details, see “Interacting with Classes” on page 762.

Adding Annotation
To add an annotation to the n-D Visualizer window, select Options → Annotate Plot
from the n-D Controls menu bar. See “Annotating Images and Plots” on page 31 for
further details. You cannot add borders to the n-D Visualizer.

The n-D Visualizer ENVI User’s Guide


Chapter 7: Spectral Tools 767

Plotting Z Profiles
To open a plot window containing the spectrum of a point selected in the n-D
Visualizer:
1. Select Options → Z Profile from the n-D Controls menu bar. The Input File
Associated with n-D Data dialog appears.
2. Select the data file associated with the n-D data. Typically, this file is the
reflectance or original data. If you select an input file with different spatial
dimensions than the file used for input into the n-D Visualizer, you will be
prompted to enter the x and y offsets that point to the n-D subset.
The Z Profile plot window appears.
3. Select from the following options:
• To plot the Z Profile for the point nearest the cursor, middle-click in the
n-D Visualizer plot window.
• To add plots to the Z Profile plot window, right-click in the n-D Visualizer
plot window. The Z Profile corresponding to the point you selected is
added to the Z Profile plot window.
When the Z Profile plot window is open, the selected file is automatically used
to calculate the mean spectra when you select Options → Mean Class or
Mean All from the n-D Controls menu bar.

Importing Spectra
To import spectra from other sources such as spectral libraries:
1. Select Options → Import Library Spectra from the n-D Controls menu bar.
The n-D Visualizer Import Spectra dialog appears.
The input spectra must be in the same space as the n-D input data (that is, MNF
space).
Tip
To convert the spectra to MNF, select Transform → MNF Rotation →
Apply Forward MNF to Spectra from the ENVI main menu bar, and use
the statistics you saved when you ran the MNF on the original data (see
“Minimum Noise Fraction Transform” on page 516).

ENVI User’s Guide The n-D Visualizer


768 Chapter 7: Spectral Tools

2. Drag spectra names from a Z Profile or Spectral Library plot window into the
n-D Visualizer Import Spectra dialog, or select Import from the n-D
Visualizer Import Spectra menu bar to import spectra from a spectral library,
ROI, or ASCII file. For details, see “Collecting Endmember Spectra” on
page 439 for details.
3. Click Apply. The Import Spectra Parameters dialog appears.
4. Select from the following options to set the spectra parameters.
• To edit a spectrum name, select the spectrum and make any changes in the
Name field.
• To edit the spectrum color, select the name and select a color from the
Color button.
• To plot the spectrum in the n-D Visualizer plot window, select the Show
Spectrum check box.
5. Click OK. The spectra appear in the n-D Visualizer as stars with labels. Note
that some spectra may fall outside the current projection and will not be visible
until you rotate the data.
Deleting Spectra
To delete imported library spectra from the n-D Visualizer:
1. Select Options → Delete Library Spectra from the n-D Controls menu bar.
2. Select the spectra to delete.
3. Click OK.
Editing Spectra Parameters
To change the color or name of imported library spectra and to turn spectra on or off
in the n-D Visualizer:
1. Select Options → Edit Library Spectra from the n-D Controls menu bar.
The Import Spectra Parameters dialog appears.
2. Select the spectra to edit.
3. Edit the color, change the names, and turn the Show Spectrum check box on
or off for the individual spectra.
4. Click OK.

The n-D Visualizer ENVI User’s Guide


Chapter 7: Spectral Tools 769

Plotting Mean Spectra


To plot a mean spectrum for the current class:
1. Select Options → Mean Class from the n-D Controls menu bar. Or, to plot the
mean spectra for all the defined classes, select Options → Mean All. An Input
File Associated with n-D Data dialog appears.
2. Select the file to use when calculating the mean. Typically, this file contains
reflectance data.
If a Z Profile window is active (see “Plotting Z Profiles” on page 767), the mean
spectra are automatically extracted from the file opened in the Z Profile.

Clearing Classes
To clear the currently selected class from the n-D Visualizer:
1. Select Options → Clear Class from the n-D Controls menu bar, or right-click
in the n-D Visualizer and select Clear Class. The currently selected class is
defined by the Active Class label in the n-D Class Controls dialog.
2. To clear all of the classes from the n-D Visualizer, select Options → Clear All
from the n-D Controls menu bar, or right-click in the n-D Visualizer and select
Clear All.

Exporting Classes to ROIs


After you have defined all desired classes, you can export their image pixel locations
to ROIs, which you can then use as endmembers for classifications, Linear Spectral
Unmixing, Matched Filtering, or other spectral mapping methods.
1. To export the current class to an ROI, select Options → Export Class from
the n-D Controls menu bar, or right-click in the n-D Visualizer and select
Export Class.
2. To export all of the classes defined in the n-D Visualizer to ROIs, select
Options → Export All from the n-D Controls menu bar, or right-click in the
n-D Visualizer and select Export All.
An ROI is created to match the spatial location of the corresponding image pixels,
which you can use with the original reflectance image for extraction of endmembers
and classification.

ENVI User’s Guide The n-D Visualizer


770 Chapter 7: Spectral Tools

Each time you export n-D Visualizer classes, new ROIs are generated. For example, if
you choose Export All twice, two identical ROIs are generated for each class. For
this reason, you should consider waiting until you have selected all of the corners of
the data cloud before selecting Export All.

Turning Axes On and Off


To turn the axes on or off in the n-D Visualizer:
1. Select Options → Show Axes from the n-D Controls menu bar.
2. Select Options → Show Axes again to turn off the axes.
Note
ENVI does not keep track of which classes have already been exported to ROIs. If a
selected class is exported more than once, ENVI creates multiple (identical) ROIs.

Managing n-D Visualizer States


Select File from the n-D Controls menu bar to save and restore the state of the n-D
Visualizer, including the highlighted groups of pixels.

Exporting the n-D Visualizer


Select File → Save Plot As → PostScript or Image from the n-D Controls menu bar.
To print the n-D Visualizer window, select File → Print (see “Printing in ENVI” in
ENVI Help for details).

Saving States
To save the n-D Visualizer state, select File → Save State from the n-D Controls
menu bar and enter an output filename with the extension .ndv for consistency.

Restoring Saved States


To restore a previously saved state, select File → Restore State and select the
appropriate file.
You can also restore a previously saved state by selecting Spectral → n-Dimensional
Visualizer → Visualize with Previously Saved Data from the ENVI main menu bar.

The n-D Visualizer ENVI User’s Guide


Chapter 7: Spectral Tools 771

Mapping Methods
Binary Encoding
From the ENVI main menu bar, select Spectral → Mapping Methods → Binary
Encoding. See “Applying Binary Encoding Classification” on page 416 for a
complete description.

Spectral Angle Mapper Classification


From the ENVI main menu bar, select Spectral → Mapping Methods → Spectral
Angle Mapper. See “Applying Spectral Angle Mapper Classification” on page 412
for a complete description.

Spectral Information Divergence Classification


From the ENVI main menu bar, select Spectral → Mapping Methods → Spectral
Information Divergence. See “Applying Spectral Information Divergence
Classification” on page 414 for a complete description.

LS-Fit (Linear Band Prediction)


LS-Fit performs a linear band prediction using least-squares fitting. You can use it to
find regions of anomalous spectral response in a dataset. It calculates the covariance
of the input data and uses it to predict the selected band as a linear combination of the
predictor bands plus an offset. The difference (residual) between the actual band and
the modeled band is calculated and output as an image. Pixels with a large residual
(positive and negative) indicate the presence of a feature that was not predicted (for
example, an absorption band). The modeled band image is also included in the
output. You can calculate the predicted band using existing statistics or from new
statistics.

Predicting from New Statistics


1. From the ENVI main menu bar, select Spectral → Mapping Methods →
LS-Fit (Linear Band Prediction) → Predict with new Statistics. The Input
File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK.
3. Click OK. The LS-Fit Parameters dialog appears.

ENVI User’s Guide Mapping Methods


772 Chapter 7: Spectral Tools

4. Select the bands to use as predictors.


5. Select the band to predict by clicking on the band name in the Select the
Model Band list. If you already selected this band as a predictor, it will be de-
selected under Select the Predictor Bands.
6. To subsample the data when calculating the statistics, enter Stats X/Y Resize
Factor values less than 1.
7. Enter an output statistics filename, if desired.
8. Select output to File or Memory.
The output contains two bands: the modeled band and the residual image. You can
compare the actual band and modeled band using dynamic overlays (see “Working
with Multiple Dynamic Overlays” on page 92). Pixels in the residual image with
large values, both positive and negative, show where the actual and modeled bands
differ. ENVI adds the resulting output to the Available Bands List.

Predicting from Existing Statistics


Use this option to specify an existing statistics file for band prediction. You can only
use bands with covariance values in the statistics file as predictor or model bands.
1. From the ENVI main menu bar, select Spectral → Mapping Methods → LS-
Fit (Linear Band Prediction) → Predict from Existing Stats. The Input File
dialog appears.
2. Select an input file and perform optional Spatial Subsetting, then click OK.
The Enter Statistics Filename dialog appears.
3. Select the statistics file that corresponds with the input data file. The LS-Fit
Parameters dialog appears. Only the bands used in the statistics calculations
are available for selection as predictor or model bands.
4. Select the bands to use as predictors.
5. Select the band to predict by clicking on the desired band name in the Select
the Model Band list. If you already selected this band as a predictor, it will be
deselected under Select the Predictor Bands.
6. Select output to File or Memory.
The output contains two bands: the modeled band and the residual image. You can
compare the actual band and modeled band using dynamic overlays (see “Working
with Multiple Dynamic Overlays” on page 92). Pixels in the residual image with
large values, both positive and negative, show where the actual and modeled bands
differ. ENVI adds the resulting output to the Available Bands List.

Mapping Methods ENVI User’s Guide


Chapter 7: Spectral Tools 773

Using Linear Spectral Unmixing


Use Linear Spectral Unmixing to determine the relative abundance of materials that
are depicted in multispectral or hyperspectral imagery based on the materials’
spectral characteristics. The reflectance at each pixel of the image is assumed to be a
linear combination of the reflectance of each material (or endmember) present within
the pixel.
For example, if 25% of a pixel contains material A, 25% of the pixel contains
material B, and 50% of the pixel contains material C, the spectrum for that pixel is a
weighted average of 0.25 times the spectrum of material A, plus 0.25 times the
spectrum of material B, plus 0.5 times the spectrum of material C. So, given the
resulting spectrum (the input data) and the endmember spectra, Linear Spectral
Unmixing solves for the abundance values of each endmember for every pixel.
The number of endmembers must be less than the number of spectral bands, and all
of the endmembers in the image must be used. Spectral unmixing results are highly
dependent on the input endmembers; changing the endmembers changes the results.
For additional information, see “Spectral Tools References” on page 794 and “Linear
Spectral Unmixing Results” on page 775.
Linear Spectral Unmixing has two constraint options: unconstrained or a partially
constrained unmixing. In the unconstrained method, abundances may assume
negative values and are not constrained to sum-to-unity (one). ENVI also supports an
optional, variable-weight, unit-sum constraint in the linear-mixing algorithm. This
allows you to define the weight of a sum-to-unity constraint on the abundance
fractions. It also permits proper unmixing of MNF transform data, with zero-mean
bands.
You pick a weight factor (the default value is 1) for the extra constraint equation. This
weighted unit-sum constraint is then added to the system of simultaneous equations
in the unmixing inversion process. Larger weights in relation to the variance of the
data cause the unmixing to honor the unit-sum constraint more closely. To strictly
honor the constraint, the weight should be many times the spectral variance of the
data.
Tip
If not all endmembers are known or if you only want to map a few endmembers, use
MF or MTMF (see “Using Matched Filtering” on page 776 and “Using Mixture
Tuned Matched Filtering” on page 778).

1. From the ENVI main menu bar, select Spectral → Mapping Methods →
Linear Spectral Unmixing. The Input File dialog appears.

ENVI User’s Guide Mapping Methods


774 Chapter 7: Spectral Tools

2. Select an input file and perform optional Spatial Subsetting, Spectral


Subsetting, and/or Masking, then click OK.
3. Click OK. The Endmember Collection:Unmixing dialog appears.
Select endmember spectra from a variety of sources (ASCII spectra, spectral
libraries, spectral plots, statistics files, ROIs). Spectra from all sources are
automatically resampled to match the wavelengths of the multiband image
being unmixed.
For details, see “Importing Spectra” on page 442, “Endmember Options” on
page 450, and “Managing Endmember Spectra” on page 453.

Figure 7-79: Endmember Collection Dialog

4. Click Apply. The Unmixing Parameters dialog appears.

Mapping Methods ENVI User’s Guide


Chapter 7: Spectral Tools 775

5. To apply a unit-sum constraint in the unmixing, use the toggle button to select
Yes and enter a Weight value. This weight is added to the system of
simultaneous equations in the unmixing inversion process. Larger weights
cause the unmixing to honor the unit-sum constraint more closely.
6. Select output to File or Memory.
7. Click OK.

Linear Spectral Unmixing Results


The pixel values of these images indicate the fraction of the pixel that contains the
endmember material corresponding to that image. For example, a pixel from the #1
Abundance image with a value of 0.45 indicates that 45% of the pixel contains
endmember #1. If many pixels have values above 1.0 or below 0.0, this indicates that
one or more of the endmembers chosen for the analysis are probably not well-
characterized, or that one or more additional endmembers are missing from the
analysis. View the RMS error image to help determine areas of missing or incorrect
endmembers.
Figure 7-80 shows bright pixels that represent abundances of kaolinite unmixed from
the other components using an ROI spectrum and the Linear Spectral Unmixing
technique.

Figure 7-80: Image Resulting from Linear Spectral Unmixing

ENVI User’s Guide Mapping Methods


776 Chapter 7: Spectral Tools

Using Matched Filtering


Use Matched Filtering (MF) to find the abundances of user-defined endmembers
using a partial unmixing. This technique maximizes the response of the known
endmember and suppresses the response of the composite unknown background, thus
matching the known signature. It provides a rapid means of detecting specific
materials based on matches to library or image endmember spectra and does not
require knowledge of all the endmembers within an image scene. This technique may
find some false positives for rare materials. See “Spectral Tools References” on
page 794 and “Matched Filtering Results” on page 777 for additional information.
Tip
You can use MTMF to reduce the number of false positives.

1. From the ENVI main menu bar, select Spectral → Mapping Methods →
Matched Filtering. The Input File dialog appears.
2. Select the input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK.
3. Click OK. The Endmember Collection:Matched Filter dialog appears.
4. Import spectra to match. For details, see “Importing Spectra” on page 442,
“Endmember Options” on page 450, and “Managing Endmember Spectra” on
page 453.
5. Click Apply. The Matched Filter Parameters dialog appears.
6. Use the toggle button to select Compute New Covariance Stats and enter an
output statistics filename, or toggle to Use Existing Stats File.
7. If you selected Compute New Covariance Stats: To remove anomalous pixels
before calculating background statistics, enable the Subspace Background
check box. Then, specify in the Background Threshold field the fraction of
the background in the anomalous image to use for calculating the subspace
background statistics. The threshold range is 0.500 to 1.000 (the entire image).
8. Select output to File or Memory.
9. From the Output Data Type drop-down list, select Byte or Floating Point.
10. If you select Byte, enter a Min and Max stretch value.
11. Click OK. If you selected Use Existing Stats File, select the statistics file that
corresponds to the input data file when the Input File dialog appears. This

Mapping Methods ENVI User’s Guide


Chapter 7: Spectral Tools 777

statistics file must contain both the mean and covariance statistics for the input
data.

Matched Filtering Results


The results of MF appear as a series of gray scale images, one for each selected
endmember. Floating-point results provide a means of estimating the relative degree
of match to the reference spectrum and approximate sub-pixel abundance, where 1.0
is a perfect match.
You should stretch each image (see “Using Interactive Stretching” on page 80).
If you selected byte data type output, use the data in the upper tail of the histogram
for the stretch.
The data histogram of the background material is centered around 0, and the target
(endmember) appears in the upper tail of the histogram (see Figure 7-81). Therefore,
the data in the upper tail of the histogram should be stretched from about 0.1 to about
0.65 to show only pixels containing the target material. Image values in the
symmetric histogram distribution centered on 0 are background areas.
Tip
You can set a default stretch range so that you do not have to stretch the data each
time they are displayed. See “Editing ENVI Headers” on page 194 for details.

ENVI User’s Guide Mapping Methods


778 Chapter 7: Spectral Tools

Figure 7-81: Histogram of a Matched Filter Result

Using Mixture Tuned Matched Filtering


Use Mixture Tuned Matched Filtering (MTMF) to perform MF and add an
infeasibility image to the results. The infeasibility image is used to reduce the number
of false positives that are sometimes found when using MF. Pixels with a high
infeasibility are likely to be MF false positives. Correctly mapped pixels will have an
MF score above the background distribution around zero and a low infeasibility
value. The infeasibility values are in noise sigma units that vary in DN scale with an
MF score (see Figure 7-82). For additional information, see “Mixture Tuned Matched
Filtering Results” on page 780.

Mapping Methods ENVI User’s Guide


Chapter 7: Spectral Tools 779

MTMF requires an MNF transform input file, or other data with isotropic, unit
variance noise (see “Applying Forward MNFs to Spectra” on page 525).

Figure 7-82: Diagram Showing Mixture Tuned Matched Filtering Technique

Tip
See “Spectral Hourglass Wizard” on page 829 for instructions on the ENVI
hourglass processing flow, including MNF transforms and MTMF, to find and map
image spectral endmembers from hyperspectral or multispectral data.

1. From the ENVI main menu bar, select Spectral → Mapping Methods →
Mixture Tuned Matched Filtering. The Input File dialog appears.
2. Select the input MNF file and perform optional Spatial Subsetting and/or
Spectral Subsetting, then click OK. The Endmember Collection:Mixture
Tuned MF dialog appears.
3. Import spectra to match. For details, see “Importing Spectra” on page 442,
“Endmember Options” on page 450, and “Managing Endmember Spectra” on
page 453.
The spectra must be in MNF space. You can calculate the spectra from ROIs in
the MNF input file or transform them into MNF space (see “Applying Forward
MNFs to Spectra” on page 525).

ENVI User’s Guide Mapping Methods


780 Chapter 7: Spectral Tools

Tip
The input spectra must be pure and spectrally extreme endmembers, for the
MTMF to be interpretable. You can identify these types of endmembers
using ENVI’s PPI and n-D Visualizer. See “Using PPI Images for
Endmember Selection” on page 753.

4. Click Apply. The Mixture Tuned Matched Filter Parameters dialog appears.
5. Use the toggle button to select Compute New Covariance Stats and enter an
output statistics filename, or toggle to Use Existing Stats File.
6. If you selected Compute New Covariance Stats: To remove anomalous pixels
before calculating background statistics, enable the Subspace Background
check box. Then, specify in the Background Threshold field the fraction of
the background in the anomalous image to use for calculating the subspace
background statistics. The threshold range is 0.500 to 1.000 (the entire image).
7. Select output to File or Memory.
8. From the Output Data Type drop-down list, select Byte or Floating Point.
9. If you select Byte, enter a Min and Max stretch value.
10. Click OK.
11. If you selected Use Existing Stats File, select the statistics file that
corresponds to the input data file when the Input File dialog appears. This
statistics file must contain both the mean and covariance statistics for the input
data.

Mixture Tuned Matched Filtering Results


The output from MTMF is a set of rule images corresponding to both the MF score
and the infeasibility score for each pixel compared to each endmember spectrum (two
rule images per endmember). The MF floating-point results help estimate the relative
degree of match to the reference spectrum and the approximate sub-pixel abundance,
where 1.0 is a perfect match. The infeasibility results are in noise sigma units and
indicate the feasibility of the MF result. Correctly mapped pixels have an MF score
above the background distribution, which has some noise-limited spread around zero,
and a low infeasibility value.
You can use a 2D scatter plot to identify the pixels with low infeasibilities and high
MF scores. Use interactive stretching to stretch the upper tail of the histogram when
viewing the MF resulting bands to show only pixels containing the target material
(see “Matched Filtering Results” on page 777).

Mapping Methods ENVI User’s Guide


Chapter 7: Spectral Tools 781

1. In the Available Bands List, select an MF Score image, click the Gray Scale
radio button, and click Load Band.
2. From the Display group menu bar, select Tools → 2D Scatter Plots.
3. Select an MF Score image from the Choose Band X list, and select the
corresponding Infeasibility image from the Choose Band Y list.
4. Click OK. A Scatter plot window appears.
5. Draw an ROI in the scatter plot around pixels that satisfy the high-MF, low-
infeasibility criteria. The best matches to the selected endmember are
displayed as colored pixels in the image.
Pixels with high MF scores and high infeasibility are probably false alarms and
should be rejected. Ideally, you should see a horizontal arm of true detections
across the bottom of the scatter plot. You can retrieve reliable sub-pixel
abundance values from the MF scores for low-infeasibility pixels.
6. From the Scatter Plot menu bar, select Options → Export Class to export the
selected pixels to an ROI. Repeat for each class to create ROIs of best-match
pixels.
7. You can also convert the ROIs to a classification image by selecting
Classification → Create Class Image from ROIs from the ENVI main menu
bar.
8. Once you select the best pixels from the scatter plot, the MF score for these
pixels corresponds to abundance, where a range of 0.0 to 1.0 equals percentage
abundance from 0% to 100%.

Using Constrained Energy Minimization


Constrained Energy Minimization (CEM) is similar to MF in that the only
required knowledge is the target spectra to be detected. Using a specific constraint,
CEM uses a finite impulse response (FIR) filter to pass through the desired target
while minimizing its output energy resulting from a background other than the
desired targets. A correlation or covariance matrix is used to characterize the
composite unknown background. In a mathematical sense, MF is a mean-centered
version of CEM, where the data mean is subtracted from all pixel vectors.
1. From the ENVI main menu bar, select Spectral → Mapping Methods →
Constrained Energy Minimization. The Input File dialog appears.
2. Select the input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Endmember Collection:CEM dialog appears.

ENVI User’s Guide Mapping Methods


782 Chapter 7: Spectral Tools

3. Import spectra to match. For details, see “Importing Spectra” on page 442,
“Endmember Options” on page 450, and “Managing Endmember Spectra” on
page 453.
4. Click Apply. The Constrained Energy Minimization Parameters dialog
appears.
5. Use the toggle button to select Compute New Covariance Stats and enter an
output statistics filename, or toggle to Use Existing Stats File.
6. If you selected Compute New Covariance Stats: To remove anomalous pixels
before calculating background statistics, enable the Subspace Background
check box. Then, specify in the Background Threshold field the fraction of
the background in the anomalous image to use for calculating the subspace
background statistics. The threshold range is 0.500 to 1.000 (the entire image).
7. Click the toggle button to select the Covariance Matrix or Correlation
Matrix method for the calculation.
8. Select output to File or Memory.
9. Click OK.
10. If you selected Use Existing Stats File, select the statistics file that
corresponds to the input data file when the Input File dialog appears. This
statistics file must contain both the mean and covariance statistics for the input
data.

Constrained Energy Minimization Results


The results of CEM appear as a series of gray scale images, one for each selected
endmember.
The default stretch setting provides good visibility for small features. If needed, you
can apply a different stretch so that larger features in the image are visible (see
“Using Interactive Stretching” on page 80).
Tip
You can set a default stretch range so that you do not have to stretch the data each
time they are displayed. See “Editing ENVI Headers” on page 194 for details.

Using Adaptive Coherence Estimator


Adaptive Coherence Estimator (ACE) is derived from the Generalized Likelihood
Ratio (GLR) approach. The ACE is invariant to relative scaling of input spectra and
has a Constant False Alarm Rate (CFAR) with respect to such scaling. Similar to

Mapping Methods ENVI User’s Guide


Chapter 7: Spectral Tools 783

CEM and MF, ACE does not require knowledge of all the endmembers within an
image scene.
1. From the ENVI main menu bar, select Spectral → Mapping Methods →
Adaptive Coherence Estimator. The Input File dialog appears.
2. Select the input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Endmember Collection:ACE dialog appears.
3. Import spectra to match. For details, see “Importing Spectra” on page 442,
“Endmember Options” on page 450, and “Managing Endmember Spectra” on
page 453.
4. Click Apply. The Adaptive Coherence Estimator Parameters dialog appears.
5. Use the toggle button to select Compute New Covariance Stats and enter an
output statistics filename, or toggle to Use Existing Stats File.
6. If you selected Compute New Covariance Stats: To remove anomalous pixels
before calculating background statistics, enable the Subspace Background
check box. Then, specify in the Background Threshold field the fraction of
the background in the anomalous image to use for calculating the subspace
background statistics. The threshold range is 0.500 to 1.000 (the entire image).
7. Select output to File or Memory.
8. Click OK.
9. If you selected Use Existing Stats File, select the statistics file that
corresponds to the input data file when the Input File dialog appears. This
statistics file must contain both the mean and covariance statistics for the input
data.

Adaptive Coherence Estimator Results


The results of ACE appear as a series of gray scale images, one for each selected
endmember.
The default stretch setting provides good visibility for small features. If needed, you
can apply a different stretch so that larger features in the image are visible (see
“Using Interactive Stretching” on page 80).
Tip
You can set a default stretch range so that you do not have to stretch the data each
time they are displayed. See “Editing ENVI Headers” on page 194 for details.

ENVI User’s Guide Mapping Methods


784 Chapter 7: Spectral Tools

Using Orthogonal Subspace Projection


Orthogonal Subspace Projection (OSP) first designs an orthogonal subspace
projector to eliminate the response of non-targets, then Matched Filter is applied to
match the desired target from the data. OSP is efficient and effective when target
signatures are distinct. When the spectral angle between the target signature and the
non-target signature is small, the attenuation of the target signal is dramatic and the
performance of the OSP could be poor.
1. From the ENVI main menu bar, select Spectral → Mapping Methods →
Orthogonal Subspace Projection. The Input File dialog appears.
2. Select the input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Endmember Collection:OSP dialog appears.
3. Import at least two spectra to match. For details, see “Importing Spectra” on
page 442, “Endmember Options” on page 450, and “Managing Endmember
Spectra” on page 453.
4. Click Apply. The Orthogonal Subspace Projection Parameters dialog appears.
5. Select output to File or Memory.
6. Click OK.

Orthogonal Subspace Projection Results


The results of OSP appear as a series of gray scale images, one for each selected
endmember.
The default stretch setting provides good visibility for small features. If needed, you
can apply a different stretch so that larger features in the image are visible (see
“Using Interactive Stretching” on page 80).
Tip
You can set a default stretch range so that you do not have to stretch the data each
time they are displayed. See “Editing ENVI Headers” on page 194 for details.

Mapping Methods ENVI User’s Guide


Chapter 7: Spectral Tools 785

Using Continuum Removal


Use Continuum Removal to normalize reflectance spectra so you can compare
individual absorption features from a common baseline. The continuum is a convex
hull fit over the top of a spectrum using straight-line segments that connect local
spectra maxima. The first and last spectral data values are on the hull; therefore, the
first and last bands in the output continuum-removed data file are equal to 1.0.
Tip
Using different spectral subsets gives different results, so you should spectrally
subset the data to the region containing the absorption features of interest.

The continuum is removed by dividing it into the actual spectrum for each pixel in the
image:
Scr = (S / C)
Where:
Scr = Continuum-removed spectra
S = Original spectrum
C = Continuum curve
The resulting image spectra are equal to 1.0 where the continuum and the spectra
match, and less than 1.0 where absorption features occur. You can perform continuum
removal on data files or on individual spectra in a plot window. For references, see
“Spectral Tools References” on page 794.
1. From the ENVI main menu bar, select Spectral → Mapping Methods →
Continuum Removal. The Input File dialog appears.
2. Select the input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. For the best results, spectrally
subset around the region containing the absorption features of interest.
3. Click OK. The Continuum Removal Parameters dialog appears.
4. Select output to File or Memory.
5. Click OK. ENVI adds the resulting output to the Available Bands List.

Recovering the Continuum Curve


The Continuum Removal tool only outputs the continuum-removed spectra; it does
not show you the curve of the calculated continuum. Use the results from Continuum
Removal to calculate the continuum curve:

ENVI User’s Guide Mapping Methods


786 Chapter 7: Spectral Tools

C = (S / Scr)
1. Display a hyperspectral image.
2. From the Display group menu bar, select Tools → Profiles → Z Profile
(Spectrum). A Spectral Profile window appears.
3. From the Spectral Profile menu bar, select Options → New Window: with
Plots. An ENVI Plot Window appears.
4. From the ENVI Plot Window menu bar, select Plot_Function → Continuum
Removed.
5. From the ENVI main menu bar, select Spectral → Spectral Math. The
Spectral Math dialog appears.
6. In the Enter an expression field, enter the following:
float(S1) / (S2)

7. Click OK. The Variables to Spectra Pairings dialog appears.


8. Map S1 to the original spectrum (in the Spectral Profile window), and map S2
to the continuum-removed plot (in the ENVI Plot Window).
9. Ensure that the Output Result to toggle button is set to Same Window.

Mapping Methods ENVI User’s Guide


Chapter 7: Spectral Tools 787

10. Click OK. The continuum curve plots over the original spectrum. Following is
an example.

Figure 7-83: Continuum Curve

You may notice that there are some small local maxima that do not fall on the
continuum curve. It is not always advantageous to place every peak in a spectrum on
the continuum curve, especially if the spectrum contains noise or poorly defined
features. The algorithm that ENVI uses to define local maxima was chosen to
increase the likelihood of identifying real absorption features. Also, remember that in
ENVI, the continuum-removed spectra are used primarily for Spectral Feature Fitting
(SFF), where it is very important to spectrally subset the data to isolate the feature of
interest. If you are investigating SFF results, you need to zoom to the region of the
Z Profile that corresponds to the spectral subset before starting a new plot window
and recovering the continuum curve.

ENVI User’s Guide Mapping Methods


788 Chapter 7: Spectral Tools

Using Spectral Feature Fitting


Use Spectral Feature Fitting (SFF) to compare the fit of image spectra to reference
spectra using a least-squares technique. SFF is an absorption-feature-based
methodology. The reference spectra are scaled to match the image spectra after the
continuum is removed from both datasets.
For more information, see “Spectral Tools References” on page 794 and “Spectral
Feature Fitting Results” on page 789.
1. From the ENVI main menu bar, select Spectral → Mapping Methods →
Spectral Feature Fitting. The Input File dialog appears.
2. Select the input file and perform optional Spatial Subsetting and/or Masking,
then click OK.
Input spectra for SFF should be from a continuum-removed perspective; there
must be some degree of concavity within the spectral “curve” to avoid
generating an error.
If the selected input file is not continuum-removed, ENVI removes the
continuum on-the-fly. However, the function executes much slower.
3. In the Input File dialog, select Spectral Subset. The File Spectral Subset
dialog appears.
4. Select bands to subset around the region containing the absorption features of
interest.
5. Click OK.
6. Click OK in the Input File dialog. The Endmember Collection:Feature Fitting
dialog appears.
7. Import the reference spectra. For details, see “Importing Spectra” on page 442,
“Endmember Options” on page 450, and “Managing Endmember Spectra” on
page 453.
8. Click Apply. The Spectral Feature Fitting Parameters dialog appears.
9. Use the toggle button to switch between Output separate Scale and RMS
Images or Output Combined (Scale/RMS) Image. For more information, see
“Working with SFF Results” on page 789.
10. Select output to File or Memory.
11. Click OK. ENVI adds the resulting output to the Available Bands List.

Mapping Methods ENVI User’s Guide


Chapter 7: Spectral Tools 789

Spectral Feature Fitting Results


A scale image and RMS image or a combined “fit” (scale/RMS) image is output for
each reference spectrum. The image is a measure of absorption feature depth, which
is related to material abundance. The brighter pixels in the scale image indicate a
better match to the reference material in those pixels (for areas with a low RMS
error). However, a large scale value (> 1) can result if incorrect reference
endmembers are input or if the incorrect wavelength range is used. The image and
reference spectra are compared at each wavelength in a least-squares sense, and the
RMS error is calculated for each reference spectrum. Dark pixels in the RMS error
image indicate a low error. You can use the RMS errors and scale image results to
locate areas that best match the reference spectrum.
Working with SFF Results
To view areas in the image that best match the reference spectrum, use 2D scatter
plots to plot the scale versus RMS. Draw an ROI over the scatter plot area
corresponding to a low RMS and high scale values to highlight the pixels that best
match the reference spectrum.
Another way to produce results that show the distribution of the reference material is
to use the “fit” (scale/RMS) image. Higher fit values indicate better matches to the
reference spectrum.
To generate an output classification-like image, select Classification → Rule
Classifier from the ENVI main menu bar to threshold the output images using a
maximum threshold value.

ENVI User’s Guide Mapping Methods


790 Chapter 7: Spectral Tools

Using Multi Range Spectral Feature Fitting


Use Multi Range SFF to apply SFF using multiple wavelength ranges for each
endmember. Spectral signatures are typically characterized by multiple absorption
features. The Multi Range SFF function allows you to define multiple and different
wavelength ranges around each endmember’s absorption features. This SFF method
uses the multiple ranges in its comparisons. Each spectral range is interactively
defined, and the continuum-removed absorption feature is plotted. You can apply
optional weights to each spectral range to emphasize more important features. You
can also save the defined wavelength ranges to a file and reuse them.
Multi Range SFF executes more slowly than SFF but is likely to produce more
accurate results. Like SFF, neither the input image nor the reference spectra need to
be continuum-removed before using Multi Range SFF. However, you are not required
to spectrally resample the reference spectra to match the wavelengths of the input
image, or to scale the reference spectra into the same range as the input image before
using the Multi Range SFF. You can interpret the resulting images in the same
manner as SFF results (see “Spectral Feature Fitting Results” on page 789).

Using New Spectral Ranges in Multi Range SFF


1. From the ENVI main menu bar, select Spectral → Mapping Methods →
Multi Range SFF → Use New Ranges. The Input File dialog appears.
2. Select the input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK.
3. Click OK. The Select Input Spectral Library dialog appears.
4. Open or select the spectral library.
5. Click OK. The Input Spectral Library dialog appears.
6. Select the endmember spectra from the list.
7. Click OK. The Edit Multi Range SFF Endmember Ranges dialog appears with
a list of the selected endmembers.
8. Select an endmember name on the left. The spectrum plot appears on the right.

Mapping Methods ENVI User’s Guide


Chapter 7: Spectral Tools 791

9. Choose which spectral ranges to use in the SFF by left-clicking in the plot. A
marker appears. Left-click and drag to position the marker on the starting
wavelength. Right-click and select Set as Start Range. The wavelength value
appears in the Start Range field. Left-click and move the marker to the ending
range wavelength position. Right-click and select Set as End Range. The
wavelength value appears in the End Range field.
Tip
Middle-click and drag to zoom in to the spectral plot. Use the right-click
menu to reset the zoom range.

You can also enter Start Range and End Range values directly. You can
adjust the position of the markers one wavelength increment at a time by
clicking the increase/decrease buttons next to the Start Range and End Range
fields. Pressing Enter after entering a wavelength value causes that value to
jump to the nearest library spectrum wavelength value.
10. Click Add Range, or right-click in the plot window and select Add Range.
The range is added to the Edit Multi Range SFF Endmember Ranges dialog,
and the continuum-removed selected feature is plotted. The number next to the
feature is its depth measure. This is a ratio of feature depth divided by
continuum level; lower values indicate a larger feature depth.
• To remove a spectral range, click Remove in the Edit Multi Range SFF
Endmember Ranges dialog.
• To remove the colored continuum graphic from the plot, select the Cont
check box in the Edit Multi Range SFF Endmember Ranges dialog.
• To remove the continuum-removed feature graphic from the plot, select the
CR check box in the Edit Multi Range SFF Endmember Ranges dialog.
• To weight one feature more than another for that endmember, enter the
weight factors. The weight factors are calculated by summing the total
entered weights and dividing each weight by that sum.
11. Select other spectral ranges, if desired, for that endmember by repeating steps
6-7.
12. Select the next endmember and select its spectral ranges.
13. Save the ranges to a file by selecting Save Ranges in the Edit Multi Range SFF
Endmember Ranges dialog and entering an output filename.
14. Click OK. The Multi Range SFF Parameters dialog appears.

ENVI User’s Guide Mapping Methods


792 Chapter 7: Spectral Tools

15. Select whether to output separate or combined scale and RMS images using
the toggle button (see “Spectral Feature Fitting Results” on page 789, which
describes these outputs).
16. Enter an output filename.
17. Click OK. ENVI adds the resulting output to the Available Bands List.

Using Previously Defined Spectral Ranges in Multi Range SFF


1. From the ENVI main menu bar, select Spectral → Mapping Methods →
Multi Range SFF → Use Previous Ranges. The Input File dialog appears.
2. Select the input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK.
3. Click OK. The Enter Multi Range SFF Parameters Filename dialog appears.
4. Select the file containing the previously defined spectral ranges. The Select
Endmembers dialog appears.
5. Select the desired endmembers to use.
6. Click OK. The Edit Multi Range SFF Endmember Ranges dialog appears.
7. Edit the ranges as desired (see “Using New Spectral Ranges in Multi Range
SFF” on page 790 for more details).
8. Click OK. The Multi Range SFF Parameters dialog appears.
9. Select whether to output separate or combined scale and RMS images using
the toggle button (see “Spectral Feature Fitting Results” on page 789, which
describes these outputs).
10. Enter an output filename.
11. Click OK. ENVI adds the resulting output to the Available Bands List.

Mapping Methods ENVI User’s Guide


Chapter 7: Spectral Tools 793

Using Endmember Collection


Use Endmember Collection to collect spectral endmembers from a variety of
sources to use in spectral processing techniques. You can import endmembers from
ASCII files, ASD binary files, spectral libraries, statistics files, or from ROI means.
You can also select a classification algorithm or an advanced spectral processing
technique to use.
1. From the ENVI main menu bar, select Spectral → Mapping Methods →
Endmember Collection. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking. then click OK. The Endmember Collection:
Parallel dialog appears.
3. Select Import from the Endmember Collection: Parallel menu bar to import
spectral endmembers. For details, see “Importing Spectra” on page 442,
“Endmember Options” on page 450, and “Managing Endmember Spectra” on
page 453.

ENVI User’s Guide Mapping Methods


794 Chapter 7: Spectral Tools

Spectral Tools References


Target Detection
X. Jin, S. Paswaters, and H. Cline, "A comparative study of target detection
algorithms for hyperspectral imagery," In Algorithms and Technologies for
Multispectral, Hyperspectral, and Ultraspectral Imagery XV. Proceedings of SPIE,
Vol. 7334, pp. 73341W1-73341W12.
C.-I Chang, J.-M. Liu, B.-C. Chieu, C.-M. Wang, C. S. Lo, P.-C. Chung, H. Ren,
C.-W. Yang, and D.-J. Ma, “A generalized constrained energy minimization approach
to subpixel target detection for multispectral imagery,” Optical Engineering, vol. 39,
no. 5, pp. 1275-1281, May 2000. (CEM)
H. Ren and C.-I Chang, “Target-constrained interference-minimized approach to
subpixel target detection for hyperspectral imagery,” Optical Engineering, vol. 39, no.
12, pp. 3138-3145, December 2000. (TCIMF)
S. Johnson, “Constrained energy minimization and the target-constrained
interference-minimized filter,” Optical Engineering, vol. 42, no. 6, pp. 1850-1854,
June 2003. (CEM and TCIMF)
S. Kraut, L. L. Scharf, and R. W. Butler, “The adaptive coherence estimator: a
uniformly most-powerful-invariant adaptive detection statistic,” IEEE Trans. on
Signal Processing, vol. 53, no. 2, pp. 427-438, 2005. (ACE)
D. Manolakis, D. Marden, and G. A. Shaw, “Hyperspectral image processing for
automatic target detection applications,” Lincoln Laboratory Journal, vol. 14, pp. 79-
116, 2003. (ACE)
J. C. Harsanyi and C.-I Chang, “Hyperspectral image classification and
dimensionality reduction: an orthogonal subspace projection approach,” IEEE Trans.
On Geoscience and Remote Sensing, vol. 32, no. 4, pp. 779-785, 1994. (OSP)
C.-I Chang, “Further results on relationship between spectral unmixing and subspace
projection,” IEEE Trans. on Geosciences and Remote Sensing, vol. 36, pp. 1030-
1032, May 1998. (OSP)
C.-I Chang, “Hyperspectral Imaging: Techniques for Spectral Detection and
Classification,” Kluwer Academic Publishers, Dordrecht. 2003. (OSP, CEM, TCIMF)
J. W. Boardman, “Leveraging the high dimensionality of AVIRIS data for improved
sub-pixel target unmixing and rejection of false positives: mixture tuned matched
filtering,” In: 7th JPL Airborne Geoscience Workshop, pp. 55-56, 1998. (MTMF)

Spectral Tools References ENVI User’s Guide


Chapter 7: Spectral Tools 795

Spectral Libraries
Clark, R. N., Swayze, G. A., Gallagher, A., King, T. V. V., and Calvin, W. M., 1993,
The U. S. Geological Survey Digital Spectral Library: Version 1: 0.2 to 3.0 mm: U. S.
Geological Survey, Open File Report 93-592, p. 1340.
Grove, C. I., Hook, S. J., and Paylor II, E. D., 1992, Laboratory Reflectance Spectra
of 160 Minerals, 0.4 to 2.5 Micrometers: Jet Propulsion Laboratory Pub. 92-2.
See “ENVI Spectral Libraries” on page 1183 for more references.

Pixel Purity Index


Boardman, J. W., Kruse, F. A., and Green, R. O., 1995, Mapping target signatures via
partial unmixing of AVIRIS data: in Summaries, Fifth JPL Airborne Earth Science
Workshop, JPL Publication 95-1, v. 1, pp. 23-26.

n-D Visualizer
Boardman, J. W., 1993, Automated spectral unmixing of AVIRIS data using convex
geometry concepts: in Summaries, Fourth JPL Airborne Geoscience Workshop, JPL
Publication 93-26, v. 1, pp. 11 - 14.
Boardman J. W., and Kruse, F. A., 1994, Automated spectral analysis: A geologic
example using AVIRIS data, north Grapevine Mountains, Nevada: in Proceedings,
Tenth Thematic Conference on Geologic Remote Sensing, Environmental Research
Institute of Michigan, Ann Arbor, MI, pp. I-407 - I-418.

Binary Encoding
Goetz, A. F. H., Vane, G., Solomon, J. E., and Rock, B. N., 1985, Imaging
spectrometry for earth remote sensing: Science, v. 228, pp. 1147 - 1153.
Mazer, A. S., Martin, M., Lee, M., and Solomon, J. E. (1988). Image processing
software for imaging spectrometry data analysis. Remote Sensing of Environment
24(1): pp. 201 - 210.

ENVI User’s Guide Spectral Tools References


796 Chapter 7: Spectral Tools

Spectral Angle Mapper (SAM)


Center for the Study of Earth from Space (CSES), 1992, SIPS User’s Guide, Spectral
Image Processing System, Version 1.2, Center for the Study of Earth from Space,
Boulder, CO, p. 88.
Kruse, F. A., Lefkoff, A. B., Boardman, J. B., Heidebrecht, K. B., Shapiro, A. T.,
Barloon, P. J., and Goetz, A. F. H., 1993, The Spectral Image Processing System
(SIPS) - Interactive Visualization and Analysis of Imaging Spectrometer Data:
Remote Sensing of Environment, Special issue on AVIRIS, May-June 1993, v. 44, pp.
145 - 163.

Linear Spectral Unmixing


Boardman, J. W., 1989, Inversion of imaging spectrometry data using singular value
decomposition: in Proceedings, IGARSS’89, 12th Canadian Symposium on Remote
Sensing, v. 4., pp. 2069-2072.
Boardman, J. W., 1992, Sedimentary facies analysis using imaging spectrometry: A
geophysical inverse problem: Unpublished Ph. D. Thesis, University of Colorado,
Boulder, p. 212.

Matched Filtering
Boardman, J. W., Kruse, F. A., and Green, R. O., 1995, Mapping target signatures via
partial unmixing of AVIRIS data: in Summaries, Fifth JPL Airborne Earth Science
Workshop, JPL Publication 95-1, v. 1, pp. 23-26.
Chen, J. Y. and I. S. Reed, 1987, A detection algorithm for optical targets in clutter,
IEEE Trans. on Aerosp. Electron. Syst., V. AES-23, No. 1.
Harsanyi, J. C., and C. I. Chang, 1994, Hyperspectral image classification and
dimensionality reduction: An orthogonal subspace projection approach, IEEE
Transactions on Geoscience and Remote Sensing, V. 32, pp. 779-785.
Stocker, A., I. S. Reed, and X. Yu, 1990, Multidimensional signal processing for
electrooptical target detection, Proc. SPIE Int. Soc. Opt. Eng., V. 1305.
Yu, X., I. S. Reed, and A. D. Stocker, Comparative performance analysis of adaptive
multispectral detectors, IEEE Trans. on Signal Processing, V. 41, No. 8.

Continuum Removal
Clark, R. N., and Roush, T. L., 1984, Reflectance spectroscopy: Quantitative analysis
techniques for remote sensing applications: Journal of Geophysical Research, v. 89,
no. B7, pp. 6329-6340.

Spectral Tools References ENVI User’s Guide


Chapter 7: Spectral Tools 797

Clark, R. N., King, T. V. V., and Gorelick, N. S., 1987, Automatic continuum analysis
of reflectance spectra: in Proceedings, Third AIS workshop, 2-4 June, 1987, JPL
Publication 87-30, Jet Propulsion Laboratory, Pasadena, California, pp. 138-142.
Green, A. A., and Craig, M. D., 1985, Analysis of aircraft spectrometer data with
logarithmic residuals: in Proceedings, AIS workshop, 8-10 April, 1985, JPL
Publication 85-41, Jet Propulsion Laboratory, Pasadena, California, pp. 111-119.
Kruse, F. A., Raines, G. L., and Watson, K., 1985, Analytical techniques for
extracting geologic information from multichannel airborne spectroradiometer and
airborne imaging spectrometer data: in Proceedings, International Symposium on
Remote Sensing of Environment, Thematic Conference on Remote Sensing for
Exploration Geology, 4th, Environmental Research Institute of Michigan, Ann Arbor,
pp. 309-324.
Kruse, F. A., Lefkoff, A. B., and Dietz, J. B., 1993, Expert System-Based Mineral
Mapping in northern Death Valley, California/Nevada using the Airborne
Visible/Infrared Imaging Spectrometer (AVIRIS): Remote Sensing of Environment,
Special issue on AVIRIS, May-June 1993, v. 44, pp. 309 - 336.
Kruse, F. A., and Lefkoff, A. B., 1993, Knowledge-based geologic mapping with
imaging spectrometers: Remote Sensing Reviews, Special Issue on NASA Innovative
Research Program (IRP) results, v. 8, pp. 3 - 28.

Spectral Feature Fitting


Clark, R. N., Gallagher, A. J., and Swayze, G. A., 1990, Material absorption band
depth mapping of imaging spectrometer data using the complete band shape least-
squares algorithm simultaneously fit to multiple spectral features from multiple
materials: in Proceedings of the Third Airborne Visible/Infrared Imaging
Spectrometer (AVIRIS) Workshop, JPL Publication 90-54, pp. 176 - 186.
Clark, R. N., Swayze, G. A., Gallagher, A., Gorelick, N., and Kruse, F. A., 1991,
Mapping with imaging spectrometer data using the complete band shape least-
squares algorithm simultaneously fit to multiple spectral features from multiple
materials: in Proceedings, 3rd Airborne Visible/Infrared Imaging Spectrometer
(AVIRIS) workshop, JPL Publication 91-28, pp. 2-3.
Clark, R. N., Swayze, G. A., and Gallagher, A., 1992, Mapping the mineralogy and
lithology of Canyonlands, Utah with imaging spectrometer data and the multiple
spectral feature mapping algorithm: in Summaries of the Third Annual JPL Airborne
Geoscience Workshop, JPL Publication 92-14, v 1, pp. 11-13.

ENVI User’s Guide Spectral Tools References


798 Chapter 7: Spectral Tools

Clark, R. N., and Swayze, G. A., 1995, Mapping minerals, amorphous materials,
environmental materials, vegetation, water, ice, and snow, and other materials: The
USGS Tricorder Algorithm: in Summaries of the Fifth Annual JPL Airborne Earth
Science Workshop, JPL Publication 95-1, pp. 39 - 40.
Crowley, J. K., and Clark, R. N., 1992, AVIRIS study of Death Valley evaporite
deposits using least-squares band-fitting methods: in Summaries of the Third Annual
JPL Airborne Geoscience Workshop, JPL Publication 92-14, v 1, pp. 29-31.
Swayze, G. A., and Clark, R. N., 1995, Spectral identification of minerals using
imaging spectrometry data: evaluating the effects of signal to noise and spectral
resolution using the Tricorder Algorithm: in Summaries of the Fifth Annual JPL
Airborne Earth Science Workshop, JPL Publication 95-1, pp. 157 - 158.

Spectral Tools References ENVI User’s Guide


Chapter 7: Spectral Tools 799

Vegetation Analysis
Remote sensing offers an efficient way to estimate vegetation properties over large
geographic areas. You can use spectral vegetation indices (VIs) calculated in ENVI to
analyze vegetation properties. This requires the following:
1. An understanding of the structure and function of vegetation and its reflectance
properties (described in “Understanding Vegetation and Its Reflectance
Properties” on page 1212).
2. An understanding of the vegetation properties that you can estimate by
calculating VIs on hyperspectral reflectance data, and knowledge of how these
VIs work (described in “Vegetation Indices” on page 1221).
3. Using ENVI to calculate applicable VIs and analyzing the output to determine
the vegetation conditions in your data (described in “Vegetation Index
Calculator” on page 799).
4. Applying classifications to the various ecologies of the indices and analyzing
the classifications for specific conditions, such as agricultural stress, fire fuel
distribution, and overall forest health (described in “Vegetation Analysis
Tools” on page 802).

Vegetation Index Calculator


Use the Vegetation Index Calculator to determine the VIs that you can calculate for
a given input file, and to calculate the indices that are applicable. When you select an
input file, ENVI determines which VIs it can calculate from the input dataset and you
choose the specific VIs for ENVI to calculate.
ENVI provides 27 VIs you can use to detect the presence and relative abundance of
various vegetation properties. All, some, or none of the VIs may be available for a
given file. Each VI depends upon sensor response in two or more spectral bands,
which are combined to create a single index value that corresponds to the density,
intensity, or volume of a biophysical parameter significant to vegetation.
Applying VIs to vegetative materials to analyze their conditions does not produce
absolute results. The results derived from the VIs are relative when determining
where distribution or stress is, providing a theoretical level ranging from a low to high
value.
For details on the vegetative properties calculated by the VIs, see “Understanding
Vegetation and Its Reflectance Properties” on page 1212. For descriptions of each VI,
see “Vegetation Indices” on page 1221.

ENVI User’s Guide Vegetation Analysis


800 Chapter 7: Spectral Tools

Shadowed or highly shaded areas in an input file may not have enough light to cause
the vegetation signal to register for the VIs. Atmospheric correction does not improve
the quality of these areas. Under these conditions, the VIs may provide inaccurate
representations of the vegetation conditions.
To generate ecosystem-specific classifications from your data, see “Vegetation
Analysis Tools” on page 802.
To calculate VIs:
1. From the ENVI main menu bar, select Spectral → Vegetation Analysis →
Vegetation Index Calculator. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK.
3. Click OK. The Vegetation Indices Parameters dialog appears (Figure 7-84).
If the ENVI header for the input file contains a bad bands list, the bad bands
are excluded from the VI calculation.

Vegetation Analysis ENVI User’s Guide


Chapter 7: Spectral Tools 801

Figure 7-84: Vegetation Indices Parameters Dialog

4. Select one or more VIs to calculate for the input file from the Select
Vegetation Indices list. This list shows the VIs that ENVI verified as
applicable to the input file. All applicable VIs are selected by default. You
must select at least one VI to continue. The number of selected VIs appears in
the Number of items selected field.
5. Use the Biophysical Cross Checking toggle button to specify whether or not
to perform biophysical cross-checking for this calculation. Biophysical cross-
checking compares VIs to validate their results. If conflicting values exist
between VIs (for example, a greenness index shows insufficient vegetation to
support the water content measurement from a canopy water index), those data
values are ignored. When biophysical cross-checking is turned off, masking is

ENVI User’s Guide Vegetation Analysis


802 Chapter 7: Spectral Tools

not applied, and ENVI stores all output data in the result. The default value is
On.
Note
Do not set Biophysical Cross Checking to On if you plan to use the VI
calculations in the vegetation analysis tools.

6. Select output to File or Memory.


7. Click OK. ENVI adds the resulting output, a band for each calculated VI, to
the Available Bands List. From the Available Bands List, you can open each VI
for analysis.

Vegetation Analysis Tools


ENVI’s vegetation analysis tools classify a scene for agricultural stress, fire fuel
distribution, and overall forest health. Thus, you can perform vegetation analysis
using tools that guide VI selection for a specific outcome.
Vegetation analysis tools are described in the following sections:
• “Agricultural Stress Tool” on page 803
• “Fire Fuel Tool” on page 806
• “Forest Health Tool” on page 809
The scientific basis for the vegetation analysis tools was developed by Dr. Gregory P.
Asner of the Carnegie Institution of Washington, Department of Global Ecology.
You should first use the Vegetation Index Calculator to calculate the VIs in an image
before processing it with a vegetation analysis tool. This allows you to reuse the data
in multiple ways without having to recalculate the VI dataset for each new analysis.
See “Vegetation Index Calculator” on page 799.
You can also skip creating the VI dataset and, instead, let a vegetation analysis tool
calculate the VIs. However, this means the VIs are calculated each time a tool is used,
so the VIs cannot be saved or reused for multiple passes through a tool.
Selecting the appropriate VIs from each input category is a critical step in
determining the output from the tools. If poor selections are made for the input VIs,
the output may contain unnecessary masked areas, the classes may have uneven
distributions of output results, or the classification results may be inaccurate. One
approach to selecting the best input VIs is to display and examine all of the VIs in a
VI category before running the tool. Specifically check for the following attributes
when displaying a VI before selecting the VI as input to the analysis tools:

Vegetation Analysis ENVI User’s Guide


Chapter 7: Spectral Tools 803

• Does the VI display in ENVI with good contrast? Good contrast increases the
likelihood the analysis tool works effectively on that VI.
• Is the display from the VI similar to other VIs from the same category? This
indicates the results obtained from the VI are similar to the results obtained
from other VIs. Occasionally, the result of one VI may provide drastically
different results from similar VIs, which may indicate the data in the particular
VI is suspect.
• Does the VI have large masked areas? Masked areas in an input VI can pass
through to the classification result, resulting in masked areas for the
classification result where other input VIs may have data.
Note
Because urban materials such as buildings and roads have different spectral
signatures than vegetation, they can cause errant results for scenes with mixed
pixels. It is best to mask out or ignore urban areas or bodies of water when
performing a vegetation condition analysis.

Each vegetation analysis tool uses a different set of three VI categories that are
combined to produce a map with classifications showing some vegetative property or
state. At least one VI from each of the categories must exist for a tool to be available.
Though the VI categories are pre-defined by each tool, you can select any of the
available VIs within a category. This provides flexibility within the tool, as you can
run it with different combinations of VIs to provide different classification results.

Agricultural Stress Tool


Use the Agricultural Stress Tool to create a spatial map showing the distribution of
crop stress. This tool is intended specifically for use on agricultural land to support
precision agriculture analysis. The conditions that cause agricultural stress are the
same as those that cause forest stress; however, agricultural stress analysis
concentrates more on growth efficiency. Dry or dying crops do not efficiently use
nitrogen and light, indicating agricultural stress, whereas a crop showing healthy,
productive vegetation indicates low stress. The Agricultural Stress Tool uses the
following VI categories:
• Greenness, to indicate areas of idle cropland, weak vegetation, and healthy
crops. These VIs are described in “Broadband Greenness” on page 1224 and
“Narrowband Greenness” on page 1228.
• Light use efficiency, to show vegetation growth rate. These VIs are described
in “Light Use Efficiency” on page 1234.

ENVI User’s Guide Vegetation Analysis


804 Chapter 7: Spectral Tools

• Canopy nitrogen, to estimate relative nitrogen levels. This VI is described in


“Canopy Nitrogen” on page 1236.
• Leaf pigments, to highlight vegetation stress. These VIs are described in “Leaf
Pigments” on page 1240.
• Canopy water content, to show levels of water stress. These VIs are described
in “Canopy Water Content” on page 1243.
When using the Agricultural Stress Tool, it is best to create a mask to separate crop
varieties, and process each crop type individually. Because different crop types have
different phenological cycles, canopy closure characteristics, and vegetative
properties, the signals within and between crop types may be confused. If masking
the different crop types is not feasible, carefully analyze the results. Compare only
the results from one crop type to other results from the same crop type. Results from
different crop types are not comparable.
To calculate agricultural stress:
1. From the ENVI main menu bar, select Spectral → Vegetation Analysis →
Agricultural Stress. The Input File dialog appears.
2. Select the input file. The file may be a VI output file you created previously
using the Vegetation Index Calculator, or you may select a hyperspectral data
file that is atmospherically corrected and calibrated to reflectance.
3. Select Spatial Subsetting by clicking Spatial Subset. Using spatial subsetting
with the Agricultural Stress Tool may further refine the results.
4. Apply optional Masking to the data by clicking Select Mask Band and
selecting the desired mask image.
5. Click OK. The Agricultural Stress Parameters dialog appears (Figure 7-85).
If the ENVI header for the input file contains a bad bands list, the bad bands
are excluded from the VI calculation.

Vegetation Analysis ENVI User’s Guide


Chapter 7: Spectral Tools 805

Figure 7-85: Agricultural Stress Parameters Dialog

6. Select a VI from the Greenness Index drop-down list. See “Vegetation


Indices” on page 1221 for descriptions.
7. Enter a Minimum valid greenness value to use in the agricultural stress
calculation. Any values in the image less than the value you specify are
masked out in the classification result. This setting, along with a proper mask
selection, is useful for areas that contain different terrain types. The default
value is 0.
8. Select a VI from the Canopy Water or Nitrogen Index drop-down list. See
“Vegetation Indices” on page 1221 for descriptions.
9. Select a VI from the Light Use Efficiency or Leaf Pigment Index drop-down
list. See “Vegetation Indices” on page 1221 for descriptions.
10. Output the result to File or Memory.
11. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Vegetation Analysis


806 Chapter 7: Spectral Tools

The Agricultural Stress Tool divides the input scene into nine classes, from lowest
stress to highest stress. Following is the classification map for the Agricultural Stress
Tool output:

Least Stress Most Stress

Purple Blue Cyan Lt blue- Green Yellow- Yellow Orange Red


green green

The classifications are relative to the particular input scene only and cannot be
generalized to other areas or other scenes. Field examination is essential to link the
classes provided by the tool with the real-world conditions they represent. The classes
cannot be compared between scenes, as the vegetative variability between scenes
could be significant, and the actual classification values may not match. For example,
a classification color of green in one scene could represent the same field conditions
with a classification color of orange in another.

Fire Fuel Tool


Use the Fire Fuel Tool to create a spatial map showing the distribution of fire fuels
and burn hazards for a region. Fire fuel mapping can be useful for forest planners, as
well as local governments attempting to mitigate fire risks within the rapidly growing
forest/urban interface. High fire fuel distributions contain dry or dying plant material,
which contains less water, whereas low fire fuel distributions typically consist of
lush, green plants. Fire fuel analysis uses the following VI categories:
• Greenness, to show the bulk amount of green vegetation. These VIs are
described in “Broadband Greenness” on page 1224 and “Narrowband
Greenness” on page 1228.
• Canopy water content, to show the water content of the vegetation. These VIs
are described in “Canopy Water Content” on page 1243.
• Dry or senescent carbon, to highlight non-photosynthetic vegetation (NPV).
These VIs are described in “Dry or Senescent Carbon” on page 1237.

Vegetation Analysis ENVI User’s Guide


Chapter 7: Spectral Tools 807

If fire fuels are located beneath a closed canopy, they may not be detected by the Fire
Fuel Tool. The higher greenness values caused by canopy closure automatically
reduce the fire risk calculation. Additionally, dry or senescent VIs are only sensitive
to the top layer of the vegetation, causing the dry vegetation beneath it to be obscured
by the upper layer of green vegetation. As such, dry materials under a closed canopy
may not be properly detected.
To calculate fire fuel:
1. From the ENVI main menu bar, select Spectral → Vegetation Analysis →
Fire Fuel. The Input File dialog appears.
2. Select the input file. The file may be a VI output file you created previously
using the Vegetation Index Calculator, or you may select a hyperspectral data
file. The hyperspectral data file should be one that is atmospherically corrected
and calibrated to reflectance.
3. Select Spatial Subsetting by clicking Spatial Subset. Using spatial subsetting
with the Fire Fuel Tool may further refine the results.
4. Apply optional Masking to the data by clicking Select Mask Band and
selecting the desired mask image.
5. Click OK. The Fire Fuel Parameters dialog appears (Figure 7-86).

ENVI User’s Guide Vegetation Analysis


808 Chapter 7: Spectral Tools

Figure 7-86: Fire Fuel Parameters Dialog

6. Select a VI from the Greenness Index drop-down list. See “Vegetation


Indices” on page 1221 for descriptions.
7. Enter a Minimum valid greenness value to use in the fire fuel calculation.
Any values in the image less than the value you specify are masked out in the
classification result. This setting, along with a proper mask selection, is useful
for areas that contain different terrain types. The default value is 0.
8. Select a VI from the Canopy Water drop-down list. See “Vegetation Indices”
on page 1221 for descriptions.
9. Select a VI from the Dry or Senescent Carbon Index drop-down list. See
“Vegetation Indices” on page 1221 for descriptions.
10. Output the result to File or Memory.
11. Click OK. ENVI adds the resulting output to the Available Bands List.

Vegetation Analysis ENVI User’s Guide


Chapter 7: Spectral Tools 809

The Fire Fuel Tool divides the input scene into nine classes, from least fuel (lowest
apparent fire risk) to most fuel (highest apparent fire risk). Following is the
classification map for the Fire Fuel Tool output:

Least Fuel Most Fuel

Purple Blue Cyan Lt blue- Green Yellow- Yellow Orange Red


green green

The classifications are relative to the particular input scene only and cannot be
generalized to other areas or other scenes. Field examination is essential to link the
classes provided by the tool with the real-world conditions they represent. You cannot
compare classes between scenes, as the vegetative variability between scenes could
be significant, and the actual classification values may not match. For example, a
classification color of green in one scene could represent the same field conditions as
a classification color of orange in another.

Forest Health Tool


Use the Forest Health Tool to create a spatial map showing the overall health and
vigor of a forested region. Forest health mapping is useful for detecting pest and
blight conditions in a forest, and it is useful in assessing areas of timber harvest. A
forest exhibiting low stress conditions is usually made up of healthy vegetation,
whereas a forest under high stress conditions shows signs of dry or dying plant
material, very dense or sparse canopy, and inefficient light use. The Forest Health
Tool uses the following VI categories:
• Greenness, to show the distribution of green vegetation. These VIs are
described in “Broadband Greenness” on page 1224 and “Narrowband
Greenness” on page 1228.
• Leaf pigments, to show the concentration of carotenoids and anthocyanin
pigments for stress levels. These VIs are described in “Leaf Pigments” on
page 1240.
• Canopy water content, to show the concentration of water. These VIs are
described in “Canopy Water Content” on page 1243.
• Light use efficiency, to show forest growth rate. These VIs are described in
“Light Use Efficiency” on page 1234.

ENVI User’s Guide Vegetation Analysis


810 Chapter 7: Spectral Tools

To calculate forest health:


1. From the ENVI main menu bar, select Spectral → Vegetation Analysis →
Forest Health. The Input File dialog appears.
2. Select the input file. The file may be a VI output file you created previously
using the Vegetation Index Calculator, or you may select a hyperspectral data
file. The hyperspectral data file should be one that is atmospherically corrected
and calibrated to reflectance.
3. Select Spatial Subsetting by clicking Spatial Subset. Using spatial subsetting
with the Forest Health Tool may further refine the results.
4. Apply an optional mask to the data by clicking Select Mask Band and
selecting the desired mask image. For details on mask selection, see
“Masking” on page 224.
5. Click OK. The Forest Health Parameters dialog appears (Figure 7-87).
If the ENVI header for the input file contains a bad bands list, the bad bands
are excluded from the VI calculation.

Figure 7-87: Forest Health Parameters Dialog

Vegetation Analysis ENVI User’s Guide


Chapter 7: Spectral Tools 811

6. Select a VI from the Greenness Index drop-down list. See “Vegetation


Indices” on page 1221 for descriptions.
Tip
Best results are achieved by using Narrowband Greenness VIs because these
are more sensitive to the condition of forest canopies. Broadband Greenness
VIs tend to be inaccurate for dense forest conditions because forests have an
abundance of green vegetation that can overwhelm and saturate the
calculation.

7. Enter a Minimum valid greenness value to use in the forest health


calculation. Any values in the image less than the value you specify are
masked out in the classification result. This setting, along with a proper mask
selection, is useful for areas that contain different terrain types. The default
value is 0.
8. Select a VI from the Leaf Pigment Index drop-down list. See “Vegetation
Indices” on page 1221 for descriptions.
9. Select a VI from the Canopy Water or Light Use Efficiency Index drop-
down list. See “Vegetation Indices” on page 1221 for descriptions.
10. Output the result to File or Memory.
11. Click OK. ENVI adds the resulting output to the Available Bands List.
The Forest Health Tool divides the input scene into nine classes, from weakest, or
least healthy forest, to healthiest forest. The following is the classification map for the
Forest Health Tool output:

Least Healthy Most Healthy

Purple Blue Cyan Lt blue- Green Yellow- Yellow Orange Red


green green

The classifications are relative to the particular input scene only and cannot be
generalized to other areas or other scenes. Field examination is essential to link the
classes provided by the tool with the real-world conditions they represent. You cannot
compare classes between scenes, as the vegetative variability between scenes could
be significant, and the actual classification values may not match. For example, a
classification color of green in one scene could represent the same field conditions as
a classification color of orange in another.

ENVI User’s Guide Vegetation Analysis


812 Chapter 7: Spectral Tools

Vegetation Suppression
Use Vegetation Suppression to remove the vegetation spectral signature from
multispectral and hyperspectral imagery, using information from red and near-
infrared bands. This method helps you better interpret geologic and urban features
and works best with open-canopy vegetation in medium spatial resolution (30 m)
imagery.
The algorithm models the amount of vegetation per pixel using a vegetation
transform. The model calculates the relationship of each input band with vegetation,
then it decorrelates the vegetative component of the total signal on a pixel-by-pixel
basis for each band. You can use the results of vegetation suppression for qualitative
analysis, but not for subsequent spectral analysis.
Vegetation suppression is most commonly used in lithologic mapping and linear
feature enhancement in areas with open canopies. For closed canopies in moderate-
resolution data, vegetation suppression is primarily used for linear feature
enhancement.
Reference:
Crippen, R. E., and R. G. Blom. 2001. Unveiling the lithology of vegetated terrains in
remotely sensed imagery. Photogrammetric Engineering & Remote Sensing 67(8):
935-943.
Perform the following steps to suppress vegetation:
1. From the ENVI main menu bar, select Spectral → Vegetation Suppression.
The Vegetation Suppression Input File dialog appears.
2. Select a multispectral file and perform optional Spatial Subsetting and/or
Spectral Subsetting.
• If the associated header contains wavelength information, ENVI
automatically determines the proper red and infrared bands to use for
vegetation suppression. ENVI uses the band closest to 0.66 μm as the red
band, and it uses the band closest to 0.83 μm as the near-infrared band.
• If the header does not contain wavelength information, the Select Near
Infrared Band dialog appears. Select the near-infrared band. Click OK.
The Select Red Band dialog appears. Select the red band.

Vegetation Suppression ENVI User’s Guide


Chapter 7: Spectral Tools 813

• If the image file has wavelength information but does not have a near-
infrared or red band, ENVI issues an error message and ends vegetation
suppression. ENVI also issues an error if the input image has only one
band.
3. Click OK. The Vegetation Suppression Parameters dialog appears.
4. Output the result to File or Memory.
5. Click OK. The vegetation suppression algorithm runs. ENVI creates one
output band per input band, and it adds the resulting image to the Available
Bands List.

ENVI User’s Guide Vegetation Suppression


814 Chapter 7: Spectral Tools

Finding Targets with BandMax


The SAM Target Finder with BandMax Wizard guides you through a step-by-step
process to find targets in hyperspectral images using a SAM classification and the
BandMax algorithm. The BandMax part of the Wizard increases classification
accuracy by determining an optimal subset of bands to help you separate your targets
from known background materials.
You can also directly access the BandMax algorithm in ENVI from the Endmember
Collection dialog (see “Suppressing Backgrounds with BandMax” on page 450).
Tip
See the ENVI Tutorials on the ITT Visual Information Solutions website (or on the
ENVI Resource DVD that shipped with your ENVI installation) for step-by-step
examples.

The BandMax algorithm was developed by the Galileo Group, Inc. The process is
based on the United States patent application titled Spectral image processing system
and method for target detection and identification. This document was submitted by
Timothy J. Pachter and Daniel Matthew Puchalski to the United States Patent Office
in 2002.
The SAM Target Finder with BandMax Wizard guides you through the following
steps:
1. Select Input Image: Select the input file and the root name of the output files
for the Wizard.
2. Select Targets: Select the spectra to use as targets.
3. Select Background: Select backgrounds to suppress.
4. Select Band Subset: Identify significant bands to use in a SAM analysis.
5. Select SAM Parameters: Define a SAM maximum angle parameter.
6. Examine SAM Results: Analyze and examine SAM results. You may exit the
Wizard at this time if the results are acceptable.

Finding Targets with BandMax ENVI User’s Guide


Chapter 7: Spectral Tools 815

The overall workflow of the Wizard is shown in Figure 7-88.

Figure 7-88: Workflow Process for the SAM Target Finder with BandMax Wizard

ENVI User’s Guide Finding Targets with BandMax


816 Chapter 7: Spectral Tools

If examining the results from this mapping process shows that the classification
accuracy is not sufficient, the Wizard returns you to step 2, where you can refine your
targets and backgrounds before running BandMax and the SAM analysis again. You
may continue to refine targets, select backgrounds, use BandMax to find the
appropriate band subset, and re-classify your input data with SAM. When your
analysis is complete, you can save and view a report of the processing. ENVI adds the
resulting output to the Available Bands List. As with any image processing tool, poor
results may occur if you provide poor input data or inappropriate parameters.

Interacting with the BandMax Wizard


1. From the ENVI main menu bar, select Spectral → SAM Target Finder with
BandMax. The SAM Target Finder with BandMax Wizard appears.

Figure 7-89: SAM Target Finder with BandMax

The Introduction panel explains the overall workflow of the Wizard. The other
panels in the Wizard present the remaining six possible steps of this process.
These steps may occur multiple times in different order, depending upon the
your analysis path.

Finding Targets with BandMax ENVI User’s Guide


Chapter 7: Spectral Tools 817

The left part of each panel in the Wizard shows a brief description of the step
presented in that panel. This description contains the requirements of the step,
background information of the process used in the step, and useful analysis
techniques for the step. The right part of the panel contains an interface with
specific functions to perform for that step.

Click to hide text in


left panel

Figure 7-90: A Sample Panel from the SAM Target Finder with BandMax Wizard

You can hide the left part of a panel by clicking Hide Text to only show the
right part of the panel. If the left part is hidden, click Show Text to re-display
it. Each panel also contains a Next button for continuing to the next step and a
Prev button for reverting back to the previous step. Next is only enabled if you
provide enough information to continue in the workflow. In some cases, a
processing status dialog appears if the next process is performed before the
next panel is initialized.

ENVI User’s Guide Finding Targets with BandMax


818 Chapter 7: Spectral Tools

Unlike other Wizards in ENVI, this Wizard is not linear. It has conditional
paths, where your input may induce a different direction in the workflow. You
can also use the Next and Prev buttons to loop back through the Wizard and
repeat a series of steps. The Prev button maintains a list of the steps that were
performed. This list enables the Prev button to still work even if you to go
through a conditional step or a series of steps looping through the Wizard.
2. Click Next in the Wizard. The Select Input/Output Files panel appears.

Select Input Image


The Select Input/Output Files panel represents step 1 in the workflow (Figure 7-88).
Here, you will specify the input file and the root name of the output files for the
Wizard.
1. Click Select Input File. The Input File dialog appears.
2. Select an input file. The SAM Target Finder with BandMax Wizard usually
assumes you are using reflectance data. However, if you use radiance data, the
error is generally not very significant because the origin is still near zero.
3. Click OK. The root name is automatically specified as the output root name.
4. To specify a different root name, click Select Output Root Name. The Select
Output Files Root Name dialog appears.
5. Specify the root name and path of the output files created throughout the
Wizard. If files with the specified root name already exist, you are prompted to
allow the Wizard to delete these files and continue. The files will be
overwritten. If you do not want to overwrite the files, click No and specify a
different root name in the Select Output Files Root Name dialog.
6. Click Next in the Wizard. The Target Selection panel appears.

Finding Targets with BandMax ENVI User’s Guide


Chapter 7: Spectral Tools 819

Select Targets
The Target Selection panel represents step 2 in the workflow (Figure 7-88). Here, you
will select spectra to use as targets.

Figure 7-91: Target Selection Panel of the SAM Target Finder with BandMax
Wizard

The Target Spectra section is an embedded version of the Endmember Collection


dialog. It contains the following options:
• Click File → Save spectra as to save a selected spectrum displayed in the
Endmember Spectra table to either an ASCII, spectral library, or Endmember
Collection file. You can import any spectra saved to these types of files back
into the Wizard by clicking Import.
• Click Import to import spectra from ASCII, ASD, spectral library, ROI, EVF,
statistics, or Endmember Collection files.
• Click Options to modify the names and the colors of the spectra presented in
the Endmember Spectra table.

ENVI User’s Guide Finding Targets with BandMax


820 Chapter 7: Spectral Tools

The Target Spectra section also contains a table that displays the spectra you have
selected.
1. Collect spectra by importing them or by dragging-and-dropping them into the
table (see “Importing Spectra” on page 442 for more information). You must
collect at least one spectrum to continue in the Wizard.
2. To select a specific spectrum in the table, click its related row number column
on the far left. You must highlight the entire row. You cannot select a spectrum
by clicking its Spectrum Name column. You can select multiple spectra using
Shift or Ctrl. Or, click Select All to select all the spectra in the table.
3. Click Plot to display the selected spectra in a separate plot window.
4. Click Delete to delete any selected spectra.
5. Click Next in the Wizard. The Background Selection and Rejection panel
appears.

Select Background
The Background Selection and Rejection panel represents step 3 in the workflow
(Figure 7-88). Here, you can select as “background” the pixel spectra that were
incorrectly identified as targets in a SAM analysis. The BandMax algorithm will
attempt to identify the bands that are best able to distinguish your targets from these
backgrounds. This process works best when using a small set of target and
background spectra.
If you do not want to specify any backgrounds:
1. Toggle Select Backgrounds to Reject? to No.
2. Click Next. The Wizard skips to the Select SAM Mapping Parameters panel,
which represents step 5 in the workflow (see “Select SAM Parameters” on
page 823).
To specify backgrounds:
1. Toggle Select Backgrounds to Reject? to Yes. The Select Background section
appears in the right part of the panel. This section contains the same items as
the Target Spectra section in step 2 of the workflow.
2. Collect background spectra by importing them or by dragging-and-dropping
them into the table (see “Importing Spectra” on page 442 for more
information). You must select at least one spectrum to continue in the Wizard.
All of the spectra selected in this table are used as backgrounds when
calculating the significant bands.

Finding Targets with BandMax ENVI User’s Guide


Chapter 7: Spectral Tools 821

When importing ROIs as backgrounds, keep in mind that the average


calculated from each region is used as the background spectrum. Therefore,
you should include each separate material as a separate ROI.
3. To select a specific spectrum in the table, click its related row number column
on the far left. A spectrum is not selected if you do not highlight the entire row.
You cannot select a spectrum by clicking its Spectrum Name column. You can
select multiple spectra using Shift or a Ctrl. Or, click Select All to select all
the spectra in the table.
4. Click Plot to display the selected spectra in a separate plot window.
5. Click Delete to delete any selected spectra.
6. Click Next in the Wizard. The Select Optimal Bands panel appears.
The BandMax algorithm examines your target and background spectra to determine
which bands are most significant for distinguishing your targets from the specified
background. The best results are usually achieved if one target is selected for each
Wizard session. In this case, BandMax is able to choose a band subset that is
optimized for that individual target.

ENVI User’s Guide Finding Targets with BandMax


822 Chapter 7: Spectral Tools

Select Band Subset


The Select Optimal Bands panel represents step 4 in the workflow (Figure 7-88).

Figure 7-92: Select Optimal Bands Panel of the SAM Target Finder with
BandMax Wizard

Here, you will customize the band subset used to suppress your backgrounds. The
BandMax algorithm calculates a significance value for each band in the input image.
This unitless value ranges from 0 to 1, where a higher value indicates the band has a
higher probability of distinguishing a target response from a background response.
BandMax compares the significance value to a significance threshold to derive a
subset of bands, based upon the current list of targets and backgrounds.
BandMax calculates the significance threshold by attempting to select 25% of the
input bands, but never fewer than six bands. However, in some cases, even using a
threshold of 0 (the lowest) does not provide an adequate number of bands. In this
case, it is best to modify your selection of targets or backgrounds (typically by
removing one or more) and run the BandMax algorithm again. See “Select Targets”
on page 819 and “Select Background” on page 820.

Finding Targets with BandMax ENVI User’s Guide


Chapter 7: Spectral Tools 823

The results of the BandMax calculations are shown in the right part of the panel. You
can customize the number of bands that will be chosen for SAM analysis (step 3 of
the Wizard workflow) by modifying the values in the following steps.
1. Review the Significant Bands list, which shows the bands that BandMax
automatically determined were significant when you clicked Next in the
Background Selection and Rejection panel.
2. Modify the Band Significance Threshold value as needed. The threshold
ranges from 0 to 1. Only bands with a significance value greater than or equal
to the significance threshold will be used. Setting the Band Significance
Threshold to a higher value results in fewer selected bands in the subset.
The increase/decrease buttons change the threshold by increments of 0.01. An
increase in the Band Significance Threshold value decreases the Number of
Significant Bands value and updates the Significant Bands list. If a change of
0.01 is not enough to update the Number of Significant Bands, increase the
increment until it does.
3. You can also decrease the Number of Significant Bands value, which
increases the Band Significance Threshold value and updates the Significant
Bands list.
The increase/decrease buttons change the number of bands by at least 1. If two
or more bands have the same significance value, a greater increment is used to
include all of these bands.
4. Click Save Significant Bands to File if you want to save the band subset in the
Significant Bands list to an ASCII file. When you have derived the subset of
bands that effectively detects your targets, you may want to use this same band
subset to perform a series of classifications on a set of images from the same
sensor. You can use this output ASCII file as input when spectrally subsetting a
file.
5. Click Next in the Wizard. The Select SAM Maximum Angle Threshold panel
appears. The bands in the Significant Bands list form a band subset that is
used as input in the following SAM analysis.

Select SAM Parameters


The Select SAM Maximum Angle Threshold panel represents step 5 in the workflow
(Figure 7-88). Here, you can specify the maximum angle threshold for the SAM
analysis. Decreasing the threshold usually results in fewer matching pixels (better
matches to the reference spectrum). Increasing the threshold may result in a more

ENVI User’s Guide Finding Targets with BandMax


824 Chapter 7: Spectral Tools

spatially coherent image; however, the overall pixel matches will not be as good as
for the lower threshold.
1. Modify the SAM Maximum Angle value as needed. The default value is 0.10
radians. The increase/decrease buttons increment the value by 0.05 radians.
2. Click Next in the Wizard. A processing status dialog shows the progress of the
SAM analysis, and the Investigate SAM Results panel appears. For more
information on the SAM classification and its parameters, see “Supervised
Classification” on page 401

Examine SAM Results


The Investigate SAM Results panel represents step 6 in the workflow (Figure 7-88).
Here, you can display and examine the results of the SAM analysis.

Figure 7-93: Investigate SAM Results Panel of the SAM Target Finder with
BandMax Wizard

Finding Targets with BandMax ENVI User’s Guide


Chapter 7: Spectral Tools 825

The output from SAM is a classified image and a set of rule images corresponding to
the spectral angle calculated between each pixel and each target (one rule image per
target).
1. 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.
2. 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.
The rule image is loaded into a display group using an inverted color table.
(The ENVI Color Tables dialog also appears.) A smaller SAM angle means a
pixel is a better match to the target. Inverting the color table displays the best
matches as brighter pixels, which is more intuitive.
A histogram of the image also appears in a separate interactive stretching
dialog. This histogram explicitly shows the linear stretch applied to the display
of the rule image. A flat line in the left portion (lowest value) of the histogram
indicates a good separation of targets and backgrounds. Any data values to the
left of this flat line are significant matches for the target spectra.
3. The display group is linearly stretched to a maximum value specified by the
Default Stretch Max value in the SAM Rule Images section of the Wizard.
The initial value is 0.10. To change the default stretch maximum when you
display rule images, enter the desired Default Stretch Max value and double-
click on the rule image name in the SAM Rule Images list.
If the Default Stretch Max value is less than the minimum value in the rule
image band, the minimum value will be used instead.
4. Double-click in the display group to open the Cursor Location/Value tool.
Evaluate the SAM spectral angles for each pixel.
5. You can increase the maximum angle threshold to make the classification more
relaxed, or decrease it to make the classification more selective. Click Prev in
the Wizard and enter a new SAM Maximum Angle value if desired.
6. Click Show Report to view the results of the SAM Target Finder with
BandMax Wizard. See “Report the Results” on page 826. The SAM is not
recalculated if you clicked Prev to get back to this step.
7. If you are satisfied with the results, click Finish to exit the Wizard.

ENVI User’s Guide Finding Targets with BandMax


826 Chapter 7: Spectral Tools

8. If you are not satisfied with the results, you can refine your targets,
backgrounds, or both. To return to step 2 of the Wizard workflow and repeat
these steps, click Next.

Report the Results


After you click Show Report in the Investigate SAM Results panel, the SAM Target
Finder with BandMax Summary Report text window appears. This text window
reports the following results for the Wizard:
• Input file (and any spatial subset) for the Wizard
• Specified targets
• Specified backgrounds
• Specified band significance threshold
• Resulting significant bands subset
• Output files of the SAM analysis
• Specified maximum angle parameter for the SAM analysis
Tip
You can select File → Save Text to ASCII in the text window to save this
information to a text file. When you choose this option, the Output Report Filename
dialog appears. ENVI saves the specified file when you click OK.

Finding Targets with BandMax ENVI User’s Guide


Chapter 7: Spectral Tools 827

RX Anomaly Detection
RX Anomaly Detection uses the Reed-Xiaoli Detector (RXD) algorithm to detect
the spectral or color differences between a region to be tested and its neighboring
pixels or the entire dataset. This algorithm extracts targets that are spectrally distinct
from the image background. For RXD to be effective, the anomalous targets must be
sufficiently small, relative to the background. Results from RXD analysis are
unambiguous and have proven very effective in detecting subtle spectral features.
ENVI implements the standard RXD algorithm:

Figure 7-94: RX Anomaly Detection Equation

Where r is the sample vector, μ is the sample mean, and KLxL is the sample
covariance matrix.
RXD works with multispectral and hyperspectral images. Bad pixels or lines appear
as anomalous, but they do not affect the detection of other, valid anomalies. As with
any spectral algorithm, exclusion of bad bands increases the accuracy of results.
Currently, this algorithm does not differentiate detected anomalies from one another.
Reference:
Chang, Chein-I, and Shao-Shan Chiang, 2002. Anomaly detection and classification
for hyperspectral imagery. IEEE Transactions on Geoscience and Remote Sensing,
Vol. 40, No. 6, pp. 1314-1325.
Reed I. S., and X. Yu, Adaptive multiple-band CFAR detection of an optical pattern
with unknown spectral distribution. IEEE Trans. Acoustics, Speech and Signal Proc.
38, p p. 1760-1770, October 1990.

Using RX Anomaly Detection


1. From the ENVI main menu bar, select Spectral → RX Anomaly Detection.
The Input File dialog appears.
2. Select a multi-band file and perform optional Spatial Subsetting and/or
Spectral Subsetting.
3. Click OK. The RX Anomaly Detection Parameters dialog appears.

ENVI User’s Guide RX Anomaly Detection


828 Chapter 7: Spectral Tools

4. Select an algorithm from the drop-down list provided. The following options
are available:
• RXD: Standard RXD algorithm
• UTD: Uniform Target Detector, in which the anomaly is defined using (1 -
μ) as the matched signature, rather than (r - μ). UTD and RXD work
exactly the same, but instead of using a sample vector from the data (as
with RXD), UTD uses the unit vector. UTD extracts background
signatures as anomalies and provides a good estimate of the image
background.
• RXD-UTD: A hybrid of the RXD and UTD methods, in which (r - 1) is
used as the matched signature. This is a variant of the UTD approach.
Subtracting UTD from RXD suppresses the background and enhances the
anomalies of interest. The best condition to use RXD-UTD is when the
anomalies have an energy level that is comparable to, or less than, that of
the background. In this case, using UTD by itself does not detect the
anomalies, but using RXD-UTD enhances them.
5. Using the Mean Source toggle button, specify whether the mean spectrum
should be derived from the full dataset (Global) or from a localized kernel
around the pixel (Local). If you choose Local, the Local Kernel Size field
appears. Specify a kernel size, in pixels, around a given pixel that will be used
to create a mean spectrum. The default value is 15.
6. Output the result to File or Memory.
7. Click OK. A processing status dialog appears while ENVI builds a covariance
matrix and calculates a mean spectrum. Then, RXD runs line-by-line. ENVI
adds the resulting output to the Available Bands List. A default square-root
stretch is applied to the resulting image to highlight the extreme anomalies.
Bright pixels in the output image represent targets that are spectrally distinct from the
image background.

RX Anomaly Detection ENVI User’s Guide


Chapter 7: Spectral Tools 829

Spectral Hourglass Wizard


Use the Spectral Hourglass Wizard to guide you step-by-step through the ENVI
hourglass processing flow (see Figure 7-95) to find and map image spectral
endmembers from hyperspectral or multispectral data. The Wizard displays detailed
instructions and useful information for each function.

Figure 7-95: End-to-End Hyperspectral “Hourglass” Processing in ENVI

ENVI User’s Guide Spectral Hourglass Wizard


830 Chapter 7: Spectral Tools

The hourglass processing flow uses the spectrally over-determined nature of


hyperspectral data to find the most spectrally pure, or spectrally unique, pixels (called
endmembers) within the dataset 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 ENVI’s Spectral
Analyst to identify the endmembers, and review the mapping results.
Each step in the Spectral Hourglass Wizard executes a standalone ENVI function
available from the Spectral menu. The name of the corresponding ENVI function
appears at the top of the panel during each step. ENVI adds the resulting output to the
Available Bands List. Various plots appear throughout the processing flow to help
assess results as you proceed.

Wizard Processing Flow


The Spectral Hourglass Wizard has individual panels that take you through the
following steps (see Figure 7-96).

Spectral Hourglass Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 831

Introduction

Input/Output
File Selection

Minimum Noise
Transform (MNF)

Review of MNF Results

Data Dimensionality
Determination

NO
Derive Endmembers
from Data?

YES

Pixel Purity Index (PPI)

Examine PPI Results


Input User-Supplied
Endmembers?
n-Dimensional Visualization
and Endmember Selection
YES

Input User-Supplied YES


Endmember Collection
Endmembers?

NO
Mapping with SAM, Unmixing
and/or MTMF

Investigate Mapping Results

Summary Report

Figure 7-96: Each Step Within The Spectral Hourglass Wizard Flow Chart
Represents a Panel in the Wizard

ENVI User’s Guide Spectral Hourglass Wizard


832 Chapter 7: Spectral Tools

Wizard Basics
To successfully use the Spectral Hourglass Wizard, you should become familiar with
the basic functions and concepts as shown in Figure 7-97:

Function Title

Important Information
and instructions are
displayed in the upper
panel

Use the scroll bars


to see all of the text
and parameters.

Enter and select


parameters in the
bottom panel

Click here to close


the Wizard

Click these buttons to move backward


and forward through the steps

Figure 7-97: Spectral Hourglass 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.

Spectral Hourglass Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 833

• Enter and select the parameters for that step using the buttons and fields near
the bottom of the panel.
• Use the Prev and Next buttons to step through the Wizard.
• Each processing step will execute when you select the Next button.
• If the Next button is not available for selection, be sure that you set all of the
necessary parameters.
• Use the Prev button to go back to a previous step to modify parameters and to
run that step again.
• ENVI adds the resulting output to 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 → Save Plot As in the plot window.
• 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.

Using the Spectral Hourglass Wizard


The Spectral Hourglass Wizard can guide you through the steps involved in state-of-
the-art hyperspectral processing, but it is no substitute for a solid understanding of
hyperspectral remote sensing. Without this understanding, it is possible to produce
poor results, despite the power of the algorithms involved.

Input/Output File Selection


1. From the ENVI main menu bar, select Spectral → Spectral Hourglass
Wizard. The ENVI Spectral Hourglass Wizard displays the Introduction
panel.
Typically, data that have been converted to reflectance via atmospheric
correction are used as input, particularly if library spectra or other external
spectra are used as endmembers in the mapping process. You must assign
wavelength values in the ENVI header of the input file. If you are not using
any external spectra in the processing, then you can use radiance or even
uncalibrated data as input. However, unless you use reflectance data, you
cannot use the Spectral Analyst (later in the Wizard) to identify the image-
derived endmembers by reference to a spectral library.
2. Click Next. The Select Input/Output Files panel appears.

ENVI User’s Guide Spectral Hourglass Wizard


834 Chapter 7: Spectral Tools

3. Click Select Input File, choose a file, and perform optional Spatial Subsetting,
Spectral Subsetting and/or Masking.
As a guideline to help with spectral subsetting, vegetation analysis and iron-
oxide mineral mapping typically use wavelength ranges in the visible near-
infrared (VNIR) and shortwave infrared (SWIR) regions from 0.4 to 1.3 μm,
while the 2.0 to 2.5 μm range is used to map most other geologic materials.
A mask may help you to exclude selected pixels such as image borders, bad
pixels, or specific materials such as water or clouds.
Be careful with your choices of spatial and spectral subsets; avoid unnecessary
complications, data volumes, and scene complexity.
4. Click OK.
5. 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
boulder.img, then the output file for each process is boulder appended
with a function-dependent suffix (for example, boulder.mnf). Click Select
Output Root Name and enter or choose a different root name if desired.
6. Click Next. The Forward MNF Transform panel appears.

Minimum Noise Transform


The MNF transform is used to determine the inherent dimensionality of image data,
to segregate and equalize the noise in the data, and to reduce the computational
requirements for subsequent processing. See “Minimum Noise Fraction Transform”
on page 516 for more information.
1. You can optionally enter a Number of output MNF bands value. However, in
most cases, 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.

Spectral Hourglass Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 835

2. To use only a subset of a file to calculate noise statistics for the whole file,
click Shift Difference Spatial Subset and enter subsetting parameters. Noise
statistics are calculated 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 line-shifted and sample-shifted images from the original data and
averaging and scaling these two results. You can select a subset of the data to
speed the noise statistic calculations or select a uniform area to improve noise
estimates.
3. Click Next. 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. See “Data Dimensionality and Spatial
Coherence” on page 835. 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.
4. 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.
For details about ENVI animation, see “Creating Animations” on page 140.
5. After displaying and analyzing the MNF result, click Next in the Wizard. The
Determine Data Dimensionality panel appears.

Data Dimensionality and Spatial Coherence


Data dimensionality indicates the number of intrinsic endmembers that the dataset
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.

ENVI User’s Guide Spectral Hourglass Wizard


836 Chapter 7: Spectral Tools

Or, you can let the Wizard estimate data dimensionality using a spatial coherence
measure that is based on MNF-transformed images. The lower MNF bands are
expected to have spatial structure and contain most of the information, while higher
MNF bands are expected to have little spatial structure and contain most of the noise.
By retaining only the coherent MNF bands (those with variance above unity) and
discarding those that are indistinguishable from the noise (those with variance at or
below unity), the dataset is reduced to its inherent dimensionality. This should
improve spectral processing results.
A spatial coherence calculation consists of a correlation coefficient calculation
between each spectral band and a version of itself offset by one line. Noise, by
definition, should have a zero or very low correlation, while an image with a spatial
structure bigger than the pixel size has a much higher correlation.
If higher MNF images are correlated to their line-shifted versions, it means there is a
vertical structure in the noisy images (such as stripes), which may resemble a signal
in the higher MNF bands. Vertical striping noise could be caused by an area-array
instrument.
Perform the following steps to calculate data dimensionality using a spatial coherence
measure:
1. 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.
While the Wizard is designed to give a reasonable default calculation of data
dimensionality, this process is often difficult and scene-dependent. You must
often resort to using a generous estimate of data dimensionality, by using all of
the MNF bands that have any reasonable image quality of eigenvalues well
above unity. Overestimating the dimensionality and including a few extra
MNF bands is much better than underestimating the dimensionality and
potentially discarding everything. If all of your MNF bands have decent image
quality and above-unity eigenvalues, then your data are not spectrally over-
determined and thus are not technically hyperspectral.
ENVI calculates the spatial coherence threshold based on the bands with
spatial coherence values greater than a given floor value, not greater than or
equal to a given floor value. If the threshold is set to 0, bands that score 0 will
not be included. For example, if you input 50 bands into the MNF
transformation and calculate the spatial coherence, it might return 36 out of 50
bands even though the threshold value is set to 0. This is because 14 of the
bands have a spatial coherence value of 0. Presumably, you should use a
threshold greater than 0, or manually select the number of bands.

Spectral Hourglass Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 837

Additionally, the threshold is not a count of all the bands above or below a
given value. Selecting the number of bands is accomplished by finding the first
band that drops below the threshold and including all the bands to the right of
this threshold as “no good.” The spatial coherence curve (as applied to MNF
data) theoretically should become less and less as you move to higher MNF
bands, since the bands get noisier and noisier. So, ENVI looks for the first band
that dropped below the threshold and discards the rest.
2. If you are satisfied with the dimensionality calculation, click OK in the Spatial
Coherence Threshold plot, then click Next in the Wizard. The Derive or Select
Endmembers panel appears.
3. 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.

Deriving Endmembers from the Input Image


1. In the Derive or Select Endmember panel, set the Derive Endmembers from
Image? 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 two to three
times the noise level in the data (which is 1 when using MNF transformed
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).
2. Click Next. The Calculating Pixel Purity Index panel appears, and progress
windows display the processing status.

ENVI User’s Guide Spectral Hourglass Wizard


838 Chapter 7: Spectral Tools

The PPI is calculated for the number of iterations you specified in the previous
panel. A Pixel Purity Index Plot appears, showing which iteration you are on
and the cumulative number of pixels that have been found to be extreme. The
curve in this plot usually starts steeply, as new pixels are found in each
iteration, and it should flatten out as all the extreme pixels are found.
3. When the iterations are complete, you can return to the Pixel Purity Index
panel and 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 (for
example, 20,000) 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.
4. 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.
ENVI adds the resulting output to the Available Bands 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.
5. In the Examine PPI Results panel, enter a value for Maximum PPI Pixels to
use in the n-D Visualizer. 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.
6. 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.

Spectral Hourglass Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 839

7. See “The n-D Visualizer” on page 754 for instructions on retrieving


endmembers from the n-D Visualizer. Click Retrieve Endmembers button to
get the selected endmembers to use in the processing flow. The Wizard
automatically imports the selected endmember spectra.
8. To plot endmembers once they are loaded into the Wizard, click Plot
Endmembers.
9. To use ENVI’s Spectral Analyst to help you identify the endmembers, click
Start Spectral Analyst. Double-click the endmember name you want to
identify in the Endmember List. For details about the Spectral Analyst see
“Spectral Analyst” on page 845. Use the Spectral Analyst with caution
because it can only recommend likely candidates for identification, and results
may change with different spectral libraries and weighting factors.
10. Click Next. The User Supplied Endmembers panels appear.
11. Select from the following options:
• To supply additional endmembers from another source, such as a spectral
library or an ROI, set the User supplied Endmembers toggle button to
Yes and repeat steps 7-9 above as necessary.
• To use endmembers from the image, set the User supplied Endmembers
toggle button to No and click Next. The Mapping Methods panel appears.

Performing Classification, MTMF, and Spectral Unmixing


1. In the Mapping Methods panel, choose SAM, MTMF, or Unmixing mapping
methods. See the following sections for more information:
• “Applying Spectral Angle Mapper Classification” on page 412
• “Using Mixture Tuned Matched Filtering” on page 778
• “Using Linear Spectral Unmixing” on page 773
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.

ENVI User’s Guide Spectral Hourglass Wizard


840 Chapter 7: Spectral Tools

If you choose Unmixing, ENVI can optionally constrain the abundances for
each pixel to sum-to-one. You can define the weight of this constraint by
entering an Unmix Unit Sum Constraint Weight value. Larger weights
relative to the variance of the data cause the unmixing to honor the unit-sum
constraint more closely. To strictly honor the constraint, make the weight many
times the spectral variance of the data.
2. Click Next. Progress windows display the processing status. The Calculate
Mapping Methods panel briefly appears.
3. From the Examine Results For drop-down list, choose SAM, MTMF, or
Unmix to switch between the Investigate SAM Results, Investigate MTMF
Results, and Investigate Unmix Results panels.
Investigate SAM Results
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 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.
1. 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.
2. 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.
The rule image is loaded into a display group using an inverted color table.
(The ENVI Color Tables dialog also appears.) A smaller SAM angle means a
pixel is a better match to the target. Inverting the color table displays the best
matches as brighter pixels, which is more intuitive.
A histogram of the image also appears in a separate interactive stretching
dialog. This histogram explicitly shows the linear stretch applied to the display
of the rule image. A flat line in the left portion (lowest value) of the histogram
indicates a good separation of targets and backgrounds. Any data values to the
left of this flat line are significant matches for the target spectra.

Spectral Hourglass Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 841

3. The display group is linearly stretched to a maximum value specified by the


Default Stretch Max value in the SAM Rule Images section of the Wizard.
The initial value is 0.05. To change the default stretch maximum when you
display rule images, enter the desired Default Stretch Max value and double-
click on the rule image name in the SAM Rule Images list.
If the Default Stretch Max value is less than the minimum value in the rule
image band, the minimum value will be used instead.
4. Double-click in the display group to open the Cursor Location/Value tool.
Evaluate the SAM spectral angles for each pixel.
5. You can increase the maximum angle threshold to make the classification more
relaxed, or decrease it to make the classification more selective. Click Prev in
the Wizard and enter a new SAM Maximum Angle value if desired.
Investigate MTMF Results
Select a specific endmember from the MTMF Rule Images list and click Load
MTMF Rule Image, or double-click the endmember in the MTMF Rule Images list
to load the MF image in an ENVI display group and to show a 2D scatter plot of MF
score and infeasibility score. The Wizard automatically estimates a linear stretch of
the images, applying the 0-255 gray scale display range to the valid detections in the
right-hand “tail” of the MF histogram. It also displays a Histogram Stretching dialog,
so you can adjust the display range as needed.
See “Mixture Tuned Matched Filtering Results” on page 780 for more information on
interpreting MTMF results.
Investigate Unmixing Results
In the Investigate Unmix Result panel of the Wizard, select a specific endmember
from the Unmix Abundance Images list and click Load Unmix Abundance Image,
or double-click the endmember in the Unmix Abundance Images list to load an
abundance image into an ENVI display group. The Wizard automatically estimates a
2% linear stretch of the abundance images and displays a Histogram Stretching
dialog so you can adjust the contrast stretch as needed.
In the Investigate Unmix Result panel of the Wizard, click Load Unmix RMS Image
to load the RMS error image.
See “Linear Spectral Unmixing Results” on page 775 for more information on
interpreting results.

ENVI User’s Guide Spectral Hourglass Wizard


842 Chapter 7: Spectral Tools

Summary Report
1. In the Investigate SAM Results, Investigate MTMF Results, or Investigate
Unmix Results panels, click Next. A Spectral Hourglass Wizard Summary
Report appears (see Figure 7-98).

Figure 7-98: A Wizard Summary Report

2. 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.
3. Click Finish to exit the Wizard.

Automated Spectral Hourglass


Use the Automated Spectral Hourglass to run the Spectral Hourglass Wizard from a
single screen (see Figure 7-99) without any intermediate interaction. The steps
include MNF, PPI, automatic endmember prediction from the n-D Visualizer, and

Spectral Hourglass Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 843

SAM, MTMF, and Linear Spectral Unmixing mapping methods. Specify the
parameters required for these functions in the Automated Hourglass Parameters
dialog; each step runs without your interaction.
Note
You should not use the Automated Spectral Hourglass unless you are familiar with
the Spectral Hourglass Wizard processing flow and appropriate parameters. You
achieve better results if you run the Spectral Hourglass Wizard and interactively
select your parameters and endmembers.

1. From the ENVI main menu bar, select Spectral → Automated Spectral
Hourglass. The Automated Hourglass Processing Input Files dialog appears.
2. Select the input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The Automated Hourglass
Parameters dialog appears with default values for the parameters. See
“Spectral Hourglass Wizard” on page 829 for descriptions of these parameters.
3. Edit the parameters or accept the defaults.
4. Click OK. The Spectral Hourglass Wizard processing flow runs.

Figure 7-99: Automated Hourglass Parameters Dialog

5. ENVI adds output from all of the intermediate steps to the Available Bands
List, spectral libraries, and plot windows, so that you can investigate each step

ENVI User’s Guide Spectral Hourglass Wizard


844 Chapter 7: Spectral Tools

for accuracy. ROIs containing the pixels used in the mapping methods are
output, and the mean spectra used as endmembers are output to a text file and
spectral library.

Spectral Hourglass Wizard ENVI User’s Guide


Chapter 7: Spectral Tools 845

Spectral Analyst
Use the Spectral Analyst to help identify materials based on their spectral
characteristics. The Spectral Analyst uses ENVI techniques such as Binary Encoding,
Spectral Angle Mapper, and Spectral Feature Fitting to rank the match of an unknown
spectrum to the materials in a spectral library (see “Binary Encoding” on page 771,
“Spectral Angle Mapper Classification” on page 771, and “Using Spectral Feature
Fitting” on page 788 for method descriptions). You can also define your own spectral
similarity techniques and add them to the Spectral Analyst (see “Spectral Analyst
Functions” in ENVI Help). The output of the Spectral Analyst is a list of the materials
in the input spectral library ranked in order of best-to-worst match. An overall
similarity score is reported, along with individual 0 to 1 scores for each method. For
more information, see “Tips for Successful Use of the Spectral Analyst” on page 848.
Note
This function does not identify spectra; it only recommends likely candidates for
identification. The results may change when the similarity methods or weights are
changed. You are still responsible for the actual identification.

Opening the Spectral Analyst


1. You must display a spectral plot (for example, a spectral library plot, Z Profile,
or an endmember collection spectra plot) before running the Spectral Analyst.
2. From the ENVI main menu bar, select Spectral → Spectral Analyst. The
Spectral Analyst Input Spectral Library dialog appears.
3. If a spectral library is not already open, click Open → Spectral Library and
select the spectral library to use for the comparisons.
4. Click OK. The Edit Identify Methods Weighting and Spectral Analyst dialogs
appear.
5. Enter a Weight for each similarity method. See “Spectral Angle Mapper
Classification” on page 771, “Using Spectral Feature Fitting” on page 788, and
“Binary Encoding” on page 771 for method descriptions. By default, Spectral
Feature Fitting has a weight of 1.0. This is a recommended starting point.
6. The Min and Max factors for each method indicate which values are
considered a perfect match by scaling them from 0 to 1 (or from 1 to 0) scores.
• For Spectral Angle Mapper, enter the Min and Max values in radians.
(The similarity to the library spectra is measured in radians.)

ENVI User’s Guide Spectral Analyst


846 Chapter 7: Spectral Tools

• For Spectral Feature Fitting, enter the Min and Max values in RMS error
units. (The similarity is measured using the RMS fit error.)
A SAM or SFF result less than or equal to Min indicates a perfect match and
receives a score of 1. A SAM or SFF result greater than or equal to Max
receives a score of 0.
• For Binary Encoding, enter the Min and Max values as a percentage of
bands correctly matched (0 to 1). A Binary Encoding result less than or
equal to Min receives a score of 0, and a result greater than or equal to
Max receives a score of 1.
7. In the Edit Identify Methods Weighting dialog, click OK.
8. In the Spectral Analyst dialog, click Apply to load a spectrum.
• If one spectrum is plotted, it is automatically entered into the Spectral
Analyst.
• If more than one spectrum is plotted, select the desired spectrum name
from the small dialog that appears. You can only select one spectrum at a
time. Click OK.
• You can also enter spectra directly from a Z Profile dialog.
9. The Spectral Analyst dialog lists the results of the similarity measures. ENVI
resamples the spectral library to match the spectral resolution of the input
spectrum. Proceed to “Understanding the Spectral Analyst Information” on
page 848.

Spectral Analyst Options


Use the Spectral Analyst dialog to open a new spectral library; edit the weights,
minimum, and maximum values; input x and y scale factors; and get input spectra
from a Z Profile plot.

Spectral Analyst ENVI User’s Guide


Chapter 7: Spectral Tools 847

Setting Wavelength Ranges


To use a specific wavelength range:
1. In a spectral plot window, use the middle mouse button to zoom to the desired
wavelength range.
2. In the Spectral Analyst dialog, click Apply.

Displaying Library Spectra with Input Spectra


To display the input spectrum and a selected library spectrum (with the continuum
removed) in a plot together, double-click on a library spectrum name in the Spectral
Analyst list.

Opening New Spectral Libraries


To open a new spectral library file to use in the comparisons:
1. From the Spectral Analyst menu bar, select File → New Spectral Library
File. The Spectral Analyst Input Spectral Library dialog appears.
2. Select the spectral library to use for the comparisons. Click OK.

Editing Weights
To edit the weights, minimum, and maximum values for each method:
1. From the Spectral Analyst menu bar, select Options → Edit Method
Weights. The Edit Identify Methods Weighting dialog appears.
2. Refer to steps 5-7 in “Opening the Spectral Analyst” on page 845 for
information about the Weight, Min, and Max fields.

Entering X and Y Scale Factors


To enter or edit x and y scale factors used to scale the input spectrum into the same
space as the spectral library:
1. From the Spectral Analyst menu bar, select Options → Edit (x,y) Scale
Factors. The Edit (x,y) Scale Factors dialog appears.
2. Enter values for X Data Multiplier and Y Data Multiplier. Click OK.

Entering Spectra from Z Profiles


To enter spectra directly from a Z Profile plot:
1. Open a Z Profile plot (see “Extracting Z Profiles” on page 98).

ENVI User’s Guide Spectral Analyst


848 Chapter 7: Spectral Tools

2. In the Spectral Analyst window, select Options → Auto Input via Z-profile.
3. In the Select Z Profiles dialog, select a Z Profile name.
4. Click OK.
5. In the Image or Zoom window, select a pixel to analyze.
The Z Profile is updated, and the spectral comparison information appears in
the Spectral Analyst dialog. As you move the Zoom box in the Image window,
the information in the Spectral Analyst changes accordingly.
Tip
If you display two images, you must select Options → Clear Auto Inputs before
using the Spectral Analyst in the second display.

Understanding the Spectral Analyst Information


The output of the Spectral Analyst is a ranked or weighted score for each of the
materials in the input spectral library. The highest score indicates the closest match
and indicates higher confidence in the spectral similarity. Similar materials may have
relatively high scores, but unrelated materials should have low scores.

Tips for Successful Use of the Spectral Analyst


The Spectral Analyst is based on spectral matching techniques with specific
requirements for successful operation. The items in this section summarize some of
factors needed to effectively use the Spectral Analyst.

Wavelength Ranges
Many materials are similar in one wavelength range, yet they are very different in
another range. For best results, use the wavelength range that contains the diagnostic
absorption features. When a spectrum displays, the Spectral Analyst works over the
range displayed in the corresponding plot being analyzed. To analyze a smaller range,
use the middle mouse button in the plot to zoom to the desired wavelength range
before clicking Apply in the Spectral Analyst.

Methods
Determine whether materials have absorption features. If so, Spectral Feature
Fitting is probably the best method. Otherwise, Spectral Angle Mapper or Binary
Encoding will yield better results.

Spectral Analyst ENVI User’s Guide


Chapter 7: Spectral Tools 849

Materials Not in the Spectral Library


The Spectral Analyst will not identify materials of interest in the input spectra that
are not in the spectral library. If a material is not in the spectral library, materials
similar to it may score relatively high.

Multiple Materials (Mixtures)


High scores for multiple materials may indicate mixtures, particularly for minerals
with absorption features in different parts of the spectrum. Because of this, you
should run the Spectral Analyst on the results of an endmember determination, the
pure endmember spectra.

Score Magnitude and Score Separation


Higher scores indicate higher confidence because more of the rules were satisfied.
Greater separation between adjacent scores indicates higher confidence in the
similarity. For example, a score of 0.98 for one material followed by a score of 0.96
for another material indicates that the unknown material is very similar to both sets of
rules. A score of 0.98 for one material and a score of 0.50 for another material
indicates a high probability that the spectrum represents the first material.

ENVI User’s Guide Spectral Analyst


850 Chapter 7: Spectral Tools

Multiple Matches (Same Score)


In many cases, the Spectral Analyst lists multiple identical scores for different
materials in the rule base. This indicates that the Spectral Analyst cannot discriminate
the two materials under the identification conditions. In this case, try a different
wavelength range or use the different weighted methods to produce a unique result.

Figure 7-100: A Spectral Analyst Result

No Match (Zero Score)


In some cases, the Spectral Analyst may list a score of 0.000 (no match) for all
materials in the spectral library. This is a good indication that the material is not in the
spectral library, or the material is not similar to other materials in the spectral library.

Context
Examine the spectral ranking in the context of the image setting and known
information. If a suggested identification seems invalid with respect to the known
information, it is probably not the correct identification.
The Spectral Analyst tool is not foolproof. It should be used as a starting point to
identify the materials in an image scene. If you use it properly with a good spectral
library, it can provide excellent suggestions for identification. Used blindly, it can
produce erroneous results.

Spectral Analyst ENVI User’s Guide


Chapter 7: Spectral Tools 851

Multi Range SFF


Use Multi Range SFF to define or edit spectral ranges for use in ENVI’s Multi
Range SFF mapping method. Spectral signatures are typically characterized by
multiple absorption features. The Multi Range SFF tool allows you to define
multiple, and different, wavelength ranges around each endmember’s absorption
features. You interactively define each spectral range and plot the continuum-
removed absorption feature. You can optionally apply weights to each spectral range
to emphasize more important features. Finally, save the defined wavelength ranges to
a file for use with the Multi Range SFF (see “Using Multi Range Spectral Feature
Fitting” on page 790 for more information).

Defining New Spectral Ranges


1. From the ENVI main menu bar, select Spectral → Multi Range SFF →
Define New Ranges. The Select Input Spectral Library dialog appears.
2. Select an input spectral library file.
3. Click OK. The Input Spectral Library dialog appears.
4. Select one or more endmember spectra.
5. Click OK. The Edit Multi Range SFF Endmember Ranges dialog appears with
a list of the selected endmembers.
6. The first endmember is selected by default on the left, and its spectrum is
plotted on the right. Select another endmember name to update the plot. Only
one spectrum is plotted at a time.
7. Choose which spectral ranges to use in the SFF using methods described in
“Using Multi Range Spectral Feature Fitting” on page 790.
8. Click OK. The Save Changes to Multi Range SFF Record dialog appears.
9. Enter an output filename with a .sff extension.
10. Click OK.

Editing Previously Defined Ranges


1. From the ENVI main menu bar, select Spectral → Multi Range SFF → Edit
Previous Ranges. The Enter Multi Range SFF Parameters Filename dialog
appears.
2. Select a .sff file.

ENVI User’s Guide Multi Range SFF


852 Chapter 7: Spectral Tools

3. The Edit Multi Range SFF Endmember Ranges dialog appears with a list of
the selected endmembers and their corresponding spectral ranges.
4. Edit the spectral ranges using methods described in “Using Multi Range
Spectral Feature Fitting” on page 790. Click OK. The Save Changes to Multi
Range SFF Record dialog appears.
5. Click OK to update the .sff file.

Multi Range SFF ENVI User’s Guide


Chapter 7: Spectral Tools 853

Extracting Endmembers with SMACC


The Sequential Maximum Angle Convex Cone (SMACC) spectral tool finds
spectral endmembers and their abundances throughout an image. This tool is
designed for use with previously calibrated hyperspectral data. In comparison to
ENVI’s Spectral Hourglass Wizard, SMACC provides a faster and more automated
method for finding spectral endmembers, but it is more approximate and yields less
precision.
Endmembers are spectra that are chosen to represent pure surface materials in a
spectral image. Endmembers that represent radiance or reflectance spectra must
satisfy a positivity constraint (containing no values less than zero). Other physically-
based constraints may be imposed, such as a sum-to-unity constraint (the pixels are
weighted mixtures of the endmembers) or a sum-to-unity or less constraint (the pixels
are weighted mixtures of the endmembers plus black). If the hyperspectral data are
calibrated to either radiance or thermal IR emissivity, you should use a sum-to-unity
unmixing constraint. If the data are calibrated to reflectance, you should use either a
positivity only or sum-to-unity or less constraint. SMACC allows you to select of any
of these constraints.
SMACC uses a convex cone model (also known as Residual Minimization) with
these constraints to identify image endmember spectra. Extreme points are used to
determine a convex cone, which defines the first endmember. A constrained oblique
projection is then applied to the existing cone to derive the next endmember. The
cone is increased to include the new endmember. The process is repeated until a
projection derives an endmember that already exists within the convex cone (to a
specified tolerance) or until the specified number of endmembers are found.
In other words, SMACC first finds the brightest pixel in the image, then it finds the
pixel most different from the brightest. Then, it finds the pixel most different from the
first two. The process is repeated until SMACC finds a pixel already accounted for in
the group of the previously found pixels, or until it finds a specified number of
endmembers. The spectra of pixels that SMACC finds become the endmembers of
the resulting spectral library.
Unlike convex methods that rely on a simplex analysis, the number of endmembers is
not restricted by the number of spectral channels. Although endmembers derived
from SMACC are unique, a one-to-one correspondence does not exist between the
number of materials in an image and the number of endmembers. SMACC derives
endmembers from pixels in an image. Each pixel may contain only one material or it
may contain a high percentage of a single material with unique combinations of other
materials. Each material identified in an image is described by a subset spanning its
spectral variability. SMACC provides an endmember basis that defines each of these

ENVI User’s Guide Extracting Endmembers with SMACC


854 Chapter 7: Spectral Tools

material subsets. SMACC also provides abundance images to determine the fractions
of the total spectrally integrated radiance or reflectance of a pixel contributed by each
resulting endmember.
Mathematically, SMACC uses the following convex cone expansion for each pixel
spectrum (endmember), defined as H:
N

H (c,i) = ∑ R(c ,k)A(k ,j)


k

where:
• i is the pixel index
• j and k are the endmember indices from 1 to the expansion length, N
• R is a matrix that contains the endmember spectra as columns
• c is the spectral channel index
• A is a matrix that contains the fractional contribution (abundance) of each
endmember j in each endmember k for each pixel
The 2D matrix representation of a spectral image is factored into a convex 2D basis (a
span of a vector space) times a matrix of positive coefficients. In the image matrix
(R), the row elements represent individual pixels, and each column represents the
spectrum of that pixel. The coefficients in A are the fractional contributions or
abundances of the basis members of the original matrix. The basis forms an n-D
convex cone within its subset. The convex cone of the data is the set of all positive
linear combinations of the data vectors, while the convex hull is the set of all
weighted averages of the data. The factor matrices are then determined sequentially.
At each step, a new convex cone is formed by adding the selected vector from the
original matrix that lies furthest from the cone defined by the existing basis.
Reference:
Gruninger, J, A. J. Ratkowski and M. L. Hoke. “The Sequential Maximum Angle
Convex Cone (SMACC) Endmember Model”. Proceedings SPIE, Algorithms for
Multispectral and Hyper-spectral and Ultraspectral Imagery, Vol. 5425-1, Orlando
FL, April, 2004.

Using the SMACC Spectral Tool


1. From the ENVI main menu bar, select Spectral → SMACC Endmember
Extraction. The Select Input Image dialog appears.

Extracting Endmembers with SMACC ENVI User’s Guide


Chapter 7: Spectral Tools 855

2. Select an input file.


3. Select OK. The SMACC Endmember Extraction Parameters dialog appears.
4. Enter the Number of Endmembers. This field specifies the number of
endmembers to extract from the image. Only positive integers are allowed. The
default value is 30.
5. Enter an RMS Error Tolerance. This value specifies the unmixing RMS error
tolerance. If set, the SMACC process exits as soon as the RMS error reaches
this value. It exits regardless of whether or not it reaches the specified number
of endmembers. The recommended starting value is 0.01 for reflectance data
and 1.0 for radiance data. The default value is 0.0, which returns all of the
requested endmembers. You should consider data units when choosing the
tolerance. For example, RMS errors for reflectance should be lower than for
most radiance units.
6. Choose an option for Unmixing Constraint for Endmember Abundances.
• Positivity Only (default): This option constrains the endmember spectra to
positive values for any wavelength. This option is typically used for
images corrected to reflectance because a negative reflectance value has no
physical meaning. This is the best constraint for unmixing reflectance
spectra under conditions of variable illumination.
• Sum to Unity or Less: This option constrains the sum of the fractions of
each material calculated for each pixel to be one or less. With this
constraint, a pixel cannot be more than 100% filled. Use this constraint
when you want a strict physical interpretation of material and shadow
fractions of the abundances of reflectance data. If you select this
constraint, the output abundance cube contains number of endmembers+1
bands. The first resulting band is defined as Shadow Abundance.
• Sum to Unity: This option constrains the sum of the fractions calculated
for each pixel to equal 100%. This constraint fills every pixel to 100%. Use
this constraint when a zero endmember is not physically plausible or when
you want to find very dark endmembers, such as shadow endmembers.
This option is recommended for unmixing spectra such as radiance or
thermal IR emissivity.

ENVI User’s Guide Extracting Endmembers with SMACC


856 Chapter 7: Spectral Tools

7. Select or deselect Coalesce Redundant Endmembers. This option coalesces


any endmembers that are within the specified spectral angle mapper threshold
(SAM Coalesce Value) into one endmember. The most extreme spectra are
identified and used to represent the entire coalesced group of endmembers.
You should not select this option if you are trying to distinguish spectrally
similar materials. If you select this option, you must enter a SAM Coalesce
Value, which is a threshold value for spectral similarity. The default value is
0.100000.
8. Enter an output filename for Endmember Location ROIs. SMACC generates
an ROI file with a single region corresponding to the location of each
endmember pixel.
9. Optionally output the Abundance Image to File or Memory. If you choose
File and enter an output filename, the resulting file is generated with a band for
each endmember. If you selected the Sum to Unity or Less option, the first
band corresponds to the shadow endmember. Generating abundance images is
optional. If you choose File but do not enter an output filename, abundance
images are not generated.
10. Under Select Output Spectral Library, choose output to File or Memory.
11. Click OK in the SMACC Endmember Extraction Parameters dialog to start the
SMACC process.
ENVI adds the resulting output to the Available Bands List. Additionally, two ENVI
plot windows appear:
• Maximum Relative Error Plot: This plot contains the RMS error of each
respective endmember.
• Endmembers Spectral Library Plot: This plot shows the spectral signature of
each of the endmembers resulting from the SMACC Endmember Extraction
process. You can save this collection of endmember spectra as a spectral
library, which you can then use in other spectral analyses.

Extracting Endmembers with SMACC ENVI User’s Guide


Chapter 7: Spectral Tools 857

Spectral Math
Use Spectral Math to apply mathematical expressions or IDL procedures to spectra
and to selected multi-band images. The spectra can be either from a multi-band image
(a Z Profile), a spectral library, or an ASCII file (see “Extracting Z Profiles” on
page 98, “Opening Spectral Libraries” on page 739, and “Importing Spectra from
Spectral Libraries” on page 446). Use Spectral Math to apply mathematical
expressions to all of the bands of multi-band images as long as the number of bands
and spectral channels match.
When using expressions in Spectral Math, the operations are performed in the input
data type (byte, integer, floating-point, and so forth) Use the conversion functions in
Table 7-2 to explicitly set the desired data type of each input band.
To apply Spectral Math, each spectrum you want to process must be open and
displayed in a plot window.
The following figure depicts Spectral Math processing that adds three spectra. Each
spectrum in the expression is mapped to an input spectrum and summed, and the
resulting spectrum is output to a plot window. You can map one or more of the
expression spectra to a file instead of mapping each input to a single spectrum. The
resulting output is a new image file. For example, in the expression s1 + s2 + s3, if s1
is mapped to a file and s2 and s3 are mapped to single spectra, then the resulting
image file contains the spectra of the s1 file summed with s2 and s3.

Figure 7-101: Spectral Math Processing – Addition of Three Spectra

ENVI User’s Guide Spectral Math


858 Chapter 7: Spectral Tools

Series and Trigonometric


Other Spectral Math Options
Scalar Math Functions

Addition (+) Sine (sin(x)) Relational Operators (EQ, NE, LE, LT,
GE, GT)
Subtraction (-) Cosine (cos(x)) Boolean Operators (AND, OR, XOR,
NOT)
Multiplication (*) Tangent (tan(x)) Type conversion functions (byte, fix,
long, float, double, complex)
Division (/) ArcSine (asin(x)) IDL functions that return array results
Minimum ArcCosine (acos(x)) IDL procedures that return array
operator (<) results
Maximum ArcTangent User IDL functions and procedures
operator (>) (atan(x))
Absolute Value Hyperbolic Sine
(abs(x)) (sinh(x))
Square Root Hyperbolic Cosine
(sqrt(x)) (cosh(x))
Exponent (^) Hyperbolic Tangent
(tanh(x))
Natural Exponent
(exp(x))
Natural
Logarithm
(alog(x))

Table 7-2: Functions and Operators (shown in parenthesis)


Used in Spectral Math.

Entering Mathematical Expressions


Table 7-2 lists the types of functions and operators that you can use in Spectral Math
expressions. For a description of how to use your own procedures and functions in
spectral math, see “Writing Spectral Math User Functions” in ENVI Help.

Spectral Math ENVI User’s Guide


Chapter 7: Spectral Tools 859

1. From the ENVI main menu bar, select Spectral → Spectral Math. The
Spectral Math dialog appears.

Figure 7-102: Spectral Math Dialog

2. In the Spectral Math dialog, enter the desired mathematical expression,


including variable names, into the Enter an expression field. The dialog
accepts any valid IDL mathematical expression, function, or procedure as long
as the result can be expressed as a vector (a 1D array) if you are processing
spectra, or a 2D array if you are processing images. The expression is assigned
to the entire spectrum or image.
Variable names must begin with the character “s” or “S” followed by up to five
numeric characters. For example, to calculate the average of six spectra, you
can enter:
(s1+s2+s3+s4+s5+s6)/6
Where s1 is one spectrum, s2 is a second spectrum, and so forth.
The Spectral Math dialog also contains the following functionality:
• Previous Spectral Math Expressions: This list shows previously applied
mathematical expressions. To apply an expression to a new set of spectra,
select it from the list and enter it into the Enter an expression field. Click
OK.

ENVI User’s Guide Spectral Math


860 Chapter 7: Spectral Tools

• Save: Save mathematical expressions to a file. The Save Expressions to a


File dialog appears. Enter an output filename with an .exp extension.
Click OK. You can save expressions to a file without having to first run
them through the Spectral Math function.
• Restore: Restore previously saved mathematical expressions. The Enter
Expressions Filename dialog appears. Select a filename and click OK.
• Clear: Clear all expressions from the Previous Spectral Math
Expressions list.
• Delete: Delete a single expression from the Previous Spectral Math
Expressions list.
• Add to List: To add an individual expression to the Previous Spectral
Math Expressions list, enter it in the Enter an expression field and click
Add to List.
3. After entering a mathematical expression in the Enter an expression field,
click OK. The Variable to Spectra Pairings dialog appears.

Assigning Spectra to Variables


Use the Variable to Spectra Pairings dialog to assign previously displayed input
spectra to variable names you entered in the Enter an expression field in the Spectral
Math dialog.
Using the example mathematical expression (s1+s2+s3+s4+s5+s6)/6,
1. In the Variables used in expression field, select the variable S1 - [undefined].
2. In the Available Spectra List, select a spectrum. The spectrum is paired with
the selected variable.
3. Assign spectra to the other variables using the same steps. To clear the
pairings, click Clear.
4. After all variables are paired with spectra, choose an output result.
• To plot the results in the same plot window as the input spectra, toggle
Output Result to to select Same Window.
• To plot the results into a new plot window, toggle Output Result to to
select New Window.
If you use spectra from two plot windows and you select output to the Same
Window, ENVI plots the result in the same window as the first assigned
spectrum.

Spectral Math ENVI User’s Guide


Chapter 7: Spectral Tools 861

5. Click OK. When the processing is complete, the Spectral Math result spectrum
is plotted in the chosen plot window. The plot is available for additional
processing or saving to an output file using plot functions (see “Using
Interactive Plot Functions” on page 106).

Figure 7-103: Variables to Spectra Pairings Dialog Showing Variables in


Unassigned (left) and Assigned States (right)

Mapping Variables to Input Files


If an image file or image memory item is available, a Map Variable to Input File
button appears in the Variables to Spectra Pairings dialog.
To select a single-band or multi-band image for use in Spectral Math, select a variable
name and click Map Variable to Input File.
6. Select the input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK.

ENVI User’s Guide Spectral Math


862 Chapter 7: Spectral Tools

7. Select output to File or Memory.


8. Click OK. When you use an input image in Spectral Math, the output image
has the same spatial and spectral dimensions.
Tip
You can also use Map Variable to Input File to perform mathematical operations
simultaneously on all bands of an image.

Writing User Spectral Math Functions


You can write a custom function in IDL, save it to a.pro or .sav file in the
save_add directory, and call it from the Enter an expression field of the Spectral
Math dialog. See “Writing Spectral Math User Functions” on page 24 for further
details and examples.

Spectral Math ENVI User’s Guide


Chapter 7: Spectral Tools 863

Resampling Spectral Data Files


Use Spectral Resampling to resample spectral data files to match either the response
of a known instrument (for example, TM, MSS, or AVIRIS), a user-defined filter
function, an ASCII wavelength file (with or without FWHM information), or the
wavelengths of a specific image input file. The resampling method you use depends
on the input information. If you only provide wavelengths (band centers), ENVI
assumes critical sampling and uses a Gaussian model with an FWHM equal to the
band spacings. If you provide wavelengths and FWHM information, ENVI uses a
Gaussian model with FWHM spacings. If you provide a filter function, ENVI uses
that for the resampling.
From the ENVI main menu bar, select Spectral → Spectral Resampling. See
“Selecting Resampling Types” on page 742 for the remaining steps.

ENVI User’s Guide Resampling Spectral Data Files


864 Chapter 7: Spectral Tools

Gram-Schmidt Spectral Sharpening


Use Gram-Schmidt Spectral Sharpening to sharpen a low spatial resolution multi-
band image using associated high spatial resolution panchromatic bands. See “Using
Gram-Schmidt Spectral Sharpening” on page 494 for more information.

Gram-Schmidt Spectral Sharpening ENVI User’s Guide


Chapter 7: Spectral Tools 865

PC Spectral Sharpening
Use PC Spectral Sharpening to sharpen a low spatial resolution multi-band image
using an associated high spatial resolution panchromatic band. See “Using PC
Spectral Sharpening” on page 497 for more information.

ENVI User’s Guide PC Spectral Sharpening


866 Chapter 7: Spectral Tools

CN Spectral Sharpening
CN Spectral Sharpening is an extension of the Color Normalized algorithm often
used to pan-sharpen three-band RGB images. See “Using CN Spectral Sharpening”
on page 498 for more information.

CN Spectral Sharpening ENVI User’s Guide


Chapter 7: Spectral Tools 867

EFFORT Polishing
Use Effort Polishing to run Empirical Flat Field Optimal Reflectance
Transformation (EFFORT) to determine and apply mild adjustments to ATREM
apparent reflectance data, so the spectra appear more like spectra of real materials.
Consistent noise or error features may appear in hyperspectral apparent reflectance
data because of the limited accuracy of the standards, measurements, and models that
were used and the limited accuracy of calibrations performed along the data signal
processing chain. This cumulative error may be several percent in each spectral band,
leading to apparent reflectance data with absolute accuracies far less than the actual
precision of the original data.
EFFORT searches for a mild linear correction, bootstrapped from the data
themselves, that polishes out this error and attempts to improve the accuracy of the
apparent reflectance data. The EFFORT correction applies statistically mild
adjustments to every band (gains near 1 and offsets near 0) that make a visual
improvement in the apparent reflectance spectra. This removal of the cumulative
errors of calibration and atmospheric correction allows improved comparison of
EFFORT corrected spectra to library spectra.
References:
Huntington, J. F. and Boardman, J. W., 1995, Semi-quantitative Mineralogical
and geological mapping with 1995 AVIRIS data, Proc. Spectral Sensing
Research ‘95, ISSSR, Published by the AGPS, 26 Nov - 1 Dec, 1995,
Melbourne, Australia.
Boardman, J. W., 1997, Mineralogic and geochemical mapping at Virginia
City, Nevada using 1995 AVIRIS data, in Proceedings of the Twelfth Thematic
Conference on Geological Remote Sensing, Environmental Research Institute
of Michigan, Denver, CO, pp. 21-28.
Boardman, J. W., 1998, Post-ATREM polishing of AVIRIS apparent
reflectance data using EFFORT: a lesson in accuracy versus precision, in
Summaries of the Seventh JPL Airborne Earth Science Workshop, Vol. 1, p. 53.
The EFFORT process is similar to the Empirical Line method of data calibration,
which matches data spectra to field-measured spectra. EFFORT, however, uses no
ground truth data, and the EFFORT-calculated gains and offsets are applied to
ATREM or other atmospherically corrected apparent reflectance data. EFFORT uses
the data to generate “pseudo field” spectra by fitting each observed spectrum with a
parametric model of Legendre polynomials optionally augmented with real spectra.
Gains and offsets for every band are calculated by comparing the modeled spectra to

ENVI User’s Guide EFFORT Polishing


868 Chapter 7: Spectral Tools

the data spectra, for pixels that are well-fit. A number of spectra are used that span the
entire albedo range to give good leverage for the linear regression process, and the
data values versus modeled values are fit with a line for every band. The slope and
offset of this line are used to correct the apparent reflectance data for the error
features. You can apply gain-only corrections to fix the model-to-data offset to 0.
You can use one or more reality boost spectra (spectra from spectral libraries or field
spectra) to help in the modeling. Using a few spectra that you know are characteristic
of your area as reality boost spectra can produce better-fitting modeled spectra. The
modeled spectra are created by a linear combination of the Legendre and reality boost
spectra. Therefore, reality boost spectra that contain sharp features, such as the
vegetation red edge, when used to augment the Legrendre basis set, can produce a
better model, giving better EFFORT correction factors and/or offsets.
EFFORT works on one or more wavelength segments that you enter. Wavelengths
ranges that contain only noise (for example, the 1.4 μm and 1.9 μm water vapor
absorption bands) should not be used in the calculation.
Typically three segments are defined around the two large water vapor bands; bands
before the 1.4 μm water vapor band, bands between the 1.4 and 1.9 μm water vapor
bands, and bands past the 1.9 μm water vapor band. Each segment must start and end
with a valid band. You can set bands within a segment that contain large, known
errors but that are critical to further analysis as invalid, so they are not used in the
initial spectral modeling.
Invalid bands may include overlapping spectral bands, bands with ringing around the
0.94 and 1.14 μm water vapor bands, and O2 and CO2 under-corrected or over-
corrected bands. These invalid bands are not used in the modeling but will be
corrected on output. The order of the Legendre polynomial that is used to model the
spectra is set by you through trial and error (though the default value provided should
work in most cases). You can model each segment with a different order polynomial.
Tip
Select a polynomial order that will fit the real data features without fitting the error
features. Before running EFFORT, use spectral plots of the radiance data to select
the wavelength segments and invalid bands to input into the EFFORT dialog.

Selecting EFFORT Input


1. From the ENVI main menu bar, select Spectral → EFFORT Polishing. The
Input File dialog appears.

EFFORT Polishing ENVI User’s Guide


Chapter 7: Spectral Tools 869

2. Select an input file and perform optional Spatial Subsetting, then click OK.
The EFFORT Input Parameters dialog appears.
3. Click Enter New Segment. A segment appears in the Segment Information
list.
4. Click Edit next to the new segment. The Segment Spectral Subset dialog
appears with all bands highlighted by default.
5. Select the starting and ending bands for this segment using Add Range; by
clicking and dragging over the list of bands; or by clicking on the first band,
holding down the Shift key, and clicking on the last band.
To set bands contained within a segment to an invalid state so that they will not
be used in computing the EFFORT correction, press the Ctrl key and click the
bands to toggle them off. These data will not be adjusted and are set to 0.
Invalid bands will not be used in the modeling, but they will be adjusted by
EFFORT.
6. Click OK.
7. To change the order of the Legendre polynomial used to fit this segment, enter
the desired order in the Order field next to the segment information.
A lower-order polynomial produces a flatter spectrum, which gives more error
suppression. However, it may also remove some actual reflectance features. A
higher-order polynomial produces a spectrum that fits the data better but it also
may fit some error features, which leaves them in the resulting output. To find
a polynomial order that fits only real data, use a trial-and-error method.
8. Enter new segments until all the spectral segments are defined.
9. To remove the last segment entered, click Delete Last Segment.

Adding Reality Boost Spectra


To input reality boost spectra:
1. In the EFFORT Input Parameters dialog, click Input Reality Boost Spectra.
An endmember collection dialog appears.
2. Import the desired spectra and click Apply. For details, see “Importing
Spectra” on page 442, “Endmember Options” on page 450, and “Managing
Endmember Spectra” on page 453. The Reality Boost Spectra Options dialog
appears.
3. Toggle each Continuum Remove? to select whether or not to use a continuum
removal on the reality boost spectrum.

ENVI User’s Guide EFFORT Polishing


870 Chapter 7: Spectral Tools

• To incorporate the spectral features and not the overall spectral shape, use
continuum removal.
• If the overall shape of the spectrum is important, (for example, vegetation
spectra), do not use continuum removal.
4. Click OK.
5. In the EFFORT Input Parameters dialog, click Edit to change the reality boost
spectra options, or click Delete to delete any of the input reality boost spectra.

Setting EFFORT Parameters


Use the EFFORT Input Parameters dialog to set parameters for the EFFORT
processing before executing EFFORT.
1. In the Number of Points field, enter the total number of spectra to use in the
EFFORT process. You should use at least 1,000 points, but no more than 10%
of the total image size.
2. Enter a value for Albedo Bins to divide the albedo range into and select
spectra from. The number of spectra used in each albedo bin is the total
number of points divided by the number of albedo bins. This ensures that
spectra with a range of albedo are used in the modeling.
3. Toggle EFFORT Calculation to calculate gain and offset values or gain
values only.
• To correct your data for gain values only, select Gain. These include errors
in the radiometric calibration, atmospheric transmittance model, and solar
irradiance model.
• To correct your data for both gain error and offset error, which include
errors in the dark current and path radiance model, select Gain and Offset.
• To save the gain and offset values to an ASCII file, specify a filename in
the Enter Output Gainoff Filename [.txt] field.
4. Click the Apply Results? toggle button to apply the calculated gain and offset
values to the input data.
• If you select No, the gain and offset values appear in a plot window when
you click OK in the EFFORT Input Parameters dialog, and no other output
will be generated.
• If you select Yes, select output to File or Memory. The gain and offset
values appear in a plot window when you click OK in the EFFORT Input

EFFORT Polishing ENVI User’s Guide


Chapter 7: Spectral Tools 871

Parameters dialog, and an EFFORT-corrected apparent reflectance output


file is created, using the filename you specify in Enter Output Filename.
• To overwrite the input file with the EFFORT output, set the In Place?
toggle button to Yes. Note that you cannot interrupt this process without
corrupting the input data file.
5. Click OK. The processing is completed in three steps, shown by three status
processing dialogs. ENVI adds the resulting output to the Available Bands
List, and the gain and offset values appear in a plot window.

ENVI User’s Guide EFFORT Polishing


872 Chapter 7: Spectral Tools

Generating Image Cubes


Use the Build 3D Cube tool to take a multispectral file or hyperspectral file (which
may be spatially and spectrally subsetted) and create an RGB image with the spectral
slice of the top row and far-right column in a perspective view (see Figure 7-104).
The spectral slices are stretched and a user-selected color table is applied. The final
image is a 3D, RGB, color-composite image cube. All of the intermediate processing
occurs file-to-file, or in memory, depending on your preferences. (Temporary files
created during the process are deleted after they are used).
1. From the ENVI main menu bar, select Spectral → Build 3D Cube. The Input
File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The 3D Cube RGB Face Input Bands dialog
appears.
3. Select the RGB bands to place on the face of the image cube by clicking on the
desired bands.
4. Click OK. The 3D Cube Parameters dialog appears.
5. Select the color table for the side and top of the 3D cube from the list of
standard ENVI/IDL color tables.
6. Enter a value for Spectral Scale to apply a multiplier to the pixel dimensions
of the side and top.
Tip
A factor greater than 1.0 exaggerates the side and top dimensions of the cube
by replicating the spectral profiles. This is particularly useful for image cubes
that contain a small number of spectral bands.

7. Enter a Border value to modify the number of border (background) pixels


surrounding the output image.
8. Select output to File or Memory.
9. Click OK. ENVI adds the resulting output to the Available Bands List.

Generating Image Cubes ENVI User’s Guide


Chapter 7: Spectral Tools 873

Figure 7-104: 3D Image Cube

ENVI User’s Guide Generating Image Cubes


874 Chapter 7: Spectral Tools

Preprocessing Utilities
Preprocessing utilities for building geometry files, georeferencing data, and
orthorectifying data are described in “Map Tools” on page 875. All other
preprocessing utilities are described in “Preprocessing Utilities” on page 357.

Preprocessing Utilities ENVI User’s Guide


Chapter 8
Map Tools

This chapter covers the following topics:

The Map Menu . . . . . . . . . . . . . . . . . . . . . 876 Georeferencing RADARSAT . . . . . . . . . . 969


Registration . . . . . . . . . . . . . . . . . . . . . . . . 877 Building RPCs . . . . . . . . . . . . . . . . . . . . . 972
Orthorectification . . . . . . . . . . . . . . . . . . . 911 Selecting Map Projection Types . . . . . . . . 990
Image Mosaicking . . . . . . . . . . . . . . . . . . . 919 Building Customized Map Projections . . 992
Georeferencing from Input Geometry . . . . 934 Converting Map Projections . . . . . . . . . . . 996
Georeferencing SPOT Data . . . . . . . . . . . . 943 Layer Stacking . . . . . . . . . . . . . . . . . . . . . 998
Georeferencing SeaWiFS Data . . . . . . . . . 946 Converting Map Coordinates . . . . . . . . . . 999
Georeferencing ASTER Data . . . . . . . . . . 949 Converting ASCII Coordinates . . . . . . . 1001
Georeferencing AVHRR Data . . . . . . . . . . 952 Merging Old Projection Files . . . . . . . . . 1002
Georeferencing ENVISAT . . . . . . . . . . . . . 956 Using GPS-Link . . . . . . . . . . . . . . . . . . . 1003
Georeferencing MODIS . . . . . . . . . . . . . . 957 Importing ASCII GPS Points . . . . . . . . . 1006
Georeferencing COSMO-SkyMed Data . . 967

ENVI User’s Guide 875


876 Chapter 8: Map Tools

The Map Menu


Use the Map menu to access ENVI’s image registration, orthorectification, geometric
correction, and mosaicking utilities. Also use the Map menu to access tools to
convert map coordinates and map projections, to build customized projections, to
convert ASCII coordinates, and to access a GPS-link utility.

The Map Menu ENVI User’s Guide


Chapter 8: Map Tools 877

Registration
Use Registration to reference images to geographic coordinates and/or correct them
to match base image geometry. You can select ground control points (GCPs)
interactively from Image windows and/or Vector windows. ENVI performs warping
using polynomial functions; Delaunay triangulation; or rotation, scaling, and
translation (RST). Resampling methods include nearest neighbor, bilinear, and cubic
convolution. Comparison of base and warped images using ENVI’s multiple
Dynamic Overlay capabilities allows quick assessment of registration accuracy.
Tip
See the ENVI Tutorials on the ITT Visual Information Solutions website (or on the
ENVI Resource DVD that shipped with your ENVI installation) for step-by-step
examples.

ENVI User’s Guide Registration


878 Chapter 8: Map Tools

Figure 8-1: Typical Layout of Registration Session

Image-to-Image Ground Control Points


Use Select GCPs: Image to Image to interactively select GCPs (called tie points in
image-to-image registration). Use the Zoom windows of two displayed images
(image-to-image registration requires that two images be displayed) to select the
GCPs. When selecting GCPs, you can select sub-pixel (fractional) coordinates. When
you select enough points to define a warp polynomial, you can begin to predict GCP
locations in the warp image. You can save and restore GCPs to and from files, and
you can change the color labels and ordering of the GCP markers. See “Warping and
Resampling Image-to-Image” on page 904 for descriptions of the warping methods.

Registration ENVI User’s Guide


Chapter 8: Map Tools 879

You can warp single-band or multi-band images. The Ground Points Selection dialog
allows you to prototype and test different GCPs and warp options.

Opening and Displaying Images


Tip
To rotate or flip images prior to registration, select Basic Tools → Rotate/Flip
Images from the ENVI main menu bar (see “Rotating Images” on page 267).

1. Open the base image and warp image files and load them into two display
groups.
2. From the ENVI main menu bar, select Map → Registration → Select GCPs:
Image to Image. The Image to Image Registration dialog appears.
3. In the Base Image list, select the display group corresponding to the base
(reference) image.
4. In the Warp Image list, select the display group corresponding to the warp
image.
5. Click OK. The Ground Control Points Selection dialog (Figure 8-2) appears.
Tip
See the ENVI Tutorials on the ITT Visual Information Solutions website (or on the
ENVI Resource DVD that shipped with your ENVI installation) for step-by-step
examples.

Collecting Ground Control Points (Image-to-Image)


Identify GCPs in the two displayed images by locating pixels in the Zoom windows,
as the steps below describe. Pixel information is loaded into the Ground Points
Selection dialog. Whole-number pixel coordinates correspond to the upper-left
corner of the pixel. The x,y values increase to the right and bottom of the pixel,
respectively.
The pixel fraction available in the Zoom window is proportional to the zoom factor.
For example, at a zoom factor of 4x, the pixels are divided into four subareas. At a
zoom factor of 10x, positioning is possible to 1/10th of a pixel. The GCP marker is
placed according to the subpixel position in the Zoom window. Subpixel locations are
supplied to provide higher accuracy in selecting GCPs.
1. In the Image window of each image, position the Zoom box over the desired
GCP area (see Controlling the Zoom Window in Getting Started with ENVI).

ENVI User’s Guide Registration


880 Chapter 8: Map Tools

2. Add individual GCPs by positioning the cursor in the two images to the same
ground location. Examine the locations in the two Zoom windows, and adjust
the locations as needed by left-clicking in each Zoom window. Subpixel
positioning is supported in the Zoom windows. The larger the zoom factor, the
finer the positioning.
The sample and line coordinates (in both images) appear in the Ground
Control Points Selection dialog, in the Base X, Y and Warp X, Y fields,
respectively. Subpixel coordinates are shown as floating-point values.
3. In the Ground Control Points Selection dialog, click Add Point to add the
GCP to the GCP list.
To view the list of GCPs, click Show List. The Image to Image GCP List
appears with the GCPs listed in a table. For a description of the GCP List, see
“Using the Image to Image GCP List” on page 882.
When the GCPs are added to the list, a marker is placed in the Image windows
of both the base and warp images. The GCP marker consists of an ID number
next to an encircled crosshair. The marker indicates the selected pixel (or
subpixel location). The center of the marker (located under the crosshair)
indicates the actual GCP location.
4. Add additional GCPs by following the same procedure.
When you select at least four GCPs, the predicted x,y coordinates for the
selected warp, the x and y error, and the RMS error are listed in the Image to
Image GCP List table (Figure 8-2).
Tip
For the best results, try to minimize the RMS error by refining the positions of the
pixels with the largest errors or by removing them (see “Minimizing RMS Error” on
page 881). You can reduce errors by adding more points. If you only have a few
points, place them near the image corners or widely scatter them throughout the
image.

Registration ENVI User’s Guide


Chapter 8: Map Tools 881

Figure 8-2: Ground Control Points Selection Dialog (top) and Image to Image
GCP List (bottom)

Minimizing RMS Error


The Ground Control Points Selection dialog shows the number of GCPs you select.
After you select a sufficient number of GCPs to conduct a first-degree polynomial
warp, the Ground Control Points Selection dialog shows the total error, and the Image
to Image GCP List table lists the RMS error for each point.
The Degree box in the Selection dialog shows the degree of polynomial used for
calculating the error. You can change this value after you select a sufficient number of
GCPs.

ENVI User’s Guide Registration


882 Chapter 8: Map Tools

Tip
To see which points have the highest RMS errors, select Options → Order Points
by Error from the Ground Control Points Selection dialog menu bar. The points in
the CGP List are reordered so that those with the highest errors appear at the top of
the list.

Using the Image to Image GCP List


Use the Image to Image GCP List to edit and update positions, to turn GCPs on and
off, to delete selected GCPs, and to predict GCP locations (see Figure 8-2).
Hiding/Showing the Image to Image GCP List
To display the Image to Image GCP List, click Show List in the Ground Control
Points Selection dialog.
To hide the Image to Image GCP List, click Hide List in the Ground Control Points
Selection dialog. Or, select File → Cancel from the Image to Image GCP List dialog
menu bar.
Positioning the Zoom Window
To center the Zoom window over any of the selected GCPs, select the desired GCP in
the Image to Image GCP List and click Goto, or select the GCP number in the Image
to Image GCP List.
The marker outlining the selected GCP is positioned at the center of the Zoom
window for both the base and warp images.
Ignoring GCPs
To selectively ignore GCPs during registration, select the GCPs to ignore and click
On/Off.
The RMS error and the spatial transformation are recalculated without using the
selected GCPs. The + next to the GCP number changes to a - in the Image to Image
GCP List, and the color of the GCP marker changes.
To turn the GCP on again, select it and click On/Off again.
Editing GCP Locations
You can edit the location of a GCP by changing the x,y values in the Image to Image
GCP List, or by interactively selecting new locations in the Zoom windows.

Registration ENVI User’s Guide


Chapter 8: Map Tools 883

Select the GCP in the Image to Image GCP List and double-click a Base X, Base Y,
Warp X, or Warp Y value to edit it. Enter the new value and press the Enter key or
click Update. The changes are reflected in the Image to Image GCP List and in the
base and warp images.
Note
If you have already selected several GCPs, a significant delay may occur while the
GCPs are redrawn and the error is recalculated.

To interactively move a GCP, perform the following steps:


1. In the Image to Image GCP List, select the GCP to move.
2. In the base and warp images, center the Zoom boxes over a new location.
3. In the Image to Image GCP List, click Update.
The location of the GCP is replaced with the new pixel positions in the Image to
Image GCP List. The Zoom windows for both images are centered over the new
location.
Deleting GCPs
To permanently remove any GCP from the list in the Image to Image GCP List, select
the GCP and click Delete.

Warping Options
Use the Options menu in the Ground Control Points Selection dialog to warp from
the currently displayed band or to warp from a file. You can also select image-to-map
type warping if your base image is georeferenced. This allows you to change the
output pixel size and projection type of the warped image.
• To use the GCPs to perform registration, select either Options → Warp
Displayed Band or Options → Warp File from the Ground Control Points
Selection dialog menu bar.
• To select image-to-map type warping (if the base image is georeferenced),
select Options → Warp Displayed Band (as Image to Map) or Options →
Warp File (as Image to Map) from the Ground Control Points Selection
dialog menu bar.
The Registration Parameters dialog appears. The details of the various warp options
available in ENVI are discussed in “Warping and Resampling Image-to-Image” on
page 904 and “Warping and Resampling Image-to-Map” on page 907.

ENVI User’s Guide Registration


884 Chapter 8: Map Tools

GCP Options
Use the Options menu in the Ground Control Points Selection dialog to control GCP
labels, colors, and order; to reverse the base and warp images; and to set other
preferences.
Reversing Base/Warp Images
To reverse the positions of the base and warp GCPs, select Options → Reverse
Base/Warp from the Ground Control Points Selection dialog menu bar.
Selecting RST Calculation
For first-order polynomials, you can calculate errors using a rotation, scaling, and
translation (RST) method. From the Ground Control Points Selection dialog menu
bar, select Options → 1st Degree (RST Only). A check mark next to the menu
option indicates it is enabled.
Predicting GCP Locations
To predict the location of a GCP in the warp image based on the warping determined
by the current GCPs and the selected polynomial degree, perform the following steps:
1. In the Zoom window of the base image, position the crosshairs over a pixel.
2. In the Group Control Points Selection dialog, click Predict. The warp image
Zoom box and the crosshairs move to the predicted pixel.
3. Refine the prediction by selecting the correct pixel in the warp image.
4. Click Add Point to enter the GCP.
Automatically Predicting GCP Locations
1. Select Options → Auto Predict from the Group Control Points Selection
dialog menu bar. A check mark next to the menu option indicates it is enabled.
When you adjust the pixel location using the Zoom window or the Zoom box
in the Image window, the Zoom box and crosshairs of the warp image Zoom
window move to the predicted pixel location.
2. Click Add Point to enter the GCP.
Turning Labels On/Off
To turn the GCP labels off or on, select Options → Label Points from the Group
Control Points Selection dialog menu bar. A check mark next to the menu option
indicates it is enabled.

Registration ENVI User’s Guide


Chapter 8: Map Tools 885

Setting Ordering Preferences


To select whether the GCP pairs display in the list by their GCP ID# or by RMS
Error, select Options → Order Points from the Group Control Points Selection
dialog menu bar. A check mark next to the menu option indicates ordering by RMS
error is enabled. No check mark indicates the list order is by GCP ID#.
Changing Label Colors
1. Select Options → Set Point Colors from the Group Control Points Selection
dialog menu bar. The GCP Colors dialog appears.
2. Click the Points which are “On” color box to select the color of the active
GCP markers.
3. Click the Points which are “Off” color box to select the color of the inactive
GCP markers.
4. Click OK in the GCP Colors dialog.
GCP ID order is the order in which they were selected. RMS error order lists the GCP
with the highest error first.
Clearing the Image to Image GCP List
To delete all of the GCPs in the Image to Image GCP List, select Options → Clear
All Points from the Group Control Points Selection dialog menu bar.
Automatically Generate Tie Points
Image coregistration is the process of geometrically aligning two or more images to
integrate or fuse corresponding pixels that represent the same objects. See
“Automatically Coregister Images” on page 892 for steps on performing image
coregistration.

Managing GCPs
Use the File menu in the Ground Control Points Selection dialog to save and restore
GCP files.
Saving GCPs to ASCII Files
1. From the Ground Control Points Selection dialog menu bar or the Image to
Image GCP List menu bar, select File → Save GCPs to ASCII.
2. Enter an output filename with a.pts extension.
3. Click OK. See “GCP File Format (.pts)” on page 1180 for information on the
format.

ENVI User’s Guide Registration


886 Chapter 8: Map Tools

Saving Coefficients to ASCII Files


To save the polynomial coefficients to an ASCII file:
1. From the Ground Control Points Selection dialog menu bar, select File →
Save Coefficients to ASCII. The Output Polynomial Coefficients dialog
appears.
2. Enter or choose an output filename.
3. Click OK. The ASCII file contains the polynomial degree and polynomial
coefficients P and Q, where:

N N
j
x′ = a ( x, y ) = ∑ ∑ Pi, j x y i
i = 0j = 0
N N

y′ = b ( x, y ) = ∑ ∑ Qi, j x j y i
i = 0j = 0

Where x′and y′ are the locations in the warp image, x and y are the locations in the
base image, N is the polynomial degree, and P and Q are the polynomial coefficients.
The P and Q polynomial coefficients matrices are written to the file by rows, one
element per line. For example, a 2 x 2 matrix of P and Q is written in the following
format:
P[0, 0] P[1, 0]
P[0, 1] P[1, 1]
Q[0, 0] Q[1, 0]
Q[0,1] Q[1, 1]
Restoring Saved GCPs
1. From the Ground Control Points Selection dialog menu bar, select File →
Restore GCPs from ASCII. An Enter The Ground Control Points Filename
dialog appears.
2. Select the desired GCP .pts filename and click Open.

Registration ENVI User’s Guide


Chapter 8: Map Tools 887

Image-to-Map Ground Control Points


Use Select GCPs: Image-to-Map to select GCPs for image-to-map registration. Use
the Zoom window to select GCPs. (Image-to-map registration requires you to display
at least one image.) When selecting GCPs, you can select subpixel coordinates.
Choose to enter corresponding map coordinates manually, from a Vector window,
from a base image, or from a GPS link. When you select enough points to define a
warp polynomial, you can begin to predict GCP locations in the warp image. You can
save and restore GCPs to and from files, and you can change the color labels and
order of the GCP markers. See “Warping and Resampling” on page 904 for
descriptions of the warping methods.

Opening and Displaying Images


1. Open the image file and display the desired band.
2. From the ENVI main menu bar, select Map → Registration → Select GCPs:
Image to Map. The Image to Map Registration dialog appears.
3. If you have more than one image open, select the display group to use from the
Input Display drop-down list. If only one image is displayed, it is
automatically selected.
4. In the Select Registration Projection list, select the output projection (see
“Selecting Map Projection Types” on page 990). To enter a custom projection
type, click New (see “Building Customized Map Projections” on page 992).
5. Click OK. The Ground Control Points Selection dialog appears.
Tip
See the ENVI Tutorials on the ITT Visual Information Solutions website (or on the
ENVI Resource DVD that shipped with your ENVI installation) for step-by-step
examples.

ENVI User’s Guide Registration


888 Chapter 8: Map Tools

Figure 8-3: Image to Map Registration Dialog

Collecting Ground Control Points (Image-to-Map)


The procedure for selecting GCPs is similar to that for image-to-image registration
(see “Image-to-Image Ground Control Points” on page 878).
1. In the Image window, position the Zoom box over the desired GCP area (see
Controlling the Zoom Window in Getting Started with ENVI).
2. In the Zoom window, left-click on a specific pixel to position the cursor over
that pixel or portion of that pixel.
The coordinates of the selected location appear in the Ground Control Points
Selection dialog in the Image X and Image Y fields. Subpixel coordinates are
supplied to provide higher accuracy in selecting GCPs (see “Collecting
Ground Control Points (Image-to-Image)” on page 879).

Registration ENVI User’s Guide


Chapter 8: Map Tools 889

3. Select from the following options:


• To enter GCPs from a base image, see “Entering GCPs from a Base
Image” on page 890.
• To automatically enter map coordinates from vector data, see “Entering
Map GCPs from Vector Windows” on page 891.
• To automatically enter map coordinates from GPS locations, see “Using
GPS-Link” on page 1003.
• To enter map coordinates from a paper map, enter the easting and northing
(or latitude/longitude) of the selected GCPs into E and N fields,
respectively.
• To enter the map GCP location from a paper map in latitude and longitude,
click the toggle button next to the map projection name (“UTM” in Figure
8-4) and enter the values into the Lat and Long fields.
Use negative (-) longitude for the western hemisphere and negative (-)
latitude for the southern hemisphere.
• To change the latitude and longitude values to degrees, minutes, and
seconds, click DMS. To use decimal degrees, click DDEG.
• To return to map projection coordinates, click the projection toggle button.
The corresponding map projection coordinates are calculated automatically.
4. When you select a desired pixel in the image and enter the map coordinates,
click Add Point in the Ground Control Points Selection dialog to add the point
to the list of GCPs.
To view the Image to Map GCP List, click Show List.
The Image to Map GCP List appears with the GCPs listed in a table. For a
description of the Image to Map GCP List, see “Using the Image to Map GCP
List” on page 892.
When you add a GCP, a marker is placed in the image, which consists of an ID
number next to an encircled crosshair. The marker indicates the selected pixel
(or subpixel location). The center of the marker (located under the crosshair)
indicates the actual GCP location.
When you select GCPs from a Vector window, ENVI also places a marker in
the Vector window. The marker consists of an ID number of the GCP displayed
with a +.
5. Add additional GCPs using the same procedure.

ENVI User’s Guide Registration


890 Chapter 8: Map Tools

When you enter enough points, the Image to Map GCP List shows the
predicted x,y coordinates for the selected warp, the x,y error, and the RMS
error.

Figure 8-4: Image to Map Ground Control Points Selection Dialog

The Ground Control Points Selection dialog shows the number of GCPs you selected.
When you select a sufficient number of GCPs to conduct a first-degree polynomial
warp, the total RMS error is also displayed.
Tip
For the best registration, try to minimize the RMS error by refining the positions of
the pixels with the largest errors or by removing them (see “Minimizing RMS
Error” on page 881). You can reduce errors by adding more points. If you only have
a few points, place them near the image corners or widely scatter them throughout
the image.

For details about editing, predicting, and positioning GCPs, see “GCP Options” on
page 884. For details about managing GCPs, see “Managing GCPs” on page 885.

Entering GCPs from a Base Image


If you have two files containing the same scene and one of the files contains map
coordinate data, you can use that file as a base image and add GCPs to the image that
is not georereferenced.
1. Open and display a georeferenced image. This is the base image.

Registration ENVI User’s Guide


Chapter 8: Map Tools 891

2. Open and display a like image that is not georeferenced.


3. From the ENVI main menu bar, select Map → Registration → Select GCPs:
Image to Map. The Image to Map Registration dialog appears.
4. Select the non-georeferenced image as the Input Display and enter projection
information. Click OK. The Ground Control Points Selection dialog appears.
5. In the Image window of the georeferenced image, right-click and select Pixel
Locator to open the Pixel Locator dialog.
6. In the Zoom window of the georeferenced image, left-click on a specific pixel
to position the cursor over that pixel or portion of that pixel.
The coordinates of the selected location display in the Pixel Locator dialog, in
sample and line order.
7. In the Zoom window of the non-georeferenced image, select the same pixel.
8. When you select the desired pixel in both images, click Export in the Pixel
Locator dialog. The pixel information is exported to the Ground Control Points
Selection dialog.
9. In the Ground Control Points Selection dialog, click Add Point. The GCP is
added to the non-georeferenced image.
10. Add additional GCPs by following the same procedure.

Entering Map GCPs from Vector Windows


If you have a vector file for the area to map-register, you can extract the map
coordinates directly from the vector data and load them into the Ground Control
Points Selection dialog.
1. Select GCPs from the displayed image as described in “Collecting Ground
Control Points (Image-to-Map)” on page 888.
2. Load the vectors into a Vector window and use the vector cursor positioning
capabilities (left-click) to locate a feature corresponding to the feature selected
on the image (see Vector Window Mouse Button Functions in Getting Started
with ENVI).
3. At the bottom of the Vector Parameters dialog, click Export to enter the map
coordinates of the vector cursor directly into the Ground Control Points
Selection dialog, or select Export Map Location from the Vector window
right-click menu.
4. In the Ground Control Points Selection dialog, click Add Point to enter the
selected point into the registration.

ENVI User’s Guide Registration


892 Chapter 8: Map Tools

Saving GCPs as Vector Files


To save the GCP points and all the associated information and attributes as an ENVI
vector file, in the Available Vectors List, select the new registration’s GCP vector
layer, and select File → Save Memory Layers to File from the Ground Control
Points selection dialog menu bar.

Warping Options
To use the GCPs to perform registration, select either Options → Warp Displayed
Band or Options → Warp File from the Ground Control Points selection dialog
menu bar. The Registration Parameters dialog appears. For details, see “Warping and
Resampling Image-to-Map” on page 907.

Using the Image to Map GCP List


The Image to Map GCP List is similar to the Image to Image GCP List. See “Using
the Image to Image GCP List” on page 882.

GCP Options
See “GCP Options” on page 884 for details on the Ground Control Points Selection
dialog options.

Automatically Coregister Images


Image coregistration is the process of geometrically aligning two or more images to
integrate or fuse corresponding pixels that represent the same objects. You can
typically obtain the geometric relationship between a warp image and a base image
through a number of tie points and you can model the relationship using
transformation capabilities, such as polynomial functions, Delaunay triangulation, or
affine transform. The image coregistration tool allow you to automatically generate
tie points, thus making fully automatic image registration possible.
You can access ENVI’s automatic tie point collection capability when you are
working with the following:
• Image-to-image GCPs. This is described in “Autoregistration Using Ground
Control Points” on page 893.
• Image-to-image mapping. This is described in “Autoregistration Using Image-
to-Image Mapping” on page 895.
Image matching is always performed between one band from the base image and one
band from the warp image.

Registration ENVI User’s Guide


Chapter 8: Map Tools 893

The automatic image coregistration tool uses area-based matching and feature-based
matching algorithms to obtain tie points, which are as follows:
• Area-based image matching compares the gray scale values of patches of two
or more images and tries to find conjugate image locations based on similarity
in those gray scale value patterns. The results of area-based matching largely
depend upon the quality of the approximate relationship between the base
image and the warp image. This is determined through traditional or pseudo
(RPC or RSM) map information, or by using three or more tie points. If both
map information and three or more tie points exist, the three or more tie points
condition is used. In the case where the pseudo map information is not
sufficiently accurate, it is recommended that you select three or more tie points
to obtain good matching results.
• Feature-based image matching extracts distinct features from images then
identifies those features that correspond to one another. This is done by
comparing feature attributes and location.

Autoregistration Using Ground Control Points


1. With two images open in display groups, select Map → Registration →
Select GCPs: Image to Image from the ENVI main menu bar. The Image to
Image Registration dialog appears.
2. Select the display group corresponding to the Base Image.
3. Select the display group corresponding to the Warp Image.
4. Click OK. The Ground Control Points Selection dialog appears.
5. From the Ground Control Points Selection dialog menu bar, select Options →
Automatically Generate Tie Points.
6. If either the base image or the warp image displays in color, the Base Image
Band Matching Choice and/or Warp Image Band Matching Choice dialogs
(Figure 8-5) appear for you to select the band to use for matching. Select the
base image band and/or warp image band.

ENVI User’s Guide Registration


894 Chapter 8: Map Tools

Figure 8-5: Base Image Band Matching Choice (left) and Warp Image Band
Matching Choice (right) Dialogs

7. Click OK. If both images display in gray scale, step 6 is skipped. The
Automatic Tie Points Parameters dialog appears (Figure 8-6 and Figure 8-8).
8. You can set parameters for area-based matching (described in “Area-Based
Matching Parameters” on page 896) or feature-based matching (described in
“Feature-Based Matching Parameters” on page 901).
Area-based matching is disabled if both the base image and warp image do not
have traditional or pseudo (RPC or RSM) map information, or if three or more
tie points have not already been selected. If area-based matching is disabled
and you want to use this method, click Cancel, return to the Ground Control
Points Selection dialog and manually select three or more tie points, then select
Options → Automatically Generate Tie Points from the Ground Control
Points Selection dialog menu bar.
9. Click OK. When processing is complete, the Ground Control Points Selection
dialog displays.
10. In the Ground Control Points Selection dialog, click Show List to view the
GCPs. The Image to Image GCP List dialog appears. See “Using the Image to
Image GCP List” on page 882 for information on viewing and editing the GCP
list.

Registration ENVI User’s Guide


Chapter 8: Map Tools 895

Autoregistration Using Image-to-Image Mapping


1. From the ENVI main menu bar, select Map → Registration → Automatic
Registration: Image to Image. The Select Input Band from Base Image
dialog appears.
2. Select the band to use and click OK. The Select Input Warp File dialog
appears.
3. Select the warp file to use, then click OK. If desired, select Spatial Subsetting
by clicking Spatial Subset.
4. If the warp file has multiple bands, the Warp Image Band Matching Choice
dialog (Figure 8-5) appears for you to select the bands to use for matching.
Select the warp image band.
5. Click OK. If the warp file has only one band, this step is skipped.
6. The ENVI Question dialog displays with the following prompt: Would you
like to select an optional existing tie points file to aid in the autoregistration?
Do one of the following:
• Click Yes to select a tie points file. This opens the Select Existing Tie
Points File dialog. Navigate to and select the desired file, then click Open.
After you click Open, the Automatic Registration Parameters dialog
appears.
• Click No to skip selecting a tie points file. This opens the Automatic
Registration Parameters dialog.
7. In the Automatic Registration Parameters dialog (Figure 8-7 and Figure 8-9),
set the parameters for automatic matching. You can set parameters for area-
based matching (described in “Area-Based Matching Parameters” on
page 896) or feature-based matching (described in “Feature-Based Matching
Parameters” on page 901).
Area-based matching is disabled if both the base image and warp image do not
have traditional or pseudo (RPC or RSM) map information, or if three or more
tie points have not already been selected. If area-based matching is disabled
and you want to use this method, click Cancel, go to the Ground Control
Points Selection dialog (Map → Registration → Select GCPs: Image to
Image from the ENVI main menu bar), and manually select three or more tie
points, then select Options → Automatically Generate Tie Points from the
Ground Control Points Selection dialog.
8. Click OK.

ENVI User’s Guide Registration


896 Chapter 8: Map Tools

9. The final steps depend upon the Examine tie points before warping
parameter setting:
• If the Examine tie points before warping value was Yes, the Image to
Image GCP List dialog displays. See “Using the Image to Image GCP
List” on page 882 for information on viewing and editing the GCP list.
• If the Examine tie points before warping value was No, ENVI adds the
warped image to the Available Bands List.

Area-Based Matching Parameters


Area-based image matching compares the gray scale values of patches of two or
more images and tries to find conjugate image locations based on similarity in those
gray scale value patterns.
The results of area-based matching largely depend upon the quality of the
approximate relationship between the base image and the warp image. This
relationship is determined through traditional or pseudo (RPC or RSM) map
information; or through three or more tie points. If both map information and three or
more tie points exist, the tie points are always used to model the approximate
relationship, and the map information is ignored. If pseudo map information is not
sufficiently accurate, you may instead select three or more tie points to obtain good
matching results.

Registration ENVI User’s Guide


Chapter 8: Map Tools 897

The area-based matching parameters are described in the following section.

Figure 8-6: Automatic Tie Points Parameters Dialog – Area-Based Matching


Options

ENVI User’s Guide Registration


898 Chapter 8: Map Tools

Figure 8-7: Automatic Registration Parameters Dialog – Area-Based Matching


Options

• Number of Tie Points: Specify the number of tie points to generate. ENVI
uses this value to automatically filter out certain incorrect tie points. This value
can be as few as 9, but the recommended value is 25 (default setting). If the
Point Oversampling value is greater than 1, ENVI trades off between tie point
quality and point distribution. Therefore, if you want to obtain at least 25
points, you may want to enter a larger value in this field, such as 50, to allow
for further filtering.

Registration ENVI User’s Guide


Chapter 8: Map Tools 899

• Search Window Size: Specify the search window size, in square pixels. The
search window is a defined subset of the image, within which the smaller
moving window scans to find a topographic feature match for a tie point
placement. The search window size can be any integer greater than or equal to
21, but it must be larger than the Moving Window Size. The default is 81.
This value depends upon the quality of the initial user-defined tie points (a
minimum of three points) or the correctness of traditional or pseudo (RPC or
RSM) map information for the base and warp image, and it also depends on the
roughness of terrain.
If both images have certain map information, then a good way to establish the
minimum search window size is to geographically link the base and warp
images. Click a feature point (point A) in the base image, then click a feature
point in the warp image. The cursor automatically moves to a point (point B)
that is close to the ground feature point (point C) that represents the same
ground feature as point A. Measure (in pixels) the distance between point B
and point C in the warp image and use 2*(distance+1) as the minimum search
window size. The search window size may vary considerably with different
images. For example, 81 may be sufficient for one image pair, while 781 may
be necessary for another image pair. Using a larger value results in a greater
the chance of finding the conjugate point, but takes longer processing time.
Setting an excessively large value may result in false matches because more
similar points may exist in a larger area.
• Moving Window Size: Specify the moving window size, in square pixels. The
moving window scans methodically in the image subset area defined by the
Search Window Size, looking for matches to a topographic feature. The
moving window size must be an odd integer. The smallest allowable value is 5.
The default is 11. Using a larger value results in a more reliable tie point
placement, but takes longer processing time; conversely, a smaller value takes
less processing time, but the tie points are less reliable. Determining a good
moving window size largely depends upon the image resolution and terrain
type. Some general guidelines follow:
• For a 10 meters or higher resolution image, use a range of 9-15.
• For a 5-10 meter resolution image, use a range of 11-21.
• For a 1-5 meter resolution image, use a range of 15-41.
• For a 1 meter or less resolution image, use a range of 21-81 or higher.

ENVI User’s Guide Registration


900 Chapter 8: Map Tools

• Because most buildings in very high-resolution images in an urban area


appear similar, specify a larger value to take the surrounding area into
account for more robust matching results. To reduce the computational
time for image matching, ENVI automatically uses a hierarchical
matching method when the moving window size is greater than or equal
to 19.
• Area Chip Size: Specify the image chip size to use to extract tie points. The
default is 128 (128 x 128), which works best in most instances. The minimum
setting is 64, and the maximum setting is 2048.
• Minimum Correlation: Specify the minimum correlation coefficient required
for a ENVI to consider a pair of conjugate points a candidate match. ENVI
immediately removes any tie points with a correlation coefficient less than this
value. If you are using a larger Moving Window Size, set this field to a
smaller value. For example, for a Moving Window Size of 31 or larger, a
minimum correlation of 0.60 or smaller may be appropriate. The default is
0.70.
• Point Oversampling: Specify the number of tie points to collect from a single
image chip. The default is 1. If you use a value greater than 1, ENVI generates
more robust results, but processing time is longer. If tie point quality is critical
and you do not want to examine the tie points, a value of 2 is recommended.
• Interest Operator: Specify the interest operator to identifying feature points.
The options are:
Moravec: (default) Searches for gray scale value differences between one
pixel and its adjacent pixels. The Moravec operator is typically faster than the
Förnster operator.
Förnster: Obtains and analyzes the gray scale gradient matrix between one
pixel and its adjacent pixels. The Förnster operator is typically better for image
matching than the Moravec operator.
The following parameters are available on the Automatic Registration Parameters
dialog only (accessible by Map → Registration → Automatic Registration: Image
to Image):
• Examine tie points before warping: Use this toggle button to indicate
whether or not to allow the examination of tie points before warping the image.
The default is Yes. It is recommended that you accept the Yes default setting,
so that you can review the tie points and edit those that are less than optimal.

Registration ENVI User’s Guide


Chapter 8: Map Tools 901

• Warp Parameters: These parameters are available when you select No with
the toggle button. Use these parameters to set warping and resampling values.
For details on these parameters, see “Warping and Resampling” on page 904.
• Output Parameters: These parameters are available when you select No with
the toggle button. Use these parameters to specify the Output Tie Points
Filename [.pts] and the output method for the results (File or Memory).

Feature-Based Matching Parameters


Feature-based image matching extracts distinct features from images and identifies
those features that correspond to one another.

Figure 8-8: Automatic Tie Points Parameters Dialog – Feature-Based Matching


Options

ENVI User’s Guide Registration


902 Chapter 8: Map Tools

Figure 8-9: Automatic Registration Parameters Dialog – Feature-Based


Matching Options

• Match Levels: Specify the number of image pyramid levels to use to conduct
image matching. The default is 1. Set this parameter to 2 or higher if the Pixel
Size Ratio (warp/base) setting is relatively inaccurate.
• Maximum Match Size: Specify the maximum size of the image pyramid used
for conducting image matching. The default is at a pyramid level that is close
to 512 x 512. The actual value varies with the base image size. The larger the
value of this parameter, the more tie points it may generate, the more accurate
the result could be, and the more processing time required.
Note
The Match Levels and Maximum Match Size values affect the number and
size of temporary files created during processing. Be sure your temporary
directory has enough available space to allow for these files, particularly
when setting match values larger than the default settings.

Registration ENVI User’s Guide


Chapter 8: Map Tools 903

• Pixel Size Ratio (warp/base): Specify the ratio of the ground pixel size in the
warp image to the ground pixel size in the base image. The default is 1.0. This
parameter guides the matching process. For example, if a base image pixel
ground size is 20 m and the warp image pixel ground size is 10 m, the resulting
pixel size ratio will be 0.5 (10/20). If both base image and warp image have
traditional or pseudo (RPC or RSM) map information, a corresponding default
value is automatically set for the Pixel Size Ratio (warp/base).
• Secondary Reliability Check: Select Yes or No to perform a secondary
reliability check. Selecting Yes (default) results in fewer, yet more reliable tie
points. Selecting No results in more, yet less reliable, tie points. For typical
remote sensing imagery, you should select Yes. If image quality is poor and
you can extract only a few feature points, or if you want to extract as many tie
points as possible (at the expense of output tie points reliability), then select
No.
• Spatial Subset: If desired, select a spatial subset from the base or warp image,
specifying the approximate overlap region of the corresponding image. This is
useful when the two images only partially overlap. In such a case, you can
select the subsets of the images to guide the image matching process. If both
the base and warp images have traditional or pseudo (RPC or RSM) map
information, a reasonable default value will be set.
The following parameters are available on the Automatic Registration Parameters
dialog only (accessible by Map → Registration → Automatic Registration: Image
to Image):
• Examine tie points before warping: Click Yes (default) to allow the
examination of tie points before warping the image. It is recommended that
you select Yes so that you can review the tie points and edit those that are less
than optimal.
• Warp Parameters: These parameters are available when you select No with
the toggle button. Use these parameters to set warping and resampling values.
For details on these parameters, see “Warping and Resampling Image-to-
Image” on page 904.
• Output Parameters: These parameters are available when you select No with
the toggle button. Use these parameters to specify the Output Tie Points
Filename [.pts] and the output method for the results (File or Memory).

ENVI User’s Guide Registration


904 Chapter 8: Map Tools

Warping and Resampling


ENVI offers three warping options: RST, polynomial, and Delaunay triangulation.
The resampling methods include nearest neighbor, bilinear, and cubic convolution.
Reference:
Richards, J. A., 1999, Remote Sensing Digital Image Analysis, Springer-Verlag,
Berlin, p. 240.

Warping and Resampling Image-to-Image


1. Select the Ground Control Points (see “Image-to-Image Ground Control
Points” on page 878).
2. From the Ground Control Points Selection dialog menu bar, select Options →
Warp Displayed Band or Options → Warp File.
• If you select Warp Displayed Band, the Registration Parameters dialog
appears (Figure 8-10).
• If you select Warp File, the Input Warp Image dialog appears. Select the
input warp file and click OK. The Registration Parameters dialog appears.

Registration ENVI User’s Guide


Chapter 8: Map Tools 905

Figure 8-10: Registration Parameters Dialog for Image-to-Image Registration

3. In the Registration Parameters dialog, select the warping method from the
Method drop-down list. The method you select determines the additional
Warp Parameters options available to you. The available warping methods
are as follows:
• RST: Rotation, scaling, and translation; this is the simplest method. To
perform RST warping, you need three or more GCPs. The RST warping
algorithm uses an affine transformation:
x = a1 + a2X + a3Y
y = b1 + b2X + b3Y

ENVI User’s Guide Registration


906 Chapter 8: Map Tools

This algorithm does not allow for shearing in the image warp. To allow for
shearing, use a first-order polynomial warp. While the RST method is very
fast, in most cases, you can achieve more accurate results with a first-order
polynomial warp.
• Polynomial: Polynomial warping is available from the 1st to nth degree.
The degree available is dependent upon the number of GCPs selected
where #GCPs → (degree + 1)2.
A first-order polynomial warp includes an XY interaction term to account
for image shear:
x = a1 + a2X + a3Y + a4XY
y = b1 + b2X + b3Y + b4XY
• Triangulation: Delaunay triangulation warping fits triangles to the
irregularly spaced GCPs and interpolates values to the output grid. This is
the default option.
4. Depending on the Method you chose, set the following method-specific
options:
• For polynomial warping, enter the desired polynomial Degree. The degree
available is dependent on the number of GCPs defined where #GCPs >
(degree + 1)2.
• For triangulation warping, use the Zero Edge toggle button to select
whether or not you want a one-pixel border of background color at the
edge of the warp data.
By selecting this option, you will avoid a smearing effect that may appear
at the edges of warped images and that you often see when using ENVI’s
data-specific georeferencing functions.
5. From the Resampling drop-down list, select the resampling method:
• Nearest Neighbor: Uses the nearest pixel without any interpolation to
create the warped image.
• Bilinear: Performs a linear interpolation using four pixels to resample the
warped image.
• Cubic Convolution: Uses 16 pixels to approximate the sinc function using
cubic polynomials to resample the image. Cubic convolution resampling is
significantly slower than the other methods.
6. In the Background field, enter a digital number (DN) value to use to fill areas
where no image data appear in the warped image.

Registration ENVI User’s Guide


Chapter 8: Map Tools 907

To override the output dimensions, enter the desired values in the Output
Image Extent fields for image-to-image registration. The output image
dimensions are automatically set to the size of the bounding rectangle that
contains the warped input image. Therefore, the output warp image size is
usually not the same size as the base image. The output size coordinates are
determined in base image coordinates. As a result, the upper-left corner values
are typically not (0,0), but they indicate the x and y offset from the base image
upper-left corner. These offset values are stored in the header and allow for
dynamic overlay of the base and warp images even when they are different
sizes.
Note
If you want the registration result to exactly match the coverage of the base
image, change the Upper Left X and Upper Left Y values to 1. Change the
Output Samples and Output Lines values so they are the same size as the
base image. If the coverage of your input image is smaller than that of the
base image, the result will have areas of “no data” where there is no
coverage.

7. Select output to File or Memory.


8. Click OK. ENVI adds the resulting output to the Available Bands List.

Warping and Resampling Image-to-Map


1. Select the Ground Control Points (see “Image-to-Map Ground Control Points”
on page 887).
2. In the Ground Control Points Selection dialog, select Options → Warp
Displayed Band or Options → Warp File.
The options Warp Displayed Band (as Image to Map) and Warp File (as
Image to Map) are also available from the Ground Control Points Selection
dialog when selecting image-to-image GCPs, as described in “Image-to-Image
Ground Control Points” on page 878.
• If you select Warp Displayed Band, the Registration Parameters dialog
appears (Figure 8-11).
• If you select Warp File, the Input Warp Image dialog displays. Select the
input warp file and click OK. The Registration Parameters dialog appears.

ENVI User’s Guide Registration


908 Chapter 8: Map Tools

Figure 8-11: Registration Parameters DIalog for Image-to-Map Registration

3. In the Output Projection and Map Extent area of the Registration


Parameters dialog, set the output projection for the image:
• To change the projection of the upper-left coordinate only, click Change
Proj.
• To change the map coordinates or latitudes/longitudes for the upper-left
coordinate, use the X Pixel Size, Y Pixel Size, Output X Size, and
Output Y Size fields.
• Click Options and select from the menu to manage the output projection
and map extent settings.
4. In the Warp Parameters area of the Registration Parameters dialog, select the
warping and resampling methods (see “Warping and Resampling Image-to-
Image” on page 904.
5. Click OK. ENVI adds the resulting output to the Available Bands List.

Registration ENVI User’s Guide


Chapter 8: Map Tools 909

Assessing Registration Accuracy


1. Use the Available Bands List to load the warped image into a new Image
window.
2. Link the warped Image window to the base Image window (by selecting
Tools → Link Displays from a Display group menu bar), and use dynamic
overlays to flicker between the base and the warped images (see “Working
with Multiple Dynamic Overlays” on page 92).

Saving Warped Images to Disk


To save a warped image in memory to disk, select File → Save Selected File to Disk
from the Available Files List menu bar. For details, see Using the Available Files List
in Getting Started with ENVI.

Warping from Saved Image-to-Image GCPs


Use Warp from GCPs: Image to Image to perform image-to-image registration
without having the images displayed. Use GCPs you selected previously to perform
the registration.
1. From the ENVI main menu bar, select Map → Registration → Warp from
GCPs: Image to Image. An Enter the GCP Filename dialog appears.
2. Enter the GCP filename or select the appropriate GCP input file from the list.
The Input Warp Image dialog appears.
3. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Input Base Image dialog appears.
4. Select an input base image and click OK.
5. In the Registration Parameters dialog, follow the instructions in “Warping and
Resampling Image-to-Image” on page 904 to perform the image-to-image
registration.

Warping from Saved Image-to-Map GCPs


Use Warp from GCPs: Image to Map to perform image-to-map registration
without having the images displayed. Use GCPs you selected previously to perform
the registration.
1. From the ENVI main menu bar, select Map → Registration → Warp from
GCPs: Image to Map. The Enter GCP Filename dialog appears.

ENVI User’s Guide Registration


910 Chapter 8: Map Tools

2. Select a.pts file and click OK. The Image to Map Registration dialog
appears (Figure 8-12).

Figure 8-12: Image to Map Registration Dialog

3. Follow the instructions in “Selecting Map Projection Types” on page 990 for
details about the Image to Map Registration dialog parameters.

Registration ENVI User’s Guide


Chapter 8: Map Tools 911

Orthorectification
Use Orthorectification to rectify data from specific pushbroom sensors (ALOS
PRISM and AVINIR, ASTER, FORMOSAT-2, GeoEye-1, IKONOS, KOMPSAT-2,
OrbView-3, QuickBird, RapidEye, WorldView-1 and -2, SPOT Level 1A and 1B, and
CARTOSAT-1), using a rational polynomial coefficients (RPC) model. Data from
each of these sensors typically include an ancillary RPC file or have the necessary
ephemeris data, which ENVI uses to compute RPCs.
Another option is to build RPCs for any generic pushbroom sensor, scanned aerial
photograph, or digital aerial photograph using ENVI’s Build RPCs function. This
option builds RPCs from ground control points (GCPs) or known exterior orientation
parameters (XS, YS, ZS, Omega, Phi, and Kappa). Then, use the Generic RPC and
RSM function to orthorectify the image. See “Building RPCs” on page 972 and
“Generic RPC and RSM” on page 918 for more information.
Note
To perform rigorous orthorectification, you must have the ENVI Orthorectification
Module installed (available with a separate license). See the ENVI
Orthorectification Module User’s Guide for details.

Orthorectify Using RPCs


The following are required input for RPC orthorectification:
• The image to rectify
• RPC model
• Elevation information
• Offset between mean sea level and the gravitational potential surface (known
as the geoid), so ENVI can correctly interpret the elevation.
• If approximate geolocation information is not available for the source image,
the rough location of the image on the earth’s surface must be computed to
provide a location base needed for the RPC transformation.
Optional input includes a DEM or ground control points (GCPs, if available) to
enhance the accuracy of the RPC orthorectification process.
Reference:

ENVI User’s Guide Orthorectification


912 Chapter 8: Map Tools

Jacek Grodecki and Gene Dial, “Block Adjustment of High-Resolution Satellite


Images Described by Rational Polynomials,” Photogrammetric Engineering and
Remote Sensing, 69(1):59-68.
To orthorectify your data with an RPC model:
1. Open the image file with associated RPCs by selecting File → Open External
File → sensor_type → data_type from the ENVI main menu bar.
Note
For ASTER 1A or 1B data, select File → Open External File → EOS →
ASTER from the ENVI main menu bar.

The input image must be linked to the RPC coefficients contained in an


ancillary text file. These coefficients are required for the rational function
expansion to convert ground coordinates into sensor coordinates. When you
select a file for input, ENVI searches for the RPC coefficients by one of the
following filenames:
• For ALOS/PRISM: An RPC filename consisting of the root image name
with an RPC extension.
• For CARTOSAT-1: An RPC filename of PRODUCT_RPC.TXT in the
directory containing the raster data.
• For FORMOSAT-2: No RPC file is required. ENVI derives the RPC model
from geometric parameters stored in the standard metadata for the scene.
• For GeoEye-1: An RPC filename consisting of the root name of the source
data file appended with the extension .pvl.
• For IKONOS: An RPC filename consisting of the root name of the source
image plus _rpc.txt.
• For KOMPSAT-2: An RPC filename consisting of the root image name
with an RPC extension.
• For OrbView-3: An RPC filename consisting of the root name of the
source data file, but without the _image prefix, and appended by
_metadata.pvl.
• For QuickBird: An RPC filename consisting of the root name of the source
data file appended with the extension .rpb.
• For RapidEye: No RPC file is required. ENVI derives the RPC model
from geometric parameters stored in the standard metadata for the scene.

Orthorectification ENVI User’s Guide


Chapter 8: Map Tools 913

• For WorldView-1 and WorldView-2: An RPC filename consisting of the


root name of the source data file appended with the extension .rpb.
• For SPOT Level 1A and 1B: No RPC file is required. ENVI derives the
RPC model from geometric parameters stored in the standard metadata for
the scene.
2. To orthorectify the data, select one of the following options from the ENVI
main menu bar:
• Map → Orthorectification → sensor_type → Orthorectify sensor_type
• Basic Tools → Preprocessing → Data-Specific Utilities →
sensor_type → Orthorectify sensor_type
• Spectral → Preprocessing → Data-Specific Utilities → sensor_type →
Orthorectify sensor_type
The Select File to Othorectify dialog appears.
Note
If your sensor type is different from any of the above options and you have a
file containing RPC information, you can use the Generic RPC and RSM
option (see “Generic RPC and RSM” on page 918).

3. Select the image to orthorectify.


4. Click OK. The Orthorectification Parameters dialog appears
If ENVI cannot locate an associated file containing the RPCs, it prompts you
to select the appropriate file. When the RPC file is located, ENVI
automatically associates it with the input file (see “Emulating an RPC or RSM
Projection” on page 201).

ENVI User’s Guide Orthorectification


914 Chapter 8: Map Tools

Figure 8-13: Orthorectification Parameters Dialog

5. Select an Image Resampling technique from the drop-down list. The


resampling technique determines the pixel values in the input image when it is
converted from its current orientation into the new orientation. The choices are
Nearest Neighbor, Bilinear, and Cubic Convolution. The default is Bilinear.
6. Enter a Background value for pixels in the output image that are outside the
boundary of the source image.
7. Specify how to determine the elevation by clicking the Input Height toggle
button and selecting Fixed or DEM.
8. If you choose Fixed, enter a static elevation value in the Meters field to use for
each pixel. Proceed to step 14.

Orthorectification ENVI User’s Guide


Chapter 8: Map Tools 915

9. If you choose DEM, follow steps 10-13. If the input image has an associated
DEM file, it is used as the default DEM for the orthorectification process. For
more information on associating a DEM with an image, see “Associating a
DEM to a File” on page 202.
10. Click Select DEM File and specify the location of the DEM file.
11. Select an option from the DEM Resampling drop-down list. The resampling
technique converts the DEM from the source image coordinate system to
Geographic (WGS-84), which is required for input into the RPC algorithm.
ENVI performs a full projection to convert each DEM coordinate into the
correct coordinate system.
12. Enter a Geoid offset value. This is a constant value that is added to every value
in the DEM to account for the difference between a spheroid mean sea level
(used in most available DEM data) and the constant geopotential surface
known as the GEOID. The RPC coefficients are created based on geoid height,
and this information must be used to provide accurate orthorectification.
For example, if the geoid is 10 m below mean sea level at the location of your
image, enter a value of -10.
Many institutions doing photogrammetric processing have their own software
for geoid height determination. You can also obtain software from NGA,
USGS, NOAA, and other sources. A geoid height calculator is located at:
http://www.ngs.noaa.gov/cgi-bin/GEOID_STUFF/geoid99_prompt1.prl.
13. Select output to File or Memory.
14. On the right side of the Orthorectification Parameters dialog, verify the
parameters related to the extent and pixel size of the output image.
15. The default values are calculated from the georeferencing information of the
original image. If the input image has no georeferencing information, ENVI
estimates the extent of the image and a reasonable pixel size to derive the
default values.
16. To change the map projection, click Change Proj.
17. To change the pixel size or number of samples or lines, enter the information in
the X Pixel Size, Y Pixel Size, Output X Size, and Output Y Size fields.
18. Click Options and select from the menu to manage the output projection and
map extent settings.
19. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Orthorectification


916 Chapter 8: Map Tools

Note
After ENVI adds the RPC or RSM information to the associated header file,
you may need to close the image, then reopen it so that ENVI will apply the
new header information.

Fast Mode Orthorectification


The RPC orthorectification process works on a pixel-by-pixel basis to provide correct
ground locations, so it can take a significant amount of processing time. An
alternative method to the standard RPC orthorectification is a “fast mode”
orthorectification. This method works by sacrificing accuracy for speed, since
processing time is much faster but the results are slightly less accurate. Instead of
solving the RPC equation for each pixel, the fast mode orthorectification solves for a
grid of points spaced throughout the image and triangulates a warp between the
points. This is essentially the same method ENVI uses to re-project images using
warp points.
The following steps illustrate the general approach for using fast mode
orthorectification.
1. Open an image. (Quickbird or IKONOS data are good examples.)
2. Open the header file by one of the following methods:
• From the ENVI main menu bar, select File → Edit ENVI Header, select
the image filename from the Edit Header Input File dialog, then click OK.
The Header Info dialog appears.
• From the Available Files List, right-click on the filename and select Edit
Header. The Header Info dialog appears.
3. Click the Edit Attributes drop-down button and select RPC or RSM
Projection Emulation. The RPC Projection Emulation dialog appears when
ENVI determines the file contains RPCs. See “Emulating an RPC or RSM
Projection” on page 201 for the remaining steps.
4. If you want to associate a DEM with the image, see “Associating a DEM to a
File” on page 202.
5. Click OK in the Header Info dialog.
6. From the ENVI main menu bar, select Map → Convert Map Projection. The
Convert Map Projection Input dialog appears.
7. Select an input file and click OK.

Orthorectification ENVI User’s Guide


Chapter 8: Map Tools 917

8. The Convert Map Projection Parameters dialog appears. Select a projection as


described in “Selecting Map Projection Types” on page 990.
9. Click OK in the Convert Map Projection Parameters dialog. ENVI calculates
the orthorectified points; this process may take a long time. The Registration
Parameters dialog appears.
10. Select output parameters as described in “Warping and Resampling Image-to-
Image” on page 904 or “Warping and Resampling Image-to-Map” on
page 907. Click OK. The orthorectified image is created and added to the
Available Bands List.

Orthorectify with GCPs


You can use ground control points (GCPs) to enhance the accuracy of the RPC
orthorectification process. ENVI uses the GCPs you provide to correct the results of
the RPC transformation to improve accuracy in the final result. The RPC
transformation tends to have a high bias error and a much lower random error;
therefore, selecting even a single GCP can provide significant improvement in
overall accuracy, and selecting multiple GCPs can further improve the results.
Adjusting the RPC orthorectification based upon GCP inputs is particularly
important if you have other spatial data and you want your orthorectification results
to be consistent with this other information.
To use GCPs with an RPC model to orthorectify the data, your imagery must be
displayed in ENVI.
1. To orthorectify your data with an RPC model and GCPs, select one of the
following options from the ENVI main menu bar:
• Map → Orthorectification → sensor_type → Orthorectify sensor_type
with Ground Control
• Basic Tools → Preprocessing → Data-Specific Utilities →
sensor_type → Orthorectify sensor_type with Ground Control
• Spectral → Preprocessing → Data-Specific Utilities → sensor_type →
Orthorectify sensor_type with Ground Control
If your sensor type is different from those supported in ENVI and you have a
file containing RPC information, you can use the Generic RPC options (see
“Generic RPC and RSM” on page 918).
The Ground Control Points Selection dialog appears.

ENVI User’s Guide Orthorectification


918 Chapter 8: Map Tools

2. Specify or restore one or more GCPs. For complete details on how to use the
dialog to select GCPs, see “Collecting Ground Control Points (Image-to-
Map)” on page 888.
The Elev value specified in the Ground Control Points Selection dialog must
be relative to the geoid height specified for the RPC orthorectification process.
3. From the Ground Control Points Selection dialog menu bar, select Options →
Orthorectify File. This option prompts you to select an input file. When the
input file is opened, the Orthorectification Parameters dialog appears; this
dialog allows you to customize the output parameters for the orthorectification
process.

Generic RPC and RSM


Use Generic RPC and RSM to orthorectify an image file that includes RPC or
replacement sensor model (RSM) information in the header.
1. From the ENVI main menu bar, select Map → Orthorectification → Generic
RPC and RSM → Orthorectify using RPC or RSM. A Select File to
Orthorectify dialog appears.
2. Select an input file and click OK.
• If the associated header file already contains RPC or RSM information, the
Orthorectification Parameters dialog appears. Refer to Figure 8-13 for the
remaining steps.
• If ENVI does not recognize any RPC or RSM information in the header, a
Select File dialog appears. Select a file that contains RPC coefficients and
click OK. The Orthorectification Parameters dialog appears. Refer to
Figure 8-13 for the remaining steps.
Note
After ENVI adds the RPC or RSM information to the associated header file,
you may need to close the image, then reopen it so that ENVI will apply the
new header information.

You can also write a user function for reading a custom RPC file format, add it to the
save_add directory of your ENVI installation, add it to the Generic RPC and RSM
menu, and run it from the menu. To add the user function to the Generic RPC and
RSM menu, edit the useradd.txt file in the menu directory of your ENVI
installation. See “User-Defined RPC Reader” in the ENVI Programmer’s Guide for
more information.

Orthorectification ENVI User’s Guide


Chapter 8: Map Tools 919

Image Mosaicking
Use mosaicking to overlay two or more images that have overlapping areas (typically
georeferenced) or to put together a variety of non-overlapping images and/or plots for
presentation output (typically pixel-based). You can mosaic individual bands, entire
files, and multi-resolution georeferenced images. You can use your mouse or pixel-
or map-based coordinates to place images in mosaics and you can apply a feathering
technique to blend image boundaries. You can save the mosaicked images as a virtual
mosaic to avoid having to save an additional copy of the data to a disk file. Mosaic
templates can also be saved and restored for other input files.

Building Pixel-Based Mosaics


From the ENVI main menu bar, select Map → Mosaicking → Pixel Based. The
Pixel-Based Mosaic window appears.

Importing Images
Use the Import menu to choose input bands for the mosaic.
1. Select either Import → Import Files or Import → Import Files and Edit
Properties from the Pixel-Based Mosaic menu bar. Use the second option if
you want to enter a background see-through value, perform feathering,
position the image on input, select which bands appear in the mosaic display,
or perform color balancing. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. You can mosaic individual bands or entire files.
To select individual bands, click the Select By toggle button in the Input File
dialog to select Band.
3. Click OK.

ENVI User’s Guide Image Mosaicking


920 Chapter 8: Map Tools

Figure 8-14: Image Mosaicking Dialog for Pixel-Based Image Mosaics

4. If you selected Import Files and Edit Properties, an Entry dialog for each
selected file appears that allows you to set the following parameters:
• Enter a Data Value to Ignore. This is the background see-through value to
make pixels with that value transparent so that the underlying image is
visible. (Use for mosaicking of images with constant DN value borders).
The background value mask is built from the first band used in the file. If a
pixel in the first band used contains this background value, then that pixel
will be masked out for all bands in the mosaicking process.
• Enter feathering parameters as needed (For more information, see
“Feathering” on page 930).
• Enter the upper-left coordinates (in pixels) in the Xoffset and Yoffset
fields to position the image in the mosaic, or optionally click the Use
x/ystart in Positioning? toggle button to select Yes. This option uses the
x,y start values from the header to compose a relative start location.

Image Mosaicking ENVI User’s Guide


Chapter 8: Map Tools 921

• Click the Mosaic Display toggle button to select a Gray Scale or RGB
color image display in the mosaicking window. For RGB, enter the desired
band numbers to display in the Red, Green, and Blue fields. Enter a
Linear Stretch percentage.
• Select whether to apply color balancing to the images by clicking No,
Fixed, or Adjust (see “Color Balancing Images” on page 922).
• Click OK.
5. The Select Mosaic Size dialog appears. Enter the desired output size (in pixels)
of the mosaic image in the Mosaic Xsize and Mosaic Ysize fields, and click
OK. A subsampled image appears in the Pixel Mosaic window for each file
imported.
6. Import other files as needed. Each image name and the outline color are listed
below the mosaic image.

Positioning Images
The coordinates for the upper-left corner of the input image are listed in the X0 and
Y0 fields at the bottom of the Pixel Mosaic dialog. Images with xstart and ystart
values in their headers are automatically placed in the mosaic with the defined offset.
Select from the following options:
• To enable editing of the position coordinates, select any listed image in the
Pixel Mosaic dialog and enter the desired upper-left coordinates in the X0 and
Y0 fields. Press the Enter key.
The number of the currently selected image is shown in the # field. Any
changes to the X0 and Y0 fields are applied to this item.
• You can also position the images in the Pixel Mosaic dialog by left-clicking on
an image and dragging it to the desired location.
• To automatically place the images into a grid, select Options → Position
Entries into Grid from the Pixel Mosaic dialog menu bar. The Position
Images dialog appears. Enter values for Grid Columns, Grid Rows, Border
Pixels (the number of border pixels to place around the images), and
Separation Pixels (the number of pixels to place between the images). Click
OK. The mosaic image is resized to fit the grid.
• To center the images, keeping their relative positioning within the defined
mosaic size, select Options → Center Entries from the Pixel Mosaic dialog
menu bar.

ENVI User’s Guide Image Mosaicking


922 Chapter 8: Map Tools

• To lock the relative positions of the images and move them as a group, select
Options → Positioning Lock On from the Pixel Mosaic dialog menu bar.
Now click and drag the images to the desired position.

Color Balancing Images


Use Color Balancing to match the statistics from one image to another (or many
others) to balance the data range between different images. Gains and offsets are
calculated from the fixed image and applied to the adjusted images so the adjusted
images end up with the same statistical range. Gains and offsets are calculated
individually for each band in the file. You can obtain the statistics from entire images
or only from overlapping areas. You cannot perform color balancing with Virtual
Mosaics.
If the images have data values you want to ignore, you must enter a Data value to
ignore value in the Edit Entry dialog so they will not be included in the calculated
statistics.
1. In the Pixel Mosaic dialog, right-click on the image you want to use as the
basis for statistics, and select Edit Entry. The Entry dialog appears.
2. Select the Fixed radio button in Color Balancing. This image will only be
used to calculate statistics and will not be adjusted. Click OK in the Entry
dialog.
3. In the Pixel Mosaic dialog, right-click on the image to adjust and select Edit
Entry. The Entry dialog appears.
4. Select the Adjust radio button in Color Balancing. Click OK.
5. Select Fixed or Adjust for any other images, as desired.
6. From the Pixel Mosaic menu bar, select File → Apply to apply the color
balancing and mosaicking. The Mosaic Parameters dialog appears.
7. Click the Color Balance toggle button to select whether to use the entire
image or overlapping areas for statistics calculations. When there is a
significant area of overlap, the best results are usually achieved by choosing
only the overlapping areas for statistics calculations.
8. Enter a Background Value. The background value mask is built from the first
band used in the file. If a pixel in the first band used contains this background
value, then that pixel will be masked out for all bands in the mosaicking
process.

Image Mosaicking ENVI User’s Guide


Chapter 8: Map Tools 923

9. When creating a mosaic of gray scale and RGB images, you can apply single-
band images as RGB. Doing this, in addition to color balancing, creates an
RGB mosaic where the gray scale images blend well with the color images.
10. Enter an output filename.
11. Click OK. ENVI adds the resulting output to the Available Bands List.

The Mosaicking Right-Click Menu


Use the mosaicking right-click menus to change the image layer levels, edit image
parameters, or to remove an image from the mosaic.
Select the image name or click the image thumbnail once in the Pixel Mosaic dialog.
Right-click and select one of the following options:
• Raise Image to Top: If the image is already on top, this option is not available.
• Raise Image one Position: If the image is already on top, this option is not
available.
• Lower Image one Position: If the image is already on the bottom, this option
is not available.
• Edit Entry: For parameter descriptions, see “Importing Images” on page 927.
• Remove Entry: Remove an image from the Pixel Mosaic dialog.

Pixel-Based Mosaicking Options


Use the Options menu in the Pixel Mosaic dialog to change the mosaic size, to select
positioning options, to enable or disable the image frame graphics, and to clear all of
the entries.
Changing the Mosaic Size
1. Select Options → Change Mosaic Size from the Pixel Mosaic dialog menu
bar. The Select Mosaic Size dialog appears.
2. Enter the desired size, in pixels, in the Mosaic Xsize and Mosaic Ysize fields.
Positioning Images
To place the images into a grid, center the images, or lock the image positions so you
can move them as a group, see “Positioning Images” on page 921.

ENVI User’s Guide Image Mosaicking


924 Chapter 8: Map Tools

Using Thumbnail Images


To enable or disable the thumbnail images displayed in the mosaic window,
select Options → Use Thumbnail Images from the Pixel Mosaic dialog menu
bar.
Turning On/Off Image Frames
To turn the colored graphic frames around the images in the mosaic off or on,
select Options → Image Frames from the Pixel Mosaic dialog menu bar.
Clearing Entries
To clear all the entries from the mosaic, select Options → Clear All Entries
from the Pixel Mosaic dialog menu bar.

Creating Virtual Mosaics


It is not necessary to save the mosaic to an output file unless you used feathering or
color balancing. Instead, you can save the mosaic to a Virtual Mosaic. ENVI uses a
Virtual Mosaic file (a saved mosaic template) like an image file. When a Virtual
Mosaic template file is opened, ENVI opens the individual image files that make up
the mosaic and puts them together on-the-fly. ENVI cannot do feathering or color
balancing on-the-fly, however. You can display, annotate, stretch, and so forth the
mosaic template file in ENVI, as with any other image. Using a Virtual Mosaic
prevents multiple files from containing the same images and therefore saves disk
space.
1. Select File → Save Template from the Pixel Mosaic dialog menu bar. An
Output Mosaic Template dialog appears.
2. Enter an output filename with the extension .mos for consistency.
3. Click the toggle button to select whether or not to open the new template as a
Virtual Mosaic.
The template file is a Virtual Mosaic file in ASCII format. It contains the mosaic size,
filenames, bands used, data dimensions, and mosaic information. The Info field
contains the x and y offsets, edge feathering distance, cutline feathering distance, and
data value to ignore.
ENVI adds the mosaic template file to the Available Bands List where you can use it
it as input for processing with other functions. You can edit the template file using
any text editor, for example, to change the file or the bands used in the mosaic.

Image Mosaicking ENVI User’s Guide


Chapter 8: Map Tools 925

Restoring Saved Templates


1. Select File → Restore Template. The Enter Mosaic Template Filename dialog
appears.
2. Select the desired .mos filename to load into the mosaic and click Open.
Replace the existing input files with new images in the Mosaic dialog by
editing the filenames in the ASCII .mos file (see “Creating Virtual Mosaics”
on page 924).
Opening Virtual Mosaics
1. From the ENVI main menu bar, select File → Open Image File. The Enter
Data Filenames dialog appears.
2. Select the desired .mos filename and click Open. ENVI adds the file to the
Available Bands List.

Building Mosaics
Use Apply to build a mosaic after all of the images for the mosaic are positioned.
Building the mosaic outputs the mosaic to a file.
It is not necessary to build the mosaic to an output file unless you used feathering or
color balancing. You can save the mosaic as a Virtual Mosaic to save time and disk
space (see “Creating Virtual Mosaics” on page 924).
1. Select File → Apply from the Pixel Mosaic dialog menu bar. The Mosaic
Parameters dialog appears.
2. Edit the Output X/Y Pixel Size values as needed.
3. Select an interpolation method from the Resampling drop-down list. The
choices are Nearest Neighbor, Bilinear, or Cubic Convolution.
4. Select output to File or Memory.
5. Enter a Background Value (a DN value for areas outside of the mosaic).
The background value mask is built from the first band used in the file. If a
pixel in the first band used contains this background value, then that pixel will
be masked out for all bands in the mosaicking process.
6. If color balancing is selected, use the toggle button to select whether to use the
entire image or to use only the overlapping areas for statistic calculations.
7. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Image Mosaicking


926 Chapter 8: Map Tools

Building Georeferenced Mosaics


Use Georeferenced Mosaicking to automatically overlay multiple georeferenced
images. You can mosaic multi-resolution georeferenced images, apply feathering and
color balancing to the images, and import georeferenced images and non-
georeferenced images into the same mosaic.
1. To build mosaics using georeferenced images, select Map → Mosaicking →
Georeferenced from the ENVI main menu bar.
2. The Map Based Mosaic dialog appears. Use this dialog to set the output
mosaic parameters and to select images to mosaic.

Figure 8-15: Image Mosaicking Dialog for Georeferenced Image Mosaics

Image Mosaicking ENVI User’s Guide


Chapter 8: Map Tools 927

Importing Images
Use the Import menu to select input files for the mosaic. The first image imported
into the mosaic must be a georeferenced image. The mosaic size will be set to the
georeferenced image size.
1. Select either Import → Import Files or Import → Import Files and Edit
Properties from the Map Based Mosaic dialog menu bar. Use the second
option if you wish to enter a transparent background value, to perform
feathering, to select which bands appear in the mosaic display, or to perform
color balancing. The Mosaic Input Files dialog appears.
The background value mask is built from the first band used in the file. If a
pixel in the first band used contains this background value, then that pixel will
be masked out for all bands in the mosaicking process.
2. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK.
You can mosaic individual bands or entire files. To select individual bands,
click the Select By toggle button in the Mosaic Input Files dialog to select
Band. Click OK.
When you select the first input file for the mosaic, a thumbnail image appears
and the mosaic size is set.
3. If you selected Import Files and Edit Properties, an Entry dialog for each
selected file appears that allows you to set the following parameters:
• Enter a Data Value to Ignore. This is the background see-through value to
make pixels with that value transparent so that the underlying image is
visible. (Use for mosaicking of images with constant DN value borders).
The background value mask is built from the first band used in the file. If a
pixel in the first band used contains this background value, then that pixel
will be masked out for all bands in the mosaicking process.
• Enter feathering parameters as needed (For more information, see
“Feathering” on page 930).
• Enter the upper-left coordinates (in pixels) in the Xoffset and Yoffset
fields to position the image in the mosaic, or optionally click the Use
x/ystart in Positioning? toggle button to select Yes. This option uses the
x,y start values from the header to compose a relative start location.
• Click the Mosaic Display toggle button to select a Gray Scale or RGB
color image display in the mosaicking window. For RGB, enter the desired

ENVI User’s Guide Image Mosaicking


928 Chapter 8: Map Tools

band numbers to display in the Red, Green, and Blue fields. Enter a
Linear Stretch percentage.
• Select whether to apply color balancing to the images by clicking No,
Fixed, or Adjust (see “Color Balancing Images” on page 922).
• Click OK.
4. Import additional georeferenced images into the mosaic as needed.
Georeferenced images are automatically positioned within the output mosaic
according to their geographic coordinates. New images are placed in front of
the other images, and the mosaic size is automatically adjusted to
accommodate the new images. If a properly georeferenced image is imported
with map coordinates that lay outside the current map extent of the mosaic, the
mosaic size is automatically changed to include the new image location.
For multi-resolution mosaicking, the output pixel size is entered on output and
ENVI automatically resamples the lower resolution images to match.
5. Import additional non-georeferenced images as needed. You can position these
images in the same manner as Pixel Based Mosaicking (for more information,
see “Positioning Images” on page 921). Each image name and the outline color
are listed below the mosaic image.
Note
You cannot adjust the mosaic positions of georeferenced images.

The Mosaicking Right-Click Menu


Use the mosaicking right-click menus to change the image layer levels, edit image
parameters, or to remove an image from the mosaic.
Select the image name or click the image thumbnail once in the Pixel Mosaic dialog.
Right-click and select one of the following options:
• Edit Entry: For parameter descriptions, see “Importing Images” on page 927.
• Remove Entry: Remove an image from the Pixel Mosaic dialog.

Georeferenced Image Mosaicking Options


Use the Options menu to change the base projection, to enable or disable the
thumbnail images, to enable or disable the colored image frame graphics, and to clear
all of the entries.
The unavailable options on this menu are used only in Pixel Based Mosaicking.

Image Mosaicking ENVI User’s Guide


Chapter 8: Map Tools 929

Changing the Base Projection


To change the base projection of the images, select Options → Change Base
Projection. Select the new projection and enter the necessary parameters (for more
information, see “Selecting Map Projection Types” on page 990).
Using Thumbnail Images
To enable/disable the thumbnail images displayed in the mosaic window, select
Options → Use Thumbnail Images menu item.
Turning On/Off Image Frames
To disable or enable the graphic frames around the images in the mosaic, select
Options → Image Frames.
Clearing Entries
To clear all the entries from the mosaic, select Options → Clear All Entries.

Creating Virtual Mosaics


See “Creating Virtual Mosaics” on page 924.

Building Mosaics
Use Apply to build a mosaic after all of the images for the mosaic are positioned.
Building the mosaic outputs the mosaic to a file.
It is not necessary to save the mosaic to an output file unless feathering,
multiresolution data, or color balancing were used. You can save the mosaic as a
virtual mosaic file to save time and disk space (see “Creating Virtual Mosaics” on
page 924).
1. Select File → Apply from the Map Based Mosaic dialog menu bar. The
Mosaic Parameters dialog appears with the output pixel size defaulted to the
highest resolution of input images. ENVI automatically resamples lower
resolution images to match. Non-georeferenced images in the mosaic are not
resampled.
2. Edit the Output X/Y Pixel Size values as needed.
3. Select an interpolation method from the Resampling drop-down list. The
choices are Nearest Neighbor, Bilinear, or Cubic Convolution. Nearest
Neighbor resampling is recommended.
4. Select output to File or Memory.
5. Enter a Background Value (a DN value for areas outside of the mosaic).

ENVI User’s Guide Image Mosaicking


930 Chapter 8: Map Tools

The background value mask is built from the first band used in the file. If a
pixel in the first band used contains this background value, then that pixel will
be masked out for all bands in the mosaicking process.
6. If color balancing is selected, use the toggle button to select whether to use the
entire image or to use only the overlapping areas for statistic calculations.
7. Click OK. ENVI adds the resulting output to the Available Bands List.

Feathering
Use Feathering to blend the edges of overlapping areas in input images for pixel-
based and georeferenced mosaicking. The two types of feathering in ENVI are edge
feathering and cutline feathering.
Tip
To use feathering when mosaicking images, import the bottom image without
feathering. Import the overlapping images with edge or cutline feathering as
desired.

Using Edge Feathering


Use edge feathering to blend the edge of a top image with the bottom image based on
a specified blending distance (see Figure 8-16). The distance specified creates a
linear ramp that averages the two images across that distance. For example, if the
specified distance is 20 pixels, 0% of the top image is used in the blending at its edge
and 100% of the bottom image is used to make the output image. At the specified
distance (20 pixels) into the image from the edge, 100% of the top image is used to

Image Mosaicking ENVI User’s Guide


Chapter 8: Map Tools 931

make the output image and 0% of the bottom image is used. 50% of each image is
used to make the output at 10 pixels in from the edge.

Figure 8-16: Example of Edge Feathering

1. From the Pixel Mosaic or Map Based Mosaic dialog menu bar, select
Import → Import Files and Edit Properties. A Mosaic Input Files dialog
appears. Select the image to feather and click OK. An Entry dialog appears.
• Or, right-click on the image and select Edit Entry. The Entry dialog
appears.
2. In the Feathering Distance field, enter the number of pixels over which to
blend the images.

Using Cutline Feathering


Use Cutline feathering to blend the boundary between two overlapping images based
on a user-defined cutline. A specified blending distance is used to blend the images
along the cutline (see Figure 8-17).
Cutlines must be defined using the annotation tools prior to mosaicking. The
annotation file must contain a polyline defining the cutline that is drawn from edge-
to-edge and a symbol placed in the region of the image that will be cut off (see
“Annotating Images and Plots” on page 31).

ENVI User’s Guide Image Mosaicking


932 Chapter 8: Map Tools

The distance specified is used to create a linear ramp that averages the two images
across that distance from the cutline outwards. For example, if the specified distance
is 20 pixels, 100% of the top image is used in the blending at the cutline and 0% of
the bottom image is used to make the output image. At the specified distance (20
pixels) out from the cutline, 0% of the top image is used to make the output image
and 100% of the bottom image is used. 50% of each image is used to make the output
at 10 pixels out from the cutline.
1. From the Pixel Mosaic or Map Based Mosaic dialog menu bar, select
Import → Import Files and Edit Properties. A Mosaic Input Files dialog
appears. Select the image to feather and click OK. An Entry dialog appears.
• Or, right-click on the image and select Edit Entry. The Entry dialog
appears.
2. Click Select Cutline Annotation File and select an annotation file.
3. In the Feathering Distance field that appears in the Cutline Feathering
Frame, specify the distance (in pixels) used to blend the image boundaries.

Figure 8-17: Example of Cutline Feathering

The cutline appears as a graphic overlaid on the image.

Image Mosaicking ENVI User’s Guide


Chapter 8: Map Tools 933

Opening Mosaic Tiled QuickBird Files


Large QuickBird datasets are split into tiles. A QuickBird tile file (.til) is usually
provided as a descriptive header for these tiles. The tile file contains information
about the number of tiles, the name of each tile, and their spatial relationship to one
another. ENVI uses this file to access the tiles and automatically create a virtual
mosaic of the entire dataset. The resulting dataset can then be used as a single entity
within ENVI.
To read a QuickBird tile file and automatically create a virtual mosaic of its tiles, use
the steps in “Opening QuickBird Mosaic Tiled Files” on page 166.

Opening Mosaic Tiled WorldView Files


Large WorldView-1 and WorldView-2 datasets are split into tiles. A WorldView tile
file (.til) is usually provided as a descriptive header for these tiles. The tile file
contains information about the number of tiles, the name of each tile, and their spatial
relationship to one another. ENVI uses this file to access the tiles and automatically
create a virtual mosaic of the entire dataset. The resulting dataset can then be used as
a single entity within ENVI.
To read a WorldView tile file and automatically create a virtual mosaic of its tiles, use
the steps in “Opening WorldView Mosaic Tiled Files” on page 168.

ENVI User’s Guide Image Mosaicking


934 Chapter 8: Map Tools

Georeferencing from Input Geometry


Use Georeference from Input Geometry to georeference data that have an
associated file containing map locations for every pixel. You can georeference
images based on input geographic lookup tables (GLTs), input geometry (IGM) files,
or the Super GLT process.
Georeferenced images have null values around their edges that must be masked in
processing and are often inflated in size by replicated pixels. Therefore, it is
suggested that you process the data first, then apply the georeferencing to derived
final products.

Building GLT Files


Use Build GLT to build a geographic lookup table (GLT) file from an input geometry
file. A GLT file contains map locations for every pixel of the image it is associated
with. A GLT consists of two bands: sample numbers and line numbers of the
georeferenced image. Pixel values indicate the sample or line number of the pixel in
the original input image that belongs at the given map location in the output image.
If the GLT values are positive, then an exact match from the input image was found;
in other words, the input image actually contained a pixel for this map location. If the
GLT values are negative, then a nearest-neighbor pixel is being used because the
input image does not actually contain a pixel for the corresponding map location. If
the GLT value is 0, then there was no nearest neighbor within seven pixels of this
map location in the input image. This is a very accurate method of georeferencing
data because it places every pixel at its exact map location, avoiding the use of GCPs
and polynomial warping.
A GLT places all of the pixels in the input image (since there is a map x,y location for
each pixel) exactly where they belong in the output image, rounding to the nearest
integer location in output pixel space. The output image may still have remaining
“holes” where no input pixel landed. These holes are filled with the nearest valid
pixel from the first step, which is essentially a nearest-neighbor resampling.
The GLT file has a fixed pixel size projected into a rotated UTM system. It uses one-
based coordinates (the upper-left pixel is located at 1,1).
Perform the following steps to build a GLT file:
1. From the ENVI main menu bar, select Map → Georeference from Input
Geometry → Build GLT. The Input X Geometry Band dialog appears.
2. Select the band that contains the x geometry coordinates.

Georeferencing from Input Geometry ENVI User’s Guide


Chapter 8: Map Tools 935

3. Click OK. The Input Y Geometry Band dialog appears.


4. Select the band that contains the y geometry coordinates. Click OK. The
Geometry Projection Information dialog appears.
5. In the Input Projection of Geometry Bands list, select the projection type.
6. In the Output Projection for Georeferencing list, select the projection for the
georeferencing.
For instructions on selecting input and output projections, see “Selecting Map
Projection Types” on page 990.
7. Click OK.
A default output pixel size and rotation angle is calculated, and it appears in
the Build Geometry Lookup File Parameters dialog.
The default output pixel size is calculated based on the map coordinates in
output space. The default output rotation angle is used to minimize the output
file size. If the rotation angle is set to 0 then north will be up in the output
image. If it is set to another angle, then north will be at an angle and will not be
“up” in the output image. The rotation angle is stored in the ENVI header and
is used when overlaying grids, so the grid lines appear at an angle.
• To change the output pixel size, replace the value in the Output Pixel Size
field.
• To change the output rotation angle, replace the value in the Output
Rotation field.
Note
If you change a non-zero rotation angle to 0 so north is up, your resulting
image may contain a lot of background fill and may become very large.

The process runs in two parts. ENVI adds the resulting output to the Available
Bands List.

Georeferencing from GLT Files


Use Georeference from GLT to georeference image data or results using a
Geographic Lookup Table GLT file.
1. From the ENVI main menu bar, select Map → Georeference from Input
Geometry → Georeference from GLT. An Input Geometry Lookup File
dialog appears.

ENVI User’s Guide Georeferencing from Input Geometry


936 Chapter 8: Map Tools

2. Select a GLT file and click OK. The Input Data File dialog appears.
3. Select an input file and perform optional Spectral Subsetting, then click OK.
The Georeference from GLT Parameters dialog appears.
4. If you used a subset of the original data as the input file, click the Subset to
Output Image Boundary toggle button to select whether to output only the
warped subset region or whether to output that subset warped within the entire
output boundary.
5. In the Background Value field, enter the DN value to use as the background
value around the edges of the warped data.
6. Enter an output filename.
7. Click OK.

Georeferencing from IGM Files


Use Georeference from IGM to georeference data using an Input Geometry (IGM)
file. An IGM file contains the map information of the image, stored in two bands: one
for x coordinates (longitude or easting) and one for y coordinates (latitude or
northing). Some datasets come with specific latitude and longitude bands, which
make up the IGM file. Additionally, ENVI generates IGM files for various sensors
such as SeaWiFS and AVHRR. The IGM file itself is not georeferenced, but it does
contain the georeferencing information for each original raw pixel. The IGM file is
used to create (on-the-fly) a geographic lookup table (GLT) file that contains the
information about which original pixel occupies which output pixel in the final
product.
Perform the following steps to georeference an image using an IGM:
1. From the ENVI main menu bar, select Map → Georeference from Input
Geometry → Georeference from IGM. The Input Data File dialog appears.
2. Select an input file and perform optional Spectral Subsetting, then click OK.
The Input X Geometry Band dialog appears.
3. Select the band that contains the x geometry coordinates and click OK. The
Input Y Geometry Band dialog appears.
4. Select the band that contains the y geometry coordinates and click OK. The
Geometry Projection Information dialog appears.
5. In the Input Projection of Geometry Bands list, select the projection type.
6. In the Output Projection for Georeferencing list, select the projection for the
georeferencing.

Georeferencing from Input Geometry ENVI User’s Guide


Chapter 8: Map Tools 937

For instructions on selecting input and output projections, see “Selecting Map
Projection Types” on page 990.
7. Click OK.
A default output pixel size and rotation angle are calculated, and they appear in
the Build Geometry Lookup File Parameters dialog.
The default output pixel size is calculated based on the map coordinates in
output space. The default output rotation angle is used to minimize the output
file size. If the rotation angle is set to 0, then north will be up in the output
image. If it is set to another angle, then north will be at an angle and will not be
“up” in the output image. The rotation angle is stored in the ENVI header and
is used when overlaying grids, so the grid lines appear at an angle.
• To change the output pixel size, replace the value in the Output Pixel Size
field.
• To change the output rotation angle, replace the value in the Output
Rotation field.
Note
If you change a non-zero rotation angle to 0 so north is up, your resulting
image may contain a lot of background fill and may become very large.

8. In the Georeference Background Value field, enter the DN value to use as


the background value around the edges of the georeferenced data.
9. Enter an output filename.
10. Click OK.

Building Super GLT Files


Use Build Super GLT to build super GLT files from IGM files. The super GLT file is
not an image file; it contains information about how many and which input pixels
contribute to the output pixel.

ENVI User’s Guide Georeferencing from Input Geometry


938 Chapter 8: Map Tools

The Super GLT process involves optimal radial resampling, where every input pixel
within a given radius that contributes to the value of an output pixel is considered in a
weighted fashion. In comparison, bilinear resampling arbitrarily averages a group of
2 x 2 neighbors, and cubic convolution resampling averages a group of 4 x 4 or
16 x 16 neighbors. Super GLT averages every relevant pixel in the file within a given
radius to determine the best possible output pixel value. Super GLT, therefore, is
much slower than a normal GLT process.
The Super GLT method is particularly useful for aircraft data where the sensor may
scan a given point on the ground multiple times, due to the roll, pitch, or yaw of the
aircraft. This means an output pixel might be best represented by an average of three
different input pixels that are located in three different locations in the input file. This
example illustrates why the Super GLT process can take a longer time to process.
Follow the steps below to build a Super GLT.
Tip
You can use Super Georeferencing from IGM to combine building the super GLT
and georeferencing from it into one step. For details, see “Super Georeferencing
from IGM Files” on page 941.

1. From the ENVI main menu bar, select Map → Georeference from Input
Geometry → Build Super GLT. The Input X Geometry Band dialog appears.
2. Select the band that contains the x geometry coordinates and click OK. The
Input Y Geometry Band dialog appears.
3. Select the band that contains the y geometry coordinates and click OK. The
Geometry Projection Information dialog appears.
4. In the Input Projection of Geometry Bands list, select the projection type.
5. In the Output Projection for Georeferencing list, select the projection for the
georeferencing.
For instructions on selecting input and output projections, see “Selecting Map
Projection Types” on page 990.
6. Click OK.
A default output pixel size and rotation angle are calculated, and they appear in
the Build Geometry Lookup File Parameters dialog.

Georeferencing from Input Geometry ENVI User’s Guide


Chapter 8: Map Tools 939

The default output pixel size is calculated based on the map coordinates in
output space. The default output rotation angle is used to minimize the output
file size. If the rotation angle is set to 0, then north will be up in the output
image. If it is set to another angle, then north will be at an angle and will not be
“up” in the output image. The rotation angle is stored in the ENVI header and
is used when overlaying grids, so the grid lines appear at an angle.
• To change the output pixel size, replace the value in the Output Pixel Size
field.
• To change the output rotation angle, replace the value in the Output
Rotation field.
Note
If you change a non-zero rotation angle to 0 so north is up, your resulting
image may contain a lot of background fill and may become very large.

7. Enter an output filename.


8. Click OK.
9. The process runs in two parts. ENVI adds the resulting GLT file to the
Available Bands List. It does not add the Super GLT file to the Available
Bands List.

Georeferencing from Super GLT Files


Use Georeference from Super GLT to georeference data using a super GLT file.
This function performs radial resampling 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.
Note
Because super GLT functions are slow, allow a significant amount of time for
processing.

1. From the ENVI main menu bar, select Map → Georeference from Input
Geometry → Georeference from Super GLT. The Input File dialog appears.
2. Select an input file and perform optional Spectral Subsetting, then click OK.
The Select SGL Filename dialog appears.
3. Select the super GLT file and click OK. The Georeference from SGL
Parameters dialog appears.

ENVI User’s Guide Georeferencing from Input Geometry


940 Chapter 8: Map Tools

Figure 8-18: Georeference from SGL Parameters Dialog

4. In the Background Pixel Value field, enter the DN value to use as the
background value around the edges of the warped data.
5. In the Kernel Size Min and Max fields, enter minimum and maximum kernel
sizes, respectively.
The minimum kernel size is used in the resampling unless fewer than the
minimum number of pixels to resample, or valid pixels, are contained in the
kernel. If fewer than the minimum number of valid pixels are contained in the
kernel, the kernel size is increased until either the minimum number of valid
pixels is met or the maximum kernel size is met. If there are fewer than the
minimum number of valid pixels in the maximum kernel size then the output
pixel value will be set to the background value.
6. Enter a value for Minimum Pixels to Resample.
If fewer than the minimum number of pixels are contained in the maximum
kernel size, then the output pixel value will be set to the background value.
7. Select output to File or Memory.
8. Click OK. ENVI adds the resulting output to the Available Bands List.

Georeferencing from Input Geometry ENVI User’s Guide


Chapter 8: Map Tools 941

Super Georeferencing from IGM Files


The Super Georeference from IGM tool combines building a super GLT file and
georeferencing from it into a single process. The process georeferences an image
using an IGM file and uses radial resampling to derive the output image.
Additionally, you have the option to output the super GLT that is built during this
process.
The initial steps for super georeferencing from IGM files are the same as those for
regular georeferencing from IGM files. However, there are additional steps required
for building the super GLT file and creating output.
1. From the ENVI main menu bar, select Map → Georeference from Input
Geometry → Super Georeference from IGM. The Input File dialog appears.
2. Select an input file and perform optional Spectral Subsetting, then click OK.
The Input X Geometry Band dialog appears.
3. Select the IGM band that contains the x geometry coordinates and click OK.
The Input Y Geometry Band dialog appears.
4. Select the band that contains the y geometry coordinates and click OK. The
Geometry Projection Information dialog appears.
5. In the Input Projection of Geometry Bands list, select the projection type.
6. In the Output Projection for Georeferencing list, select the projection for the
georeferencing.
For instructions on selecting input and output projections, see “Selecting Map
Projection Types” on page 990.
7. Click OK. A default output pixel size and rotation angle are calculated, and
they appear in the Build Geometry Lookup File Parameters dialog.
8. In the Kernel Size Min and Max fields, enter minimum and maximum kernel
sizes to use, respectively.
The minimum kernel size is used in the resampling unless fewer than the
minimum number of pixels to resample, or valid pixels, are contained in the
kernel. If fewer than the minimum number of valid pixels are contained in the
kernel, the kernel size is increased until either the minimum number of valid
pixels is met or the maximum kernel size is met. If there are fewer than the
minimum number of valid pixels in the maximum kernel size then the output
pixel value will be set to the background value.
9. Enter a value for Minimum Pixels to Resample.

ENVI User’s Guide Georeferencing from Input Geometry


942 Chapter 8: Map Tools

If fewer than the minimum number of pixels are contained in the maximum
kernel size, then the output pixel value will be set to the background value.
10. Enter an output SGL filename.
11. In the Georeference Background Value field, enter the DN value to use as the
background value around the edges of the warped data.
12. Select output to File or Memory.
13. Click OK. ENVI adds the resulting output to the Available Bands List.

Georeferencing from Input Geometry ENVI User’s Guide


Chapter 8: Map Tools 943

Georeferencing SPOT Data


Use Georeference SPOT to build geometry files and to georeference Level 1A and
Level 1B CEOS and Dimap format SPOT data.

Building SPOT Geometry Files


Use Build Geometry File to build a SPOT geometry file to calculate the x and y
coordinates for each pixel. You may select the desired projection for the coordinates.
You can georeference the SPOT data by using the results from this procedure as the
IGM input file in the Georeferencing from Input Geometry function.
1. Open a SPOT file by selecting File → Open External File → SPOT →
data_type from the ENVI main menu bar.
2. Select one of the following:
• Basic Tools → Preprocessing → Data-Specific Utilities → SPOT →
Build Geometry File
• Map → Georeference SPOT → Build Geometry File
• Spectral → Preprocessing → Data-Specific Utilities → SPOT → Build
Geometry File
The Input SPOT Image dialog appears.
3. Select the SPOT image file.
4. Click OK. The Build IGM for SPOT Data dialog appears.
5. Select the desired map projection for the x,y coordinates by selecting a
projection type from the list (see “Selecting Map Projection Types” on
page 990).
6. Enter an optional Avg Scene Elevation (Meters) value.
7. Enter the Number of Base Points for X and Y.
These values are the number of points that are calculated, and all other x and y
coordinates are interpolated from these points. You may select a number of
base points up to the number of samples and lines in your image. If you select
fewer base points, they will be evenly spaced throughout the image.

ENVI User’s Guide Georeferencing SPOT Data


944 Chapter 8: Map Tools

Note
Using a large number of base points will increase the processing time
considerably.

8. Select output to File or Memory.


9. Enter or choose an output filename.
10. Click OK. ENVI extracts the needed information from the SPOT leader file
and adds the resulting output to the Available Bands List.

Georeferencing SPOT Data


Use Georeference Data to georeference SPOT data based on header information.
ENVI performs a precision geocoding of the SPOT image using a complete geometry
model of the earth and satellite orbit.
1. Open a SPOT file by selecting File → Open External File → SPOT →
data_type from the ENVI main menu bar.
2. Select one of the following from the ENVI main menu bar:
• Basic Tools → Preprocessing → Data-Specific Utilities → SPOT →
Georeference Data
• Map → Georeference SPOT → Georeference Data
• Spectral → Preprocessing → Data-Specific Utilities → SPOT →
Georeference Data
The Input SPOT image dialog appears.
3. Select the SPOT image file.
4. Click OK. The Georeference SPOT Data dialog appears.
5. Select the desired output map projection by selecting a projection type from
the list (see “Selecting Map Projection Types” on page 990). By default, a
UTM map projection is selected based on header information.
6. Enter an optional Avg Scene Elevation (Meters) value.
7. Enter the Number Warp Points for X and Y. You may select a number of
warp points up to the number of samples and lines in your image. If you select
fewer warp points, they will be evenly spaced throughout the image.
To save the warp points to a GCP file, enter or choose an output filename.

Georeferencing SPOT Data ENVI User’s Guide


Chapter 8: Map Tools 945

Note
Using a large number of warp points will increase the processing time
considerably.

8. Click OK. The Registration Parameters dialog appears.


9. Select the warping and resampling methods and change the output dimensions,
if desired (see “Warping and Resampling” on page 904 for details). The
triangulation method is recommended to produce the most accurate results.
Note, however, that it will be much slower than polynomial warping.
10. Enter or choose an output filename.
11. Click OK.

ENVI User’s Guide Georeferencing SPOT Data


946 Chapter 8: Map Tools

Georeferencing SeaWiFS Data


Use Georeference SeaWiFS to calculate geometry information for and to
georeference HDF and CEOS format SeaWiFS data. Geometry information includes
latitude, longitude, sensor azimuth, sensor zenith, solar azimuth, solar zenith, and
UTC time. The georeferencing tool produces a full precision geocoding based on a
complete geometry model of the earth and satellite orbit.
ENVI uses the same solar geometry calculations as the NOAA Earth System
Research Laboratory (see http://www.srrb.noaa.gov/), except that it uses lookup
tables to obtain equations for time, declination, and julian day.

Building SeaWiFS Geometry Files


Use Build Geometry File to calculate the geometry for HDF and CEOS format LAC
SeaWiFS data. When you select this procedure, ENVI extracts the header
information and calculates the geometry values for each pixel. You can select which
values to calculate: latitude, longitude, sensor azimuth and zenith angles, sun azimuth
and zenith angles, and UTC time. The zenith angle is measured vertically from each
pixel to the sensor or sun (straight above the pixel = 0 degrees) and the azimuth angle
is the direction from each pixel to the sensor or sun with north = 0 degrees, and angles
increasing clockwise (that is, east = 90 degrees).
Tip
You can also georeference your SeaWiFS data by using the results from this
procedure as the IGM input file in Georeferencing from Input Geometry (see
“Georeferencing from IGM Files” on page 936).

1. Open a SeaWiFS file by selecting File → Open External File → SeaWiFS →


HDF or CEOS from the ENVI main menu bar.
2. Select one of the following options from the ENVI main menu bar:
• Basic Tools → Preprocessing → Data-Specific Utilities → SeaWiFS →
HDF Build Geometry File or CEOS Build Geometry File
• Map → Georeference SeaWiFS → HDF Build Geometry File or CEOS
Build Geometry File
• Spectral → Preprocessing → Data-Specific Utilities → SeaWiFS →
HDF Build Geometry File or CEOS Build Geometry File
The Input File dialog appears.

Georeferencing SeaWiFS Data ENVI User’s Guide


Chapter 8: Map Tools 947

3. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK.
4. If your input file is not in HDF or CEOS format, select the associated HDF or
CEOS annotation file to read the header information from.
5. Click OK. The SeaWiFS Geometry Parameters dialog appears.
6. Select the values to compute by selecting one of the following options:
• To select individual values, select the check boxes next to the desired
value.
• To select a range of values, enter the beginning and ending numbers into
the two fields next to the Add Range button and click Add Range.
• To select all values, click Select All.
• To de-select any selected items, click Clear.
7. Select output to File or Memory.
8. From the Output Data Type drop-down button, select Double or Floating
Point.
9. Click OK.

Georeferencing SeaWiFS Data


Use Georeference Data to georeference your HDF and CEOS format SeaWiFS data.
ENVI extracts the header information for CEOS or HDF format SeaWiFS data and
does a precision geocoding of the data based on a complete geometry model of the
earth and satellite orbit.
Tip
We recommend that you use the more accurate technique, Georeference from
Input Geometry (see “Georeferencing from Input Geometry” on page 934),
instead of CEOS or HDF Georeference Data.

1. Open a SeaWiFS file by selecting File → Open External File → SeaWiFS →


HDF or CEOS from the ENVI main menu bar.
2. Select one of the following options from the ENVI main menu bar:
• Basic Tools → Preprocessing → Data-Specific Utilities → SeaWiFS →
HDF Georeference Data or CEOS Georeference Data

ENVI User’s Guide Georeferencing SeaWiFS Data


948 Chapter 8: Map Tools

• Map → Georeference SeaWiFS → HDF Georeference Data or CEOS


Georeference Data
• Spectral → Preprocessing → Data-Specific Utilities → SeaWiFS →
HDF Georeference Data or CEOS Georeference Data
The Input File dialog appears.
3. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK.
4. If your input file is not in HDF or CEOS format, select the associated HDF or
CEOS annotation file to read the header information from.
5. Click OK. The Georeference SeaWiFS Parameters dialog appears.
6. Select the desired output map projection from the list (see “Selecting Map
Projection Types” on page 990).
7. Enter X and Y values for Number of Warp Points.
You may select a number of warp points up to the number of samples and lines
in your image. If you select fewer warp points, they will be evenly spaced
throughout the image.
To save the warp points to a GCP file, enter or choose an output filename.
Note
Using many warp points increases the warping time considerably, but can
significantly increase the accuracy of the georeferencing.

8. Click OK. The Registration Parameters dialog appears.


9. Select the warping and resampling methods and change the output dimensions,
if desired (see “Warping and Resampling” on page 904 for details). The
triangulation method is recommended to produce the most accurate results.
Note, however, that it will be much slower than polynomial warping.
10. Select output to File or Memory.
11. Click OK.

Georeferencing SeaWiFS Data ENVI User’s Guide


Chapter 8: Map Tools 949

Georeferencing ASTER Data


Use Georeference ASTER to build geometry files and to georeference ASTER data
based on header information. ENVI performs a precision geocoding of the ASTER
data using the latitude and longitude information contained in the HDF file.

Building ASTER Geometry Files


Use Build Geometry File to build an ASTER geometry file to calculate the x and y
coordinates for each pixel. You may select the desired projection for the coordinates.
You can georeference the ASTER data by using the results from this procedure as the
IGM input file in the Georeferencing from Input Geometry function.
Note
The capability to georeference is only available for ASTER level 1A data. ASTER
level 1B HDF files already contain georeferenced data and are typically in UTM
projection with a rotation. To convert ASTER Level 1B to north-up UTM or other
projections (that is, without rotation), select Map → Convert Map Projection
from the ENVI main menu bar. See “Converting Map Projections” on page 996 for
details.

You can also achieve the conversion using orthorectification; see


“Orthorectification” on page 911 for details.

1. Open an ASTER file by selecting File → Open External File → EOS →


ASTER from the ENVI main menu bar.
2. Select one of the following menu options from the ENVI main menu bar:
• Basic Tools → Preprocessing → Data-Specific Utilities → ASTER →
Build Geometry File
• Map → Georeference ASTER → Build Geometry File
• Spectral → Preprocessing → Data-Specific Utilities → ASTER →
Build Geometry File
The Input ASTER Level 1A Image dialog appears.
3. Select an ASTER Level 1A image file.
4. Click OK. The Build IGM for ASTER Data dialog appears.

ENVI User’s Guide Georeferencing ASTER Data


950 Chapter 8: Map Tools

5. Select the desired map projection for the x,y coordinates by selecting a
projection type from the list (see “Selecting Map Projection Types” on
page 990).
6. Select output to File or Memory.
7. Click OK. ENVI extracts the needed information from the ASTER header file
and adds the resulting output to the Available Bands List.

Georeferencing ASTER Data


Use Georeference Data to georeference ASTER data based on header information.
ENVI performs a precision geocoding of the ASTER image using a complete
geometry model of the earth and satellite orbit.
1. Open an ASTER file by selecting File → Open External File → EOS →
ASTER from the ENVI main menu bar.
2. Select one of the following options from the ENVI main menu bar:
• Basic Tools → Preprocessing → Data-Specific Utilities → ASTER →
Georeference Data
• Map → Georeference ASTER → Georeference Data
• Spectral → Preprocessing → Data-Specific Utilities → ASTER →
Georeference Data
The Input ASTER Image dialog appears.
3. Select an ASTER Level 1A image file.
4. Click OK. The Georeference ASTER Data dialog appears.
5. Select the desired output map projection by selecting a projection type from
the list (see “Selecting Map Projection Types” on page 990). By default, a
UTM map projection is selected based on header information.
6. Enter the Number of Warp Points to use for X and Y. You may select a
number of warp points up to the number of samples and lines in your image. If
you select fewer warp points, they will be evenly spaced throughout the image.
Note
Using a large number of warp points will increase the processing time
considerably.

7. If desired, specify to save the warp points to a GCP file, by entering or


choosing an output filename.

Georeferencing ASTER Data ENVI User’s Guide


Chapter 8: Map Tools 951

8. Click OK. The Registration Parameters dialog appears.


9. Select the warping and resampling methods and change the output dimensions,
if desired (see “Warping and Resampling” on page 904 for details). The
triangulation method is recommended to produce the most accurate results;
however, that method is much slower than polynomial warping.
10. Enter or choose an output filename.
11. Click OK.

ENVI User’s Guide Georeferencing ASTER Data


952 Chapter 8: Map Tools

Georeferencing AVHRR Data


Use Georeference AVHRR to build AVHRR geometry files and to georeference
AVHRR data.

Building AVHRR Geometry Files


Use AVHRR Build Geometry File to calculate the geometry values for each pixel.
You may select which values to calculate: latitude, longitude, solar zenith, and/or
sensor zenith angles.
ENVI uses the same solar geometry calculations as the NOAA Earth System
Research Laboratory (see http://www.srrb.noaa.gov/), except that it uses lookup
tables to obtain equations for time, declination, and julian day.
Tip
You can also georeference your AVHRR data by using the results from this
procedure as the IGM input file in Georeferencing from Input Geometry (see
“Georeferencing from IGM Files” on page 936).

1. Open an AVHRR file by selecting File → Open External File → AVHRR →


data_type from the ENVI main menu bar.
2. Select one of the following options from the ENVI main menu bar:
• Map → Georeference AVHRR → Build Geometry File
• Basic Tools → Preprocessing → Data-Specific Utilities → AVHRR →
Build Geometry File
• Spectral → Preprocessing → Data-Specific Utilities → AVHRR →
Georeference Data
The Input File dialog appears.
3. Select the original AVHRR file.
4. Click OK. The AVHRR Image Geometry Parameters dialog appears.
5. Select which values to compute.
6. Select the Degrees or Radians radio button to indicate the output units for
zenith angle.
The zenith angle is measured vertically from each pixel to the sensor or sun
(straight above the pixel = 0 degrees).

Georeferencing AVHRR Data ENVI User’s Guide


Chapter 8: Map Tools 953

7. Enter an output filename.


8. Select Double or Floating Point output data type from the Output Data Type
drop-down list.
9. Click OK. ENVI extracts the header information and calculates the geometry
values for each pixel.

Georeferencing AVHRR Data


Use Georeference Data to georeference Level 1B AVHRR data, calibration results,
and sea surface temperature images using information embedded in the original data
file.
If you are going to use AVHRR data for quantitative analysis, you should calibrate
the data before georeferencing. Likewise, if you plan to calculate a sea surface
temperature (SST) image, you must do this before georeferencing. See “Calibrating
AVHRR Data” on page 380 and “Computing Sea Surface Temperature” on page 380
for details.
Tip
It is recommended that you use the more accurate technique Build Geometry File
and Georeference from Input Geometry (see “Georeferencing from Input
Geometry” on page 934), instead of Georeference AVHRR Data.

1. Open an AVHRR file by selecting File → Open External File → AVHRR →


data_type from the ENVI main menu bar.
2. Select one of the following options from the ENVI main menu bar:
• Basic Tools → Preprocessing → Data-Specific Utilities → AVHRR →
Georeference Data
• Map → Georeference AVHRR → Georeference Data
• Spectral → Preprocessing → Data-Specific Utilities → AVHRR →
Georeference Data
The Enter AVHRR Filename dialog appears.
3. Select an input AVHRR file and perform optional Spatial Subsetting and/or
Spectral Subsetting, then click OK.
If the input data file is not the original AVHRR format file, another Input File
dialog appears for selection of the original AVHRR file.

ENVI User’s Guide Georeferencing AVHRR Data


954 Chapter 8: Map Tools

4. Click OK. The georeferencing information is extracted from the Level 1B


AVHRR file. The Georeference AVHRR Parameters dialog appears.
5. Select the desired output map projection from the list and enter any necessary
parameters (see “Selecting Map Projection Types” on page 990).
You should carefully consider which map projection is appropriate for the
location and extent of your image. Some projections are more appropriate for
AVHRR scale images than others. It is recommended that you not use UTM
and State Plane projections for images that cover areas larger than UTM or
State Plane zones. If you choose either of these projections, then the resulting
registration will be geographically correct but the map coordinates in areas
furthest from the origin will be well beyond normal maximum values for these
projections.
With images projected to Geographic Lat/Lon, pixels have constant degree
units but not necessarily length units, because the size of a longitude degree
varies with latitude. This results in extreme distortion across most AVHRR-
scale images.
Map projections that are appropriate for AVHRR-scale images include
stereographic, transverse mercator, or conic projections. Stereographic
projections are commonly used for images with equal N-S and E-W extent.
Transverse mercator projections are often used for images with greater N-S
extent. Conic projections are often used for images with greater E-W extent.
6. Enter the Number of Warp Points to use for X and Y.
The Level 1B file contains 51 geolocation points for every line of the image.
The Number of Warp Points fields specify the number of embedded
geolocation points that ENVI will extract and use as ground control points
(GCPs) in the georeferencing. The more warp points you choose, the more
accurate the georeferencing will be, but the longer the process will take.
This utility does not just georeference the image, it actually georectifies it. This
is equivalent to performing a full registration warp in ENVI. If you are
concerned about achieving the most accurate registration possible, it is
recommended that you choose all 51 warp points in the X direction, and
perhaps one tenth the number of image lines in the Y direction. If you are
georeferencing large AVHRR images (for example, 2000 x 2000 x 5) using
thousands of GCPs, be prepared to wait. The process can take hours for such
large files.
7. Click OK. The Registration Parameters dialog appears for you to select the
warping and resampling methods and to change the output dimensions (see
“Warping and Resampling” on page 904 for details).

Georeferencing AVHRR Data ENVI User’s Guide


Chapter 8: Map Tools 955

For large coverages, the Delaunay triangulation warp method produces


significantly more accurate results. If you choose the Polynomial warp
method, it is recommended that you restrict the degree to 1 (or perhaps 2 in
special cases), as this type of warp model often introduces unrealistic features.
8. Select output to File or Memory.
9. Click OK.

ENVI User’s Guide Georeferencing AVHRR Data


956 Chapter 8: Map Tools

Georeferencing ENVISAT
Use Georeference AATSR, Georeference ASAR, or Georeference MERIS to
georeference ENVISAT AATSR, ASAR, or MERIS data with the geolocation
information included in the ENVISAT file. ENVISAT imagery contains geolocation
tie points that correspond to specific pixels in the image. You can use these tie points
to automatically georeference the ENVISAT data without building a geometry file.
1. Open an ENVISAT file by selecting File → Open External File →
ENVISAT → sensor_type from the ENVI main menu bar.
2. Select one of the following menu options from the ENVI main menu bar,
depending on which type of ENVISAT imagery is being georeferenced:
• Basic Tools → Preprocessing → Data-Specific Utilities →
ENVISAT → Georeference sensor_type
• Spectral → Preprocessing → Data-Specific Utilities → ENVISAT →
Georeference sensor_type
• Map → Georeference ENVISAT → sensor_type
The Select ENVISAT File dialog appears.
3. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Select Output Projection dialog appears.
4. Select the desired output map projection from the list (see “Selecting Map
Projection Types” on page 990 for more information), enter any necessary
parameters.
5. Click OK. The Registration Parameters dialog appears.
6. Select any necessary parameters (see “Warping and Resampling” on page 904
for more information).
7. Click OK. ENVI adds the resulting output to the Available Bands List.

Georeferencing ENVISAT ENVI User’s Guide


Chapter 8: Map Tools 957

Georeferencing MODIS
Use Georeference MODIS to georeference both MODIS Level 1B and MODIS
Level 2 datasets to the output projection coordinates.
If latitude and longitude data are available as images named Latitude and Longitude
within the HDF dataset, the utility recognizes the images as containing geographic
coordinates. If latitude and longitude data are available as images named other than
Latitude and Longitude, ENVI prompts you to select the coordinate-containing
images. If no images from the dataset contain geocoordinates, the data cannot be
georeferenced.
To apply MODIS bow tie effect correction to the data, as described in “Applying the
Correction for the MODIS Bow Tie Effect” on page 963, the dataset must have
latitude and longitude information.
1. Open a MODIS Level 1B or MODIS Level 2 file by selecting File → Open
External File → EOS → MODIS from the ENVI main menu bar.
2. From the ENVI main menu bar, select one of the following to georeference the
MODIS file:
• Map → Georeference MODIS
• Basic Tools → Preprocessing → Data-Specific Utilities → MODIS →
Georeference Data
• Spectral → Preprocessing → Data-Specific Utilities → MODIS →
Georeference Data
The Input MODIS File dialog appears.
3. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK.
If the dataset contains bands named Latitude and Longitude, the Georeference
MODIS Parameters dialog appears (Figure 8-20).
If the dataset does not contain bands named Latitude and Longitude, the
Lat/Lon Band Selection dialog appears (Figure 8-19). In this case:
• If the dataset contains geographic coordinate bands using names other than
the expected default, select the image names and click OK. The
Georeference MODIS Parameters dialog appears.
• If the dataset does not contain geographic coordinate bands, click Cancel
to close the utility. You will not be able to georeference the dataset.

ENVI User’s Guide Georeferencing MODIS


958 Chapter 8: Map Tools

Figure 8-19: Lat/Lon Image Selection Dialog

Georeferencing MODIS ENVI User’s Guide


Chapter 8: Map Tools 959

Figure 8-20: Georeference MODIS Parameters dialog

4. In the Georeference MODIS Parameters dialog:


• Select the desired output map projection from the list and enter any
necessary parameters (see “Selecting Map Projection Types” on page 990
for details).
• Enter the number of x and y warp points to use in the corresponding
Number Warp Points: X and Y fields.
When georeferencing MODIS data, the maximum number of warp points
allowed depends on the image size and product type. If fewer warp points
are entered, they are evenly spaced throughout the image.

ENVI User’s Guide Georeferencing MODIS


960 Chapter 8: Map Tools

Note
Using many warp points may increase the warping time, but can significantly
increase the accuracy of the georeferencing.

• Save the ground control points (GCPs) to an ASCII file, if desired, by


entering an output filename in the Enter Output GCP Filename [.pts]
box.
• If ENVI is unable to determine the offset and increment for the
latitude/longitude images, the Start Pixel for Lat/Lon Values and Pixels
Between Lat/Lon Values fields display. Change the default values in
these fields as needed. These values indicate the correct mapping
relationship between the lat/lon grid and the input image. They are needed
for georeferencing.
• Apply bow tie effect correction to the dataset, if desired, using the steps in
“Applying the Correction for the MODIS Bow Tie Effect” on page 963.
• Click OK. The Registration Parameters dialog appears. The options
available in the dialog depend on the Yes/No value in the Perform Bow
Tie Correction toggle.

Georeferencing MODIS ENVI User’s Guide


Chapter 8: Map Tools 961

Figure 8-21: Registration Parameters when Bow Tie Option = Yes

ENVI User’s Guide Georeferencing MODIS


962 Chapter 8: Map Tools

Figure 8-22: Registration Parameters when Bow Tie Option = No

5. In the Registration Parameters dialog Output Projection and Map Extent


area, set the output projection for the image:
• To change the projection of the upper-left coordinate only, click Change
Proj.
• Change the map coordinate or latitude/longitude information for the
upper-left coordinate, pixel size, and output image size.
• Click Options and select from the menu to manage the output projection
and map extent settings.
6. In the Registration Parameters dialog Warp Parameters area, select the
warping and resampling methods (see “Warping and Resampling” on page 904
for details).
7. Click OK. ENVI adds the resulting output to the Available Bands List.

Georeferencing MODIS ENVI User’s Guide


Chapter 8: Map Tools 963

Applying the Correction for the MODIS Bow Tie


Effect
The data collected by the MODIS sensors aboard the Terra (EOS AM) and Aqua
(EOS PM) satellites include a so-called bow tie effect due to the larger ground-
sampled size of the edge pixels with respect to the ground-sampled size of the image
pixels located in the center of the scan.
ENVI includes a re-projection method to offset the bow tie effect found in MODIS
Level 1B and Level 2 data.
1. Open the MODIS file as described in “Georeferencing MODIS” on page 957.
2. The Georeference MODIS Parameters dialog (Figure 8-20) contains a
Perform Bow Tie Correction toggle button located at the bottom of the
dialog. The default setting is Yes.
3. Make your changes using this dialog and accept the bow tie correction.
4. Click OK. The Registration Parameters dialog (Figure 8-21) appears.
Note
If the toggle button is changed to No, then ENVI performs the MODIS
georeference procedure without the correction.

5. Select output to File or Memory.


6. Click OK to continue with the georeferencing and bow tie correction. ENVI
adds the resulting output to the Available Bands List.
You can see the effect of the bow tie correction by displaying a radiance band
from the original image (Figure 8-23), the same radiance band from the
georeferenced image with no bow tie correction (Figure 8-24); and the same
band from the georeferenced image with bow tie correction (shown in Figure
8-25).

ENVI User’s Guide Georeferencing MODIS


964 Chapter 8: Map Tools

Figure 8-23: Original MODIS 1b Radiance Image and Scroll Windows

Georeferencing MODIS ENVI User’s Guide


Chapter 8: Map Tools 965

Figure 8-24: Georeferenced MODIS Radiance Image without Bow Tie


Correction Image and Scroll Windows

ENVI User’s Guide Georeferencing MODIS


966 Chapter 8: Map Tools

Figure 8-25: Georeferenced MODIS Radiance Image with Bow Tie Correction
Image and Scroll Windows

Georeferencing MODIS ENVI User’s Guide


Chapter 8: Map Tools 967

Georeferencing COSMO-SkyMed Data


Use Georeference COSMO-SkyMed (DGM) to georeference a COSMO-SkyMed
Level-1B file. ENVI uses only the four corner points of the image in georeferencing.
No DEMs are used to assist in georeferencing. Follow these steps to continue:
1. Open a COSMO-SkyMed Level-1B Detected Ground Multilook file (indicated
by DGM in the filename) by selecting File → Open External File → Radar →
COSMO-SkyMed from the ENVI main menu bar.
2. From the ENVI main menu bar, select Map → Georeference COSMO-
SkyMed (DGM). The Select COSMO-SkyMed Filename dialog appears.
3. Select an input file and click OK. The COSMO-SkyMed Registration
Parameters dialog appears (Figure 8-26).
4. Use the settings in this dialog to select an output projection and to specify how
to extract geolocation points from the COSMO-SkyMed file:
• Select Output Projection For Registration: Choose the projection into
which to warp the data. The default projection is UTM (if map information
is available). For details about selecting map projections, see “Selecting
Map Projection Types” on page 990.
• X Pixel Size/Y Pixel Size: Set the output data pixel size in units of
degrees, meters, or feet. The units to use depends on the units used for the
selected projection. If your input image does not have a pixel size defined,
the default values are 30 meters for both x and y. If pixel size data is
included in your file, those values appear in the X and Y Pixel Size fields.
• Enter Output GCP FileName: Allows you to optionally save the
extracted GCPs in a file with a specified name.
5. In the Enter Output FileName field, enter the filename for your
georeferenced image.
6. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Georeferencing COSMO-SkyMed Data


968 Chapter 8: Map Tools

Figure 8-26: COSMO Registration Parameters dialog

Georeferencing COSMO-SkyMed Data ENVI User’s Guide


Chapter 8: Map Tools 969

Georeferencing RADARSAT
Use Georeference RADARSAT to georeference RADARSAT data with embedded
geolocation point information. You can use the geolocation points associated with
each line of RADARSAT data to georeference the data to a specified map projection.
You can use all of the geolocation points from the file, or specify how many points to
extract from the data for georeferencing.
Note
Not all RADARSAT files contain embedded geolocation points. If your
RADARSAT data does not have geolocation points, you will be unable to
georeference the file.

1. Open a RADARSAT file by selecting File → Open External File →


Radar → RADARSAT from the ENVI main menu bar.
2. From the ENVI main menu bar, select one of the following:
• Map → Georeference RADARSAT
• Radar → Open/Prepare Radar File → Georeference RADARSAT
• Basic Tools → Preprocessing → Data-Specific Utilities →
RADARSAT → Georeference RADARSAT
• Spectral → Preprocessing → Data-Specific Utilities →
RADARSAT → Georeference RADARSAT
The Input File dialog appears.
3. Select an input file and perform optional Spatial Subsetting and/or Spectral
Subsetting, then click OK. The Extract RADARSAT GCP Parameters dialog
appears (Figure 8-27).

ENVI User’s Guide Georeferencing RADARSAT


970 Chapter 8: Map Tools

Figure 8-27: Extract RADARSAT GCP Parameters Dialog

Use the settings in this dialog to select an output projection and to specify how
to extract geolocation points from the RADARSAT file:
• Select Output Projection For Registration: Choose the projection into
which to warp the data. The default projection is UTM (if map information
is available). For details about selecting map projections, see “Selecting
Map Projection Types” on page 990.
• X Pixel Size/Y Pixel Size: Set the output data pixel size in units of
degrees, meters, or feet. The units to use depends on the units used for the
selected projection. If your input image does not have a pixel size defined,
the default values are 12.5 meters for both x and y. If pixel size data is
included in your file, those values appear in the X and Y Pixel Size fields.

Georeferencing RADARSAT ENVI User’s Guide


Chapter 8: Map Tools 971

• Number of Lines to Skip: Use this option to optimize either the accuracy
or the processing speed of the geolocation point extraction.
The larger the value in this field, the fewer number of points are extracted.
In this case, processing is faster but the accuracy is more approximate.
If you choose a smaller value for the number of lines to skip, the
processing time increases but the accuracy is improved. The default value
is 100.
• Enter Output GCP File Name: Allows you to optionally save the
extracted GCPs in a file with a specified name.
4. Click OK. The Registration Parameters dialog appears.
5. The Registration Parameters dialog allows you to further refine the warp
method, resampling technique, background value, and output parameters. For
more information about the Registration Parameters dialog, see “Warping and
Resampling Image-to-Map” on page 907.
In the Enter Output Filename field, enter the filename for your georegistered
image.
6. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Georeferencing RADARSAT


972 Chapter 8: Map Tools

Building RPCs
Use Build RPCs to compute rational polynomial coefficient (RPC) information for
the following:
• Scanned aerial photographs from a frame camera.
• Digital aerial photographs with a frame central projection (including Vexcel
UltraCamD).
Note: ENVI automatically computes RPC map information for Leica ADS40
files if the necessary ancillary files are present. See “Opening ADS40 Files” on
page 174 for more information.
• Digital aerial photographs with a line central projection (including Leica
ADS40 and STARLABO TLS).
• Imagery from any generic pushbroom sensor (including ALOS PRISM and
AVINIR, ASTER, CARTOSAT-1, FORMOSAT-2, GeoEye-1, IKONOS, IRS-
C, KOMPSAT-2, MOMS, QuickBird, RapidEye, WorldView-1 and -2, and
SPOT) as long as GCPs are available.
Note
ASTER, SPOT, and FORMOSAT-2 data files contain RPC information, which you
can retain before orthorectification or DEM extraction and avoid using Build RPCs
altogether. See “Retaining RPC Information from ASTER, SPOT, and
FORMOSAT-2 Data” on page 989 for details.

RPCs are computed using a digital photogrammetry technique that uses a collinearity
equation to construct sensor geometry, where the object point, perspective center, and
image point are all on the same space line. The technique involves a series of
transformations involving pixel, camera, image-space, and ground coordinate
systems.
For single-image orthorectification, the technique includes two preprocessing steps to
build the sensor geometry: interior orientation (which transforms the pixel
coordinate system to the camera coordinate system), and exterior orientation (which
determines the position and angular orientation parameters associated with the
image). Once RPCs are computed, the RPC information is added to the input file
header so that you can use the file with ENVI’s generic RPC orthorectification and
DEM Extraction tools. See “Generic RPC and RSM” on page 918 and the DEM
Extraction Module User’s Guide for more information.

Building RPCs ENVI User’s Guide


Chapter 8: Map Tools 973

Before computing RPCs (see “Select Input File” on page 979), you should
understand the photogrammetry model that ENVI uses, since you will have an
opportunity to edit associated parameters.

Frame and Line Central Projections


ENVI uses two modeling scenarios for the image-ground relationship when
computing RPCs: a frame central projection and a line-central projection.
Frame camera and digital (frame central) aerial photography use the frame central
projection. This projection has one perspective center (S) defined as the optical center
of a camera lens through which all light rays pass and create imaging signatures in
the image focal plane. Any object point (A), its image point (a), and its perspective
center (S) are collinear in space. The principal point (o) is defined as the foot of the
perpendicular from the perspective center to the plane of an aerial photograph.

Figure 8-28: Frame Central Projection

ENVI User’s Guide Building RPCs


974 Chapter 8: Map Tools

Imagery from pushbroom sensors and aerial photography from line central digital
cameras use the line central projection. Each scan line has its own projection center,
as the following figure shows.

Figure 8-29: Line Central Projection

To compute RPCs, the angles of each axis in the object space system, along with the
location of the projection center, must also be determined. These are referred to as
exterior orientation parameters. ENVI can automatically calculate these parameters
based on GCPs that you select, but you can also edit them or manually enter them as
needed.
References:
Wang, Zhizhuo, 1990, Principles of Photogrammetry (with Remote Sensing),
Beijing: Publishing House of Surveying and Mapping.
McGlone, J. C., editor, 2004, Manual of Photogrammetry, Fifth Edition, American
Society for Photogrammetry and Remote Sensing.

Parameters for Digital Cameras and Pushbroom


Sensors
When building RPCs for digital camera aerial photography and pushbroom sensor
imagery, you will need to enter various required parameters such as principal points,
focal lengths, pixel sizes, and incidence angles. This section provides guidelines on
determining these values.

Building RPCs ENVI User’s Guide


Chapter 8: Map Tools 975

Principal Point Coordinates


Principal point coordinates are often set to [0.0, 0.0], which assumes that the
principal point is the center of the image for a frame central projection, and the center
of each scan line for a line central projection. A laboratory calibration report should
provide the principal point coordinates.

Focal Length and Pixel Size


Focal length is the orthogonal distance from the perspective center to the image focal
plane. Pixel sizes correspond to the CCD cells (detectors of the camera that captured
the images). Typically, aerial digital cameras and satellite pushbroom sensors have
square pixels, which means that the pixel size is the same in the x and y dimension.
Focal length and pixel sizes are usually available through the data provider or camera
calibration report. You can often evaluate the correctness of the input pixel size based
on its relationship with flight height, ground resolution, and focal length:

---f- = -----------
PS -
H GSD
Where:
f is the focal length
H is the aircraft or satellite altitude
PS is the pixel size on the camera lens
GSD is the ground sample distance or ground resolution.
The following table lists focal lengths and pixel sizes for some aerial cameras and
satellite pushbroom sensors:

Sensor Name Focal Length (mm) Image Pixel Size (mm)

ADS40 62.77 (0.0065, 0.0065)


ALOS AVNIR-2 800.0 (0.0115, 0.0115)
ALOS PRISM 1939.0 (0.007, 0.007) effective pixel
size
ASTER 329.0 (Bands 1, 2, 3N) (0.007, 0.007)
376.3 (Band 3B) Bands 1, 2, 3N, 3B
EROS-A1 3500 (0.013, 0.013)

ENVI User’s Guide Building RPCs


976 Chapter 8: Map Tools

Sensor Name Focal Length (mm) Image Pixel Size (mm)


FORMOSAT-2 2896 (0.0065, 0.0065) Pan
IKONOS-2 10000 (0.012, 0.012) Pan
IRS-1C 982 (0.007, 0.007) Pan
IRS-1D 974.8 (0.007, 0.007) Pan
KOMPSAT-2 900 Pan (0.013, 0.013)
2250 Multispectral
Kodak DCS420 28 (0.009, 0.009)
MOMS-02 660 (0.01, 0.01)
QuickBird 8836.2 (0.013745, 0.013745)
RapidEye 637 (0.0065, 0.0065)
SPOT-1 through -4 1082 (0.013, 0.013) Pan
SPOT-5 HRS 580 (0.0065, 0.0065) Pan
STARLABO TLS 60 (0.007, 0.007)
Vexcel UltraCamD 101.4 (0.009, 0.009) Pan
WorldView-2 13311 (0.008, 0.008)
Z/I Imaging DMC 120 (0.012, 0.012)

Along Track and Across Track Incidence Angles


These parameters only apply to pushbroom sensors, and they are different for each
sensor. Data from some pushbroom sensors have fixed incidence angles across all
images, while other data have different incidence angles for each image. These angles
are only used to set the initial values for the exterior orientation parameters and do
not have to be exact.
The along track incidence angle is the angle (in degrees) between the vertical
position of the satellite and its forward or backward viewing direction. If viewed
from the ground point corresponding to the scene center, the along track incidence
angle has a positive value if the viewing direction is northward.
The across track incidence angle is the angle (in degrees) between the vertical
position of the satellite and its side-viewing direction when the sensor is scanning

Building RPCs ENVI User’s Guide


Chapter 8: Map Tools 977

along the side. If viewed from the ground point corresponding to the scene center, the
across track incidence angle has a positive value if the viewing direction is eastward.
Following are some guidelines for determining the incidence angles for different
pushbroom sensors.
ASTER
You can set both angles to 0.0 degrees. However, for Band 3B, you should set the
along track incidence angle to -27.6 degrees (descending orbit) or 27 degrees
(ascending orbit), and the across track incidence angle to 0.0 degrees.
Note
ASTER and SPOT data files contain RPC information, which you can retain before
orthorectification or DEM extraction and avoid using Build RPCs altogether. See
“Retaining RPC Information from ASTER, SPOT, and FORMOSAT-2 Data” on
page 989 for details.

IKONOS
The *_metadata.txt file associated with an IKONOS dataset lists Nominal
Collection Elevation and Nominal GSD (Cross Scan and Along Scan)
angles for each source image. Use these values to compute the approximate along
track and across track incidence angles with the following equations:
2 2
tan ( ∂ nominal ) + 1 – a
∂ across_track = tan
–1 -----------------------------------------------------
2
1+a

2 2
a ( 1 + tan ( ∂ nominal ) ) – 1
∂ along_track = tan
–1 --------------------------------------------------------------
2
1+a
Where:
GSD along_track
a = -----------------------------------
GSD across_track
You should set the signs of the incidence angles according to the actual pointing
direction, which you can determine from the Nominal Collection Azimuth
value in the *_metadata.txt file.

ENVI User’s Guide Building RPCs


978 Chapter 8: Map Tools

∂ nominal = 90 – nominal_collection_elevation

IRS-1C/1D
Set the along track incidence angle to 0.0 degrees. Set the across track incidence
angle according to the Input view angle (Deg) value in the leader file.
KOMPSAT-2
Set the approximate incidence angles using the
AUX_IMAGE_SATELLITE_INCIDENCE_DEG metadata field in the associated
ephemeris data file (.eph).
QuickBird
Set the approximate incidence angles (and signs) using the inTrackViewAngle and
crossTrackViewAngle values in the associated *.IMD file.
RapidEye
Set the across track incidence angle to the acrossTrackIncidenceAngle value in
the associated *_metadata.xml file. Set the along track incidence angle to 0.0
degrees.
SPOT
Incidence angles are available in the leader file (CAP format) or XML metadata file
(DIMAP format).
For SPOT-1 through SPOT-4 data, you can set the along track incidence angle to 0
because this type of viewing is not allowed. For SPOT-5 data, the XML metadata lists
the along track incidence angle in the <INCIDENCE_ANGLE> tag. Use the
<VIEW_ANGLE> tag to set the across track incidence angle.
For CAP-format data, the incidence angle is in the byte offset 453-468 within the
header record. You can use a simple text editor to view the header record. The format
for the incidence angle is <X>AA.A, for example, L12.7 or R18.1. If the prefix is L,
set the angle to a negative value. If the prefix is R, set the angle to a positive value.

Building RPCs ENVI User’s Guide


Chapter 8: Map Tools 979

WorldView-1 and WorldView-2


Set the approximate incidence angles (and signs) using the mean
InTrackViewAngle and meanCrossTrackViewAngle values in the associated
*.IMD file.

Select Input File


1. From the ENVI main menu bar, select Map → Build RPCs. The Input File
dialog appears.
2. Select an input file, such as a scanned aerial photograph, digital aerial imagery,
or pushbroom sensor imagery. Click OK. The Build RPCs dialog appears.
3. From the Type drop-down list, select one of the following options:
• Frame Camera: Scanned aerial photographs from a frame camera. This is
the default value.
• Digital (Frame Central): Digital aerial photographs with a frame central
projection. This type of imagery has the same projective geometry as a
frame camera but does not include fiducial marks. Examples include
Kodak DCS and Vexcel UltraCamD.
• Digital (Line Central): Digital aerial photographs with a line central
projection. This type of imagery has one projective center for each sensor
image line. Examples include Leica ADS40 and STARLABO TLS.
• Pushbroom Sensor: Imagery from any generic pushbroom sensor
(including ALOS, ASTER, FORMOSAT-2, IKONOS, IRS-C, KOMPSAT-
2, MOMS, QuickBird, RapidEye, and SPOT) as long as GCPs are
available. This option may result in better accuracy than the options
available through the Map → Orthorectification option in the ENVI
main menu bar because it uses GCPs (instead of ephemeris data) to
compute RPCs. The actual results depend upon the number, the accuracy,
and the distribution of GCPs.
The fields and required parameters in the Build RPCs dialog change,
depending on the camera Type value you select. The following sections
provide more information on each option.

Frame Camera
1. From the Type drop-down list in the Build RPCs dialog, select Frame
Camera.

ENVI User’s Guide Building RPCs


980 Chapter 8: Map Tools

2. Enter a Focal Length (mm) value for the camera or sensor. This field is
required.
3. Enter Principal Point x0 (mm) and Principal Point y0 (mm) coordinates,
which are usually available from the camera calibration report. The default
value is 0 for both fields.
4. Click Select Fiducials in Display. The scanned aerial photograph is
automatically loaded to a new display group, and the Interior Orientation
Fiducials dialog appears.

Build Interior Orientation


Interior orientation establishes the relationship between the camera model and the
aerial photograph image. It uses tie points between the aerial photograph and the
camera fiducial marks (at least four) and the camera focal length.
The options in the Interior Orientation Fiducials dialog are similar to those in the
Ground Control Points Selection dialog for image-to-image registration. For more
information, see “Image-to-Image Ground Control Points” on page 878.
1. Select a fiducial mark location by centering the mouse cursor (crosshairs) in
the Zoom window over it and clicking. The image coordinates appear in the
Image X and Image Y fields of the Interior Orientation Fiducials dialog.
2. Enter the fiducial location in camera units (mm) in the Fiducial X and
Fiducial Y fields. This information should be available in the camera report.
3. Click Add Point to add the location to the list of tie points.
4. Click Show List to display the Interior Orientation with Fiducials dialog. This
dialog is similar to the Image to Image GCP List dialog. See “Using the Image
to Image GCP List” on page 882 for more information.
5. Continue selecting fiducial mark locations until you have at least four.
6. From the Interior Orientation Fiducials dialog menu bar, select Options →
Export Fiducials to Build RPCs Widget to compute interior orientation
parameters. The Interior Orientation Fiducials dialog closes.

Build Exterior Orientation


1. In the Build RPCs dialog, click Select GCPs in Display. The Select GCPs in
Display dialog appears.
2. Select one of the following options and click OK:

Building RPCs ENVI User’s Guide


Chapter 8: Map Tools 981

• Restore GCPs from ASCII File: The Enter GCP Filename dialog
appears. Select a GCP file that contains projection information (with a
.pts extension). Click OK.
• Select Projection for GCPs: The Select GCPs in Display dialog appears.
See “Selecting Map Projection Types” on page 990 for more information
on choosing a projection. You can also select Restore GCPs from ASCII
File from this dialog. Click OK.
3. The Exterior Orientation GCPs dialog appears. This dialog is similar to the
Ground Control Points Selection dialog for image-to-map registration. See
“Collecting Ground Control Points (Image-to-Map)” on page 888 for more
information.
4. Center the crosshairs in the Zoom window over a GCP and click once. The
image coordinates appear in the Image X and Image Y fields of the Exterior
Orientation GCPs dialog.
5. Enter map coordinates for the GCP in the appropriate fields of the Exterior
Orientation GCPs dialog.
6. In the Elev field, enter an elevation for the selected ground point.
7. Click Add Point to add the location to the list of GCPs.
8. Click Show List to display the Ground Control Points List dialog. This dialog
is similar to the Image to Image GCP List dialog. See “Using the Image to
Image GCP List” on page 882 for more information.
9. Continue adding GCPs. You should spread the GCPs across the image,
including all four corners, for best results. Unlike the GCPs used in “warp”
registrations, the accuracy of each GCP used for the exterior orientation is
absolutely critical for locating the position of the aerial camera. If the exterior
orientation is not accurate, then the orthorectified image will be in error, even
if the interior orientation is perfect.
10. From the Exterior Orientation GCPs dialog menu bar, select Options →
Export GCPs to Build RPCs Widget to compute exterior orientation
parameters. An Exterior Orientation from GCPs Error Report dialog appears,
which shows a report of the individual RMS errors for each GCP, and the total
RMS error.
The Build RPCs dialog lists six exterior orientation parameters (XS, YS, ZS,
Omega, Phi, and Kappa), along with the units of the rotation angles, and the
rotation system used.

ENVI User’s Guide Building RPCs


982 Chapter 8: Map Tools

The rotation matrix associated with XS, YS, and ZS is calculated from three
rotation angles: Omega, Phi, and Kappa. While the rotation angles are different
among rotation systems, the rotation matrix is the same.
Note
You should only be concerned with the rotation system if you import existing
orientation parameters that come from a global positioning system (GPS),
inertial navigation system (INS), or inertial measurement unit (IMU); or
from block bundle adjustment results using third-party photogrammetry
software. If these do not apply to you, then accept the default calculated
exterior orientation parameters. Rotation angles are only used to compute the
RPCs.

11. To edit any of the exterior orientation parameters, click Edit Parameters. The
Edit Exterior Orientation Parameters dialog appears. This dialog also allows
you to edit the projection information associated with the GCPs.
12. From the Rotation System drop-down list in the Edit Exterior Orientation
Parameters dialog, select one of the following options.
• Omega/Phi/Kappa: SX is the primary axis, defined as a fixed axis whose
space direction does not change while the direction of the other axes
changes as the space is rotated. Omega is a rotation about the SX axis, Phi
is a rotation about the SY axis, and Kappa is a rotation about the SZ axis.
Figure 8-30 indicates the positive directions of all the rotation angles. This
is the default option since it is widely used in the U.S. and most of the
world.

Figure 8-30: Omega, Phi, Kappa Angular Rotation System

• +Phi/Omega/Kappa: SY is the primary axis. Phi is a rotation about the


SY axis, Omega is a rotation about the SX axis, and Kappa is a rotation

Building RPCs ENVI User’s Guide


Chapter 8: Map Tools 983

about the SZ axis. Figure 8-31 indicates the positive directions of all the
rotation angles. This convention is commonly used in Germany.

Figure 8-31: +Phi, Omega, Kappa Angular Rotation System

• -Phi/Omega/Kappa: This is the same system as +Phi/Omega/Kappa,


except the direction of Phi is reversed. This convention is commonly used
in China.

Figure 8-32: -Phi, Omega, Kappa Angular Rotation System

13. Edit the XS, YS, ZS, Omega, Phi, and Kappa fields in the Edit Exterior
Orientation Parameters dialog as needed.
14. Click the Units toggle button to toggle between Degrees or Radians. This
field represents the units of Omega, Phi, and Kappa.
15. Click OK in the Edit Exterior Orientation Parameters dialog.

Compute RPCs
1. If you want to further improve the RMS error of the exterior orientation model,
click Select GCPs in Display again in the Build RPCs dialog. You can add

ENVI User’s Guide Building RPCs


984 Chapter 8: Map Tools

more GCPs or delete GCPs with large errors. See “Build Exterior Orientation”
on page 980.
2. When you are finished modifying the GCPs, click Recalculate Exterior
Orientation in the Build RPCs dialog.
3. Click OK in the Build RPCs dialog. The Scene Elevation in Meters dialog
appears.
4. The Minimum Elevation and Maximum Elevation fields are initially
populated with the range of global elevation values in world_dem (found in
the data directory of your ENVI installation path). If you know the elevation
range of your scene, you can enter new Minimum Elevation and Maximum
Elevation values. These values represent the height above the WGS-84
ellipsoid for the geographic region that the image covers.
5. Click OK. After processing is complete, an ENVI Message dialog appears:
“RPCs have been calculated for this file, and the header has been updated.”
Click OK.
Once RPCs are computed, the RPC information is added to the input file
header so that you can use the file with ENVI’s Generic RPC orthorectification
and DEM Extraction tools. See “Generic RPC and RSM” on page 918 and the
DEM Extraction Module User’s Guide for more information.

Digital (Frame Central)


1. From the Type drop-down list in the Build RPCs dialog, select Digital (Frame
Central).
2. Enter a Focal Length (mm) value for the camera or sensor. This field is
required. See “Focal Length and Pixel Size” on page 975.
3. Enter Principal Point x0 (mm) and Principal Point y0 (mm) coordinates,
which are usually available from the camera calibration report. The default
value is 0 for both fields. See “Principal Point Coordinates” on page 975.
4. Enter X Pixel Size (mm) and Y Pixel Size (mm) values. These are required
fields. See “Focal Length and Pixel Size” on page 975.
5. Click Select GCPs in Display. A Select GCPs in Display dialog appears. See
“Build Exterior Orientation” on page 980 for the remaining steps.
6. If you want to further improve the RMS error of the exterior orientation model,
click Select GCPs in Display again. You can add more GCPs or delete GCPs
with large errors.

Building RPCs ENVI User’s Guide


Chapter 8: Map Tools 985

7. When you are finished modifying the GCPs, click Recalculate Exterior
Orientation in the Build RPCs dialog.
8. Click OK. The Scene Elevation in Meters dialog appears.
9. The Minimum Elevation and Maximum Elevation fields are initially
populated with the range of global elevation values in world_dem (found in
the data directory of your ENVI installation path). If you know the elevation
range of your scene, you can enter new Minimum Elevation and Maximum
Elevation values. These values represent the height above the WGS-84
ellipsoid for the geographic region that the image covers.
10. Click OK. After processing is complete, an ENVI Message dialog appears:
“RPCs have been calculated for this file, and the header has been updated.”
Click OK.
Once RPCs are computed, the RPC information is added to the input file
header so that you can use the file with ENVI’s Generic RPC orthorectification
and DEM Extraction tools. See “Generic RPC and RSM” on page 918 and the
DEM Extraction Module User’s Guide for more information.

Digital (Line Central)


1. From the Type drop-down list in the Build RPCs dialog, select Digital (Line
Central).
2. Enter a Focal Length (mm) value for the camera or sensor. This field is
required. See “Focal Length and Pixel Size” on page 975.
3. Enter Principal Point x0 (mm) and Principal Point y0 (mm) coordinates,
which are usually available from the camera calibration report. The default
value is 0 for both fields. See “Principal Point Coordinates” on page 975.
4. Enter X Pixel Size (mm) and Y Pixel Size (mm) values. These are required
fields. See “Focal Length and Pixel Size” on page 975.
5. Select a Sensor Line Along Axis option. Each sensor line has one projective
center.
• X: The sensor line direction is along the image x-axis.
• Y: The sensor line direction is along the image y-axis.
6. Set the required Polynomial Orders for XS, YS, ZS, Omega, Phi, and Kappa.
• 0: The parameter is constant for the entire image.

ENVI User’s Guide Building RPCs


986 Chapter 8: Map Tools

• 1: The parameter has a linear relationship with the y camera coordinates,


for example: XS(i) = a0 + a1yi
• 2: The parameter is modeled using a second-order polynomial, for
example: XS(i) = a0 + a1yi + a2yi2
The default value is 1 for all six exterior orientation parameters. The
higher you set the polynomial order, the more GCPs you must select in the
image. Usually, a second-order polynomial is only needed to model a
scenario where there is a nonlinear variation of the exterior orientation
between sensor lines, which implies an unstable flight path. Experiment
with different polynomial orders to select the optimal modeling strategy.
7. Click Select GCPs in Display. A Select GCPs in Display dialog appears. See
“Build Exterior Orientation” on page 980 for the remaining steps.
8. If you want to further improve the RMS error of the exterior orientation model,
click Select GCPs in Display again. You can add more GCPs or delete GCPs
with large errors.
9. When you are finished modifying the GCPs, click Recalculate Exterior
Orientation in the Build RPCs dialog.
10. Click OK. The Scene Elevation in Meters dialog appears.
11. The Minimum Elevation and Maximum Elevation fields are initially
populated with the range of global elevation values in world_dem (found in
the data directory of your ENVI installation path). If you know the elevation
range of your scene, you can enter new Minimum Elevation and Maximum
Elevation values. These values represent the height above the WGS-84
ellipsoid for the geographic region that the image covers.
12. Click OK. After processing is complete, an ENVI Message dialog appears:
“RPCs have been calculated for this file, and the header has been updated.”
Click OK.
Once RPCs are computed, the RPC information is added to the input file
header so that you can use the file with ENVI’s Generic RPC orthorectification
and DEM Extraction tools. See “Generic RPC and RSM” on page 918 and the
DEM Extraction Module User’s Guide for more information.

Pushbroom Sensor
1. From the Type drop-down list in the Build RPCs dialog, select Pushbroom
Sensor.

Building RPCs ENVI User’s Guide


Chapter 8: Map Tools 987

2. Enter a Focal Length (mm) value for the camera or sensor. This field is
required. See “Focal Length and Pixel Size” on page 975.
3. Enter Principal Point x0 (mm) and Principal Point y0 (mm) coordinates.
The default value is 0 for both fields. See “Principal Point Coordinates” on
page 975.
4. Enter X Pixel Size (mm) and Y Pixel Size (mm) values. These are required
fields. See “Focal Length and Pixel Size” on page 975.
5. Enter Incidence Angle Along Track and Incidence Angle Across Track
values. See “Along Track and Across Track Incidence Angles” on page 976.
6. Select a Sensor Line Along Axis option. Each sensor line has one projective
center.
• X: The sensor line direction is along the image x-axis.
• Y: The sensor line direction is along the image y-axis.
7. Set the required Polynomial Orders for XS, YS, ZS, Omega, Phi, and Kappa.
• 0: The parameter is constant for the entire image.
• 1: The parameter has a linear relationship with the y camera coordinates,
for example: XS(i) = a0 + a1yi
• 2: The parameter is modeled using a second-order polynomial, for
example: XS(i) = a0 + a1yi + a2yi2
The default value is 1 for all six exterior orientation parameters. The
higher you set the polynomial order, the more GCPs you must select in the
image. Usually, a second-order polynomial is only needed to model a
scenario where there is a nonlinear variation of the exterior orientation
between sensor lines, which implies an unstable flight path. Experiment
with different polynomial orders to select the optimal modeling strategy.
8. Click Select GCPs in Display. A Select GCPs in Display dialog appears. See
“Build Exterior Orientation” on page 980 for the remaining steps.
9. If you want to further improve the RMS error of the exterior orientation model,
click Select GCPs in Display again. You can add more GCPs or delete GCPs
with large errors.
10. When you are finished modifying the GCPs, click Recalculate Exterior
Orientation in the Build RPCs dialog.
11. Click OK. The Scene Elevation in Meters dialog appears.

ENVI User’s Guide Building RPCs


988 Chapter 8: Map Tools

12. The Minimum Elevation and Maximum Elevation fields are initially
populated with the range of global elevation values in world_dem (found in
the data directory of your ENVI installation path). If you know the elevation
range of your scene, you can enter new Minimum Elevation and Maximum
Elevation values. These values represent the height above the WGS-84
ellipsoid for the geographic region that the image covers.
13. Click OK. After processing is complete, an ENVI Message dialog appears:
“RPCs have been calculated for this file, and the header has been updated.”
Click OK.
Once RPCs are computed, the RPC information is added to the input file
header so that you can use the file with ENVI’s Generic RPC orthorectification
and DEM Extraction tools. See “Generic RPC and RSM” on page 918 and the
DEM Extraction Module User’s Guide for more information.

Building RPCs ENVI User’s Guide


Chapter 8: Map Tools 989

Retaining RPC Information from ASTER, SPOT, and


FORMOSAT-2 Data
After you pre-process certain data files and choose to perform orthorectification,
ENVI’s orthorectification tools may prompt you for an associated RPC file because
the necessary tags from the original file are no longer present or associated with the
processed files. In the case of ASTER, SPOT, or FORMOSAT-2 data, ENVI
calculates the RPCs from information in the original files, so there is no external
source for the RPCs and you cannot perform orthorectification.
You can retain RPC information from ASTER, SPOT, and FORMOSAT-2 data files
by storing the information in an ENVI header file prior to processing the data.
Perform the following steps:
1. Open the ASTER, SPOT, or FORMOSAT-2 file.
2. From the ENVI main menu bar, select File → Edit ENVI Header. The Edit
Header Input File dialog appears.
3. Select the data file, and click OK. The Header Info dialog appears.
4. Click the Edit Attributes drop-down button, and select RPC or RSM
Projection Emulation. The RPC Parameters dialog appears.
5. Click the RPC Projection Emulation Enabled toggle button to select On.
6. Click OK in the RPC Parameters dialog, then again in the Header Info dialog
to retain the new header settings.
These steps prompt ENVI to calculate the RPCs and write them to an ENVI header
file (.hdr) in the same directory as the data file. Now you can process the data. The
RPCs in the header file are passed to the processed file so that you can perform
orthorectification.

ENVI User’s Guide Building RPCs


990 Chapter 8: Map Tools

Selecting Map Projection Types


Many functions require you to select an input and/or output map projection type for
your data. Refer to the following procedure when projection selection is needed in
any dialog.
For detailed information about map projections, see “Map Projections” on page 1199.
1. In the list of projection types, either:
• Select the projection name.
• Click New to build a customized map projection, and follow the
instructions under “Building Customized Map Projections” on page 992.
Different parameters are available depending on the selected projection type.
2. Select the corresponding secondary parameters for the selected projection
type:
• If you select Arbitrary, select either Pixel Based or Map Based by
clicking on the toggle button below the Units parameter. Either type of
arbitrary projection only affects the y direction. ENVI always uses the
upper-left corner as the origin, regardless or map-based or pixel-based
projections.
The map-based arbitrary projection means the projection is treated like any
other true projection, where y values increase as you move up (north).
In a pixel-based arbitrary projection, y values increase as you move down
(south), in the same way the pixel rows increase downward. Use a pixel-
based projection when there is no true map system, but it is still necessary
to match the pixel locations in your image. This type of projection
typically will not work with Layer Stacking, which is for map-based
projections only. However, if all of your images were in a pixel-based
projection and are aligned in samples and lines, this type of projection
could potentially work.
• To change the datum for a projection type, click Datum and select a datum
from the list in the Select Geographic Datum dialog.
The datum conversions are done using the Molodensky Transformation
(see the web page http://www.connect.net/jbanta/).

Selecting Map Projection Types ENVI User’s Guide


Chapter 8: Map Tools 991

• If you select UTM, click the N or S toggle button to indicate if the selected
latitude is north (N) or south (S) of the equator. Enter a zone, or click Set
Zone and enter the latitude and longitude values to automatically calculate
the zone.
• If you select a State Plane projection, enter the zone or click Set Zone and
select the zone name from the list.
Both NOS and USGS zone numbers are shown next to the zone name.
• To designate the units for a projection type, click Units and select a unit
type. Enter a pixel size (in the selected unit).

ENVI User’s Guide Selecting Map Projection Types


992 Chapter 8: Map Tools

Building Customized Map Projections


ENVI includes many standard map projections such as Universal Transverse
Mercator (UTM) and Gauss-Kruger. For more information about ENVI’s supported
map projections, see “ENVI Map Projections” on page 1197. Use Customize Map
Projections to enter other known map projections and to create your own customized
map projections such as UTM projections with other datum or ellipsoids. You have
complete control over all of the map projection parameters including the projection
type (Transverse Mercator, Lamberts Conformal Conic, Lambert Azimuthal Equal
Area, Hotine Oblique Mercator B, Stereographic, Albers Equal Area, Polyconic, and
others), Ellipsoid, Datum, False Easting and Northing. Details of specific map
projections are in provided in the following reference:
Snyder, 1982. Map Projections Used by the U. S. Geological Survey. USGS Bulletin
1532.
Note
ENVI’s UTM projection uses the North American 1927 datum and Clarke 1866
ellipsoid.

1. From the ENVI main menu bar, select Map → Customize Map Projections,
or click New in any dialog where map projection selection is available. The
Customized Map Projection Definition dialog appears.
2. Either proceed to step 3, or select Projection → Load Existing Projection
from the dialog menu bar to select from a list of standard projections contained
in the file map_proj.txt located in the ENVI directory structure (see “ENVI
Map Projections File” on page 994).
After the parameters are loaded, you can edit them as necessary.
3. Enter or modify the Projection Name, if desired.
4. Select the Projection Type from the list of supported projections (see “Map
Projections” on page 1199).

Building Customized Map Projections ENVI User’s Guide


Chapter 8: Map Tools 993

5. To change the ellipsoid, click the Projection Datum toggle button to select
Projection Ellipsoid. Select User Defined from the list. Enter the desired A
and B values to define the ellipsoid (See Snyder, 1982).
6. To change the datum, select the desired datum from the scrolling list. The
ellipsoid that corresponds with the selected datum is shown next to the
Ellipsoid label. Toggle back to the Projection Ellipsoid list and select this
ellipsoid.
7. If you want a false easting and northing (typically to keep map coordinates
from being negative), enter the values in the corresponding fields.

Figure 8-33: Customized Map Projection Definition Dialog

8. Enter the projection-type-specific parameters in the available fields on the


right side of the dialog.
The parameters vary depending upon the projection selected. For example, for
transverse mercator, the central meridian and base latitude are required along
with a scaling constant (this constant is the scale on the central meridian, used
so that the mean scale of the entire map is more correct). Polyconic requires

ENVI User’s Guide Building Customized Map Projections


994 Chapter 8: Map Tools

the projection origin. Lamberts Conformal Conic and Albers Equal Area
projections require the projection origin and two standard parallels. See
Snyder, 1982 for details.
• Select Options → Toggle DMS <-> DD from the Customized Map
Projection Definition dialog menu bar to switch between
degrees/minutes/seconds and decimal degrees.
• You can select Options → Extract Projection Origin From Image from
the Customized Map Projection Definition dialog menu bar to set the
latitude/longitude to the center pixel location of an existing georeferenced
image. A Choose Georeferenced Image dialog appears. Select a
georeferenced image and click OK.
9. Select Projection → Add New Projection from the Customized Map
Projection Definition dialog to add the projection to the list of projections used
by ENVI.
The available projections are modified for the current ENVI session and you
will be asked if you want to save the changes to the map_proj.txt file when
you close the dialog (see “ENVI Map Projections File”).
To save the new or modified projection information, select File → Save
Projections from the Customized Map Projection Definition dialog menu bar.
The file map_proj.txt, located in the ENVI directory structure, is modified
to contain the new projection. You can edit this file using any text editor as an
alternative to the interactive definition above.

ENVI Map Projections File


The ENVI map projections file is an ASCII file that defines the map projections used
in ENVI. Use Customize Map Projections to build customized map projections (see
“Building Customized Map Projections” on page 992). A portion of the ENVI
map_proj.txt file included in the ENVI distribution is shown here:
; ENVI CUSTOMIZED PROJECTION FILE
;
; 3 - Transverse Mercator
; a, b, lat0, lon0, x0, y0, k0, [datum], name
;
; 4 - Lambert Conformal Conic
; a, b, lat0, lon0, x0, y0, sp1, sp2, [datum], name
;
; 6 - Hotine Oblique Mercator B
; a, b, lat0, lon0, azimuth, x0, y0, k0, [datum], name
; azimuth:azimuth of central line (degrees east of north)

Building Customized Map Projections ENVI User’s Guide


Chapter 8: Map Tools 995

;
; 7 - Stereographic (ellipsoid)
; a, b, lat0, lon0, x0, y0, k0, [datum], name
;
; 9 - Albers Conical Equal Area
; a, b, lat0, lon0, x0, y0, sp1, sp2, [datum], name
;
; 10- Polyconic
; a, b, lat0, lon0, x0, y0, [datum], name
;
; 11- Lambert Azimuthal Equal Area
; a, b, lat0, lon0, x0, y0, [datum], name
;
; 12- Azimuthal Equadistant
; r, lat0, lon0, x0, y0, name
;
; 13- Gnomonic
; r, lat0, lon0, x0, y0, name

ENVI User’s Guide Building Customized Map Projections


996 Chapter 8: Map Tools

Converting Map Projections


Use Convert Map Projection to convert your georeferenced files to another map
projection. ENVI provides a method to perform projection conversions by
individually projecting each pixel in the image. You can use rigorous projection
conversion or warp methods. The rigorous projection method performs a full
projection transformation (including datum shift, if needed) for every pixel in the
output image. This results in greater conversion accuracy, particularly in regions with
significant projection distortion. However, because these projection equations are
more complex than those for warping methods, processing time will increase.
1. From the ENVI main menu bar, select Map → Convert Map Projection. The
Convert Map Projection Input Image dialog appears.
2. Select the input georeferenced file.
3. Click OK. The Convert Map Projection Parameters dialog appears.

Figure 8-34: Convert Map Projection Parameters Dialog

Converting Map Projections ENVI User’s Guide


Chapter 8: Map Tools 997

4. In the Output Projection and Map Extent area of the Convert Map
Projection Parameters dialog:
• Click Change Proj to change the projection of the upper-left coordinate
only. The Projection Selection dialog appears. Change the map coordinate
or latitude/longitude information and click OK.
• The X/Y Pixel Size and Output X/Y Size fields in the Convert Map
Projection Parameters dialog are automatically populated with information
from the input image.
• Click Options and select from the menu to manage the output projection
and map extent settings.
5. In the Conversion Parameters area of the Convert Map Projection
Parameters dialog, select the warping and resampling methods (see “Warping
and Resampling Image-to-Image” on page 904.
6. Select output to File or Memory.
7. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Converting Map Projections


998 Chapter 8: Map Tools

Layer Stacking
Use Layer Stacking to build a new multiband file from georeferenced images of
various pixel sizes, extents, and projections. The input bands will be resampled and
re-projected to a common output projection and pixel size. The output file will have a
geographic extent that either encompasses all of the input file extents or encompasses
only the data extent where all of the files overlap.
For details, see “Layer Stacking” on page 269.

Layer Stacking ENVI User’s Guide


Chapter 8: Map Tools 999

Converting Map Coordinates


Use Map Coordinate Converter as a calculator to convert between latitude and
longitude and corresponding map projection coordinates.
1. From the ENVI main menu bar, select Map → Map Coordinate Converter.
The Map Coordinate Converter dialog appears.
2. In the First Coordinate section of the dialog, enter the coordinates of the
known point.
• If the known point is in latitude and longitude, enter the coordinates in the
appropriate fields.
• The default is to enter latitudes and longitudes in degrees, minutes, and
seconds (DMS). Click DDEG to enter them in decimal degrees.
• If the known point is in another projection, click the toggle button next to
Proj: Geographic Lat/Lon and follow these steps:
A. Click Change Proj. The Projection Selection dialog appears.
B. Select the desired projection.
C. Select from the following options depending on the projection type.
• To change the projection units, click Units and select the desired units.
• To change the datum, click Datum and select the desired datum.
• To calculate the Zone number for a UTM projection, select the N or S
radio button and enter a known Zone value. Or, click Set Zone and enter
Latitude and Longitude values; the Zone number is automatically
determined.
• To select a Zone number for a State Plane projection, enter a known Zone
value. Or, click Set Zone. A Select State Plane Zone dialog appears. Select
the desired State Plane Zone Name from the list. Both NOS and USGS
Zone numbers are shown next to the Zone name. Click OK. The Zone
number is automatically determined.
D. Click OK in the Projection Selection dialog.
3. Repeat step 2 for the output projection under the Second Coordinate part of the
Map Coordinate Converter dialog.

ENVI User’s Guide Converting Map Coordinates


1000 Chapter 8: Map Tools

4. Select one of the following options:


• To convert the point in the First Coordinate projection into the Second
Coordinate projection type, click Forward in the Map Coordinate
Converter dialog.
• To convert the point in the Second Coordinate projection into the First
Coordinate projection type, click Reverse.
• To clear the coordinates, click Reset.

Figure 8-35: Map Coordinate Converter and Projection Selection Dialogs

Converting Map Coordinates ENVI User’s Guide


Chapter 8: Map Tools 1001

Converting ASCII Coordinates


Use ASCII Coordinate Conversion to convert ASCII coordinates in one projection
and datum to another. The input ASCII file must contain columns of x,y coordinates,
and optional z values (elevations). If no elevations are included in the input
coordinates, then ENVI assumes elevation values of 0 m. The output file will also
contain two columns of x,y,(z) coordinates in the new selected projection. You can
output the coordinates to an ENVI ground control points (GCP) file.
1. From the ENVI main menu bar, select Map → ASCII Coordinate
Conversion. The Enter Input Coordinate Filenames dialog appears.
2. Select the input ASCII coordinates file.
3. Click OK. The Convert Input Coordinate Files dialog appears.
• To add a file to the Selected Input Files list, click Input Additional File.
• To remove the file from the list, select a filename in the Selected Input
Files list and click Delete.
4. Enter an output filename.
5. Click OK. The ASCII Coordinate Conversion dialog appears.
6. Select the input projection type from the Select Input Projection list (see
“Selecting Map Projection Types” on page 990).
7. Select the desired output projection type from the Select Output Projection
list (see “Selecting Map Projection Types” on page 990).
8. Enter Map X/Y Column values of the columns that contain the map
information, Map Z Column elevation values (if any), and Image X/Y
Column values (if your input file is in ENVI GCP format).
9. Select the numeric precision of the output data by entering a Precision value.
10. Select one of the following output options:
• To output your converted coordinates and all other unchanged input
columns of data, click the Output toggle button to select All Input
Columns.
• To output the converted coordinates and image values to an ENVI GCP
(ground control points) file, click the Output toggle button to select ENVI
GCP File.
11. Click OK. ENVI converts the coordinates and writes a new ASCII file
containing the converted coordinates.

ENVI User’s Guide Converting ASCII Coordinates


1002 Chapter 8: Map Tools

Merging Old Projection Files


Use Merge Old “map_proj.txt” File to merge an old map_proj.txt file with the
existing projection database, which means that projections you added in a previous
release of ENVI will be merged with the new projection database.
1. From the ENVI main menu bar, select Map → Merge Old “map_proj.txt”
File. The Enter Old “map_proj.txt” Filename dialog appears.
2. Select the old projection file. A prompt appears, telling you how many
projections were added to the database.
3. Click Yes to save the changes to the current map_proj.txt file.
4. Enter or choose a new output filename, if desired.
5. Click OK.

Merging Old Projection Files ENVI User’s Guide


Chapter 8: Map Tools 1003

Using GPS-Link
Use GPS-Link to read National Marine Electronics Association 0183 format
(NMEA 0183) data directly from a GPS unit. The GPS must be manually set to the
NMEA 0183 mode. ENVI supports a GPS-link on PCs running Microsoft
Windows 2000 or Windows XP. However, the SCSI tape support drivers are needed
for the link to work on Windows. To install SCSI tape support for Microsoft
Windows 2000 and Windows XP platforms, open the aspi_v470.exe self-
extracting archive in the \tape32 directory on the ENVI for Windows installation
CD. Please see the included README.DOC file for installation instructions. GPS-Link
only works in Windows 32-bit mode. If you have a 64-bit Windows PC, run ENVI in
32-bit mode by selecting Start → Program Files → ENVI x.x → 32-bit → ENVI
or ENVI + IDL.

Collecting GPS Locations


ENVI can automatically collect GPS locations at a time interval that you specify, it
can collect single locations, and it can automatically follow the locations on a
displayed image. You can save GPS points to an ASCII file, ENVI vector file (.evf),
or you can export them to the registration Ground Control Points Selection dialog.
1. From the ENVI main menu bar, select Map → GPS-Link. The GPS-Link
Serial Parameters dialog appears.
2. From the Serial Port drop-down list, select the serial port that the GPS
receiver is plugged into.
3. Select the appropriate values from the Read Baud Rate, Number of Data
Bits, Number of Stop Bits, Data Parity Type, and Parity Enable drop-down
lists.
4. Click Select GPS Datum. The Select Datum dialog appears.
5. Select the datum type that your GPS unit is using to collect data.
6. Click OK to return to the GPS-Link Serial Parameters dialog.
7. Click OK. The ENVI GPS-Link dialog appears.
8. Click Get Location to collect the current location. The latitude, longitude, and
time of collection appear in the dialog.
9. Click Get Location again to collect another location. The location appears in
the dialog list.

ENVI User’s Guide Using GPS-Link


1004 Chapter 8: Map Tools

10. Select from the following options:


• To enter text about a location point:
A. In the list of locations, select a location. Click Edit.
B. In the dialog that appears, enter the information. Click OK.
This text and corresponding point will be output when you save to an ASCII
file.
• To go to the location of a specific point in the associated displayed image,
select the desired location point in the list and click Goto.
• To export a location point to an open Image-to-map registration Ground
Control Points Selection dialog, select the desired location point in the list
and click Export.
The location appears in the registration dialog (see “Image-to-Map Ground
Control Points” on page 887).
• To delete a location point from the list, select the location point and click
Delete.

Attaching GPS Links to Displays


You can attach the GPS-Link to an Image window that contains a georeferenced
image. The position of the cursor in the Image window follows the GPS locations.
1. Select Options → Attach to display from the ENVI GPS-Link dialog menu
bar. The Attach GPS-Link to Display dialog appears.
2. Select the desired display number.
3. Click OK. As the GPS locations are updated, the center pixel in the Zoom
window moves to follow their locations.

GPS-Link Options
In the ENVI GPS-Link dialog, use the Options menu to clear points, collect points,
or set the display format (degrees) of the points.
• To erase all points in the list, select Options → Clear Points.
• To turn the automatic collection of points at a set time interval on or off, select
Options → Auto Update: On/Off.
• To set the time interval between automatic point collection, select Options →
Set Retrieval Rate. Enter the desired time interval in seconds.

Using GPS-Link ENVI User’s Guide


Chapter 8: Map Tools 1005

• To turn the collection of points on and off, select Options → Collect Points:
On/Off.
• When in Auto Update mode, select Collect Points: On/Off to pause the
collection of points.
• To display the collected location in decimal degrees (DD) or in degrees,
minutes, seconds, select Options → Display Points: DD/DMS.

Managing GPS-Link Locations


In the ENVI GPS-Link dialog, use the File menu to save GPS locations.
Saving GPS Locations to ASCII Files
1. Select File → Save Points to ASCII.
2. Enter or choose an output filename.
The ASCII file contains the latitude, longitude, Julian time, and any associated
text that was entered using the Edit button.
Saving GPS Locations to ENVI Vector Files
1. Select File → Save Points to EVF. The Save GPS Points to EVF dialog
appears.
2. Select the appropriate button to save each point as a separate record, save all
the points as one record, or to save all the points as a polyline.
3. Enter a layer name.
4. Select output to File or Memory.
5. Click OK.

ENVI User’s Guide Using GPS-Link


1006 Chapter 8: Map Tools

Importing ASCII GPS Points


A typical format for GPS points is an ASCII file with three columns of data: the point
ID number, the x location, and the y location. Selecting File → Open External
File → Generic Format → ASCII from the ENVI main menu bar does not allow
you to import points in this format because it is an ASCII raster reader and is not
intended to read ASCII point data. Instead, use the Point Collection utility to read
ASCII GPS points.

Sample Format
Following is a sample ASCII file of GPS data:
1, -107.7840409, 44.28326903
2, -107.7764449, 44.28345405
3, -107.7688487, 44.28363857
4, -107.7612525, 44.28382258
5, -107.7536563, 44.28400609

This file has five GPS point locations, identified by the ID number in the first
column. The second column contains longitudes, and the third column contains
latitudes. You can delimit the data values by space, comma, or tab. The file can also
contain optional header information, as long as the header is commented out with a
semicolon.

Importing GPS Points


1. From the ENVI main menu bar, select Window → Point Collection. The
ENVI Point Collection dialog appears.
2. From the ENVI Point Collection dialog menu bar, select File → Import
Points from ASCII. The Enter ASCII Points Filename dialog appears.
3. Select a GPS point text file and click Open. The Input ASCII File dialog
appears.
4. Verify that your file is shown as the input file at the top of the Input ASCII File
dialog.
5. Set the Longitude Column to the column number corresponding to longitude
values.
6. Set the Latitude Column to the column number corresponding to latitude
values. Leave the remaining Column fields blank.

Importing ASCII GPS Points ENVI User’s Guide


Chapter 8: Map Tools 1007

7. Select a map projection, datum, and units. See “Selecting Map Projection
Types” on page 990 for details.
8. Click OK. The longitude and latitude values are imported into ENVI and
appear in the ENVI Point Collection dialog.

Saving GPS Points to Vectors


Perform the following steps to save the GPS points as an ENVI vector layer (EVF)
file.
1. From the ENVI Point Collection dialog menu bar, select File → Save Points
As → EVF Layer. The Output Points to EVF dialog appears.
2. Enter a Layer Name and select output to File or Memory.
3. Click OK. The Available Vectors List appears with the new layer. You can
now open an associated image and overlay the points on the image.

ENVI User’s Guide Importing ASCII GPS Points


1008 Chapter 8: Map Tools

Importing ASCII GPS Points ENVI User’s Guide


Chapter 9
Vector Tools

This chapter covers the following topics:

The Vector Menu . . . . . . . . . . . . . . . . . . . 1010 Converting Raster Images . . . . . . . . . . . 1056


Opening Vector Files . . . . . . . . . . . . . . . . 1011 Converting Classification Images . . . . . . 1057
The Available Vectors List . . . . . . . . . . . . 1012 Rasterizing Point Data . . . . . . . . . . . . . . 1058
Working with Vectors . . . . . . . . . . . . . . . 1013 Converting ROIs to DXF Files . . . . . . . . 1060
Creating Vector Layers . . . . . . . . . . . . . . 1038 Converting Annotation Files to DXF Files . . .
Creating World Boundary Layers . . . . . . 1040 1061
Extracting Linear Features with Intelligent Converting EVFs to DXF Files . . . . . . . 1062
Digitizer . . . . . . . . . . . . . . . . . . . . . . . . . . 1043

ENVI User’s Guide 1009


1010 Chapter 9: Vector Tools

The Vector Menu


Use the Vector menu to open, create, and manage vector files; convert raster images
(including classification images) to ENVI vector layers; grid irregular points; and
convert ENVI vector files (.evf), annotation files (.ann), and ROIs to DXF format.
You can also access ENVI’s interactive vector tools from the display group. For
information about overlaying vectors on images, see “Overlaying Vectors” on
page 70.

The Vector Menu ENVI User’s Guide


Chapter 9: Vector Tools 1011

Opening Vector Files


Use Open Vector File to open shapefiles, ArcInfo® Interchange format files, DXF
vector files, MapInfo Interchange format (.mif), Microstation DGN (.dgn), USGS
DLG files, USGS SDTS files, and ENVI vector format (.evf) files. For details, see
Opening Vector Files in Getting Started with ENVI.

ENVI User’s Guide Opening Vector Files


1012 Chapter 9: Vector Tools

The Available Vectors List


Use the Available Vectors List to access the vector files and the individual layers of
each vector file that were opened during the current session. For a full description and
instructions, see The Available Vectors List in Getting Started with ENVI.

The Available Vectors List ENVI User’s Guide


Chapter 9: Vector Tools 1013

Working with Vectors


Use ENVI Vector tools to view vector data such as USGS Digital Line Graphs
(DLG), USGS DLGs in Spatial Data Transfer Standard (SDTS) format, DXF files,
ARC/INFO Interchange files, and shapefiles. ENVI provides two ways of displaying
and working with vectors:
• Overlaying the vector layers on an image in the display group (see “Overlaying
Vectors” on page 70 for information about overlaying vectors on an image).
• Opening the vector layers in a Vector window (shown in Figure 9-1).

Figure 9-1: Vector Window with Menu Bar Selections

You can access options to work with vector layers from either the Vector window
menu bar, the Vector Parameters dialog menu bar, or the right-click menu. Using the
menu options, you can add new vectors; export vector layer coordinates for use in
image-to-map registration; and view, edit, and query vector attributes, as described in
the next sections.

ENVI User’s Guide Working with Vectors


1014 Chapter 9: Vector Tools

Tip
Use the Mouse Button Descriptions window while working with vectors to view
information about the function of each mouse button at any given cursor location.
See Vector Window Mouse Button Functions in Getting Started with ENVI.

Selecting the Active Vector Layer


The active vector layer is the layer you want to edit or query. When working with
multiple vector layers, be sure to make the desired layer active before using the vector
tools to query, edit, or add vectors.
1. Select one of the following:
• Right-click in the Vector window or display group and select Select Active
Layer → layer_name.
• From the Vector window or Vector Parameters dialog menu bar, select
Options → Select Active Layer → layer_name.
To show or hide the active layer while the layer remains the active layer, right-click
and select the Active Layer Off or Active Layer On.
Warning
Do not attempt to edit the same vector layer in two separate display groups at the
same time. If you are editing a vector layer, it is strongly recommended that you not
display the layer in any other display groups during the editing process. If you edit a
vector layer in two display groups at once, your data will be corrupted.

Working with Vectors ENVI User’s Guide


Chapter 9: Vector Tools 1015

Figure 9-2: Vector Window Right-Click Menu for Active Layer

Changing Layer Display Order


ENVI draws vector layers in the order that they are listed in the Available Vector
Layers list. You can change the display order as needed.
1. From either the Vector window or the Vector Parameters dialog menu bar,
select Options → Arrange Layer Order. The Vector Layer Ordering dialog
appears.
2. Select a layer name and drag it to the desired order in the list.
3. When you are finished rearranging the order, click OK. ENVI redraws the
vector layers using the new display order.

ENVI User’s Guide Working with Vectors


1016 Chapter 9: Vector Tools

Removing Vector Layers


1. Use one of the following:
• From either the Vector window or the Vector Parameters menu bar, select
Options → Remove Layers.
• In either the Vector window or the display group, right-click and select
Remove Layers.
2. Select the layers to remove.
3. Click OK.
To remove only the active layer, right-click in the Vector window or display group
and select Remove Active Layer.

Controlling Cursor Modes


Use the cursor mode to select vectors, to highlight corresponding vector attributes in
the Layer Attributes table, to edit existing vectors, to add new vectors, to input vector
points from an ASCII file, or to delete vectors. Cursor modes include Cursor Query,
Edit Existing Vectors, and Add New Vectors.
Select the cursor mode using one of the following:
• From the Vector window or Vector Parameters dialog menu bar, select
Mode → cursor_mode.
• Right-click in the Vector window or the display group and select Select
Mode → cursor_mode.

Viewing Vector Information


Use Options → Vector Information to view vector attributes. For more details, see
“Viewing Vector Attributes” on page 1030.

Changing Vector Layer Display Properties


You can change the appearance of vector layers, such as the layer color, line
thickness, polygon fill style, and so forth.
1. Select one of the following:
• Right-click in either the Vector window or the display group and select
Edit Layer Properties.

Working with Vectors ENVI User’s Guide


Chapter 9: Vector Tools 1017

• From either the Vector window or Vector Parameters dialog menu bar,
select Edit → Edit Layer Properties.
2. Select the vector to edit from the Layer Names list.
3. To edit the layer color, click the color button and select a new color.
4. To edit the appearance of the lines, enter a value in the Thick field, and select
the line style from the Style drop-down list.
5. Select a polygon fill type from the Polygon Fill drop-down list options:
• None: Leave the polygon unfilled.
• Solid: Fill the polygon with the polygon color.
• Line, Dashed, Dotted, and so forth: Fill the polygon with equally spaced
lines.
6. Change the orientation of the fill lines, enter the value of the angle in degrees
(counterclockwise, with respect to the horizontal [0 degrees]) in the Orien
field.
7. Change the spacing of the lines, enter a value in the Space box.
8. Select the Point Symbol to use for plot points from the drop-down list.
9. Designate the size of the symbol, in the Symbol Size field.
10. To plot attribute names with vector points, see “Plotting Attribute Names” on
page 1017.
11. To plot vector points with different sizes for attribute values, see “Plotting
Vector Points Based on Attribute Values” on page 1018.
12. Click OK.
To create your own vector plot symbols, see “Creating Vector Plot Symbols” in the
ENVI Programmer’s Guide.

Plotting Attribute Names


To plot attribute names with the vector points and to associate attribute names with
symbols:
1. In the Edit Vector Layers dialog, select the layer name and click Advanced.
The Point Attribute Relationships dialog appears.
2. Select the Associate attribute name with symbol check box.

ENVI User’s Guide Working with Vectors


1018 Chapter 9: Vector Tools

3. Use the Attribute drop-down list to select the column name to plot from the
Layer Attributes table.
4. Use the Align drop-down list to select left, middle, or right alignment, font
type, text size and orientation using the appropriate parameters.
5. Click OK. The Edit Vector Layers dialog appears.
For more information about attributes, see “Vector Attributes” on page 1029.

Plotting Vector Points Based on Attribute Values


To plot vector points with different symbol sizes based on attribute values:
1. In the Edit Vector Layers dialog, select the point layer name and click
Advanced. The Point Attribute Relationships dialog appears.
2. Select the Associate attribute value with symbol size check box.
3. From the Attribute drop-down list, select the name of the Layer Attributes
table column that contains the data to use to scale the symbol size. The column
must contain numeric values.
4. Select the minimum and maximum symbol size to use.
5. Click OK. The Edit Vector Layers dialog appears.

Working with Vectors ENVI User’s Guide


Chapter 9: Vector Tools 1019

Figure 9-3: Edit Vector Layers Dialog

Adding New Vectors


Use the following steps to add new vectors to an existing layer.
1. Make the layer to modify the active layer.
2. Select one of the following:
• From either the Vector window or the Vector Parameters dialog menu bar,
select Mode → Add New Vectors.
• Right-click in either the Vector window or the display group and select
Select Mode → Add New Vectors.
3. Select one of the following:
• From either the Vector window or the Vector Parameters dialog menu bar,
select Mode → vector_type.

ENVI User’s Guide Working with Vectors


1020 Chapter 9: Vector Tools

• Right-click in either the Vector window or the display group and select
Select Mode → vector_type.
4. Select the vector type from the right-click menu in the Vector window, or from
the Mode menu in the Vector Parameters dialog menu bar. The choices are
Polygon, Polyline, Rectangle, Ellipse, and Point.
From the Vector window right-click menu, choose Multi Part: On. See
“Drawing ROIs” on page 323 for details.
5. Depending on the vector type selected in the previous step, use one of the
following:
• Left-click to define points, polygons, or polyline vertices. To undo the last
point, middle-click.
• Left-click and drag to draw rectangles or ellipses. Middle-click to delete
the rectangle or ellipse.
• Middle-click and drag to draw squares or circles. Middle-click to delete
the square or circle.
• To undo the last point, middle-click.
6. Right-click to set the vector placement. For all vector types other than Point, a
diamond-shaped handle appears near the new vector. You can left-click on the
diamond and drag it to change vector placement.
For Point vector types, select one of the following:
• Accept as Individual Points: To accept each point as an individual record.
• Accept as Multi Point: To accept multiple points as a single record.
• Remove New Point: To remove the point.
7. For all vector types other than Point, right-click again and select one of the
following:
• Accept New Polyline/Polygon/Rectangle/Ellipse: Accepts the placement
of the vector.
• Remove New Polyline/Polygon/Rectangle/Ellipse: Deletes the vector.
• Snap Start Node to the Nearest Polyline: Accepts the placement of the
polyline and connects its start node with an existing nearby polyline.
• Snap End Node to the Nearest Polyline: Accepts the placement of the
polyline and connects its end node with an existing nearby polyline.

Working with Vectors ENVI User’s Guide


Chapter 9: Vector Tools 1021

• Snap Both Ends to the Nearest Polylines: Accepts the placement of the
polyline and connects both its start and end nodes with existing nearby
polylines.
• Node Handles On: To enable the node handles for editing purposes.
You can remove accepted vectors from an unsaved vector layer.
1. Select one of the following:
• From the Vector window or Vector Parameters dialog menu bar, select
Edit.
• Right-click in the Vector window or the display group and select Edit.
2. From the resulting menu, select one of the following:
• Undo Last Edit: To remove only the last vector added.
• Undo All Edits: To remove all vectors added.

Splitting and Joining Polyline Vectors


1. Make the layer to modify the active layer.
2. Select one of the following:
• From either the Vector window or the Vector Parameters dialog menu bar,
select Mode → Edit Existing Vectors.
• Right-click in either the Vector window or the display group and select
Select Mode → Edit Existing Vectors.
3. Left-click on a vector to select it.
4. Split or join polyline vectors with the following:
• To split the vector, right-click on a node and select Mark Node. Right-
click again and select Split Vector. The marked node becomes two nodes.
These nodes are the endpoints of the two new split polylines, which you
can separate by left-clicking to separate the nodes.
• To join vectors, left-click to select a second vector. Right-click and select
Join Vectors. The selected polylines are joined into a single vector.
5. Right-click and select Accept Changes to save the changes to the vector file.
You can undo the changes by selecting Edit → Undo Last Edits or Edit →
Undo All Edits from either the Vector window or the Vector Parameters dialog
menu bar.

ENVI User’s Guide Working with Vectors


1022 Chapter 9: Vector Tools

Editing, Adding, and Removing Vector Nodes


Use these options to change the location of vector nodes, to add vector nodes to
existing vectors, and to remove vector nodes.
Warning
Do not attempt to edit the same vector layer in two separate display groups at the
same time. If you are editing a vector layer, it is strongly recommended that you not
display the layer in any other display groups during the editing process. If you edit a
vector layer in two display groups at once, your data will be corrupted.

Tip
To toggle mouse button functions from Edit Existing Vectors mode to Cursor
Query mode (zoom, pan, and so forth), press and hold the Ctrl key while clicking
the mouse button.

1. Make the layer to modify the active layer.


2. Select one of the following:
• From either the Vector window or the Vector Parameters dialog menu bar,
select Mode → Edit Existing Vectors.
• Right-click in either the Vector window or the display group and select
Select Mode → Edit Existing Vectors.
3. Left-click on a vector to select it.
4. Use the following to edit the nodes:
• To change the location of a vector node, left-click and drag the diamond-
shaped handle to a new location. To undo your changes, middle-click.
• To add a vector node to the active layer, right-click on the location of the
new node then select Add Node [1]. A new node appears. Left-click and
drag the new node to the desired location.
• To add multiple vector nodes, right-click and select Number of Nodes to
Add. Enter the number of nodes to add in the field and click OK. To add
the nodes specified, position the cursor at the desired location, right-click
and select Add Nodes [n], where n is the number of nodes to add. ENVI
adds the nodes.
• To delete a vector node, right-click on the node select Delete Node. ENVI
removes the selected node and connects the two nearest nodes.

Working with Vectors ENVI User’s Guide


Chapter 9: Vector Tools 1023

• To delete a range of nodes at once, right-click on one node and select


Mark Node. Mark the node at the other end of the range the same way,
which selects all nodes in between. Right-click again, and select Delete
Marked Nodes.
• To clear marked nodes, select Clear Marked Nodes from the right-click
menu.
5. Right-click and select Accept Changes to save the changes to the vector file.
You can undo the changes by selecting Edit → Undo Last Edits or Edit →
Undo All Edits from either the Vector window or Vector Parameters dialog
menu bar.

Deleting Vectors from Layers


1. Make the layer to modify the active layer.
2. Select one of the following:
• From either the Vector window or the Vector Parameters dialog menu bar,
select Mode → Edit Existing Vectors.
• Right-click in either the Vector window or the display group and select
Select Mode → Edit Existing Vectors.
3. Left-click on a vector to select it.
4. Right-click and select Delete Selected Vector.
You can undo the changes by selecting Edit → Undo Last Edits or Edit →
Undo All Edits from the Vector window or Vector Parameters dialog menu
bar.

Saving Vector Changes


To save changes made to vectors, select Edit → Save Changes Made to Layer.
Note
You cannot undo saved changes.

Adding ASCII Points to Vector Layers


To read points from an ASCII file (for example, GPS points) and add them to a vector
layer:

ENVI User’s Guide Working with Vectors


1024 Chapter 9: Vector Tools

1. Make the layer to which to add the points the active layer.
2. Select one of the following:
• From either the Vector window or the Vector Parameters dialog menu bar,
select Mode → Add New Vectors.
• Right-click in either the Vector window or the display group and select
Select Mode → Add New Vectors.
3. Right-click in either the Vector window or the display group and select Input
Points from ASCII. The Input ASCII Points Filename dialog appears.
4. Select a file and click Open. The Input ASCII File dialog appears.
5. Select the x and y column numbers.
6. Use the These points comprise drop-down list to select the type of vector the
points define, a polygon, polyline, group of points (as one vector), or
individual points.
7. If your vectors are georeferenced, select the projection of the ASCII points.
8. Click OK. ENVI adds the points to the vector layer.

Vector Layer Options


Use the Options menu from the Vector window or Vector Parameters dialog to
import additional vector layers, arrange the display order of the layers, place
annotation in the vector layer, change the plot parameters, get vector information, and
to undo and save changes to vector layers.

Toggle On/Off Crosshair Cursor


Use Toggle Cursor On from either the Vector window or the Vector Parameters
dialog menu bar when in Cursor Query mode to leave the crosshair cursor on the
display. You can also access this feature using the Toggle Cursor On/Off selection
from the Vector window right-click menu.

Loading Additional Vectors


Use this procedure to load additional vectors from files that are already open in the
Available Vectors List.
1. From either the Vector window or the Vector Parameters dialog menu bar,
select Options → Import Layers. The Import Vector Layers dialog appears.
2. Select the vector files to import.

Working with Vectors ENVI User’s Guide


Chapter 9: Vector Tools 1025

3. Click OK. The selected layers appear in the right-click menu and display
automatically.

Calculating Areas Under Vectors


You can calculate an area under a vector when it is overlaying an image in the display
group.
1. Make the layer to calculate the active layer.
2. From the Vector Parameters dialog menu bar, select Options → Report Area
of EVFs, then choose an area unit in the submenu. If the pixel size is unknown,
the Input Display Pixel Size dialog appears. Use this dialog to provide the x
and y pixel sizes (for the units specified).
The calculated area for all EVFs displays in the EVF Area Info dialog. You can
save the information in this dialog to an ASCII text file or exit out of the dialog
through its File menu

Adding Annotation to Vector Displays


To add annotation to vector displays or to add a vector key, see “Annotating Images
and Plots” on page 31.

Changing the Vector Window Display Range


You can change the area displayed in the Vector window (in projection coordinates).
This option is not available when vectors are overlaid on display groups.
1. From the Vector window menu bar, select Options → Plot Parameters. The
Vector Window Plot Parameters dialog appears.
2. Enter the values in the X/Ymin and X/Ymax fields in the data projection
coordinates.
3. Click Apply to apply the new data range to the Vector window.
To reset the data ranges to the size of the bounding box, click Reset Ranges.

Adding Borders and Tick Marks


You can add borders, tick marks, and tick labels to the Vector window. This option is
not available when vectors are overlaid on display groups.
1. From the Vector window menu bar, select Options → Plot Parameters. The
Vector Window Plot Parameters dialog appears.

ENVI User’s Guide Working with Vectors


1026 Chapter 9: Vector Tools

2. Enter the values (in pixels) in the four Plot Border Values fields, for the top,
right, bottom, and left sides of the window.
3. Select the background color from the Background button.
4. Enter the number of Number of X/Y tick intervals in the appropriate fields.
Tick marks in vector projection units are plotted in all the borders and labels
display in the left and bottom borders.
5. Click Apply to apply the border and ticks to the window.
To reset the plot range in the Vector window to the bounding box, click Reset
Ranges.

Linear Feature Cleanup and Length Attributes


See “Automatically Editing Extracted Features” on page 1049, “Calculating the
Extracted Feature Length” on page 1050, and “Setting Length Attribute Parameters”
on page 1054 for details on the Linear Feature Cleanup, Calculate Length
Attribute and Length Attribute Parameters options.

Managing Vector Layer Files


Use the selections found under the File menu to open new vector files, save and
restore vector template files, export vector layers to ROIs or to a shapefile, and output
the vector data.

Opening Additional Vector Files


1. From either the Vector window or the Vector Parameters dialog menu bar,
select File → Open Vector File. The Select Vector Filenames dialog appears.
2. If you want to open a file other than a .evf file, select the file type from the
Files of type drop-down list.
3. Select the vector file and click Open. ENVI adds the vector files to the
Available Vectors List and displays the vectors in the Vector window, or
overlays the vectors on the image in the display group.

Creating Empty Vector Layers


1. From either the Vector window or the Vector Parameters menu bar, select
File → Create New Layer. The New Vector Layer Parameters dialog appears.
2. Enter a Layer Name.
3. Select output to File or Memory.

Working with Vectors ENVI User’s Guide


Chapter 9: Vector Tools 1027

4. Click OK. The layer name appears in the Available Vector Layers list.

Saving Vector Layers to Template Files


You can save the current vector setup to a template file for repeated use.
1. From either the Vector window or the Vector Parameters menu bar, select
File → Save Layers to Template. The Enter Vector Template Filename dialog
appears.
2. Enter an output template filename with the extension .vec for consistency.
3. Click OK. ENVI saves your current vector setup, including the loaded vectors,
colors, line style and thicknesses, to a file with the extension .vec.

Restoring Vector Layers from Saved Templates


1. From either the Vector window or the Vector Parameters dialog menu bar,
select File → Restore Layers from Template. The Enter Vector Template
Filename dialog appears.
2. Select a .vec file and click Open. ENVI opens the associated vector files
automatically.
Note
You cannot save and restore vectors that are in memory only.

Exporting Vector Locations to GCPs


If you have a vector file for the area of an image to map-register, you can extract the
map coordinates directly from the vector data and load them into the Ground Control
Points Selection dialog by left-clicking on a location in the Vector window, then
selecting Export Map Location from the Vector window right-click menu.
For details, see “Entering Map GCPs from Vector Windows” on page 891.

Exporting Vector Layers to ROIs


1. Make the layer to export the active layer.
2. From either the Vector window or the Vector Parameters dialog menu bar,
select File → Export Active Layer to ROI. The Export EVF Layers to ROI
dialog appears.
3. Select one of the following:

ENVI User’s Guide Working with Vectors


1028 Chapter 9: Vector Tools

• Convert all records of an EVF layer to one ROI: To convert all vectors
to a single ROI record.
• Convert each record of an EVF layer to a new ROI: To convert each
vector to an individual ROI records.
4. Click OK. The ROI name(s) appear in the ROI Tool dialog.
Note
Exporting layers to ROIs can create very large ROIs.

Exporting Vector Layers to Shapefiles


Use Export Active Layer to Shapefile to export vector layers to a shapefile (.shp),
an index file (.shx), and a data base file (.dbf):
1. Make the layer to export the active layer.
2. From either the Vector window or Vector Parameters menu bar, select File →
Export Active Layer to Shapefile. The Output EVF Layer to Shapefile dialog
appears.
3. Enter the output filename.
4. Click OK. Each shapefile can contain only one type of vector (polygon, point,
and so on). If multiple vector types are present in the layer to export, ENVI
prompts you to provide different output filenames for each vector type.

Exporting Vector Layers to a Geodatabase


See “Selecting an Output Geodatabase” on page 226 for more information.

Calculating Buffer Zone Images for Vectors


Use Calculate Buffer Zone to calculate a buffer zone image in which the value of
every pixel is defined as the distance from that pixel to the selected vector layers, in
units of pixels. If your vectors are overlaid on a display group, ENVI uses the
displayed image to create the output buffer zone image. If the vectors display in a
Vector window, you must select an associated file to use for the calculation. You
designate a maximum distance value and the result is that any pixels with a distance
larger than that value are set to the maximum distance value.
1. From either the Vector window or the Vector Parameters dialog menu bar,
select File → Calculate Buffer Zone.
The next dialog that appears depends on where the layer is displayed (Vector
window or display group) and the number of open layers.

Working with Vectors ENVI User’s Guide


Chapter 9: Vector Tools 1029

• If your vector layer is in the Vector window, the Select Associated Data
File dialog appears. Select an input file and perform optional Spatial
Subsetting, then click OK. The Buffer Zone Image Parameters dialog
appears.
• If your vector layer is overlaid on the display group, the Buffer Zone
Image Parameters dialog displays. dialog appears. Select an input file and
perform optional Spatial Subsetting, then click OK.
• If more than one vector layer is open, the Buffer Zone Input Layers dialog
appears. Select the names of the layers to include in the buffer zone image
and click OK. The Select Associated Data File or Buffer Zone Image
Parameters dialog appears.
If you select more than one layer, the distance will be calculated from the
pixel to the nearest selected layer.
2. Set the Maximum Distance to measure. Any pixels with a distance larger than
this value are set to the maximum distance value +1.
3. From the Distance Kernel drop-down button, select Floating Point or Integer
output.
4. Select output to File or Memory.
5. Click OK.

Saving and Printing Vector Window Displays


To output the display shown in the Vector window, select File → Save Plot As →
PostScript or Image File from the Vector window menu bar.
To print the vector display, select File → Print from the Vector window menu bar.
For details, see “Saving Images from Displays” on page 15.

Vector Attributes
Vector layers may have attributes associated with them. ENVI reads shapefile and
MapInfo Interchange file attributes. The attributes are stored in a dBASE II table
(.dbf) for shapefiles and in a .mid file for MapInfo.
Use the Layer Attributes table to view, edit, sort, and save vector attribute data. Use
the Vector Attribute functions to create new vector layers based on attribute values, to
add new attributes to vectors, to plot point attribute names in Vector windows, and to
associate point symbol sizes with attribute values (see “Changing Vector Layer
Display Properties” on page 1016).

ENVI User’s Guide Working with Vectors


1030 Chapter 9: Vector Tools

Viewing Vector Attributes


1. Make the desired layer the active layer.
2. Select one of the following from either the Vector window or Vector
Parameters dialog menu bar:
• Options → Vector Information. The Vector Information dialog appears.
• Edit → Edit/View/Query Attributes. The Layer Attributes table appears.
3. From either the Vector window or the Vector Parameters dialog menu bar,
select Mode → Cursor Query.
4. Left-click on the vectors. The associated attributes display in the Vector
Information dialog or are highlighted in the vector Layer Attributes table.

Creating New Vector Layers from Attributes


To make a new vector layer using a simple mathematical and logical attribute query
expression:
1. Make the desired layer the active layer.
2. From either the Vector window or the Vector Parameters dialog menu bar,
select Edit → Query Attributes. The Layer Attribute Query dialog appears.
3. Click Start. The Query Condition dialog appears and allows you to enter a
query expression.
4. Select the attribute item to query by using the attributes name drop-down list.
5. Select one of the following mathematical expressions from the drop-down list:

Expression Description

> greater than


>= greater than or equal
< less than
<= less than or equal
== equals
!= not equals

Table 9-1: Mathematical Expression Options

Working with Vectors ENVI User’s Guide


Chapter 9: Vector Tools 1031

6. Enter a query value in the field. The value can be a string (case sensitive) or
numeric value depending on the attribute type.
7. To make a more complicated query expression using logical operators, choose
from the following options:
• Click AND and follow steps 4-6 to do a query that must satisfy both
entered mathematical expressions.
• Click OR and follow steps 4-6 to do a query that must satisfy one of the
entered mathematical expressions.
• Click Clear to clear the entire query expression.
• Click Delete to delete individual lines of the query expression.
8. Enter a query layer name in the appropriate field.
9. Select output to File or Memory.
10. Click OK.

Adding Attributes to Vectors


To add attributes to a vector layer that does not have any:
1. Make the desired layer the active layer.
2. From either the Vector window or the Vector Parameters dialog menu bar,
select Edit → Add Attributes. The Add Attributes Choice dialog displays.
3. Select Define new attributes interactively.
4. Click OK. The Attribute Initialization dialog appears with one field defined.
5. Use the Name field to change the attribute name.
• To add a new field to the Defined Attribute Fields list, click Add Field.
• To delete a field from the Defined Attribute Fields list, select a field name
from list and click Delete Field.
6. Select the field Type from the drop-down list. Available types include
Character, Numeric, Logical, and Date. The logical field contains a single
character, either a Y or N, T or F, or ?.
7. Enter the Width of the field in the Layer Attributes table.

ENVI User’s Guide Working with Vectors


1032 Chapter 9: Vector Tools

8. Enter the number of digits to the right of the decimal in the Decimal Count
box for a numeric field.
9. Click OK. ENVI starts a Layer Attributes table (see “The Layer Attributes
Table” on page 1033).

Importing Vector Attributes From an ASCII File


You can import vector attributes from an ASCII file to a vector layer that has no
previously defined attributes.
The imported ASCII file must have either comma-separated fields or tab-separated
fields with either the same number of lines as the number of records in the ENVI
vector file, or the number of lines equal to the [number of records] +1. If the ASCII
file has [number of records] +1 rows, the first row is assumed to contain names for
each column of information. The names can contain up to 11 characters for each
column. If the number of rows in the ASCII file is the same as the number of records
in the ENVI vector file, the column names default to Field_1, Field_2, Field_n, where
n is the number of columns.
1. From either the Vector window or Vector Parameters dialog menu bar, select
one of the following:
• Edit → Add Attributes for vector layers with no pre-existing attributes.
• Edit → View/Edit/Query Attributes for vector layers with existing
attributes.
The Add Attributes Choice dialog appears.
2. Select Restore attributes from ASCII file.
3. Click OK. The Enter Input ASCII File dialog appears.
4. Select a file and click Open.
Note
If your ASCII file does not have the correct number of lines, an error
message appears stating that the number of lines is incorrect and the file will
not be opened.

The ASCII data appears in the Layer Attributes table. You can edit the
information in any of the fields.

Working with Vectors ENVI User’s Guide


Chapter 9: Vector Tools 1033

The Layer Attributes Table


In the Layer Attributes table you can view, edit, sort, and save vector attribute data.
The Layer Attributes table shows the attribute names at the top of each column and
the attribute record number at the left of each row.

Importing Vector Attributes to an Existing Layer Attributes


Table
You can import vector attributes from an ASCII file into an existing Layer Attributes
table.
The imported ASCII file must have either comma-separated fields or tab-separated
fields with either the same number of lines as the number of records in the ENVI
vector file, or the number of lines equal to the [number of records] +1. If the ASCII
file has [number of records] +1 rows, the first row is assumed to contain names for
each column of information. The names can contain up to 11 characters for each
column. If the number of rows in the ASCII file is the same as the number of records
in the ENVI vector file, the column names default to Field_1, Field_2, Field_n, where
n is the number of columns.
1. From the Layer Attributes table menu bar, select File → Import Attributes
From ASCII. The Enter Input ASCII File dialog appears.
2. Highlight the text file with the new attribute data and click Open.
3. ENVI automatically updates the new attribute values in the Layer Attributes
table. You can edit on the attributes, if desired.
4. From the Layer Attributes table menu bar, select File → Save Changes.

Selecting Attribute Data


1. Make the desired layer the active layer.
2. From either the Vector window or the Vector Parameters dialog menu bar,
select Edit → View/Edit/Query Attributes. The Layer Attributes table
appears.
3. Left-click on the vectors in either the Vector window or the display group.
ENVI highlights the associated attributes in the Layer Attributes table.

ENVI User’s Guide Working with Vectors


1034 Chapter 9: Vector Tools

Highlighting Vectors
To highlight the vector that corresponds to a selected attribute record, select the
attribute record number in the Layer Attributes table. You can highlight vectors that
correspond to multiple attribute records.
Depending on where the vectors are displayed, either the Vector window or the
display group centers on the corresponding vector and highlights it in the Current
Highlight color.

Highlighting Based on Layer Query


You can highlight items both in the Layer Attributes table and the corresponding
vectors in the Vector window or the display group based on a query for the current
vector layer.
1. Make the desired layer the active layer.
2. From the Layer Attributes table menu bar, select Options → Query Layer.
3. Click Start.
4. Follow the directions for the query expression given in “Creating New Vector
Layers from Attributes” on page 1030. ENVI highlights items in the Layer
Attributes table that satisfy the query and highlights the corresponding vectors.
You can save the results from the vector query to a new vector layer. See “Saving
Selected Records to a New Vector Layer” on page 1037.

Editing Single Attribute Values


To edit a single attribute value, double-click in the attribute field and enter the new
value.

Working with Vectors ENVI User’s Guide


Chapter 9: Vector Tools 1035

The following figure shows the vector Layer Attributes table.

Figure 9-4: Layer Attributes Table

Adding New Attribute Columns


To add new columns to the Layer Attributes table:
1. From the Layer Attributes table menu bar, select Options → Add Record
Columns. The Attribute Initialization dialog appears.
2. Enter the Name, Type, Width, and Decimal Count for the new attribute
information.
3. Click Add Field. ENVI adds the new column to the Layer Attributes table.

Deleting Attribute Columns


To delete an attribute column from the table:
1. In the Layer Attributes table, select the column name to delete.
2. From the Layer Attributes menu bar, select Options → Delete Record
Column. ENVI removes the column from the Layer Attributes table.

ENVI User’s Guide Working with Vectors


1036 Chapter 9: Vector Tools

Sorting Table Information


You can sort the Layer Attributes table using the values or strings in a column (in a
forward, reverse, or original order).
1. In the Layer Attributes table, select the column name to sort.
2. From the Layer Attributes table menu bar Options menu, select one of the
following:
• Sort by selected column forward: To sort the column in ascending
alphanumeric order.
• Sort by selected column reverse: To sort the column in descending
alphanumeric order.
• Sort by original order: To return to the original sort order.

Replacing Attributes with a Single Value


To replace cells in the same column with a single value:
1. In the Layer Attributes table, select one of the following:
• To replace the entire column, select the column name.
• To replace selected cells, click and drag with the cursor to highlight the
cells.
2. From the Layer Attributes table menu bar, select Options → Replace selected
cells with value. The Replace Table Cells with Value dialog appears.
3. Enter the string or numeric value.
4. Click OK.

Replacing Attributes with ASCII Data


You can replace cells in the same column with values from an ASCII file.
1. In the Layer Attributes table, select one of the following:
• To replace the entire column, select the column name.
• To replace selected cells, click and drag with the cursor to highlight the
cells.
2. From the Layer Attributes table menu bar, select Options → Replace selected
cells with ASCII values.
3. Select the input ASCII filename. The Input ASCII File dialog appears.

Working with Vectors ENVI User’s Guide


Chapter 9: Vector Tools 1037

4. Select the column number (strings can only have one column), and starting and
ending row numbers.
5. Click OK to enter the data into the Layer Attributes table.

Saving Selected Records to a New Vector Layer


1. In the Layer Attributes table, select File → Save Selected Records to new
Layer.
2. Enter a layer name and an output filename.
3. Click OK.

Saving Selected Records to an ASCII file


1. Select the record(s) to save.
2. In the Layer Attributes table, select File → Save Selected Records to ASCII.
3. Enter an output filename.
4. Click OK.

Saving Changes
To save changes made to the Layer Attributes table, select File → Save Changes
from the Layer Attributes table menu bar.
Note
This overwrites the existing attribute file.

Saving Layer Attributes Tables to ASCII Files


1. In the Layer Attributes table, select File → Save All Records to ASCII. The
Output Records to ASCII dialog appears.
2. Enter an output filename.
3. Click OK.

ENVI User’s Guide Working with Vectors


1038 Chapter 9: Vector Tools

Creating Vector Layers


Use Create New Vector Layer to create a new vector layer using the projection and
boundaries from a variety of sources. You can create a new, empty vector layer so you
can enter your own vector polygons, lines, or points and attributes. This vector layer
can have the same projection and geographic boundaries (size) as existing vector
layers, georeferenced raster images, or you can base it on user-defined input. You can
also create an empty vector layer from non-georeferenced raster images for drawing
vectors over those images. After you create a new vector layer, you can add vector
records the file. See “Adding New Vectors” on page 1019.
Tip
You can also create vector layers by selecting Options → Create Vector New
Layer in the Available Vectors List (see Creating New Layers in Getting Started
with ENVI).

Creating Layers from Existing Vector Layers


1. Select one of the following:
• From either the Available Vectors List or the ENVI main menu bar, select
Vector → Create New Layer → Using Existing Vector Layer.
• From either the Vector window or the Vector Parameters dialog, select
Vector → Create New Layer.
The New Vector Layer Parameters dialog appears.
If you have more than one layer in the Available Vectors List, the dialog
displays a list of sources. Select the source layer from the list.
2. Enter an output Layer Name.
3. Select output to File or Memory.
4. Click OK. ENVI adds the resulting output to the Available Vectors List.

Creating Layers from Raster Image Files


1. From either the Available Vectors List or the ENVI main menu bar, select
Vector → Create New Layer → Using Raster Image File. The Select Image
File dialog appears.
2. Select the input image file.

Creating Vector Layers ENVI User’s Guide


Chapter 9: Vector Tools 1039

3. Click OK. The New Vector Layer Parameters dialog appears.


4. Enter an output Layer Name.
5. Select output to File or Memory.
6. Click OK. The layer name appears in the Available Vector Layers list.

Creating Layers from User-Defined Parameters


1. From either the Available Vectors List or the ENVI main menu bar, select
Vector → Create New Layer → Using Existing Vector Layer. The New
Vector Layer Parameters dialog appears.
2. Select a projection type and enter a Zone number (see “Selecting Map
Projection Types” on page 990).
3. Enter the bounding box coordinates in the selected projection units in the
X/Ymin and X/Ymax fields.
4. Enter an output Layer Name.
5. Select output to File or Memory.
6. Click OK. The layer name appears in the Available Vector Layers list.

ENVI User’s Guide Creating Vector Layers


1040 Chapter 9: Vector Tools

Creating World Boundary Layers


Use Create World Boundaries to create layers of various world boundaries
(including political boundaries, coastlines, rivers, and USA states) from either the
high resolution or low resolution database that is installed with ENVI.
1. Select one of the following:
• From the ENVI main menu bar, select Vector → Create World
Boundaries.
• From the Available Vectors List menu bar, select Options → Create
World Boundaries.
The Create Boundaries dialog appears.
2. Select the check box next to the layers to include when creating boundaries.
• To select a range of layers, enter the starting and ending numbers and click
Add Range.
• To select all the layers, click Select All.
• To clear all the layers, click Clear.
3. Select one of the following options:
• To create world boundary layers for a specific area, enter the latitude and
longitude coordinates in the corresponding fields.
• To create world boundary layers for the entire world, do not enter latitude
and longitude coordinates.
4. Select output to File or Memory. If you intend to use the layers frequently, you
will find it more convenient to save them to disk. The EVF files generated from
the low-resolution database are quite small (less than 400 KB total), while the
EVF files generated from the high-resolution database are significantly larger
(approximately 45 MB).
5. Click OK. ENVI adds the resulting output to the Available Vectors List,
creating one output .evf file for every selected layer and appending a layer
abbreviation to the root filename. The high resolution layers are named with a
_hp, _hc, or _hr for the political boundaries, the coastlines, or the rivers,
respectively. ENVI names the low resolution layers similarly, but with an _lp,
and so forth. ENVI appends _usa to the USA States layer root name.

Creating World Boundary Layers ENVI User’s Guide


Chapter 9: Vector Tools 1041

Note
Building vector layers from the high resolution database creates very large
output files (~20 MB each).

If you need to create vector layers from a coastline database that was not installed in
the ENVI default installation, you can copy the database files from your installation
CD to your computer. The coastline database files are under the following directory
of your installation CD (Unix users must re-install the software):
...setup\x86\itt\IDLxx\resource\maps\

Where xx is the IDL version.


This directory contains two subdirectories called high and low, which contain the
files for the two coastline databases. Copy the entire directory and all of its files into
the corresponding directory under the ENVI/IDL installation on your system. For
example, on a Windows machine, the appropriate destination directory under a
typical installation of ENVI is:
C:\Program Files\ITT\IDLxx\resource\maps\

Then, follow the steps outlined above for building the vector layers in ENVI and you
should have access to the additional database. After you create the EVF files, you can
delete the extra database files to save disk space.

Creating Outline Maps from World Boundary Layers


A simple way to make outline maps from world boundary layers is to create a new,
empty, georeferenced image file, then overlay the vector layers and grid lines. You
need to know some basic information about your intended map projection so that you
can define the georeferencing information correctly (because the extent of the map
coverage will be defined by a combination of the image size and the pixel size).
Follow these general steps to create a map from world boundary layers:
1. Generate world boundary layers for your area of interest, as described in
“Creating World Boundary Layers” on page 1040.
2. Create an empty image. From the ENVI main menu bar, select File →
Generate Test Data. See “Generating Test Data” on page 210.
3. From the ENVI main menu bar, select File → Edit ENVI Header. The Edit
Header Input File dialog appears.
4. Select the empty image you generated in step 1 and click OK. The Header Info
dialog appears.

ENVI User’s Guide Creating World Boundary Layers


1042 Chapter 9: Vector Tools

5. Click the Edit Attributes drop-down button and select Map Info. The Edit
Map Information dialog appears.
6. Fill in the fields according to your selected map projection and area of interest.
See “Entering Map Information for Georeferenced Files” on page 199 for
details.
7. Once you have defined the map information, click the name of your empty
image in the Available Bands List, and select Load Band.
8. From the Display group menu bar, select Overlay → Vectors. The Vector
parameters dialog appears.
9. From the Vector Parameters dialog menu bar, select Options → Import
Layers. The Import Vector Layers dialog appears.
10. Select the world boundary layer from the list and click OK.
11. From the Display group menu bar, select Overlay → Grid Lines. See “Adding
Grid Lines” on page 63 for details.
12. From the Display group menu bar, select Overlay → Annotation, and overlay
any further annotation. See “Annotating Images and Plots” on page 31 for
details.

Creating World Boundary Layers ENVI User’s Guide


Chapter 9: Vector Tools 1043

Extracting Linear Features with Intelligent


Digitizer
Use Intelligent Digitizer to extract linear features such as roads and rivers as vector
data. You select features using intelligent mode, where you place seed points along
the path of a feature and ENVI automatically finds the intermediate points. The
Intelligent Digitizer is particularly useful for images that have low spectral content,
but high spatial resolution, such as high-resolution imagery from QuickBird,
IKONOS, and OrbView-3.
ENVI supports polyline vectors for use on features such as roads, and supports
polygon vectors for use on features such as lake boundaries. You can extract features
using a single band, or you can extract them using multiple bands. Using Intelligent
Digitizer on properly-selected multiple bands increases the accuracy of your results.
Intelligent Digitizer is a semi-automated tool, where you manually select seed points
along the path of a linear feature and ENVI automatically finds the nodes in between.
You can undo and redo seed points as you define them, and snap features with one
another when they are within a certain proximity. You can also toggle between
intelligent mode and ENVI’s standard vector tool mode when needed, such as when
contrast is low or there are big disturbances in the features, to ensure that feature
selection is accurate.
With automatic post-processing operations, you can establish intersections between
crossing segments of features so they share a vector node, and you can correct
polylines that overshoot their intersection with other polylines. With manual post-
processing operations, you can snap polylines to one another, extend existing
polylines in intelligent mode, and calculate the length attribute for features.
Because Intelligent Digitizer is integrated with ENVI’s vector tool, standard vector
functions are available to manually edit extracted features, to add and edit feature
attributes, and to export layers to shapefiles.

Selecting Bands for Intelligent Digitizer


To start Intelligent Digitizer, you select a single band or multiple bands from your
image. If your image has only three bands and you want to use multiple bands for
linear extraction, ENVI automatically selects all three bands as your input bands.

ENVI User’s Guide Extracting Linear Features with Intelligent Digitizer


1044 Chapter 9: Vector Tools

Selecting a Single Band


1. From the ENVI main menu bar, select Vector → Intelligent Digitizer. The
Intelligent Digitizer Input File dialog appears.
2. Click the Select By toggle button to select Band.
3. Select the input band.
4. Click OK. The image band opens in a display group and the Vector Parameters
dialog appears with a layer named Intelligent Digitizer: New Layer in the
Available Vector Layers list.
5. Extract features using the steps in “Using Intelligent Digitizer” on page 1045.
You can also select a single band by following the steps in the next section and select
only a single band instead of multiple bands.

Selecting Multiple Bands


Selecting multiple bands differs depending on whether you access Intelligent
Digitizer from the display group or from the ENVI main menu bar.
If you are starting Intelligent Digitizer from the ENVI main menu bar:
1. Select Vector → Intelligent Digitizer. The Intelligent Digitizer Input File
dialog appears.
2. Select the input file.
3. Click OK. If the image has three or fewer bands, the image opens in color in a
display group and the Vector Parameters dialog appears with a layer named
Intelligent Digitizer: New Layer in the Available Vector Layers list. Proceed
to the steps in “Using Intelligent Digitizer” on page 1045.
4. If the image has more than three bands, the File Spectral Subset dialog appears
with pre-selected bands. ENVI pre-selects bands as follows:
• If the image has four bands, ENVI selects bands 3 and 4, typically the red
and near-infrared bands.
• If the image has more than four bands and also has wavelength
information, ENVI selects a color-infrared combination of bands.
• If the image has more than four bands but does not have wavelength
information, ENVI selects the bands as [nb/3, nb/2, nb*2/3] for red, green,
and blue, where nb is number of bands.

Extracting Linear Features with Intelligent Digitizer ENVI User’s Guide


Chapter 9: Vector Tools 1045

5. Select the band, or bands, to use for linear extraction, or keep the default band
selection. If you want to use multiple bands, it is recommended that you select
six or fewer bands. Using more than six bands slows system performance.
6. Click OK. The image opens in color in a display group and the Vector
Parameters dialog appears with a layer named Intelligent Digitizer: New Layer
in the Available Vector Layers list.
7. Extract features using the steps in “Using Intelligent Digitizer” on page 1045.
If you are starting Intelligent Digitizer from the display group:
1. From the Display group menu bar, select Overlay → Vectors. The Vector
Parameters dialog appears.
2. Select File → Create New Layer. The New Vector Layer Parameters dialog
appears.
3. Enter a Layer Name.
4. Select output to File or Memory.
5. Click OK. The Vector Parameters dialog appears.
6. Select Mode → Add New Vectors, then select Mode → Intelligent Digitizer
Parameters. The Intelligent Digitizer Parameters dialog appears.
7. Click Select Intelligent Digitizer Input Bands. The File Spectral Subset
dialog appears, with the currently displayed band or bands selected by default.
8. Select the band, or bands, to use for linear extraction, or keep the default band
selection. If you want to use multiple bands, it is recommended that you select
six or fewer bands. Using more than six bands slows system performance.
9. Click OK.
10. Extract features using the steps in “Using Intelligent Digitizer”.

Using Intelligent Digitizer


When extracting features, it is best to create separate layers for different feature
types. For example, create one layer for roads, another layer for creeks, and so forth.
The Intelligent Digitizer parameter defaults are set to provide results appropriate for
road centerline extraction; however, you may want to adjust the parameters before
extracting different feature types. See “Setting Intelligent Digitizer Parameters” on
page 1053 for details.

ENVI User’s Guide Extracting Linear Features with Intelligent Digitizer


1046 Chapter 9: Vector Tools

1. To use intelligent mode, ensure the following are enabled in the Vector
Parameters menu bar. (If you accessed Intelligent Digitizer using Vector →
Intelligent Digitizer, these options are already set.)
• Mode → Add New Vectors
• Mode → Polygon or Polyline
• Mode → Multi Part: Off
• Mode → Intelligent Digitizer

Figure 9-5: Vector Parameters Dialog – Intelligent Digitizer Enabled

2. In the Window field, select which display group window to use for extracting
features. The choices are Image, Scroll, or Zoom. To disable feature
extraction in all windows, select Off.
3. Left-click to specify the first seed point of the feature to extract, and continue
to add seed points by left-clicking at intervals along the feature. ENVI
automatically connects the seed points as you go. See “Intelligent Digitizer
Mouse Button Functions” on page 1048 for information about feature
extraction mouse button behavior. Some general guidelines for extracting
features are as follows:

Extracting Linear Features with Intelligent Digitizer ENVI User’s Guide


Chapter 9: Vector Tools 1047

• For road centerline extraction, select seed points near the road centerline.
• For features that contain sharp curves, select seed points at the sharp curve.
• If the spectrum of the feature surface changes abruptly, select a seed point
a few pixels beyond the surface change.
• For polygon extraction, define the last seed point of the polygon on or near
the first seed point. If the first and last seed points are too far apart when
you accept the polygon, ENVI connects the nodes with a straight line,
rather than following the shape of the feature.
• If a seed point does not extract the feature as desired, middle-click to
delete the seed point and select a new one. Clicking on a location closer to
the previous seed point will likely give a better result.
• To extract polyline features that will eventually intersect with features you
have not yet extracted, extend the start or end node beyond where the
features will intersect. You can correct overshooting polylines afterward
using automatic post-processing.
• In areas that do not provide sufficient contrast between the feature and its
background, press and hold the Shift key to toggle to standard vector
mode, then left-click to define the feature through the area of low contrast.
When back to an area of higher contrast, release the Shift key to resume
using intelligent mode.
4. When there are enough seed points to extract the feature, right-click to set the
polygon or polyline placement. A diamond-shaped handle appears near the
polygon or polyline. If needed, you can left-click on the diamond and drag it to
change vector placement.
5. Right-click again and select one of the following:
• Accept New Polyline/Polygon: Accepts the placement of the polyline or
polygon.
• Remove New Polyline/Polygon: Deletes the polyline or polygon.
• Snap Start Node to the Nearest Polyline: Accepts the placement of the
polyline and connects its start node with an existing nearby polyline.
• Snap End Node to the Nearest Polyline: Accepts the placement of the
polyline and connects its end node with an existing nearby polyline.
• Snap Both Ends to the Nearest Polylines: Accepts the placement of the
polyline and connects both its start and end nodes with existing nearby
polylines.

ENVI User’s Guide Extracting Linear Features with Intelligent Digitizer


1048 Chapter 9: Vector Tools

Note
For snapping options, the polylines to snap must be within the Snap
Tolerance (Pixels) parameter in the Intelligent Digitizer Parameters dialog
(see “Setting Intelligent Digitizer Parameters” on page 1053).

6. Perform automatic and/or manual post-processing operations after the feature


extracting is complete. See “Automatically Editing Extracted Features” on
page 1049 and “Manually Editing Extracted Features” on page 1049.

Intelligent Digitizer Mouse Button Functions


Cursor functions for extracting features change depending on whether or not you are
in intelligent mode. You can press the Shift key to toggle between intelligent mode
and standard vector mode. The mouse button functions are as follows:

Mouse
Function
Button

Left Intelligent mode:


• Click to add seed points.
Standard vector mode:
• Click to define vertices.
Either mode:
• After right-clicking to set the last seed point or vertex, click
and drag to move the polyline or polygon.
Middle Either mode:
• Click to remove the last seed point or vertex.
• After right-clicking to set the last seed point or vertex, click to
delete the polygon or polyline.
Right Either mode:
• Click to end the polyline or polygon.
• After right-clicking to set the last seed point or vertex, click to
display menu options to accept the polyline or polygon, snap
polyline ends, and so forth.

Table 9-2: Mouse Button Functions – Intelligent Digitizer

Extracting Linear Features with Intelligent Digitizer ENVI User’s Guide


Chapter 9: Vector Tools 1049

Automatically Editing Extracted Features


After you extract features, you can apply ENVI’s automatic post-processing cleanup
tool to create intersections between polylines that cross one another and to correct
overshooting (dangling) polylines.
1. Select one of the following:
• Make the layer to edit the active layer, then from the Vector Parameters
menu bar, select Options → Linear Feature Cleanup.
• Make the layer to edit the active layer, right-click in the display group, and
select Linear Feature Cleanup.
• Right-click on the layer to edit in the Vector Parameters dialog, and select
Linear Feature Cleanup.
The Linear Feature Cleanup Parameters dialog appears.
2. The Dangle Length Tolerance (Pixels) default value is 20.00. ENVI removes
any dangling polylines shorter than this value during automatic feature
cleanup. Change the value if needed.
3. Click OK. ENVI removes any dangling polylines and creates intersections
between crossing polylines. When complete, ENVI overlays the modified
layer on the original layer (using a different Current Layer color). In the
Vector Parameters dialog, ENVI adds the new layer, named
original_layername_clean, to the Available Vector Layers list.
If desired, you can close the original layer. To rename the new layer, or any layer, see
“Renaming Intelligent Digitizer Layers” on page 1052 for details.

Manually Editing Extracted Features


Use ENVI’s standard vector tools to perform manual vector editing. With manual
post-processing, you can extend polylines; snap to polylines; split or join polylines;
and add, edit, or remove vectors and nodes.
1. Make the layer to edit the active layer.
2. Select one of the following:
• From the Vector Parameters dialog menu bar, select Mode → Edit
Existing Vectors.
• Right-click in the display group and select Select Mode → Edit Existing
Vectors.

ENVI User’s Guide Extracting Linear Features with Intelligent Digitizer


1050 Chapter 9: Vector Tools

3. Select the vector to edit. The vector nodes appear.


4. Edit as needed. For example:
• To extend polylines, right-click on an end node and select Extend
Selected Vector. ENVI automatically switches to Add New Vectors
mode. To extend the vector in intelligent mode, right-click and verify
Intelligent Digitizer is enabled (otherwise, leave it disabled to extend
using standard vector mode). Select seed points along the feature to extend
the existing polyline. Right-click and select Accept New Polyline.
• To snap polylines to nearby polylines, either right-click on the end node to
snap and select Snap End Node to the Nearest Polyline, or right click on
the vector and select Snap Both Ends to the Nearest Polylines to snap
both ends to nearby polylines. The polylines must be within the Snap
Tolerance (Pixels) parameter in the Intelligent Digitizer Parameters dialog
(see “Setting Intelligent Digitizer Parameters” on page 1053).
• To split polylines, right-click on a node and select Mark Node. ENVI
highlights the node. Right-click again and select Split Vector. ENVI adds
a new node on top of the marked node. Click and drag the node to separate
it from the original node you marked. Right-click again and select Accept
Changes.
• To join polylines, select a second vector to join with the first selected
vector. Right-click and select Join Vectors. ENVI joins the vectors with a
straight line. Right-click again and select Accept Changes.
• To add, edit, or delete nodes or vectors, use ENVI’s standard vector tools,
as described in “Working with Vectors” on page 1013.

Calculating the Extracted Feature Length


You can calculate the length of extracted features and include the results as the
attribute evf_length in the Layer Attributes table. The default units for the
evf_length attribute are meters. To set the parameters ENVI uses to calculate the
length attribute, see “Setting Length Attribute Parameters” on page 1054. For more
information on the Layer Attributes table, see “The Layer Attributes Table” on
page 1033.
1. Select one of the following:
• Right-click in the display group and select Calculate Length Attribute.
• Right-click on the layer name in the Vector Parameters dialog and select
Calculate Length Attribute.

Extracting Linear Features with Intelligent Digitizer ENVI User’s Guide


Chapter 9: Vector Tools 1051

• Make the layer to calculate active, then from the Vector Parameters menu
bar, select Options → Calculate Length Attribute.
2. If the input band does not have map information, the Input Display Pixel dialog
appears. Enter a pixel size and units, which ENVI uses to calculate the length.
3. ENVI calculates the EVF length of the features, then displays the results in the
evf_length field of the Layer Attributes table.

Selecting Different Bands


To perform feature extraction on a different band or bands than what are shown in the
display group:
1. Select one of the following:
• From the Vector Parameters dialog menu bar, select Mode → Intelligent
Digitizer Parameters.
• Right-click on the display group and select Intelligent Digitizer
Parameters.
The Intelligent Digitizer Parameters dialog appears.
2. Click Select Intelligent Digitizer Input Bands. The File Spectral Subset
dialog appears.
3. Select the band, or bands, to use for linear extraction. If you want to use
multiple bands, it is recommended that you select six or fewer bands. Using
more than six bands slows system performance.
4. Click OK. ENVI uses the bands you specify for the feature extraction.
Changing the bands to use from the File Spectral Subset dialog does not
change the bands that appear in the display group.

Saving Intelligent Digitizer Layers


As you work on vector layers for Intelligent Digitizer, you can save them to memory
or to a file.
To save layer changes to memory, make the layer to save the active layer, then select
one of the following:
• From the Vector Parameters dialog menu bar, select Edit → Save Changes
Made to Layer.
• Right-click in the display group and select Save Changes Made to Layer.

ENVI User’s Guide Extracting Linear Features with Intelligent Digitizer


1052 Chapter 9: Vector Tools

To save a memory layer to a file:


1. From the ENVI main menu bar, select Vector → Available Vectors List. The
Available Vectors List appears.
2. Select the layer to save.
3. From the Available Vectors List menu bar, select File → Save Memory
Layers to File. The Save Memory Layer to File dialog appears.
4. Enter an output filename.
5. Click OK.

Exporting Intelligent Digitizer Layers to Shapefiles


1. In the Vector Parameters dialog, select the layer to export from the Available
Vector Layers list.
2. From the Vector Parameters dialog menu bar, select File → Export Active
Layer to Shapefile. The Output Polylines to Shapefile or the Output Polygons
to Shapefile dialog appears, depending on whether the layer includes polylines
or polygons.
3. Enter an output filename.
4. Click OK.

Renaming Intelligent Digitizer Layers


Use the following procedure to rename a vector layer, for example, to rename the
Intelligent Digitizer: New Layer that ENVI creates when you start the Intelligent
Digitizer.
1. Save any changes made to the layer and close the Vector Parameters dialog that
lists the layer to rename.
2. From the ENVI main menu bar, select Vector → Available Vectors List. The
Available Vectors List displays, with all open vector layers listed.
3. From the Available Vectors List menu bar, select Options → Edit Layer
Names. The Edit Layer Names dialog appears.
4. Select the layer name to edit.
5. Edit the layer name in the Edit Selected Item field.
6. Click OK. The Available Vectors List appears with the new layer name in the
Available Vector Layers list.

Extracting Linear Features with Intelligent Digitizer ENVI User’s Guide


Chapter 9: Vector Tools 1053

7. From the Available Vector Layers list, select the layers to overlay on the
display group image.
8. Click Load Selected. The Load Vectors dialog displays.
9. Select the display number to load the vectors into from the Select Vector list.
10. Click OK. ENVI overlays the vectors on the display group image and the
Vector Parameters dialog appears.

Setting Intelligent Digitizer Parameters


Depending on the features to extract, you may want to adjust the Intelligent Digitizer
parameter default settings. Typically, the defaults are ideal for road centerline
extraction; however, if you plan to extract features with pronounced curves (such as
creeks), you can improve the quality of the results by adjusting the parameters.
1. Select one of the following:
• From the Vector Parameters dialog menu bar, select Mode → Intelligent
Digitizer Parameters.
• Right-click on the display group and select Intelligent Digitizer
Parameters.
The Intelligent Digitizer Parameters dialog appears.

Figure 9-6: Intelligent Digitizer Parameters Dialog

2. The Linear Feature Width (Pixels) default is the average road width at the
current image resolution, in pixels (assuming a road width of 15 meters).
Though this setting is suitable for road extraction, you can change it for

ENVI User’s Guide Extracting Linear Features with Intelligent Digitizer


1054 Chapter 9: Vector Tools

features with widths that differ from the average road width. If needed, use the
Cursor Location/Value tool to help estimate the width. The lowest allowable
value is 0.0.
3. The Snap Tolerance (Pixels) specifies distance, in pixels, to allow between
two polylines for ENVI to join them when you use snapping operations.
Change the default as needed. The default is 30.00, which indicates that ENVI
will join polylines 30.00 or fewer pixels apart. The lowest allowable value is
0.0, which disables snapping.
4. The Smoothing default specifies how much smoothing ENVI applies during
feature extraction. High is the default setting, which is good for features that
are not highly curved. If you have highly curved features to extract, use a
setting of Low or Off to reduce the amount of curve smoothing.
5. To perform feature extraction on a different band, or bands, than what is in the
display group, see “Selecting Different Bands” on page 1051.
6. When all parameters are set, click OK.

Setting Length Attribute Parameters


Use Length Attribute Parameters to set the parameters ENVI uses to automatically
calculate the length of each extracted feature.
1. Select one of the following:
• From the Vector Parameters dialog menu bar, select Options → Length
Attribute Parameters.
• Right-click on the display group and select Length Attribute
Parameters.
The Length Attribute Parameters dialog appears.

Extracting Linear Features with Intelligent Digitizer ENVI User’s Guide


Chapter 9: Vector Tools 1055

Figure 9-7: Length Attribute Parameters Dialog

2. Select the measurement units from the Length Units drop-down list. The
default is Meters. Other options include Km, Feet, Yards, Miles, and Nautical
Miles. If needed, you can add additional unit options to the useradd.txt file
in the ENVI menu directory.
3. Enter the Attribute Field Width to define the width of the evf_length
attribute in the output file.
4. Enter the Decimal Count to specify the number of digits to allow to the right
of the decimal in the evf_length attribute in the output file.

ENVI User’s Guide Extracting Linear Features with Intelligent Digitizer


1056 Chapter 9: Vector Tools

Converting Raster Images


Use Raster to Vector to create a vector layer for a specified DN contour value in a
raster image.
1. From the ENVI main menu bar, select Vector → Raster to Vector. The Raster
to Vector Input Band dialog appears.
2. Select an input file and perform optional Spatial Subsetting, then click OK.
The Raster to Vector Parameters dialog appears.
3. Enter the DN Value to use as a contour value.
4. Enter an ENVI vector file layer name in the EVF Layer Name field.
5. Select output to File or Memory.
6. Click OK. ENVI makes a polygon vector layer using the entered DN contour
value, and a vector attribute file (.dbf) containing the class ID, polygon
length, and area information for the resulting ENVI vector file. The resulting
output is added to the Available Vectors List.
Note
The vectors appear to be shifted one half pixel to the Southeast because ENVI
interprets the map coordinate of the vector node to be the upper left hand corner of
the raster pixel (versus treating the address as the center of the pixel).

Converting Raster Images ENVI User’s Guide


Chapter 9: Vector Tools 1057

Converting Classification Images


Use Classification to Vector to convert classification results to ENVI polygon vector
layers (.evf files). The classification images will have a vector layer for each
selected class.
1. From the ENVI main menu bar, select Vector → Classification to Vector. The
Raster to Vector Input Band dialog appears.
2. Select an input file and perform optional Spatial Subsetting, then click OK.
The Raster to Vector Parameters dialog appears.
3. Select the class names to convert to vector polygons by selecting the class
names.
4. Select whether to output all selected classes as a single vector layer or as
separate layers for each class by clicking the Output toggle button.
5. Select output to File or Memory.
6. Click OK. If a separate layer for each class is output, ENVI saves each
selected class to a separate vector file, appending a _1, _2, and so on to the
root name.
Note
The vectors appear to be shifted one half pixel to the Southeast because ENVI
interprets the map coordinate of the vector node to be the upper left hand corner of
the raster pixel (versus treating the address as the center of the pixel).

ENVI User’s Guide Converting Classification Images


1058 Chapter 9: Vector Tools

Rasterizing Point Data


Use Rasterize Point Data to interpolate irregularly gridded data into a raster image.
ENVI’s gridding function uses Delaunay triangulation of a planar set of points. After
the irregularly gridded data points are triangulated, they are interpolated to a regular
grid. You can use linear or smooth quintic polynomial interpolation. You can also
select extrapolation for grid points outside of the triangulation area. ENVI reads the
grid points from an ASCII file, and supports different input and output projections.
1. From the ENVI main menu bar, select one of the following:
• Vector → Rasterize Point Data
• Topographic → Rasterize Point Data
The Enter ASCII Grid Points Filename dialog appears.
2. Select the input ASCII file. The Input Irregular Grid Points dialog appears.
3. Enter the column numbers that contain the x and y positions and z data values.
4. Select the input projection type from the list and enter a Zone number.
To enter a custom projection type, click New and enter the customized map
projection information (see “Building Customized Map Projections” on
page 992).
5. Click OK. The Gridding Output Parameters dialog appears.
6. To change the projection of the upper-left coordinate only, click Change Proj.
For information about selecting projections, see “Selecting Map Projection
Types” on page 990.
7. If your output projection is geographic, define the output pixel and image sizes
in degree units.
8. To create a custom projection type, click Change Proj then click New and
enter the customized map projection information (see “Building Customized
Map Projections” on page 992).
9. Use the X/Y Pixel Size and the Output X/Y Size fields to map coordinate or
latitude/longitude information for the upper-left coordinate, pixel size, and
output image size.
10. Use the choices in the Options drop-down button to manage the output
projection and map extent settings.

Rasterizing Point Data ENVI User’s Guide


Chapter 9: Vector Tools 1059

11. Select the type of interpolation by clicking the Interpolation toggle button.
The choices are: Linear (quintic polynomial) or Quintic (smooth quintic
polynomial).
12. Select whether or not to extrapolate edges by clicking the Extrapolate Edges
toggle button.
If you select Yes, ENVI uses quintic extrapolation.
13. Select the Output Data Type from the drop-down list.
14. Select output to File or Memory.
15. Click OK. ENVI adds the resulting output to the Available Bands List.

Importing ASCII DEMs


A DEM may consist of a simple ASCII file with four columns of data: the point ID
number, x location, y location, and z (elevation) value. Selecting File → Open
External File → Generic Format → ASCII from the ENVI main menu bar does not
allow you to import points in this format because it is an ASCII raster reader and is
not intended to read ASCII point data. Instead, use the Rasterize Point Data utility to
read ASCII DEM data.

Sample Format
Following is a sample ASCII file of DEM data:
1, -107.7840409, 44.28326903, 366.2
2, -107.7764449, 44.28345405, 225.2
3, -107.7688487, 44.28363857, 309.2
4, -107.7612525, 44.28382258, 608.7
5, -107.7536563, 44.28400609, 600.2

This file has five DEM locations and elevation values, identified by the ID number in
the first column. The second column contains longitudes, the third column contains
latitudes, and the fourth column contains elevations (in meters). You can delimit the
data values by space, comma, or tab. The file can also contain optional header
information, as long as the header is commented out with a semicolon.
Follow the rasterize point data steps in the previous section to open your ASCII
DEM. Set the X/Y Position Column fields to the appropriate longitude and latitude
columns, respectively. Set the Z Data Value Column to the appropriate elevation
column. When you click OK in the Gridding Output Parameters dialog, ENVI adds
the DEM data to the Available Bands List.

ENVI User’s Guide Rasterizing Point Data


1060 Chapter 9: Vector Tools

Converting ROIs to DXF Files


1. From the ENVI main menu bar, select Vector → Convert ROI to DXF. The
Enter Input ROI Filenames dialog appears.
2. Select an input ROI file and click Open. The Convert Region of Interest Files
to DXF Files dialog appears. The filename appears in the Selected Input Files
list.
3. Select from the following options:
• To add additional ROI files to the list of selected files, click Input
Additional File and select the annotation file.
• To remove a file from the list, select the filename and click Delete.
• The default output is Pixel Coordinates. If you want to output to map
coordinates, select Map Coordinates by clicking on the Output to toggle
button.
4. Enter an output filename.
5. Click OK. If you selected output to Map Coordinates, the Select File
Containing Map Coordinates dialog appears.
6. Select a file that contains the output map coordinates.
7. Click OK.

Converting ROIs to DXF Files ENVI User’s Guide


Chapter 9: Vector Tools 1061

Converting Annotation Files to DXF Files


ENVI can convert rectangle, ellipse, polygon, and polyline annotations. It ignores all
other annotation items.
1. From the ENVI main menu bar, select Vector → Convert ANN to DXF.
ENVI converts only rectangles, ellipses, polygons, and polylines. All other
annotation items are ignored. The Enter Input ANN Filenames dialog appears.
2. Select a filename and click Open. The Convert Annotation Files to DXF Files
dialog appears. The filename appears in the Selected Input Files list.
3. Select from the following options:
• To add additional annotation files to the list of selected files, click Input
Additional File and select the annotation file.
• To remove a file from the list, select the filename and click Delete.
• The default output is Pixel Coordinates. If you want to output to map
coordinates, select Map Coordinates by clicking on the Output to toggle
button.
4. Enter an output filename.
5. Click OK. If you selected output to Map Coordinates, the Select File
Containing Map Coordinates dialog appears.
6. Select a file that contains the output map coordinates.
7. Click OK.

ENVI User’s Guide Converting Annotation Files to DXF Files


1062 Chapter 9: Vector Tools

Converting EVFs to DXF Files


1. From the ENVI main menu bar, select Vector → Convert EVF to DXF. The
Enter Input EVF Filenames dialog appears.
2. Select a filename and click Open. The Convert ENVI Vector Files to DXF
Files dialog appears. The filename appears in the Selected Input Files list.
3. Select from the following options:
• To add additional files to the list of selected files, click Input Additional
File and select the EVF file.
• To remove a file from the list, select the filename and click Delete.
4. Enter an output filename.
5. Click OK.

Converting EVFs to DXF Files ENVI User’s Guide


Chapter 10
Topographic Tools

The chapter covers the following topics:

The Topographic Menu . . . . . . . . . . . . . . 1064 Creating Hill Shade Images . . . . . . . . . . 1074


Opening Topographic Files . . . . . . . . . . . 1065 Replacing Bad Values . . . . . . . . . . . . . . . 1077
Using Topographic Modeling . . . . . . . . . 1066 Rasterizing Point Data . . . . . . . . . . . . . . 1078
Extracting Topographic Features . . . . . . . 1070 Converting Vector Topo Maps into Raster
Extracting Digital Elevation Model Data 1073 DEMs . . . . . . . . . . . . . . . . . . . . . . . . . . . 1079
Using 3D SurfaceView . . . . . . . . . . . . . . 1081

ENVI User’s Guide 1063


1064 Chapter 10: Topographic Tools

The Topographic Menu


Use the Topographic menu to open, analyze, and output results from your
topographic digital elevation data. Topographic Modeling tools help you to
calculate a shaded relief image, slope, aspect, and various curvature values from your
topographic data. Topographic Features tools generate a classification image
showing channels, ridges, peaks, pits, passes, and planes. Use Create Hill Shade
Image to create a Hill Shade image that combines a color image with a shaded relief
image. Use other topographic tools to replace bad values in your digital elevation data
or to rasterize point data, and use the 3D SurfaceView to fly-through your
topographic data with vectors or a color image draped over it.

The Topographic Menu ENVI User’s Guide


Chapter 10: Topographic Tools 1065

Opening Topographic Files


Use Open Topographic File to read United States Geological Survey Digital
Elevation Model (USGS DEM) data, Digital Terrain Elevation Data (DTED), Spatial
Data Transfer Standard (SDTS DEM), and Shuttle Radar Topography Mission
(SRTM DEM) formats directly into ENVI. ENVI retains elevations at full precision
in the converted files. For details about opening topographic files, see “Opening
Digital Elevation Files” on page 181.
To georeference DEMs, use ENVI’s registration function to warp the DEM to a
specified projection using the corner coordinates and given pixel size (see “Image-to-
Map Ground Control Points” on page 887).

ENVI User’s Guide Opening Topographic Files


1066 Chapter 10: Topographic Tools

Using Topographic Modeling


Use Topographic Modeling on USGS DEM data and other digital elevation data to
generate lambertian (shaded relief) surfaces, and to extract parametric information,
including slope, aspect, and various convexities and curvatures. All of the parameters
are calculated by fitting a quadratic surface to the digital elevation data for the entered
kernel size and taking the appropriate derivatives. You can change the kernel size so
that you can extract multi-scale topographic information.
The slope is measured in degrees with the convention of 0 degrees for a horizontal
plane. ENVI measures the aspect angle with the convention of 0 degrees to the north
(up) and angles increasing clockwise.
For the convexity and curvature measures, convex surfaces are given positive values
and concave surfaces are given negative values. The profile convexity (intersecting
with the plane of the z axis and aspect direction) measures the rate of change of the
slope along the profile. The plan convexity (intersecting with the x,y plane) measures
the rate of change of the aspect along the plan. These two surface curvature measures
are in orthogonal directions with the profile convexity in the direction of maximum
gravity effects and the plan convexity in the direction of minimum gravity effects.
The longitudinal curvature (intersecting with the plane of the slope normal and aspect
direction) and cross-sectional curvature (intersecting with the plane of the slope
normal and perpendicular aspect direction) are also measures of the surface curvature
orthogonally in the down slope and across slope directions, respectfully. The
minimum and maximum overall surface curvatures can also be calculated.
ENVI also generates a root mean square (RMS) error image, which indicates how
well the quadratic surface fits the actual digital elevation data.
Reference:
Wood, Joseph The Geomorphological Characterization of Digital Elevation Models,
Ph. D. Thesis, University of Leicester, Department of Geography, Leicester, UK,
1996.
Tip
The Topographic Modeling Tools operate on image-format data, not on raw USGS-
format DEM data. If your topographic data is in profile format, convert the data to
image format (see “Opening USGS Files” on page 183 or “Reading Known Tape
Formats” on page 236).

1. From the ENVI main menu bar, select Topographic → Topographic


Modeling. The Topo Model Input DEM dialog appears.

Using Topographic Modeling ENVI User’s Guide


Chapter 10: Topographic Tools 1067

2. Select an input band and perform optional Spatial Subsetting, then click OK.
The Topo Model Parameters dialog appears
3. Enter the kernel size.
Tip
Use various kernel sizes to extract multi-scale topographic information.
Larger kernel sizes run slower.

Figure 10-1: Topo Model Parameters Dialog (left) and Compute Sun Elevation
and Azimuth Dialog (right)

ENVI User’s Guide Using Topographic Modeling


1068 Chapter 10: Topographic Tools

4. In the Select Topographic Measures to Compute list, select the topographic


measures to compute by. ENVI creates band output for each topographic
measure.
5. If you select Shaded Relief, enter or compute the sun elevation and azimuth as
described in “Computing Sun Elevation Values” in the next section.
6. If the pixel size is not set in the header, enter the X and Y pixel sizes in meters.
7. Select output to File or Memory.
8. Click OK. ENVI adds the resulting output to the Available Bands List. Figure
10-2 shows examples of Topographic Modeling output.

Figure 10-2: Example of Topo Modeling for a Simulated Pyramid DEM with an
Aspect of 135 Degrees and Elevation of 45 Degrees

Using Topographic Modeling ENVI User’s Guide


Chapter 10: Topographic Tools 1069

Computing Sun Elevation Values


1. In either the Topo Model Parameters dialog or the Hill shade Image Parameters
dialog, click Compute Elevation and Azimuth. The Compute Sun Angle
dialog appears.
2. Select the month and day from the drop-down lists, and enter the year and time
of day (GMT) in the corresponding field.
3. Enter the latitude and longitude coordinates in the Lat and Lon fields.
4. Click OK.

ENVI User’s Guide Using Topographic Modeling


1070 Chapter 10: Topographic Tools

Extracting Topographic Features


Use Topographic Features to produce a classification output image that classifies
each pixel into one of the following terrain types or morphometric features: peak,
ridge, pass, plane, channel, or pit.
The morphometric features are determined by fitting a quadratic surface to the digital
elevation data for the entered kernel size and calculating the slope and curvatures of
the surface (see “Using Topographic Modeling” on page 1066). You can change the
kernel size so that you can extract multi-scale topographic information.
The slope and curvature of the surface determines the morphometric feature. For
example, a sloping surface that is concave in the cross-sectional direction is a
channel. A sloping surface that is convex in the cross-sectional direction is a ridge.
Peaks have a convex cross-section and convex longitudinal curvature while pits have
concave curvatures. Passes have one convex curvature and one concave curvature.

Figure 10-3: Example of Topographic Features Image Result

Extracting Topographic Features ENVI User’s Guide


Chapter 10: Topographic Tools 1071

References:
Wood, Joseph The Geomorphological Characterization of Digital Elevation Models,
Ph. D. Thesis, University of Leicester, Department of Geography, Leicester, UK,
1996.
If your DEM is noisy, striped, or stepped, you should smooth it before using this
function.
Tip
See the ENVI Tutorials on the ITT Visual Information Solutions website (or on the
ENVI Resource DVD that shipped with your ENVI installation) for step-by-step
examples.

1. From the ENVI main menu bar, select Topographic → Topographic


Features. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, then click OK.
The Topographic Features Parameters dialog appears.
3. Enter the Slope Tolerance and Curvature Tolerance values. ENVI uses the
slope (in degrees) and curvature tolerance values to determine when a pixel is
classified as a peak, pit, or pass versus a channel or ridge. For a pixel to be
classified as a peak, pit, or pass, the slope value must be less than the slope
tolerance and the cross-sectional curvature must be greater than the curvature
tolerance. Increasing the slope tolerance and decreasing the curvature
tolerance increases the number of peaks, pits, and passes in the classified
output.
4. Enter the Topographic Kernel Size. Use various kernel sizes to extract multi-
scale topographic information. Larger kernel sizes run slower.
If a pixel size was not found in the ENVI header for the DEM file, enter the X
and Y pixel size (in meters) in the corresponding fields.
5. In the Select Features to Classify list, select the features to include in the
output classification image.
If a feature type is not selected, those pixels will be unclassified.
6. Select output to File or Memory.
7. Click OK. ENVI adds the resulting output to the Available Bands list. When
you display the image, green represents plane, blue represents channel, orange
represents ridge, red represents pass, yellow represents peak, and magenta
represents pit. Figure 10-3 shows an example of a topographic features result.

ENVI User’s Guide Extracting Topographic Features


1072 Chapter 10: Topographic Tools

Tip
You can change the class colors by selecting Tools → Color Mapping → Class
Color Mapping (see “Mapping Class Colors” on page 123).

Extracting Topographic Features ENVI User’s Guide


Chapter 10: Topographic Tools 1073

Extracting Digital Elevation Model Data


The DEM Extraction (DEM) module in ENVI is available for purchase from ITT
Visual Information Solutions or your ENVI distributor. Contact your sales
representative or ITT Visual Information Solutions (303-786-9900,
[email protected]) for more information.
If you have a DEM module license, see the ENVI DEM Extraction User’s Guide for
details.

ENVI User’s Guide Extracting Digital Elevation Model Data


1074 Chapter 10: Topographic Tools

Creating Hill Shade Images


Use Create Hill Shade Image to create a color shaded relief image from a digital
elevation model using a color table or a displayed color image.

Creating Hill Shade Images Using Color Images


Creating a Hill Shade image from a color image provides data fusion by adding
topographic information to your image. The color image is transformed into hue,
saturation, value space. The value band is replaced with a shaded relief image that
was calculated from the DEM using the input sun angles, and the color image is
transformed back to RGB space.
The color image must be coregistered with the DEM file, displayed, and contrast
stretched before you can create the Hill Shade image.
1. From the ENVI main menu bar, select Topographic → Create Hill Shade
Image. The Hill Shade Blend Input dialog appears.
2. Select the display number of the color image. The Input File dialog appears.
3. Select an input band and perform optional Spatial Subsetting, then click OK.
The Hill Shade Image Parameters dialog appears.
4. Specify the sun elevation and azimuth for the shaded relief image by entering
the values into the Sun Elevation Angle and Sun Azimuth Angle fields. (To
compute sun elevation values, see “Computing Sun Elevation Values” on
page 1069.)
5. Select output to File or Memory.
6. Click OK. ENVI adds the resulting output to the Available Bands List.

Creating Hill Shade Images ENVI User’s Guide


Chapter 10: Topographic Tools 1075

Figure 10-4: Example of a Hill Shade Image

Creating Hill Shade Images from Color Tables


Use Create Hill Shade Image to create a Hill Shade image using a color table
applied to the digital elevation data. The selected color table and stretch type are
applied to the DEM. The DEM is transformed into hue-saturation-value space, the
value band is replaced with a shaded relief image that was calculated using the input
sun angles, and the HSV bands are transferred back to RGB space.
1. From the ENVI main menu bar, select Topographic → Create Hill Shade
Image. If you have one or more images open in display groups, the Hill Shade
Blend Input dialog appears. Click Color Table Lookup. The Input File dialog
appears.
2. Select an input band and perform optional Spatial Subsetting, then click OK.
The Hill Shade Image Parameters dialog appears.

ENVI User’s Guide Creating Hill Shade Images


1076 Chapter 10: Topographic Tools

3. Specify the Sun Elevation Angle and Sun Azimuth Angle in the
corresponding fields. (To compute sun elevation values, see “Computing Sun
Elevation Values” on page 1069.)
4. Select the name of a color table from the list.
5. From the Stretch drop-down list, select a stretch type.
• If you select % Linear, enter the percentage to clip.
• If you select Linear Range, enter the minimum and maximum values.
• If you select Gaussian, enter the number of standard deviations for the
data distribution.
6. Select output to File or Memory.
7. Click OK. ENVI adds the resulting output to the Available Bands List.

Creating Hill Shade Images ENVI User’s Guide


Chapter 10: Topographic Tools 1077

Replacing Bad Values


You can fill bad values in digital elevation models (DEMs) with values calculated
using a surface fitting technique. Bad pixels often occur in radar shadows of DEMs
generated from interferometric radar. The locations of the bad pixels are identified in
the DEM image by entering the DN value of the bad pixels or a range of bad values.
You can also make a mask of the bad pixels and use it to locate the pixels that need to
be replaced (see “Creating Masks” on page 349). The surface fitting uses Delaunay
triangulation to fill the bad pixels with triangles calculated from the surrounding good
elevation values.
If there are large holes in your dataset, you may see the triangles used to fill them.
1. Select one of the following from the ENVI main menu bar:
• Topographic → Replace Bad Values
• Radar → TOPSAR Tools → DEM Replace Bad Values
The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting and/or Masking,
then click OK. The Replace Bad Data Parameters dialog appears.
3. Enter a bad pixel value in the Bad Value field, or a range of bad pixel values in
the Min and Max fields.
You do not need to enter values if you selected a mask band that contains the
locations of the bad pixels.
4. Select output to File or Memory.
5. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Replacing Bad Values


1078 Chapter 10: Topographic Tools

Rasterizing Point Data


ENVI’s gridding function uses Delaunay triangulation of a planar set of points for the
interpolation of irregularly-gridded data. After the irregularly gridded data points are
triangulated, they are interpolated to a regular grid. You can select linear or smooth
quintic polynomial interpolation, and extrapolation for grid points outside of the
triangulation area is also an option. ENVI reads the grid points from an ASCII file
and input and supports output projections. For details, see “Rasterizing Point Data”
on page 1058.

Rasterizing Point Data ENVI User’s Guide


Chapter 10: Topographic Tools 1079

Converting Vector Topo Maps into Raster


DEMs
Topographic data is frequently available in both vector and raster formats. While each
format has its advantages, ENVI offers several tools for extracting additional
information from raster digital elevation model (DEM) data. For example, you can
use raster DEMs to do the following:
• Derive complementary topographic datasets including slope, aspect, and
shaded relief (see “Using Topographic Modeling” on page 1066).
• Create a topographic classification image (see “Extracting Topographic
Features” on page 1070).
• Drape imagery onto topographic elevation data using the 3D Surface View
(see “Using 3D SurfaceView” on page 1081).
Use Convert Contours to DEM to triangulate a raster grid for the DEM from the
vector records’ nodes. It is recommended that the output pixel size be set no smaller
than the approximate sampling distance of the vector nodes. If the output pixel size
differs significantly from the node sampling distance, the vector contour lines are
automatically made more dense in an attempt to reduce interpolation artifacts. All
vector records contained in the file are used unless their corresponding elevation
attribute value falls outside the valid elevation range you specified.
The vector data must be an ENVI vector format (.evf) file. The .evf file must
contain an attribute that defines the elevation of each vector contour line. If the vector
topography is in an external format file (such as a shapefile), open the data in ENVI
and the import routine prompts you to convert the file into an .evf (see Opening
Vector Files in Getting Started with ENVI for details).
1. From the ENVI main menu bar, select one of the following:
• Topographic → Convert Contours to DEM
• Vector → Convert Contours to DEM
The Input File dialog appears.
2. Select an .evf file containing topographic contour lines and an elevation
attribute and click Open. If ENVI does not find an associated attribute file, the
Choose the Associated Attribute File dialog appears. Otherwise, skip the next
step.
3. Select a .dbf file and click Open. The Convert Elevation Contours to Raster
DEM dialog appears.

ENVI User’s Guide Converting Vector Topo Maps into Raster DEMs
1080 Chapter 10: Topographic Tools

4. From the Elevation Attribute Column drop-down list, select the attribute that
contains the elevation of the vector contours.
5. If desired, enter a Valid Elevation Range in the same units as the elevation
attributes. ENVI omits vectors whose elevation falls outside of the valid range
when constructing the DEM.
6. Enter an Output Pixel Size and Output Data Type. You can change the pixel
size before you click OK to begin processing. It is recommended that you do
not set the output pixel size to a value smaller than the approximate sampling
distance between the nodes that define the vector contours.
7. Use the Gridding Interpolation Method and the Extrapolate Edge of Image
toggle buttons to set the gridding parameters.
8. To spatially subset the output DEM, click one of the following buttons:
• Map: To restrict the DEM output to an area defined in map coordinates.
The Spatial Subset by Map Coordinates dialog appears. See “Subsetting by
Map Coordinates” on page 218 for details.
• File: To restrict the output DEM to the same area as an existing
georeferenced file. The Choose a File on Which to Base the Spatial Subset
dialog appears.
9. In the Select Output Projection area, choose a map projection for the output
DEM. This does not have to be the same projection as the input vector data.
10. Click OK. The DEM Output Parameters dialog appears.
11. Examine the information displayed under the Gridded DEM Output Image
title to make sure it is accurate. If you need to change any of the output
parameters, including the pixel size, click Change Output Parameters.
12. Select output to File or Memory.
13. Click OK. ENVI adds the resulting output to the Available Bands List.

Converting Vector Topo Maps into Raster DEMs ENVI User’s Guide
Chapter 10: Topographic Tools 1081

Using 3D SurfaceView
Use ENVI’s 3D SurfaceView window to visualize elevation or other surface data in
3D. You can use 3D SurfaceView to do the following:
• Display the surface data as a wire-frame, a ruled grid, or as points.
• Drape the surface data with a gray scale or color image, and overlay it with
ROIs and vectors.
• Rotate, translate, and zoom in and out of the surface in realtime using the
mouse cursor or the 3D SurfaceView Controls dialog. The cursor is also linked
to your draped image allowing cursor locations, values, and profiles to display
from the 3D view.
• Define a flight path (interactively or with a drawn annotation). You can
animate the flight path to produce 3D fly-throughs of your data. You can
control the vertical and horizontal view angles fly through your data at a
constant height above the surface or at a constant altitude.
• Use perspective controls to place the visual perspective in the 3D SurfaceView
and rotate the surface around that perspective.

Displaying 3D Files
If you are running ENVI on a Windows system, you must be in 16-bit or 24-bit color
display mode.
1. Display the gray scale or color image you want to drape over your DEM (or
other 3D dataset). ENVI uses the entire image as the overlay image on the
DEM unless both the image and DEM files are georeferenced.
• If both files are georeferenced, then ENVI uses only the part of the image
that overlaps with your DEM.
• If the DEM is subset, then ENVI subsets the georeferenced image to
match. The spatial resolutions of the two files do not need to be the same.
• If both the image and the DEM are georeferenced, they do not need to be
in the same projection. ENVI reprojects the DEM on the fly to match the
image projection.
2. Select one of the following options:
• From the ENVI main menu bar, select Topographic → 3D SurfaceView.
• From the Display group menu bar, select Tools → 3D SurfaceView.

ENVI User’s Guide Using 3D SurfaceView


1082 Chapter 10: Topographic Tools

If more than one display group is open, select the display group that contains
the desired image. The Associated DEM Input File dialog appears.
3. Select an input file and perform optional Spatial Subsetting, then click OK.
The 3D SurfaceView Input Parameters dialog appears.
Note
If a DEM is already associated with the input image file in the image header,
ENVI uses the associated DEM by default (it does not prompt you to select a
DEM). For more information on associating a DEM with an image, see
“Associating a DEM to a File” on page 202.

Figure 10-5: 3D SurfaceView Input Parameters Dialog

4. Select the DEM Resolution (number of pixels) check box to use for the 3D
plot. You can select more than one resolution. Typically, use the lowest
resolution (64) while you are determining the best flight path, then use a higher
resolution to display your final fly-through sequence.
Note
Using higher DEM resolutions significantly slow the display; use higher
resolution settings only on powerful platforms.

Using 3D SurfaceView ENVI User’s Guide


Chapter 10: Topographic Tools 1083

5. Select one of the following as the Resampling method:


• Nearest Neighbor: To resample using the nearest DEM value. For
example, if your DEM resolution is 30 meters and your image resolution is
60 meters, nearest neighbor resampling uses every other pixel and every
other line to create the DEM in the 3D window.
• Aggregate: To average all the DEM values that contribute to the output
pixel. For example, if your DEM resolution is 30 meters and your image
resolution is 60 meters, pixel aggregate resampling averages four pixels to
create the output DEM.
6. Enter the DEM min plot value and DEM max plot value if desired. ENVI
does not plot DEM values lower than the minimum value and higher than the
maximum value in the 3D views.
7. Enter the Vertical Exaggeration, if any, to produce a true scale vertical
exaggeration applied to the z axis where higher values correspond to greater
exaggeration. The default is 5.0.
8. Select one of the following for Image Resolution:
• Full: Use the highest possible resolution. If you have a large image, full
resolution may cause you to run out of memory.
• Other: Use Nearest Neighbor or Aggregate as the resampling method.
9. Set the High Resolution Texture Mapping toggle button to Off or On. The
default is On. When set to On, and a higher resolution image is available,
ENVI uses the high resolution image when you zoom in to your the 3D
SurfaceView. The input image must be at least 1024 x 1024 pixels in order for
the High Resolution Texture Mapping parameter to have a noticeable effect
in the 3D SurfaceView.
Note
Using the High Resolution Texture Mapping option may slow the zoom
and fly-through features of the 3D SurfaceView.

10. To perform optional Spatial Subsetting, click Spatial Subset and select a
spatial subset of the image.
The spatial dimensions of the DEM and image do not need to be same. ENVI
displays the full dimensions (or selected subsets) of both datasets.
11. Click OK. The 3D SurfaceView plot window appears (see Figure 10-6).

ENVI User’s Guide Using 3D SurfaceView


1084 Chapter 10: Topographic Tools

Figure 10-6: Texture Type 3D Plot in a 3D SurfaceView Plot Window

3D SurfaceView Window Mouse Button Functions


Use the following mouse button functions to interactively rotate, translate, and scale
the surface. You can also control the rotation, translation, and zoom by selecting
Options → Surface Controls from the 3D SurfaceView window menu bar (see
“Controlling the Surface Display” on page 1085).
To reset the surface plot to its original position, select Options → Reset View from
the 3D SurfaceView window menu bar.

Using 3D SurfaceView ENVI User’s Guide


Chapter 10: Topographic Tools 1085

The 3D SurfaceView window mouse button functions are as follows:

Mouse Button Function

Left Click and drag horizontally to rotate the surface around the
z axis.
Click and drag vertically to rotate the surface around the y
axis.
Double left-click on the surface to go to a pixel in the
Image window.
Middle Click and drag to translate (move) the image.
Right Click and drag to the right to zoom in.
Click and drag to the left to zoom out.

Table 10-1: Mouse Button Functions – 3D SurfaceView Window

Displaying Cursor Location and Value


If the Cursor Location/Value dialog is open, ENVI reads the approximate x,y,z
(elevation) values from the 3D SurfaceView. If your draped image is georeferenced,
ENVI also reports the map locations.
To move the Zoom window to a specific pixel in the Image window containing the
draped image, double left-click on the pixel in the 3D plot. Both the DEM and the
image must be in the same projection for this to properly function.

Controlling the Surface Display


You can use the 3D SurfaceView Controls dialog to access the following functions:
• Rotating, moving, and zooming in and out of the surface display.
• Changing surface styles, vertical exaggeration, and DEM resolution.
• Setting, starting, and stopping a perspective rotation.
To access the 3D SurfaceView Controls dialog, select Options → Surface Control
in the 3D SurfaceView window. When the 3D SurfaceView Controls dialog appears,
use the buttons, text fields, and controls described in the following sections to control
the surface display.

ENVI User’s Guide Using 3D SurfaceView


1086 Chapter 10: Topographic Tools

At any time, you can return the surface to its original settings by clicking Reset View
in the 3D SurfaceView Controls dialog. The surface returns to its original orientation,
but the dialog settings are retained.

Figure 10-7: 3D SurfaceView Controls Dialog

Rotating, Zooming, and Translating


In addition to using cursor functions (see “3D SurfaceView Window Mouse Button
Functions” on page 1084) to manipulate the 3D SurfaceView plot, you can also
perform these functions using controls in a dialog.
The Rotation/Scale/Translation Controls area in the 3D SurfaceView Controls
dialog contains buttons you use to control the plot in the following ways:
• Click the curved arrow buttons to change the rotation of the surface plot in the
direction desired. Use the Inc field to change the rotation increment. The
default is 5.
• Click the + or - buttons to zoom in or out of the surface plot. Use the Inc field
to change the zoom increment. The default is 0.10.
• Click the arrow buttons to move the surface plot in the desired direction. Use
the Inc field to change the translation increment. The default is 0.05.

Using 3D SurfaceView ENVI User’s Guide


Chapter 10: Topographic Tools 1087

Changing the Surface Properties


The Surface Properties area in the 3D SurfaceView Controls dialog contains
parameters that control vertical exaggeration, depth offset, surface style, and DEM
resolution surface properties. Use the parameters as follows:
• Set the Vertical Exaggeration for the plot. The value you enter produces a
true scale vertical exaggeration applied to the z-axis, where higher values
correspond to greater exaggeration. The default value is 5.0.
• Enter the value of the Depth Offset to obtain the best results for your graphics
card. This value is only used for hardware rendering (renderer = 0). The default
value is 25.
Increasing the value reduces the amount of vector stitching through the
textured surface. Too large offset values may cause the textured surface to
disappear entirely.
For the best results, start with a high resolution DEM and a small initial Depth
Offset value, then increase the Depth Offset value until the vector stitching is
eliminated.
The Depth Offset setting is only retained in your current ENVI session. To
change the default value, edit the surfaceview depth offset parameter
in the ENVI configuration file menu\envi.cfg.
• Use the Surface Style drop-down list to select to plot the 3D SurfaceView plot
with a Texture image draped over it, as a Wire mesh, as a Ruled XZ surface,
as a Ruled YZ surface, or as a Point surface.
• Click DEM Resolution to choose the resolution (used for the plot) from the
available DEM resolutions. If you selected more than one DEM resolution in
the 3D SurfaceView Input Parameters dialog, you can select from any of these
resolutions.

Using the Perspective Rotation Controls


The Perspective Controls area in the 3D SurfaceView Controls dialog allows you to
select a point in the 3D SurfaceView plot to specify a perspective origin around which
ENVI rotates the surface.
1. Click the figure icon button to toggle the cursor to select mode.
2. Move the arrow cursor onto the 3D SurfaceView plot and select the plot to set
the origin of the rotation.

ENVI User’s Guide Using 3D SurfaceView


1088 Chapter 10: Topographic Tools

The view zooms to the new origin of the perspective which is set at a height
that is 0.05 normalized units (default) above the surface and the surface begins
to rotate. You can modify the height of the perspective origin above the surface
using the Translation controls in the 3D SurfaceView Controls dialog.
If a perspective rotation was not initiated, click Start to begin rotating the
surface around its center point.
Click Stop to pause the current rotation.
If the cursor is in select mode, but a perspective origin in the surface was not
chosen, clicking Stop toggles the cursor out of select mode.
3. Enter the value for the Rotation Delay. The delay value is the number of
seconds to wait between successive renderings of the rotating surface. The
default value is 0.05. Setting the value to 0.0 sets the rotation speed to your
computer’s limits for calculating the transformation matrix and rendering the
surface.
4. To change the direction of the rotation of the surface, click Direction and
select either Left or Right. Direction refers to the rotation direction of the
surface, not the viewer’s perspective. The default rotation direction is Right.

Defining and Displaying Flight Paths


When defining a flight path in 3D SurfaceViews, you have the choice of using a User
Defined path mode or Annotation path mode. In User Defined mode, you fly
through your data based on a flight sequence you define. In Annotation mode, you
fly through your data based on an annotation flight path. The annotation must be
drawn on the image from which the surface plot was created or imported from a saved
annotation file.
1. To work in either mode, select Options → Motion Controls from the 3D
SurfaceView window menu bar. The 3D SurfaceView Motion Controls dialog
appears.
2. From the 3D SurfaceView Motion Controls dialog menu bar, select
Options → fly_through_mode.

Using 3D SurfaceView ENVI User’s Guide


Chapter 10: Topographic Tools 1089

The following sections provide details about working in the two different modes.

Figure 10-8: SurfaceView Motion Controls Dialog in User Defined Mode (left)
and Annotation Mode (right)

Defining a Flight Path in User Defined Mode


Use the User Defined mode to define a flight path and to play a sequence of views
that fly-through your data.
1. In the 3D SurfaceView Motion Controls dialog, select Options → Motion:
User Defined Views.
2. In thew 3D SurfaceView window, click with the mouse to select the starting
projection (view) for the fly-through.
For mouse button function descriptions, see “3D SurfaceView Window Mouse
Button Functions” on page 1084.
3. In the 3D SurfaceView Motion Controls dialog, click Add to add the selected
projection to the flight path.
4. Click with the mouse to select another projection and click Add. ENVI
interpolates the flight path smoothly interpolated between the two projections.

ENVI User’s Guide Using 3D SurfaceView


1090 Chapter 10: Topographic Tools

5. Repeat selecting projection steps until you have selected as many as desired
(only two are required).
• To replace a projection in the flight path list, select the path view number
and click Replace.
• To delete a projection in the flight path list, select the path view number
and click Delete.
• To clear the flight path list, click Clear.
6. Enter the number of frames to use in the fly-through animation. ENVI
interpolates the flight path smoothly interpolated between the two projections.
7. Click Play Sequence to animate the fly-through.
To control the speed and direction of the fly-through, select Options →
Animate Sequence in the SurfaceView Motion Controls dialog (see
“Animating Flight Paths” on page 1092).

Defining a Flight Path in Annotation Mode


Use Annotation mode to define a flight path based on annotation. Use a polyline,
polygon, rectangle, or ellipse annotation object to define the flight path (see
“Annotating Images and Plots” on page 31 for details). You can control the vertical
and horizontal look angles, fly at a constant elevation above the DEM terrain, or fly at
a constant altitude.
To use Annotation mode, you must have annotation drawn on the Image window
from which the 3D SurfaceView was created, or have the desired annotation object
saved in an annotation file (.ann).
1. From the 3D SurfaceView Motion Controls dialog menu bar, select
Options → Motion: Annotation Flight Path. The Input Annotation Flight
Path dialog appears.
2. Select whether to import annotation from the display or from a file.
• If you select the option to input the annotation object from an Image
window, select the annotation object.
• If you select the option to import the annotation object from a saved
annotation file, select the annotation (.ann) file and object.
ENVI displays the selected annotation object, number of nodes, and the
number of points display in the middle of the 3D SurfaceView Motion
Controls dialog and plots the flight path in the 3D SurfaceView window.

Using 3D SurfaceView ENVI User’s Guide


Chapter 10: Topographic Tools 1091

Tip
If you are already in Annotation mode and want to input annotation, select File →
Input Annotation from Display or Input Annotation from File from the 3D
SurfaceView Motion Controls dialog menu bar.

3. To smooth the flight path by using a running average of points along the line,
enter the number of points to use in the average in the Flight Smooth Factor
field.
4. To fly over the surface at a constant height above the DEM terrain, click the
toggle button until Flight Clearance appears and enter the height (in the same
units as the DEM).
To fly over the surface at a constant elevation, click the toggle button until
Flight Elevation appears and enter the elevation above sea level (in the same
units as the DEM).
5. To adjust the vertical look angle, enter the angle, in degrees, in the Up/Down
field. A vertical look angle of -90 degrees looks straight down at the surface. A
look angle of 0 degrees looks straight ahead (horizontal).
To adjust the horizontal look angle, enter the angle, in degrees, in the
Left/Right field. A horizontal look angle of -90 degrees looks to the left, a
look angle of 0 degrees looks straight ahead, and a look angle of 90 degrees
looks to the right.
6. To turn the annotation flight line trace off and on, select Options →
Annotation Trace from either the 3D SurfaceView Motion Controls dialog or
the 3D SurfaceView window menu bar.
7. Enter the number of frames to use when animating the data fly-through in the
Frames field.

ENVI User’s Guide Using 3D SurfaceView


1092 Chapter 10: Topographic Tools

8. Click Play Sequence to animate the fly-through. To have the sequence


repeatedly restart when it reaches the end, select Options → Loop Play
Sequence from the 3D SurfaceView Motion Controls dialog menu bar.
To control the speed and direction of the fly-through, select Options →
Animate Sequence (see “Animating Flight Paths” on page 1092).

Animating Flight Paths


Use Animate Sequence while in either User Defined or Animation modes to
display and fly through your 3D SurfaceView plot in an Animation window. In the
Animation window, you can control the characteristics of your fly-through with more
precision than in the 3D SurfaceView Motion Controls dialog:
1. From the 3D SurfaceView Motion Controls dialog menu bar, select
Options → Animate Sequence. The 3D SurfaceView plot displays in the
ENVI animation window.
2. See “Controlling Animation Characteristics” on page 142 for details about
using animation controls. The first few times through, the frame sequence may
be slow until the frames are put in memory.
3. To save the animation to a MPEG (Moving Picture Experts Group) file, select
File → Save as MPEG (see “Saving Animations” on page 143 for details).

Saving Flight Path Sequences to Files


To save the current flight path to a file:
1. From the 3D SurfaceView Motion Controls dialog menu bar, select File →
Save Sequence to file.
2. Enter an output filename with the extension .pat for consistency.
To restore a previously saved flight path, select File → Restore Sequence from file
from the 3D SurfaceView Motion Controls dialog menu bar and select the .pat
filename. Restoring is only available in User Defined mode.

Using 3D SurfaceView ENVI User’s Guide


Chapter 10: Topographic Tools 1093

Exporting Flight Path Sequences to MPEG Files


Note
When creating MPEG files, you must be aware of the capabilities of the MPEG
decoder you will be using to view it. Some decoders only support a limited set of
sampling and bit rate parameters to normalize computational complexity, buffer
size, and memory bandwidth. For example, the Windows Media Player supports a
limited set of sampling and bit rate parameters. In this case, it is best to use
352 x 240 x 30 fps or 352 x 288 x 25 fps when determining the dimensions and
frame rate for your MPEG file. When opening a file in Windows Media Player that
does not use these dimensions, you will receive a Bad Movie File error message.
The file is not bad, this decoder just doesn't support the dimensions of the MPEG.

To export a flight sequence to an MPEG (Movie Picture Experts Group) file:


1. From the SurfaceView Motion Controls dialog menu bar, select File → Save
Sequence As MPEG. The Output Sequence to MPEG Parameters dialog
appears.
2. The default output size of the MPEG image window is the Windows standard.
To change the output window size, enter the size (in pixels) in the MPEG
Output Size fields.
3. Enter the Number of Frames (individual views) to include in the output flight
sequence (movie).
More frames make a longer sequence, but also make a larger output file.
4. From the MPEG Frame Rate drop-down button, select a rate in
frames/second.
5. Enter the MPEG compression quality.
6. Enter a duplication factor in the Duplicate Frames field, if desired.
Duplication helps to make the MPEG output appear smoother. For example, a
duplication factor of 2 will duplicate each frame and double the number of
output frames.
7. Enter an output filename.
8. Click OK. ENVI writes the output MPEG file in two steps. The second step
cannot be cancelled, and may take up to many seconds per frame.
The compression is a lossy compression where 0 is lowest quality and 100 is
highest quality (no compression). Entering a compression quality factor less
than 100 decreases the amount of disk space used to store the MPEG output.

ENVI User’s Guide Using 3D SurfaceView


1094 Chapter 10: Topographic Tools

Positioning the Perspective


In addition to the Perspective Controls in the 3D SurfaceView Controls dialog, you
can also view the surface view panoramically (as if you were standing in the image)
with the Position Controls dialog.
1. From the 3D SurfaceView window menu bar, select Options → Position
Controls. The 3D SurfaceView Position Controls dialog appears.

Figure 10-9: 3D SurfaceView Position Controls Dialog

2. Click the toggle button to select Map Coord for georeferenced images, or
Pixel Coord for non-georeferenced images. The default is Pixel Coord.
• If you select Pixel Coord, enter the Sample and Line coordinates of
where you want to stand in the image.
If your image is a subset of a larger image, you can use the x and y pixel
offsets from the header file by clicking the Use Offset toggle button to Yes.
• If you select Map Coord, enter the map coordinates of the location where
you want to stand and click Change Proj to change the projection (if
desired).
3. In the Auto Apply field, select whether or not to apply changes automatically
by selecting Yes or No.

Using 3D SurfaceView ENVI User’s Guide


Chapter 10: Topographic Tools 1095

4. Select from the following options to change your position and viewing angle in
the surface view image.
• To change the location where you are standing, double left-click on a spot
in the Image window to automatically move to that location.
The location change is reflected in both the Image window and the 3D
SurfaceView window.
• To change the azimuth look direction (north = 0 and angles increase
clockwise), use the Azimuth slider bar or fields in the 3D SurfaceView
Position Controls dialog.next to the label. To change the angle in
increments of five degrees, middle-click on the Azimuth arrows.
• To change the elevation angle from which you are looking, use the
Elevation slider bar next to the label. To change the angle in increments of
five degrees, middle-click on the Elevation arrows.
An angle of 0 degrees is horizontal and a negative angle is down looking.
• To change the distance from which you are looking down on the image,
enter a number in the Height Above Ground field or use the
increase/decrease buttons to change the height.
The units used should be the same as the DEM elevation units.
5. Click Apply.

Changing Background Color


You can change the background color of the 3D SurfaceView plot.
1. From the 3D SurfaceView window menu bar, select Options → Change
Background Color. The 3D SurfaceView Background Color dialog appears.
2. From the drop-down list, select RGB, HLS, or HSV.
3. Click Color and select a color from the resulting menu, or set color values by
using the corresponding slider bars and fields.
4. Click OK.

ENVI User’s Guide Using 3D SurfaceView


1096 Chapter 10: Topographic Tools

Importing Vectors and ROIs


Use Import Vectors to overlay ROIs and vector layers on the 3D SurfaceView plot.
You must have ROIs or vectors displayed in the original image display from which
the 3D SurfaceView was created. For information about defining ROIs or overlaying
vectors on an image, see “Defining ROIs” on page 323 or “Overlaying Vectors” on
page 70.
1. From the 3D SurfaceView window menu bar, select Options → Import
Vectors.
All of the ROIs and vectors from the image are overlaid on the 3D
SurfaceView plot.
2. When ROIs and vectors are overlaid, select from the following options in the
3D SurfaceView window menu bar:
• To remove a layer or layers, select Options → Remove Vectors and select
the layers to remove.
• To turn the display or hide layers, select Options → Plot Vector Layers.
Hiding layers does not remove them from the 3D SurfaceView plot.
• To display the vectors and ROIs while interactively positioning and
moving the 3D SurfaceView image, select Options → Plot Vectors on
Move.
• To avoid slow interactive repositioning when many vectors and ROIs are
overlaid, deselect Options → Plot Vectors on Move.
• To change the appearance (for example, line thickness, color) of vectors or
ROIs in the 3D SurfaceView plot, first make the changes to the vectors in
the original image, then re-import the vectors from the image into the 3D
SurfaceView.
For details about working with vectors, see “Overlaying Vectors” on page 70.

Smoothing 3D Images
To smooth 3D Surface View Images that appear pixelated, select Options →
Bilinear Interpolation.
To disable the smoothing effect, select Options → Interpolation: None.

Using 3D SurfaceView ENVI User’s Guide


Chapter 10: Topographic Tools 1097

Managing SurfaceView Files


Use the File menu in the 3D SurfaceView window to save or print the displayed
surface, or to exit the 3D SurfaceView window.

Saving 3D SurfaceViews
Use the File option in the 3D SurfaceView window menu bar to save the plot to an
image file or a Virtual Reality Modeling (VRML) file, or export the plot to a printer.
Select one of the following from the 3D SurfaceView window menu bar:
• To save a surface view as an image file, select File → Save Surface As →
Image File.
• To save a surface view as a VRML 2.0 file, select File → Save Surface As →
VRML.
If you are using a Cosmo Player to view the VRML file, set the Cosmo Player
preferences as follows to view the file. In the Cosmo Player menu:
Select Preferences → Performance
Select Fastest for Image/Texture quality
Unselect the option Enable specular and emissive color.
• To print a 3D SurfaceView plot, select File → Print.
For more information and instructions, see “Saving Images from Displays” on
page 15.

ENVI User’s Guide Using 3D SurfaceView


1098 Chapter 10: Topographic Tools

Using 3D SurfaceView ENVI User’s Guide


Chapter 11
Radar Tools

This chapter covers the following topics:

The Radar Menu . . . . . . . . . . . . . . . . . . . 1100 Adaptive Filters . . . . . . . . . . . . . . . . . . . 1110


Opening and Preparing Radar Files . . . . . 1101 Texture Filters . . . . . . . . . . . . . . . . . . . . . 1111
Calibrating Radar Files . . . . . . . . . . . . . . 1103 Creating Synthetic Color Images . . . . . . 1112
Removing Antenna Gain Variations . . . . 1105 Using Polarimetric Tools . . . . . . . . . . . . 1113
Resampling to Ground Ranges . . . . . . . . 1107 Using TOPSAR Tools . . . . . . . . . . . . . . 1140
Generating Incidence Angle Images . . . . 1109

ENVI User’s Guide 1099


1100 Chapter 11: Radar Tools

The Radar Menu


Use the Radar menu to access standard and advanced tools for analysis of detected
radar images and advanced SAR systems such as JPL’s fully polarimetric AIRSAR
and SIR-C systems. ENVI can process ERS-1, JERS-1, RADARSAT, SIR-C,
X-SAR, and AIRSAR data and any other detected SAR dataset. In addition, ENVI
can handle radar data distributed in the CEOS format, and should be able to handle
data from other radar systems (not mentioned here) that also distribute their data in
this format.
Most standard ENVI processing functions are inherently radar-capable including all
display capabilities, stretching, color manipulations, classification, registration,
filters, geometric rectification, and so on. Additional specialized tools are provided
for analyzing polarimetric radar data. See the ENVI Tutorials on the ITT-VIS website
(or on the ENVI Resource DVD that shipped with your ENVI installation) for step-
by-step examples.

The Radar Menu ENVI User’s Guide


Chapter 11: Radar Tools 1101

Opening and Preparing Radar Files


Use Open/Prepare Radar File to open radar format files from CD or disk.
Instructions for opening specific radar formats are described in “Opening Radar
Files” on page 179.

Working with COSMO-SkyMed Data


Follow these steps to save COSMO-SkyMed metadata to XML format:
1. Open a COSMO-SkyMed file by selecting one of the following options from
the ENVI main menu bar:
• Radar → Open/Prepare Radar File → COSMO-SkyMed → Open
COSMO-SkyMed Data
• File → Open External File → Radar → COSMO-SkyMed
2. From the ENVI main menu bar, select Radar → Open/Prepare Radar
File → COSMO-SkyMed → Save COSMO-SkyMed Metadata to XML.
The Select COSMO-SkyMed Dataset dialog appears.
3. Select a COSMO-SkyMed file and click OK. The Convert COSMO-SkyMed
Metadata to XML dialog appears.
4. Select an output filename and location for the metadata, then click OK. ENVI
adds a .sml extension to the output metadata file.
5. Select an output filename and location, and click OK.

Viewing Headers
Use View AIRSAR/TOPSAR Header, View COSMO-SkyMed Header, View
Generic CEOS Header, and View RADARSAT Header, to produce reports of
header information.
1. From the ENVI main menu bar, select one of the following:
• Radar → Open/Prepare Radar File → View AIRSAR/TOPSAR
Header
• Radar → Open/Prepar Radar File → View COSMO-SkyMed
Header → Basic (simple information) or Extend (detailed information)
• Radar → Open/Prepare Radar File → View Generic CEOS Header
• Radar → Open/Prepare Radar File → View RADARSAT Header

ENVI User’s Guide Opening and Preparing Radar Files


1102 Chapter 11: Radar Tools

The Input File dialog appears.


2. Select the file from which to read the header and click OK. ENVI prints the
header information to the Header Report window.
3. To save the report to an output file, select File → Save Text to ASCII from the
Header Report window menu bar. The Output Report Filename dialog appears.
4. Enter an output filename and click OK.

Synthesizing AIRSAR and SIR-C Data


AIRSAR images must be synthesized before you can use them in ENVI processing
routines. For details, see “Synthesizing JPL AIRSAR Data” on page 1113.
SIR-C Single Look Complex (SLC) and Multi-Look Complex (MLC) images must
be synthesized before you can use them in ENVI processing routines. For details, see
“Synthesizing SIR-C Data” on page 1117.

Opening and Preparing Radar Files ENVI User’s Guide


Chapter 11: Radar Tools 1103

Calibrating Radar Files


Use Radar → Calibration to calibrate your ERS or RADARSAT data files to radar
brightness values (β0) or to radar backscatter coefficient values (σ0) using a DEM.

Calibrating to Beta Nought (β0)


Use Beta Nought to radiometrically calibrate your ERS or RADARSAT data to radar
brightness values (β0). The radar brightness values are output in decibels (dB). This
function works for ERS PRI products and RADARSAT SGF, SGX, SGC, SCN,
SCW, and SLC detected products.
1. From the ENVI main menu bar, select Radar → Calibration → Beta
Nought. The Input File dialog appears.
2. Select the ERS or RADARSAT data file and perform optional Spatial
Subsetting, then click OK.
3. If ENVI cannot find the leader file, the Enter Leader File dialog displays.
Select the file and click Open. If you are using ERS data, the Beta Nought
Parameters dialog appears.
4. The ERS Incidence Angle and ERS Absolute Calibration values are
automatically read from the leader file. If they are not found in the leader file,
enter the center of image incidence angle and absolute calibration constant in
the appropriate fields.
5. Select output to file or memory.
6. Click OK.

Calibrating to Sigma Nought (σ0)


Use Sigma Nought to calibrate your ERS or RADARSAT data to radar backscatter
coefficient (σ0). This function requires a DEM with the same spatial dimensions and
pixel size as the input radar data. The DEM image is used to accurately calculate the
incidence angle over the image. The radar backscatter coefficient values are output in
decibels (dB). This function works for ERS PRI products and RADARSAT SGF,
SGX, SGC, SCN, SCW, and SLC detected products.
ENVI uses Equation 1 from the following reference to calibrate radar data:
European Space Agency. “Calibration of the ERS SAR PRI data product.”
http://earth.esa.int/ESC2/2_esc.html, accessed March 2009.

ENVI User’s Guide Calibrating Radar Files


1104 Chapter 11: Radar Tools

1. From the ENVI main menu bar, select Radar → Calibration → Sigma
Nought. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, then click OK.
The Select Input DEM File dialog appears.
3. Select the corresponding DEM data file and click Open. The DEM file must
be the same dimensions and pixel size as the input radar file.
4. If ENVI cannot find the leader file, the Enter Leader File dialog displays.
Select the file and click Open.
5. The Sigma Nought Parameters dialog appears. Enter an output filename and
click OK.
6. If you are using ERS data, the ERS Incidence Angle and ERS Absolute
Calibration values will be automatically read from the leader file. If they are
not found in the leader file, enter the center of image incidence angle and
absolute calibration constant in the appropriate fields.
7. If you are using RADARSAT data, ENVI will automatically read the Near
Range Angle and Far Range Angles from the leader file. If theses values are
not found in the leader file, enter the near range angle and far range angle, in
degrees, in the appropriate fields.
8. Select output to file or memory.
9. Click OK.

Calibrating Radar Files ENVI User’s Guide


Chapter 11: Radar Tools 1105

Removing Antenna Gain Variations


Radar images typically have a variation in gain across the range direction due to the
instrument’s antenna gain pattern. Use ENVI’s Antenna Pattern Correction to
remove this gain variation. ENVI can calculate and plot azimuth mean values to show
the mean variation in the range direction. A polynomial function, with a user-defined
order, is fit to the means and used to remove the gain variation. You can select either
an additive or multiplicative correction.
Reference:
Ulaby, F. T., R. K. Moore, and A. K. Fung, 1982. Microwave Remote Sensing Active
and Passive, Volume II, Artech House, Inc., Norwood, MA, p.1064.
1. From the ENVI main menu bar, select Radar → Antenna Pattern
Correction. The Input File dialog appears.
2. Select an input file and perform optional Spatial Subsetting, Spectral
Subsetting, and/or Masking, then click OK. The Antenna Pattern Correction
Parameters dialog and an Antenna Pattern Correction plot appear. The plot
shows the mean data values in red with the selected polynomial fit overlaid in
white.

Figure 11-1: Antenna Pattern Correction Plot with First Order Polynomial Fit (in
White)

ENVI User’s Guide Removing Antenna Gain Variations


1106 Chapter 11: Radar Tools

3. In the Antenna Pattern Correction Parameters dialog, select a Range Direction


of Samples or Lines.
4. Select a Correction Method of either Additive or Multiplicative. Typically, a
multiplicative correction is used for radar antenna pattern variations.
5. Enter the Polynomial Order and click Plot Polynomial. You can change the
polynomial order and plot it again. It is best to use a low order polynomial so
as not to remove the local variation in backscatter signal.
The Antenna Pattern Correction plot menu bar is not active until you close the
Antenna Pattern Correction Parameters dialog.
6. Select output to File or Memory.
7. Click OK.

Removing Antenna Gain Variations ENVI User’s Guide


Chapter 11: Radar Tools 1107

Resampling to Ground Ranges


A radar system looks to the side and records the locations of objects using the
distance from the sensor to the object along the line of sight, rather than along the
surface. An image collected using this geometry is referred to as a slant range image.
Slant range radar data have a systematic geometric distortion in the range direction.
The true, or ground range, pixel sizes vary across the range direction because of the
changing incident angles. This makes the image appear compressed in the near range,
relative to what it would look like if all of the pixels covered the same area on the
ground.
Use Slant to Ground Range to resample slant range radar images to ground range
pixel sizes with a fixed size, assuming flat terrain. ENVI has slant-to-ground range
correction tools specifically for use with SIR-C, AIRSAR, and RADARSAT data, as
well as a generic slant-to-ground range tool for other radar images.
For SIR-C and AIRSAR data, ENVI performs slant-to-ground range correction on
synthesized images; it does not perform the correction on the entire SIR-C
compressed data product file, nor the AIRSAR compressed Stokes matrix file.
Because the compressed files contain required information about the sensor
orientation, ENVI prompts you to select the original unsynthesized data file from
which to extract the necessary information.
1. From the ENVI main menu bar, select one of the following:
• Radar → Slant to Ground Range → AIRSAR
• Radar → Slant to Ground Range → RADARSAT
• Radar → Slant to Ground Range → SIR-C
• Radar → Slant to Ground Range → Generic
For SIR-C, AIRSAR, and RADARSAT, the Enter Filename dialog appears.
For Generic, the Input File dialog appears (skip the next step).
2. For SIR-C, AIRSAR, and RADARSAT input files, select a file that contains
the data acquisition parameters. For AIRSAR and RADARSAT, this
information appears in the CEOS header.
• For AIRSAR and SIR-C, select a compressed Stokes matrix file (.stk).
Click OK.
• For RADARSAT, select the image file (.dat). Click OK.

ENVI User’s Guide Resampling to Ground Ranges


1108 Chapter 11: Radar Tools

• To manually enter the necessary parameters, click Cancel and enter the
parameters in the Slant to Ground Range Parameters dialog that appears.
The Input File dialog appears.
3. Select an input file and perform optional Spatial Subsetting, then click OK.
The Slant to Ground Range Parameters dialog appears.
4. For SIR-C, AIRSAR, and RADARSAT input files, ENVI automatically
populates the Instrument height (km), Near range distance (km), and Slant
range pixel size (m) fields with information from the input file that contains
data acquisition parameters.
For generic input files:
• Enter the sensor altitude in the Instrument height (km) field.
• Enter a Near range distance (km) value from nadir for the input image.
• Enter a value for Slant range pixel size (m). This is not the pixel size of
the input image.
5. Enter a value for the desired Output pixel size (m) of the ground range data.
6. From the Near Range Location drop-down list, select the location of the near
range in the image: Top, Bottom, Left, or Right.
7. From the Resampling Method drop-down list, select Nearest Neighbor,
Bilinear, or Cubic Conv.
8. Output the result to File or Memory.
9. Click OK.

Resampling to Ground Ranges ENVI User’s Guide


Chapter 11: Radar Tools 1109

Generating Incidence Angle Images


Use Incidence Angle Image to generate incidence angle images from AIRSAR
(excluding AIRSAR data associated with TOPSAR datasets), RADARSAT, SIR-C,
and generic radar data. The incidence angles are calculated based on the near range
and far range angles and assume flat topography.
1. From the ENVI main menu bar, select one of the following:
• Radar → Incidence Angle Image → AIRSAR
• Radar → Incidence Angle Image → RADARSAT
• Radar → Incidence Angle Image → SIR-C
• Radar → Incidence Angle Image → Generic
For SIR-C, AIRSAR, and RADARSAT, the Enter Filename dialog appears.
For Generic, the Incidence Angle Parameters dialog appears (skip the next two
steps).
2. For SIR-C, AIRSAR, and RADARSAT input files, select a file that contains
the data acquisition parameters. For AIRSAR and RADARSAT, this
information appears in the CEOS header.
3. Click OK. The Incidence Angle Parameters dialog appears. For AIRSAR,
RADARSAT, and SIR-C, ENVI reads the necessary information automatically
from the header files. If all of the needed parameters are not found, enter the
missing values in the corresponding fields.
For generic input files, set the following parameters:
• Enter the number of output Samples and Lines and the near and far range
angles, in degrees, in the corresponding fields.
• Select the Near Range location from the corresponding radio buttons. The
choices are Top, Bottom, Left, or Right.
• Select Incidence Angle Units output in radians or degrees.
4. Select output to File or Memory.
5. Click OK.

ENVI User’s Guide Generating Incidence Angle Images


1110 Chapter 11: Radar Tools

Adaptive Filters
ENVI includes several adaptive filters to use for SAR processing. The filters include
Lee, Enhanced Lee, Frost, Enhanced Frost, Gamma, Kuan, and Local Sigma to
reduce image speckle and a Bit Errors filter to remove bad pixels. Filters are
described in “Using Adaptive Filters” on page 553.

Adaptive Filters ENVI User’s Guide


Chapter 11: Radar Tools 1111

Texture Filters
ENVI includes several texture filters for extracting textural information from SAR
and other data types. These include filters based on the data range, RMS, 1st moment,
and 2nd moment of the data. Filters are described in “Using Texture Filters” on
page 548.

ENVI User’s Guide Texture Filters


1112 Chapter 11: Radar Tools

Creating Synthetic Color Images


Use Synthetic Color Image to transform a gray scale image into a synthetic color
image. This transform is often used with radar data to improve the display of subtle
large-scale features while retaining fine detail. For details, see “Creating Synthetic
Color Images” on page 534.

Creating Synthetic Color Images ENVI User’s Guide


Chapter 11: Radar Tools 1113

Using Polarimetric Tools


ENVI has a suite of polarimetric radar analysis tools for the NASA/JPL AIRSAR,
TOPSAR, and SIR-C data types. These polarimetric radar data are stored in a
compressed Stokes or scattering matrix format. Because of the format, the data
cannot be directly viewed and specialized functions are needed. Use the polarimetric
tools in ENVI to view headers, decompress and synthesize images, multilook SIR-C
compressed data, calculate phase and pedestal height images, perform an AIRSAR
scattering classification technique, and extract polarization signatures.

Synthesizing JPL AIRSAR Data


AIRSAR images must be synthesized before you can use them in ENVI processing
routines. Use Synthesize AIRSAR Data to synthesize standard and specific transmit
and receive polarization and total power images from compressed Stokes files. The
input AIRSAR data must be in JPL Stokes matrix format (standard file extension
.stk). JPL AIRSAR data are usually delivered on 9-track, 8mm, or 4mm tape as three
separate files (P, L, and C-band) in compressed Stokes matrix format (see the JPL
AIRSAR documentation for details).
References:
van Zyl, J.J., H.A. Zebker, and C. Elachi: Imaging radar polarization signatures:
theory and observation. Radio Science 22(4):pp. 529-543, 1987.
Zebker, H.A., J.J. van Zyl, and D.N. Held. Imaging radar polarimetry from wave
synthesis. Journal of Geophysical Research 92(31): pp. 683-701, 1987.
Tip
To transfer the JPL AIRSAR files to your local disk, use system-level tape utilities
or the ENVI Dump Tape routine (see “Dumping Tape Data” on page 253). You can
use AIRSAR data with missing or non-standard headers, but you must enter the
data parameters as described in “Entering Missing AIRSAR Parameters” on
page 1115).

For easier processing, name the three files with the following convention:
filename_p.stk, filename_l.stk, and filename_c.stk.

You can generate byte images to conserve disk space when quantitative analysis is not
an issue.

ENVI User’s Guide Using Polarimetric Tools


1114 Chapter 11: Radar Tools

1. From the ENVI main menu bar, select Radar → Polarimetric Tools →
Synthesize AIRSAR Data. The Input Stokes Matrix Files dialog appears. Use
this dialog to read the compressed Stokes matrix files.

Figure 11-2: Input Stokes Matrix Files Dialog

2. Click Open File. The Enter Filename dialog appears.


3. Select a Stokes matrix filename. If the file has a valid AIRSAR header with all
of the required parameters, ENVI adds it to one of the Selected Files fields in
the Input Stokes Matrix File dialog (depending on whether the file is P-, L-, or
C-band data). If you followed the suggested file naming convention described
previously, ENVI automatically adds the correct filenames for the other two
files to the appropriate fields. Otherwise, repeat the file selection process for
each of the bands.
If your radar data filenames do not appear in your directory, set the filename
filter to *.* using the Files of Type drop-down list. To clear the names in the
Input File dialog at any time, click Reset or click Cancel to quit without
processing.
If the Stokes matrix input file does not have a valid AIRSAR header, or if
values are missing from the header, the AIRSAR Header Parameters dialog
appears. For instructions, see “Entering Missing AIRSAR Parameters” on
page 1115.
4. Click OK. The Synthesize Parameters dialog appears.
5. Enter the parameters as described in “Selecting Synthesizing Parameters” on
page 1115.
6. Select output to File or Memory.

Using Polarimetric Tools ENVI User’s Guide


Chapter 11: Radar Tools 1115

7. Click OK. All of the synthesized bands are placed in a single file. ENVI adds
the synthesized images to the Available Bands List.

Entering Missing AIRSAR Parameters


In the AIRSAR Header Parameters dialog, all of the known parameters are listed in
the dialog. The dialog often appears because JPL has changed header parameters for
a particular processor version. Typically, the COMP SCALE FACTOR (also known
as GENFAC) or the Band might be missing from the header.
1. Enter the Offset to Data in bytes.
2. Enter the COMP SCALE FACTOR. A factor of 1.0 is typically suitable.
3. Enter the Number or Samples and Number of Lines in the corresponding
fields.
4. Select the Band to which the settings apply.
5. Click OK. The Input Stokes Matrix Files dialog appears.

Selecting Synthesizing Parameters


Use the Synthesize Parameters dialog to select specific send and receive polarization
combinations to synthesize into ENVI images. The standard polarizations HH, VV,
HV (where H=horizontal, V=vertical), and a total power (TP) image are generated for
each of the three frequencies (bands) by default. These bands appear in the Select
Bands to Synthesize list.

ENVI User’s Guide Using Polarimetric Tools


1116 Chapter 11: Radar Tools

Figure 11-3: Synthesize Parameters Dialog

1. From the Select Band Combinations to Synthesize list, select the check
boxes next to bands to include.
2. Enter the transmit and receive ellipticity and orientation angles in the
Transmit Ellip/Orien and Receive Ellip/Orien fields.
3. Click Add Combination. Ellipticity values range from -45 to 45 degrees with
an ellipticity of 0 producing linear polarizations. Orientation values range from
0 to 180 degrees with 0 representing horizontal and 90 degrees for vertical
polarizations.
4. Select the desired bands, C, L, and /or P by selecting the box to the left of the
band name.
5. Click Add Combination. The selected images are listed in the Additional
Images field.

Using Polarimetric Tools ENVI User’s Guide


Chapter 11: Radar Tools 1117

6. To perform Spatial Subsetting of the image to synthesize directly from the


Stokes matrix data, click Spatial Subset.
7. From the Output Data Type drop-down list, select one of the following:
8. Floating Point or Byte. Some additional fields vary, depending on your
selection.
• Floating Point: To output the data in floating-point. If you are creating
output to a floating-point data type to mask bad data values, enter the
minimum and maximum data values to use, in units of intensity, in the
Intensity Min and Max fields.
In the Output in dB field, select Yes to output the converted image to
decibels, or select No to output the converted images as intensity values.
When creating output images in dB, the Intensity Min and Max values are
still entered in units of intensity as the output is bounded by these values
prior to computing dB (for example, if you bound the data by 0 to 1 then a
dB image will be bounded by -Inf to 0).
Synthesized values less than the Intensity Min are set to zero (0) and
values greater than the Max are replaced by the value one (1).
• Byte: To output the data in byte format. Use this setting when quantitative
analysis is not required. In the Std Multiplier field that appears, enter the
standard deviation multiplier used to calculate a minimum and maximum
for scaling. The default value of 1.5 works for most AIRSAR and SIR-C
scenes.

Synthesizing SIR-C Data


SIR-C Single Look Complex (SLC) and Multi-Look Complex (MLC) images must
be synthesized before you can use them in ENVI processing routines. Use Synthesize
SIR-C Images to synthesize standard and specific send and receive polarization and
total power (TP) images from SIR-C compressed scattering matrix files. The input
SIR-C data must be in ENVI compressed data product format (SIR-C standard file
extension .cdp). For more information, see the references for “Synthesizing JPL
AIRSAR Data” on page 1113.
To ensure that the SIR-C data are in the proper compressed data product format
(.cdp), use ENVI SIR-C tape routines (see “Reading SIR-C CEOS Tapes” on
page 242).

ENVI User’s Guide Using Polarimetric Tools


1118 Chapter 11: Radar Tools

Note
If you are using SIR-C files dumped directly from tape to disk, or if you are using
SIR-C data on disk that were not read from tape, see “Using the CEOS Header Tool
to Find Missing Information” on page 1120 for instructions for entering required
data parameters.

For easier processing, name the files with the following convention:
filename_c.cdp and filename_l.cdp.
If your data are Multi-Look Detected (MLD), these are just 2-byte integer data and do
not need to be synthesized. For other data types, see “Using the CEOS Header Tool to
Find Missing Information” on page 1120 for instructions on finding the number of
lines, samples, and offset for the image, using the View CEOS Header tool. Then,
open the image by selecting File → Open Image File from the ENVI main menu bar,
and enter this information into the Header Info dialog that appears. (For complex
data, be sure to set the Strip Line Header? toggle button to Yes.)
Follow these steps to synthesize SIR-C data:
1. From the ENVI main menu bar, select one of the following options:
• Radar → Polarimetric Tools → Decompress-Synthesize Images →
Synthesize SIR-C Images
• Radar →Open/Prepare Radar File →Synthesize SIR-C Data
The Input Data Products Files dialog appears. Use this dialog to read the
SIR-C compressed scattering matrix files.
Note
Do not open the Stokes matrix files using the File menu selection from the
ENVI main menu bar.

Using Polarimetric Tools ENVI User’s Guide


Chapter 11: Radar Tools 1119

Figure 11-4: Data Products Files Dialog

2. Click Open File. The Enter Filename dialog appears.


3. Select a SIR-C scattering matrix (.cdp) filename. If the file is a valid ENVI
compressed data file with all of the required parameters, ENVI adds it to one
of the Selected Files fields in the Input Data Product Files dialog (depending
on whether the file is P-, L-, or C-band data). If you followed the suggested file
naming convention described previously, ENVI automatically adds the correct
filenames for the other two files to the appropriate fields. Otherwise, repeat the
file selection process for each of the bands.
If the input file is not a valid ENVI compressed data file, the SIR-C Header
Parameters dialog appears. For instructions, see “Entering Missing SIR-C
Parameters” on page 1119.
4. Click OK. The Synthesize Parameters dialog appears.
5. Set the parameters as described in “Selecting Synthesizing Parameters” on
page 1115.
6. Select output to File or Memory.
7. Click OK. All synthesized bands are placed in a single output file. ENVI adds
the resulting output to the Available Bands List.

Entering Missing SIR-C Parameters


If the SIR-C Header Parameters dialog appears when you select an input file, it
means that information is missing from the header. All of the known parameters are
listed in the dialog.

ENVI User’s Guide Using Polarimetric Tools


1120 Chapter 11: Radar Tools

Figure 11-5: SIR-C Header Parameters Dialog

1. Enter the number of Samples and Lines in the corresponding fields.


2. Enter the image size in the range direction (in kilometers) in the Width (km)
field.
3. Enter the scene size in the azimuth direction (in kilometers) in the Length
(km) field.
4. To skip any imbedded header and get to the beginning of the SIR-C data, enter
the byte offset in the Offset field.
5. Select the C or L band radio button.
6. Select SAR Channel Type by clicking on a SIR-C data type toggle button.
7. To strip line headers from the input data and exclude them from output image,
select Yes.
8. If the data are dumped directly from tape in CEOS format, they may have an
extra 12 bytes at the beginning of every line.
9. Click OK. The Input File dialog appears.
Using the CEOS Header Tool to Find Missing Information
If you are using SIR-C files dumped directly from tape to disk, or if you are using
SIR-C data on disk that were not read from tape, ENVI does not provide a utility to

Using Polarimetric Tools ENVI User’s Guide


Chapter 11: Radar Tools 1121

directly convert the data into compressed data product (.cdp) format so they can be
synthesized into images. You need to use ENVI’s View CEOS Header tool to gather
the required information for synthesizing a SIR-C image.
Note
You can also find missing information in the quicklook prints that JPL provided
with the data, or by printing or viewing one of the ASCII CEOS header files that
comes on the SIR-C distribution tapes.

You should have at least four files for your SIR-C data. The largest file is usually the
data file, and the second largest is usually the SAR leader file.
1. From the ENVI main menu bar, select Radar → Open/Prepare Radar
File →View Generic CEOS Header. The Enter Compressed Data Products
Filename dialog appears.
2. Select the SAR leader file and click Open. The CEOS Header Report dialog
appears.
3. Note the Processed Scene Range value. Enter this value in the Width
(km) field of the SIR-C Header Parameters dialog when you later synthesize
the data.
4. Note the Processed Scene Azimuth value. Enter this value in the Length
(km) field of the SIR-C Header Parameters dialog when you later synthesize
the data.
5. Note the Product type value. Select the appropriate SAR Channel Type
radio button in the SIR-C Header Parameters dialog when you later synthesize
the data.
6. Close the CEOS Header Report dialog.
7. From the ENVI main menu bar, select Radar → Open/Prepare Radar
File →View Generic CEOS Header again. The Enter Compressed Data
Products Filename dialog appears.
8. Select the data file and click Open. The CEOS Header Report dialog appears.
9. Note the Number of Samples and Number of Lines values. Enter these
values in the Samples and Lines fields of the SIR-C Header Parameters dialog
when you later synthesize the data.
10. Note the Record Info value. The last number in the array is the size of the
image offset or embedded header. Enter this value in the Offset field of the
SIR-C Header Parameters dialog when you later synthesize the data. If there
are two fields labeled Record Info in the CEOS Header Report, then take the

ENVI User’s Guide Using Polarimetric Tools


1122 Chapter 11: Radar Tools

two large numbers at the end of these lines and add them to determine the
image offset.
11. Now that you have the information you need to synthesize the SIR-C images,
follow the steps in “Synthesizing SIR-C Data” on page 1117. When you enter
information in the SIR-C Header Parameters dialog, be sure to click the Yes
radio button next to Strip Line Header?

Extracting Polarization Signatures


Use Polarization Signatures to extract 3D representations of the complete scattering
characteristics for a single pixel or the average for an ROI from either the Stokes
matrix for AIRSAR data or from the compressed scattering matrix for SIR-C data.
You can extract the signatures based on the current pixel location on a displayed
image or extract for ROIs that were defined using ENVI’s ROI definition procedures.
ENVI extracts both co- and cross-polarization signatures so that you can view and
process them as standard ENVI images or display them in a Polarization Signature
Viewer (see “Using the Polarization Signature Viewer” on page 1128).

Background
The first imaging SAR systems collected data with only one polarization state. For
example, the SEASAT satellite, launched in 1978, measured the backscatter return
for a horizontally polarized transmitted signal, and a horizontally polarized return
signal. Several more recent systems have also utilized single polarization SAR,
including ERS-1, JERS-1, SIR-A, and SIR-B. Only in the past decade have SAR
sensors been capable of measuring more than one polarization state while preserving
phase information. These systems, called POLSAR, transmit and receive both
vertically and horizontally polarized microwave signals. Currently, the most
commonly available POLSAR datasets are those generated from JPL’s AIRSAR or
SIR-C instruments.

Ellipticity and Orientation Angles


As an electromagnetic wave propagates through space, its electric field vector rotates
in a plane perpendicular to the direction of propagation. In rotating, the electric field
traces out an ellipse. The shape of this polarization ellipse is completely described by
two parameters: the ellipticity angle (E) and the ellipse orientation angle (O) The V

Using Polarimetric Tools ENVI User’s Guide


Chapter 11: Radar Tools 1123

and H axes are in a plane perpendicular to the direction at which the radar signal is
transmitted.

Figure 11-6: Polarization Ellipse

If the electromagnetic wave has a linear polarization, then the polarization ellipse will
be a straight line which corresponds to an ellipticity angle of 0 or 180. For linear
polarizations, an orientation angle of 0 or 180 degrees represents horizontal
polarization, while an orientation angle of 90 degrees represents vertical polarization.
POLSAR sensors usually transmit and receive both vertical and horizontal linearly
polarized radiation. An excellent source for more information on ellipticity and
orientation angles is the chapter on Radar Fundamentals in Principles and
Applications of Imaging Radar.
For a SAR system that coherently transmits and receives both horizontal and vertical
polarizations, you can use the elements of the resulting scattering matrix to calculate
images representing any desired polarization state (that is, any valid combination of
ellipticity and orientation angles). Therefore, for POLSAR data, you are not limited
to synthesizing images of backscatter at VV, HH, or HV polarizations. You can
synthesize an image that shows what the backscatter would be with transmitted and
received signals of any polarization, including non-linear polarizations.

Using Polarization Signatures


Although coherent POLSAR data allows the calculation of radar backscatter at any
ellipticity and orientation angle, it is generally not practical to analyze POLSAR data
by synthesizing a large number of images with different polarizations. Polarization
signatures, which are 3D representations of the complete scattering characteristics of

ENVI User’s Guide Using Polarimetric Tools


1124 Chapter 11: Radar Tools

a pixel or ROI, are commonly used for this purpose. Polarization signature plots show
the variation in scattering intensity, normalized scattering cross-section, or dB as a
function of ellipticity and orientation angles. In a polarization signature plot, linear
vertical polarization is shown in the center of the plot, while linear horizontal
polarization is shown at the center of the X axis, at both the maximum and minimum
of the Y axis. See Figure 11-7 for an example.

Figure 11-7: Example Polarization Signature Plot

Polarization signatures provide a wealth of information about various properties of a


surface. Radiation with different polarizations scatters off a given surface in different
ways. The polarization signatures can help to determine which polarization images
may optimize the signal from a particular feature. They can also be used to determine
which polarization images may best distinguish two features of interest.

Using Polarimetric Tools ENVI User’s Guide


Chapter 11: Radar Tools 1125

One polarization signature can show either co-polarized or cross-polarized


polarizations. Co-polarized polarizations have the same transmitted and received
polarizations. HH and VV are the two linear co-polarized options. Cross-polarized
polarizations have orthogonal transmitted and received polarizations. HV or VH are
the linear cross-polarized options.
Tip
See the ENVI Tutorials on the ITT Visual Information Solutions website (or on the
ENVI Resource DVD that shipped with your ENVI installation) for step-by-step
examples.

References:
Evans, D.L., T.G. Farr, J.J. van Zyl, and H.A. Zebker, 1988, Radar polarimetry:
analysis tools and applications. IEEE Transactions on Geosciences and Remote
Sensing, Vol. 26, No. 6, pp. 774-789.
Raney, R.K., 1998, Radar fundamentals: technical perspective, in Principles and
Application of Imaging Radar (F.M. Henderson and A.J. Lewis, eds.), Manual of
Remote Sensing, Third Edition, Volume 2, John Wiley and Sons, Inc.
van Zyl, J.J., H.A. Zebker, and C. Elachi, 1987, Imaging radar polarization
signatures: theory and observation. Radio Science, Vol. 22, No. 4, pp. 529-543.
van Zyl, J. J., 1989, Unsupervised classification of scattering behavior using radar
polarimetry data, IEEE Transactions on Geosciences and Remote Sensing, vol. 27,
No. 1, pp. 36-45.
Zebker, H.A., J.J. van Zyl, and D.N. Held, 1987, Imaging radar polarimetry from
wave synthesis. Journal of Geophysical Research, Vol. 92, No. 31, pp. 683-701.

Extracting Polarization Signatures from Single Pixels


Use the following procedure to extract polarization signatures for single pixels in a
display group directly from compressed quad-polarized AIRSAR Stokes matrix data
or from SIR-C quad-polarized compressed scattering matrix data.
1. Display the synthesized image or another coregistered image.
2. Interactively set the pixel to extract in the displayed image by middle-clicking
on the desired pixel in the Zoom window.
3. From the Display group menu bar, select Tools → Polarization Signatures →
AIRSAR or SIR-C. Depending on whether you select AIRSAR or SIR-C, the
Input Stokes Matrix Files or the Input Data Products dialog appears.

ENVI User’s Guide Using Polarimetric Tools


1126 Chapter 11: Radar Tools

4. Enter the Stokes matrix filenames as described in “Synthesizing JPL AIRSAR


Data” on page 1113, or enter the scattering matrix filenames as described in
“Synthesizing SIR-C Data” on page 1117. The polarization signature for the
currently selected pixel is automatically loaded into the Polarization Signature
Viewer.
You can change the polarization signature to plot by selecting Options →
Extract Current Pixel from the Polarization Signature Viewer menu bar to
extract and plot a polarization signature for the selected pixel in the Zoom
window.
You can set or control specific parameters. For details, see the “Using the
Polarization Signature Viewer” on page 1128.

Extracting Polarization Signatures from ROIs


Use the following procedure to calculate polarization signatures for ROIs. The
signatures are extracted directly from the AIRSAR compressed Stokes matrix files or
the SIR-C scattering matrix files, and are available for display either in polarization
signature viewers or as images in standard ENVI displays. ENVI extracts and saves
both co- and cross-polarized signatures in a multiband output file. Each signature has
91 samples (-45 to 45 degrees ellipticity angle) and 181 lines (0 to 180 degrees
orientation angle).
1. Display a synthesized image or other coregistered dataset and define ROIs (see
“Defining ROIs” on page 323).
2. From the ENVI main menu bar, select Radar → Polarimetric Tools →
Extract Polarization Signatures → AIRSAR or SIR-C. Depending on
whether you select AIRSAR or SIR-C, the Input Stokes Matrix Files or the
Input Data Products dialog appears.
3. Enter the Stokes matrix filenames as described in “Synthesizing JPL AIRSAR
Data” on page 1113, or enter the scattering matrix filenames as described in
“Synthesizing SIR-C Data” on page 1117.
4. Click OK. The Polsig Parameters dialog appears. The ROIs appear in the
Select Polsig Images field, with one entry for each of the P-, L-, and C-band
images (AIRSAR) or L- and C-band images (SIR-C).

Using Polarimetric Tools ENVI User’s Guide


Chapter 11: Radar Tools 1127

Figure 11-8: Polsig Parameters Dialog

5. Select the ROI name(s) for the polarization signatures.


6. Select the polarization signature output type from the following:
• Intensity: To output the signature as floating-point intensity.
• Normalized: To output the signature as normalized intensity using the
maximum image value. The normalized intensity from 0 to 1 is calculated
by dividing the signature by its maximum value.
• dB: To output the signature in decibels.
The z axis units you select are used for the polarization signature images; all
three axis units will be available when the data are visualized in the
Polarization Signature Viewer.

ENVI User’s Guide Using Polarimetric Tools


1128 Chapter 11: Radar Tools

7. Select output to File or Memory. ENVI saves the polarization signatures (co-
or cross-polarized) as a multiband image, where each band of the image is a
separate 91 samples (-45 to 45 degrees ellipticity angle) by 181 lines (0 to 180
degrees orientation angle) polarization signature for one of the selected
frequencies with the intensity representing the z axis (intensity, normalized
intensity, or dB).
8. In the Load Bands to Polsig Viewers field, select whether or not to load each
signature into its own Polarization Signature Viewer after it is extracted.
Note
Selecting Yes may create numerous windows and use a significant amount of
resources. The preferred alternative is to select No and to use the Polarization
Signature Viewer function to view individual signatures (see the following
“Using the Polarization Signature Viewer” section).

9. Click OK. ENVI calculates both co-polarized and cross-polarized signatures


for each selected ROI and adds the resulting output to the Available Bands
List. You can also analyze the output in the Polarization Signature Viewers
(see the following “Using the Polarization Signature Viewer” section).

Using the Polarization Signature Viewer


Use the Polarization Signature Viewer to interactively view and analyze polarization
signatures extracted from AIRSAR and SIR-C data. The polarization signatures
display as floating-point, 2D images and 3D surface plots (wire mesh, scaled wire
mesh, or gray scale). The x and y axes represent ellipticity and orientation
respectively, and you can set the vertical axis to plot as intensity, dB, or normalized
intensity. You can toggle the plots between co- and cross-polarized signatures and
display signatures displayed for all of the available frequencies. Statistics display for
the signatures, which you can save to ASCII files. You can change the color tables
applied to the plots, and save the plots to image files or print them.
The Polarization Signature Viewer starts automatically when you extract a
polarization signature.
To load a previously extracted polarization signature, select Radar → Polarimetric
Tools → Extract Polarization Signatures → View Saved Signatures from the
ENVI main menu bar.

Using Polarimetric Tools ENVI User’s Guide


Chapter 11: Radar Tools 1129

When the Polarization Signature Viewer appears, a 3D wire mesh surface displays on
the left and a 2D gray scale image of the signature displays on the right of the Viewer.
The statistics for the current signature are listed below the plot.

Figure 11-9: Polarization Signature Viewer

Viewing Polarization Signature Data


In the Polarization Signature Viewer, you can interactively view the signature details,
set the axes parameters, change the type of polarization signature to view, display the
3D plot as a surface or as a wire frame, apply color tables to 3D plot and the 2D
image, and rotate and move the 3D plot.
Displaying Signature Details
An interactive cursor in the 2D polarization signature drives a 3D cursor on the 3D
plot and vice versa. Orientation and ellipticity angles and pixel values representing
the radar backscatter at each pixel track the 3D cursor. These values are listed in the
lower left corner of the 3D plot in ellipticity, orientation angle, z-value order.
To plot crosshairs on both the 2D and 3D plots, left-click and drag the cursor in the
2D signature or in the 3D plot.

ENVI User’s Guide Using Polarimetric Tools


1130 Chapter 11: Radar Tools

Setting Displayed Axes


Use the following options from the Polarization Signature Viewer menu bar:
• To turn the axes off, select Options → Axis: Off.
• To display a single (x,y,z) axis: Options → Axis: Single.
• To display an axis cube, select Options → Axis: Cube.
Changing Z-Axis Units
To selectively plot the vertical axis of the polarization signature as intensity, dB
(decibels) or normalized intensity (intensity divided by the maximum intensity giving
a 0 to 1 data range), select Polsig_Data → plot_option from the Polarization
Signature Viewer menu bar.
Setting Z-Axis Ranges
To change the default range of the z-axis:
1. Double left-click on the z-axis or select Options → Edit Z-Axis Ranges from
the Polarization Signature Viewer menu bar. The Z-Axis Scaling dialog
appears.
2. For each signature type (Intensity, dB, Normalized), select whether to use auto
scaling or custom scaling by clicking the Auto toggle button and selecting Yes
or No. If you select No, enter the minimum and maximum scaling values. Auto
scaling uses the minimum and maximum of the signature data.
3. Click OK.
Displaying Co- and Cross-Polarized Signatures
To plot co-polarized or cross-polarized signatures in the Polarization Signature
Viewer, select Polsig_Data → Co-Pol or Cross-Pol.
Applying Color Tables
To apply one of ENVI’s standard color tables to both the 3D plot and the 2D image:
1. From the Polarization Signature Viewer menu bar, select Options → Color
Tables. The Polsig Color Tables dialog appears.
2. Select a color table from the Available Color Tables list. ENVI applies the
color table to all displayed Polarization Signature Viewers. The color table
only applies to the 3D plot if it is a shaded surface. For more information about
color tables, see “Applying ENVI Color Tables and Density Slices” on
page 120.

Using Polarimetric Tools ENVI User’s Guide


Chapter 11: Radar Tools 1131

Figure 11-10: Polsig Color Tables Dialog

Plotting Band Polarization Signatures


When you start the Polarization Signature Viewer by extracting from the current
pixel, the Frequency menu option appears in the Polarization Signature Viewer menu
bar. The band names P, L, and C for AIRSAR; and L and C for SIR-C are available.
To plot the polarization signature for a band, select Options → Frequency and select
the band name.
Only frequencies (bands) that correspond to the currently opened compressed data
files are available.
Displaying Shaded Surfaces
To display the signature as a 3D shaded surface, select Options → Surface: Shaded.
To return to the original 3D wire frame image, select Options → Surface: Wire
Frame.
ENVI retains any color table changes.

ENVI User’s Guide Using Polarimetric Tools


1132 Chapter 11: Radar Tools

Changing Plot Colors


To change the background/foreground color scheme of the 3D plot, select Options →
Background: Black or Background: White from the Polarization Signature Viewer.
Rotating and Panning the 3D Plot
To rotate the 3D surface or 3D wire frame image, left-click outside the signature
surface and drag the signature to the desired orientation.
To move the 3D surface or 3D wire frame image around on the screen, middle-click
and drag it to the desired location.
To zoom in and out of the 3D plot, right-click and drag the cursor to the right to zoom
in and drag it to the left to zoom out.
To reset the surface to its default position, double left-click.
Changing the Default Position
To change the default position of the 3D plot, set the desired position and select
Options → Save Current View as Default from the Polarization Signature Viewer.
The next time you double-click to reset the image, it appears in the new default
position.
Displaying Current Pixel Polarization Signature
To display a polarization signature for the current pixel or to display a previously
saved signature, respectively.
To display a polarization signature for the current pixel, select Options → Extract
Current Pixel from the Polarization Signature Viewer menu bar.
Displaying Previously Saved Signatures
1. From the Polarization Signature Viewer menu bar, select Options → Load
New Polsig. The New Polsig Bandname dialog appears.
2. Select the input signature from the list.
3. Click Apply to apply the changes to the 3D plot.
Copying Signatures
To copy the current polarization signature to a new Polarization Signature Viewer,
select Options → New Polsig Window from the Polarization Signature Viewer menu
bar.

Using Polarimetric Tools ENVI User’s Guide


Chapter 11: Radar Tools 1133

Restoring Saved Polarization Signatures


1. From the ENVI main menu bar, select Radar → Polarimetric Tools →
Extract Polarization Signatures → View Saved Signatures. The
Polarization Signature Viewer appears.
2. From the Polarization Signature Viewer, select Options → Load New Polsig
and select the signature from the list of available polarization signatures. The
available polarization signatures are contained in an ENVI file that must
already be opened in ENVI.
Closing All Polarization Signature Viewers
To close all open Polarization Signature Viewers, select Options → Close all Polsig
Windows from the Polarization Signature Viewer menu bar.

Managing Polarization Signature Plots


Use the File menu to output the polarization signature plot, close plots, and to open
other input compressed data files.
Specifying a Different File
To change the Stokes file used to calculate the polarization signature, choose File →
Stokes Matrix Filename from the Polarization Signature Viewer menu bar and
select a new input file.
This option is only available when you start the Polarization Signature Viewer by
extracting from the current pixel.
Saving Signatures
To save the 3D signature as an image file, select File → Save Plot As → Image File
from the Polarization Signature Viewer menu bar.
To save the 3D signature as a VRML 2.0 file, select File → Save Plot As → VRML
from the Polarization Signature Viewer menu bar.
To print the 3D signature, select File → Print from the Polarization Signature Viewer
menu bar. For details, see “Saving Images from Displays” on page 15.
Saving Statistics to ASCII Files
To save the current polarization signature statistics to an ASCII file:
1. From the from the Polarization Signature Viewer menu bar, select File → Save
Stats as ASCII.

ENVI User’s Guide Using Polarimetric Tools


1134 Chapter 11: Radar Tools

2. Enter an output filename.


3. Click OK.
Tip
If you load another signature, you can save the statistics for it and append them to
the same file by using the same filename.

The numbers next to the title in the ASCII file are the pixel locations of the pixel the
signature was extracted from.

Displaying Polarization Signatures as Images


You can display and manipulate polarization signatures that are saved as images
using ENVI’s image processing functions.
To load the signatures into a display, use the Available Bands List.
The signatures display with an orientation angle of 180 degrees and an ellipticity of
-45 degrees in the upper-left image corner

Using Polarimetric Tools ENVI User’s Guide


Chapter 11: Radar Tools 1135

The following figure shows polarization signatures and surface plots that are
annotated to clarify the relation between the images and the default orientation 3D
polarization signatures.

Figure 11-11: Examples of 2D and 3D (wire frame) Polarization Signatures


Displayed as Images and Annotated to Clarify Relations Between 2D and 3D
Plots

Multilooking SIR-C Compressed Data


Use Multilook to reduce speckle noise in SAR data. Use SIR-C Multilook to
multilook SIR-C data on disk to a specified number of looks, number of lines and
samples, or azimuth and range resolutions.
The data to multilook must be compressed data.
1. From the ENVI main menu bar, select Radar → Polarimetric Tools →
Multilook Compressed Data → SIR-C Multi-Look. The Input Data Product
Files dialog appears.

ENVI User’s Guide Using Polarimetric Tools


1136 Chapter 11: Radar Tools

2. Select a compressed input file using the procedures described in “Synthesizing


JPL AIRSAR Data” on page 1113. The SIRC Multi-Look Parameters dialog
appears.
3. Choose the files to multilook by from the Select Files to Multilook list.

Figure 11-12: SIRC Multi-Look Parameters Dialog

4. Enter the number of looks in the Samples (range) and Lines (az) directions or
select from the following options.
• To specify the number of pixels in the output image, enter the values in the
Pixels fields for the samples and lines.
• To specify the output pixel size in meters, enter the values in the Pixel Size
(m) fields for samples and lines.

Using Polarimetric Tools ENVI User’s Guide


Chapter 11: Radar Tools 1137

When you enter a value for one of the parameters, ENVI automatically
calculates the others to match. For example, if you enter the Pixel Size as
30 m, then ENVI calculates the corresponding number of pixels and the looks
and changes them in the corresponding fields.
ENVI supports both integer and floating-point number.
5. To perform Spatial Subsetting on the data, click Spatial Subset.
6. Enter a base name in the Enter Base Filename field. ENVI uses this value as
the basis for multiple filenames, one for each frequency selected. For example
if you enter sirc as the base name and both C-band and L-band data are being
processed, then ENVI creates two output files named sirc_c.cdp and
sirc_l.cdp
7. Click OK.
Use the synthesize function to generate image data from the output multilooked
compressed data files (see “Synthesizing SIR-C Data” on page 1117).

Generating Phase Images


Use Phase Image to generate a phase image for AIRSAR or SIR-C data as a means
to measure the phase difference between the horizontal and vertical polarizations.
The phase difference is measured in either radians or degrees and ranges from -π to π
or -180 degrees to 180 degrees.
A piecewise linear stretch that sets -π and π to 0 and 0 radians to 255 will map the
positive and negative angles to the same level.
Additionally, use band math to calculate the absolute value of the result (using
abs(b1)) (see “Band Math” on page 306).
1. From the ENVI main menu bar, select Radar → Polarimetric Tools → Phase
Image → AIRSAR or SIR-C. Depending on whether you select AIRSAR or
SIR-C, the Input Stokes Matrix Files or the Input Data Products dialog
appears.
2. Click Open File and select the input compressed data file.
3. Click OK. The Phase Image Parameters dialog appears.
4. In the Phase Images field, select the check boxes next to the bands to use for
the phase image calculation.
5. Select Radians or Degrees for output angle units.
6. To perform Spatial Subsetting on the data, click Spatial Subset.

ENVI User’s Guide Using Polarimetric Tools


1138 Chapter 11: Radar Tools

7. Select output to File or Memory.


8. Click OK. ENVI adds the resulting output to the Available Bands List.

Generating Pedestal Height Images


Use Pedestal Height Image to generate a pedestal height image for AIRSAR or
SIR-C data as a means to measure the amount of multiple scatter of the radar wave
for every pixel (higher pedestal heights mean more multiple scattering). The pedestal
height is the height of a polarization signature above 0 and the value is calculated by
averaging the following four polarization combinations: orientation 0 degrees,
ellipticity -45 degrees; orientation 90 degrees, ellipticity -45 degrees; orientation 0
degrees, ellipticity 45 degrees; orientation 90 degrees, ellipticity 45 degrees.
The pedestal height of a polarization signature plot is a characteristic of the plot that
provides information about the degree of polarization of the return signal. The
pedestal height is the lowest z-axis value in the polarization signature. A larger
pedestal height indicates low polarization purity. Low polarization purity (that is, a
high degree of depolarization) may be due to multiple scattering, differences in
scattering characteristics among pixels in a ROI, or noise in the image. It could also
be due to movement of the surface at the time of measurement (foe example, ocean
waves or vegetation in wind).
See the references in “Extracting Polarization Signatures” on page 1122 for more
information about pedestal height.
1. From the ENVI main menu bar, select Radar → Polarimetric Tools →
Pedestal Height Image → AIRSAR or SIR-C. Depending on whether you
select AIRSAR or SIR-C, the Input Stokes Matrix Files or the Input Data
Products dialog appears.
2. Select the input compressed data file.
3. Click OK. The Pedestal Height Image Parameters dialog appears.
4. Select the check boxes to select the bands to use for the pedestal height image
generation.
5. To perform Spatial Subsetting on the data, click Spatial Subset.
6. Select output to File or Memory.
7. Click OK. ENVI adds the resulting output to the Available Bands List.

Using Polarimetric Tools ENVI User’s Guide


Chapter 11: Radar Tools 1139

Generating AIRSAR Scattering Classification Images


Use AIRSAR Scattering Classification to generate a classification image that
discriminates between areas with no vegetation, areas with low and medium level
vegetation cover, forested areas, and urban areas. ENVI also generates individual
scattering mechanism images (odd bounce, double bounce, volume scattering).
The classification routine uses fully polarimetric AIRSAR data to determine the
nature of radar scattering mechanisms for each pixel within the scene. ENVI pays
particular attention to the presence and nature of vegetation. (This is an IDL
implementation of routines similar to the MAPVEG program developed by Dr. Tony
Freeman at JPL.)
All three (P, L, and C-band) Stokes matrix files are required as input for this
classification.
1. From the ENVI main menu bar, select Radar → Polarimetric Tools →
AIRSAR Scattering Classification. The Input Stokes Matrix Files dialog
appears.
2. Select the AIRSAR compressed Stokes matrix files to use for the
classification.
If the file has a valid AIRSAR header with all of the required parameters, the
filename is listed in one of the Selected Files fields in the Input Stokes Matrix
File dialog, depending on whether it is P-, L-, or C-band data. If you followed
the suggested file naming convention described previously, correct filenames
for the other two files are automatically entered into the appropriate fields. If
not, you must repeat the file selection process for each band.
If the file does not have a valid AIRSAR header, or if values are missing from
the header, the AIRSAR Header Parameters dialog appears. Enter the missing
values as described in “Entering Missing AIRSAR Parameters” on page 1115.
3. Click OK. The AIRSAR Scatter Classification dialog appears.
4. Enter the Kernel Size to use to determine the average values used in the
scattering mechanism determination.
5. Perform optional Spatial Subsetting.
6. Select output to File or Memory for both the classification and the rule images
(the scattering mechanism images).
7. Click OK. ENVI adds the resulting output to the Available Bands List.

ENVI User’s Guide Using Polarimetric Tools


1140 Chapter 11: Radar Tools

Using TOPSAR Tools


Use TOPSAR Tools to read integrated TOPSAR data, view the headers, and convert
the integrated TOPSAR files to physical units. Integrated TOPSAR data typically
includes a digital elevation model (DEM), C-band VV data, incidence angle image,
correlation image, and L- and P-band polarimetric AIRSAR data. See “Using
Polarimetric Tools” on page 1113 for additional analysis tools.
Reference:
AIRSAR Integrated Processor Documentation, Data Formats, Version 0.01, May 3,
1995, JPL Publication, Jet Propulsion Laboratory, Pasadena, CA.

Opening TOPSAR Files


Use Open TOPSAR File to read integrated TOPSAR data. See “Opening Radar
Files” on page 179 for details.
To read all the TOPSAR files and automatically convert them to physical units see the
following section. To synthesize AIRSAR images see “Synthesizing JPL AIRSAR
Data” on page 1113.

Converting TOPSAR Data


Use Convert TOPSAR Data to read and convert the raw TOPSAR format data files
to physical units (floating-point data). The Cvv file is converted to sigma zero. The
incidence angle file is converted to 0-180 degrees angles. The correlation file is
converted to 0-1 values. The DEM is converted to meters.
1. From the ENVI main menu bar, select Radar → TOPSAR Tools → Convert
TOPSAR Data. The Enter Filename dialog appears.
2. Select a datafile and click Open. The TOPSAR Conversion Parameters dialog
appears.
3. Select the check boxes next to the filenames of the files you want to convert.
4. To perform Spatial Subsetting by clicking Spatial Subset.
5. Select output to File or Memory.
6. Click OK. ENVI places all of the converted files into a single output file with a
band for each input file.

Using TOPSAR Tools ENVI User’s Guide


Chapter 11: Radar Tools 1141

Replacing Bad DEM Values


You can replace bad values in digital elevation models (DEMs) with values calculated
using a surface fitting technique. See “Replacing Bad Values” on page 1077 for
instructions.

ENVI User’s Guide Using TOPSAR Tools


1142 Chapter 11: Radar Tools

Using TOPSAR Tools ENVI User’s Guide


Appendix A
ENVI Preference
Settings
This chapter describes the parameters associated with ENVI preferences. It includes:

Configuration Parameter Descriptions . . 1144 Installing Other TrueType Fonts with ENVI . .
Editing System Graphics Colors . . . . . . . 1163 1169
Editing System Color Tables . . . . . . . . . . 1165 Modifying IDL CPU Parameters . . . . . . 1171

ENVI User’s Guide 1143


1144 Appendix A: ENVI Preference Settings

Configuration Parameter Descriptions


This section describes the ENVI parameters that are available in the System
Preferences dialog, and in the envi.cfg file. For more information on setting these
values, see Setting ENVI Preferences in Getting Started with ENVI.
The descriptions in the next sections show the parameter names as they appear on the
System Preferences dialog tabs in boldface text. The parameter names from the
envi.cfg file are in courier text.

User-Defined File Preference Settings


The following fields are on the System Preferences dialog User Defined Files tab.

Dialog Option/
Description
.cfg File Option

Graphics Colors File Optional. A file that defines the graphics colors
default graphic colors used by ENVI. “ENVI Graphic Colors File” on
file page 1164 describes the file format, and “Editing
System Graphics Colors” on page 1163 details
how to edit the file through the ENVI interface.
Color Table File Optional. A file that defines the color tables used
default color table in ENVI. “Editing System Color Tables” on
file page 1165 details how to edit the color table
through the ENVI interface.
ENVI Menu File Optional. A file that defines the ENVI main menu
default envi menu file bar options available for the installation. The topic
ENVI Main Menu Bar Definition File in Getting
Started with ENVI describes the file format.
Display Menu File Optional. A file that defines the Display group
default display menu menu bar options available for the installation.
file The topic Display Group Menu Bar Definition
File in Getting Started with ENVI describes the
file format.

Table A-1: User Defined Files Tab Parameters

Configuration Parameter Descriptions ENVI User’s Guide


Appendix A: ENVI Preference Settings 1145

Dialog Option/
Description
.cfg File Option

Shortcut Menu File Optional. A file that defines the display group
default display right-click menu options available for the
shortcut menu file installation. The topic Display Group Right-Click
Menu Definition File in Getting Started with ENVI
describes the file format.
Map Projection File Optional. A file that defines map projections.
default map projection “ENVI Map Projections File” on page 994
file describes the file format.

Previous Files File Optional. A file that defines the filenames to


default previous files display when choosing from a list of images
file previously opened in ENVI. “ENVI Previous Files
List” on page 1155 describes the file format.
Tape Device Optional. The default system device name for tape
tape device name drives. A typical example for a SCSI tape drive on
a UNIX machine might be /dev/rst0 or
/dev/rmt2h. Check your system documentation
for the correct default device name for your
specific installation.
Startup Script File Optional. A script file to run automatically at
default startup script ENVI startup. The topic Using Startup Scripts in
file Getting Started with ENVI describes the file
format.
Useradd Text File Optional. A file that contains button names, event
default useradd text handlers, and so on, for user-defined plot, spectral
file analyst, and map projection routines, and/or map
projection units (see “User-Defined RPC Reader”
in the ENVI Programmer’s Guide.
Math Expression File Optional. A file that defines math expressions, to
default math load by default into the Previous Expressions
expression file field of the Band Math and Spectral Math dialogs.

Table A-1: User Defined Files Tab Parameters (Continued)

ENVI User’s Guide Configuration Parameter Descriptions


1146 Appendix A: ENVI Preference Settings

Dialog Option/
Description
.cfg File Option

User Defined Move Routine Optional. Specifies a user-defined procedure to


user defined move call when you move the Zoom box within an
routine Image window (see “User Move Routines” in the
ENVI Programmer’s Guide).
User Defined Motion Optional. Specifies a user-defined procedure to
Routine call when you move the mouse within an Image
user defined motion window (see “User Move Routines” in the ENVI
routine Programmer’s Guide).

Table A-1: User Defined Files Tab Parameters (Continued)

Default Directory Preference Settings


The following fields are on the System Preferences dialog Default Directory tab.

Dialog Option/
Description
.cfg File Option

Data Directory The directory for input images. This is the default
default data directory data directory ENVI uses unless you specify
another path when opening a file.
Temp Directory The directory used to store ENVI temporary files.
default tmp directory
Output Directory The directory for output files. ENVI writes output
default output files to this directory unless you specify another
directory path when entering an output filename.

Save_Add Directory Optional. The directory for custom IDL routines.


default save_add Routines located in this directory are
directory automatically restored or compiled at ENVI
startup.

Table A-2: Default Directories Tab Parameters

Configuration Parameter Descriptions ENVI User’s Guide


Appendix A: ENVI Preference Settings 1147

Dialog Option/
Description
.cfg File Option

Spec Lib Directory The directory for spectral library files.


default spectral
library directory
Alternate Header Directory The directory for header files associated with input
alternate header images from read-only devices, such as a CD.
directory ENVI stores header files in the same directory as
the input image; however, when the file is from a
read-only device, ENVI is unable to write a header
file and instead writes to the alternate header
directory. If ENVI is unable to locate a header file,
it looks in the alternate header directory.

Table A-2: Default Directories Tab Parameters (Continued)

Display Default Preference Settings


The fields are on the System Preferences dialog Display Default tab.

Dialog Option/
Description
.cfg File Option

Image Window Xsize/ Sets the initial size of the full resolution Image
Image Window Ysize window in pixels.
image window default
xsize/image window
default ysize

Image Window Scroll Bars Specifies whether the Image window has scroll
image window scroll bars.
bars

Table A-3: Display Defaults Tab Parameters

ENVI User’s Guide Configuration Parameter Descriptions


1148 Appendix A: ENVI Preference Settings

Dialog Option/
Description
.cfg File Option

Scroll Window Xsize/ Sets the initial size of the Scroll window in pixels.
Scroll Window Ysize
scroll window default
xsize/scroll window
default ysize
Zoom Window Xsize/ Sets the initial size of the Zoom window in pixels.
Zoom Window Ysize
zoom window default
xsize/zoom window
default ysize
Zoom Window Scroll Bars Specifies whether the Zoom window has scroll
zoom window scroll bars.
bars

Zoom Window Zoom Factor Sets the Zoom window zoom factor.
zoom window zoom
factor

Zoom Window Interpolation Sets the interpolation method to use when


zoom window zooming in the Zoom window. The choices are:
interpolation Nearest Neighbor, Bilinear, Bicubic, Optimized
Bicubic.
Display Window Style Specifies which combination of three windows
display window style will appear in the display group. The choices are:
Image/Scroll/Zoom, Scroll/Zoom, Image Only,
and Zoom Only.
Display Graphic Color Sets the color of the Zoom box, Image box, and
window graphic color Zoom controls.

Display Retain Value Sets the control of the backing store. A retain
display retain value value of 0 specifies no backing store. A retain
value of 1 requests that the server or window
system provide backing store. A retain value of 2
(default) specifies that IDL provide backing store.

Table A-3: Display Defaults Tab Parameters (Continued)

Configuration Parameter Descriptions ENVI User’s Guide


Appendix A: ENVI Preference Settings 1149

Dialog Option/
Description
.cfg File Option

Display Default Stretch Sets the default stretch to use for images loaded
display default into display groups. The options are: % Linear,
stretch Linear Range, Gaussian, Equalize (histogram
equalization), and Square Root (square root
stretch). For % Linear, Linear Range, Gaussian,
specify the value in the field next the drop-down
list.
Scroll/Zoom Position Sets the initial position (Left, Right, Above,
(Style 1) Below, Within, Off) of the Zoom and Scroll
scroll and zoom window windows relative to the Image window.
default position

Zoom Position (Style 2) Sets the location of the Zoom window (Left,
zoom window default Right, Off), if only the Zoom and Scroll windows
position display.

RGB Colors Per Image Specifies how many of the 256 colors in the color
number of colors per table to use for each RGB color quantized image
rgb image display. ENVI runs on 8- or 24-bit color
workstations. These settings are for 8-bit mode.
Each Image window occupies a certain range of
entries in the color table.
Gray Scale Colors Per Specifies how many of the 256 colors in the color
Image table to use for each gray scale display. ENVI runs
number of colors per on 8- or 24-bit color workstations. These settings
gray scale image are for 8-bit mode. Each Image window occupies a
certain range of entries in the color table.
Edit System Graphic Colors Opens the Edit Graphic Colors dialog, which is
detailed in “Editing System Graphics Colors” on
page 1163.
Edit System Color Tables Opens the ENVI Color Table Editor dialog, which
is detailed in “Editing System Color Tables” on
page 1165.

Table A-3: Display Defaults Tab Parameters (Continued)

ENVI User’s Guide Configuration Parameter Descriptions


1150 Appendix A: ENVI Preference Settings

Plot Default Preference Settings


The following fields are on the System Preferences dialog Plot Default tab.

Dialog Option/
Description
.cfg File Option

Background Color Sets the plot window background color.


plot window default
background color

Foreground Color Sets the plot window foreground color.


plot window default
foreground color
Font Sets the plot window font for the axis labels and
plot window default plot title.
font
Charsize Sets the plot window character size.
plot window default
charsize
Axis Thickness Sets the plot window thickness of the x and y axis
plot window default lines (1 is normal).
axis thickness
Minor Ticks Sets the number of minor tick marks to use in the
plot window default plot window.
minor ticks
Tick Length Sets the length of the major tick marks in the plot
plot window default window, measured as a ratio of the axis length
tick length normalized to 1.0, (for example, a length of .02
results in ticks that are 2% of the length of the
entire axis).

Table A-4: Plot Defaults Tab Parameters

Configuration Parameter Descriptions ENVI User’s Guide


Appendix A: ENVI Preference Settings 1151

Dialog Option/
Description
.cfg File Option

Window xsize/ Sets the plot window initial size in pixels.


Window ysize
plot window default
xsize/plot window
default ysize
X-Axis Margin: Left/ Sets the plot window size (in characters) of the left
X-Axis Margin: Right and right margins around the plot axis.
plot window default Note - In the envi.cfg file, the X-Axis Margin:
xmargin Left/Right values are combined. The first value is
the left margin and the second value is the right
margin (for example, {8,1}).
Y-Axis Margin: Bottom/ Sets the plot window size (in characters) of the
Y-Axis Margin: Top bottom and top margins around the plot axis.
plot window default Note - In the envi.cfg file, the Y-Axis Margin:
ymargin Bottom/Top values are combined. The first value
is the bottom margin and the second value is the
top margin (for example, {4,3}).
Key Margin Sets the size of the plot window margin when the
plot window default key or data labels are enabled.
key margin

Table A-4: Plot Defaults Tab Parameters (Continued)

ENVI User’s Guide Configuration Parameter Descriptions


1152 Appendix A: ENVI Preference Settings

Grid Line Default Preference Settings


The fields are on the System Preferences dialog Grid Line Default tab.

Dialog Option/
Description
.cfg File Option

Map Grid Properties


X-Axis Labels Sets whether the x-axis labels of the map grid
map grid x-axis labels display horizontally or vertically.

Y-Axis Labels Sets whether the y-axis labels of the map grid
map grid y-axis labels display horizontally or vertically.

Labels Sets whether the map grid labels display.


map grid labels
(color box) Sets the foreground color of the map grid labels.
map grid labels color

Thick Sets the thickness of the map grid labels.


map grid labels thick

Font Sets the font of the map grid labels. For more
map grid font information on fonts, see “Installing Other
TrueType Fonts with ENVI” on page 1169.
Charsize Sets the font size of the map grid labels.
map grid labels size

Corners Sets whether the map grid corners display.


map grid corners
(color box) Sets the foreground color of the map grid corners.
map grid corners color

Thick Sets the thickness of the map grid corners.


map grid corners thick

Table A-5: Grid Line Defaults Tab Parameters

Configuration Parameter Descriptions ENVI User’s Guide


Appendix A: ENVI Preference Settings 1153

Dialog Option/
Description
.cfg File Option

Lines Sets whether the map grid lines display.


map grid lines

(color box) Sets the foreground color of the map grid lines.
map grid lines color

Thick Sets the thickness of the map grid lines.


map grid lines thick

Style Sets the style of the map grid lines.


map grid lines line
style

Box Sets whether the map grid box displays.


map grid box

(color box) Sets the foreground color of the map grid box.
map grid box color
Thick Sets the thickness of the map grid box sides.
map grid box thick

Style Sets the line style of the map grid box sides.
map grid box line
style

Lat/Lon Grid Properties


X-Axis Labels Sets whether the x-axis labels of the geo grid
geo grid x-axis labels display horizontally or vertically.

Y-Axis Labels Sets whether the y-axis labels of the geo grid
geo grid y-axis labels display horizontally or vertically.

Labels Controls whether the geo grid labels display.


geo grid labels

Table A-5: Grid Line Defaults Tab Parameters (Continued)

ENVI User’s Guide Configuration Parameter Descriptions


1154 Appendix A: ENVI Preference Settings

Dialog Option/
Description
.cfg File Option

(color box) Sets the foreground color of the geo grid labels.
geo grid labels color

Thick Sets the thickness of the geo grid labels.


geo grid labels thick

Font Sets the font of the geo grid labels.


geo grid font

Charsize Sets the font size of the geo grid labels.


geo grid labels size

Corners Controls whether the geo grid corners display.


geo grid corners
(color box) Sets the foreground color of the geo grid corners.
geo grid corners color

Thick Sets the thickness of the geo grid corners.


geo grid corners thick

Lines Sets whether the geo grid lines display.


geo grid lines

(color box) Sets the foreground color of the geo grid lines.
geo grid lines color

Thick Sets the thickness of the geo grid lines.


geo grid lines thick

Style Sets the style of the geo grid lines.


geo grid lines line
style

Box Sets whether the geo grid box displays or not.


geo grid box

Table A-5: Grid Line Defaults Tab Parameters (Continued)

Configuration Parameter Descriptions ENVI User’s Guide


Appendix A: ENVI Preference Settings 1155

Dialog Option/
Description
.cfg File Option

(color box) Sets the foreground color of the geo grid box.
geo grid box color
Thick Sets the thickness of the geo grid box sides.
geo grid box thick

Style Sets the line style of the geo grid box sides.
geo grid box line
style

Table A-5: Grid Line Defaults Tab Parameters (Continued)

Previous Files List Preference Settings


In this dialog you can:
• Remove files from the list by selecting the filename and clicking Delete.
• Specify files to always keep on the list and keep at the top of the list by
selecting the filename and clicking “Stick” On. The curly bracketed symbol
{S} appears to the left of the filename when a file is a sticky file. To clear a file
from being sticky, select the filename and click “Stick” Off.
• Revert to your original settings by clicking Reset.

ENVI Previous Files List


The ENVI Previous Files List contains a list of the last 25 files opened in ENVI. The
complete path and filename of the listed files are stored in a file named in the
envi.cfg file. In front of each filename is a + or -. Files with a + are sticky meaning
they will remain on the top of the list and not fall off the end of the list. Files with a -
move down the list as new files are opened, and eventually fall off the list. A portion
of a Previous Files list is shown below.
+E:\data\canyocanyon.tm
-E:\data\topsar\top_l.cub
-C:Program Files\ITT\idl64\products\envi44\spec_lib\usgs_sli.dat
-E:\data\canyon\tm800.img
-E:\data\dem\denver-e.img

ENVI User’s Guide Configuration Parameter Descriptions


1156 Appendix A: ENVI Preference Settings

You can also edit the Previous Files List by selecting File → Preferences and
selecting the Previous Files List tab to open the editing window (see “Previous Files
List Preference Settings” on page 1155).

Miscellaneous Preference Settings


The fields are on the System Preferences dialog Miscellaneous tab.

Dialog Option/
Description
.cfg File Option

Configuration Name Assigns a unique name to this particular ENVI


configuration name configuration.

Menu Orientation Sets whether the ENVI main menu bar displays
main menu orientation horizontally or vertically.

Max Items for Multilist Sets the maximum number of items to list in a
max number of items widget. If the number of widget listed is greater
for multilist than this value, ENVI uses an alternate check box
mode to speed up list scrolling.
Max Histogram Bins Sets the maximum number of bins to use during
max number of histogram calculation.
histogram bins
Max Items in Pulldown Sets the maximum number of items to list in a
max number of items in drop-down button. If the number of items is
pulldown menus greater than this value, the drop-down button
divides the items into sub-menus, each containing
only this maximum number of items or fewer. This
prevents long lists of items from running off the
display.
Max Vertices for Memory Sets the maximum number of polygon vertices for
max number of vertices vector files loaded into ENVI. If the number of
for memory vertices is greater than this value, ENVI will not
load the polygons into memory, but instead creates
an ENVI vector (.evf) file.

Table A-6: Miscellaneous Tab Parameters

Configuration Parameter Descriptions ENVI User’s Guide


Appendix A: ENVI Preference Settings 1157

Dialog Option/
Description
.cfg File Option

Page Units Sets whether page units are in inches or


default output page centimeters.
size Note - In the envi.cfg file, this value and the
Page Size value are combined in the same
parameter. The first value is page size and the
second value is page units.
Page Size Sets the default page size for PostScript output in
default output page either centimeters or inches.
size Note - In the envi.cfg file, this value and the
Page Units value are combined in the same
parameter. The first value is page size and the
second value is page units.
Page Offset Sets the default x and y page offset for multiple
default output page page PostScript output in inches or centimeters.
offset

Command Line Blocking Sets whether you have access to IDL command
command line blocking line programming during an ENVI session.

Exit IDL on Exit from ENVI Determines whether to automatically exit IDL
exit idl on exit from when exiting from ENVI, or if the IDL session
envi remains open.

Status Window for Input Sets whether to show a status window when
Data loading data of BIL or BIP format into a display
status window for group.
input data reading
Interactive Stretch Auto Sets whether on not to automatically apply
Apply changes to the stretch in interactive stretching.
interactive stretch You can also toggled this on/off from the
auto reply Interactive Stretching dialog.

Table A-6: Miscellaneous Tab Parameters (Continued)

ENVI User’s Guide Configuration Parameter Descriptions


1158 Appendix A: ENVI Preference Settings

Dialog Option/
Description
.cfg File Option

Auto Append Extensions Sets whether to append the default extensions to


auto append output the entered filename. See ENVI File Naming
filename extensions Conventions in Getting Started with ENVI for a
list of file extensions.
Auto Load Default Bands Sets whether to automatically load default bands
load default band when specified to do so in the ENVI header file.
combination See “Setting Default Bands to Load” on page 197
automatically for details.
Open Applicable Files to Sets whether to open BMP, HDF, JPEG,
Memory JPEG2000, PICT, SRF, and XWD external files
open applicable directly to memory instead of prompting for file or
formats automatically memory output.
to memory

Auto-Correct Sets whether to open ASTER datasets with the


ASTER/MODIS calibration information automatically applied, or
auto-correct open MODIS datasets with gains and offsets
aster/modis automatically applied. If set to No, datasets open
with DN values.

Table A-6: Miscellaneous Tab Parameters (Continued)

Configuration Parameter Descriptions ENVI User’s Guide


Appendix A: ENVI Preference Settings 1159

Dialog Option/
Description
.cfg File Option

Cache Size (Mb) Sets a soft limit for the amount of system RAM
total cache size (MB) you expect ENVI to use. ENVI has an internal
memory management/cache scheme that works to
limit the amount of memory used. This setting is
designed to avoid Unable to Allocate Array errors
in IDL and segmentation fault/core dumps back to
system level from IDL on some platforms. The
error results when ENVI attempts to use more
memory than is available. Higher values for the
cache size speed up spatial processing functions.
Set this value to slightly less than the amount of
available system RAM (less on multi-user
systems) (see “Total Cache Size” on page 1159).
Image Tile Size (Mb) Sets the tile size for ENVI to use for processing.
image tile size (MB) Tiling is an internal ENVI image segmentation
technique that allows the system to work on
images larger than available RAM. Set this value
to about 1/10th the total cache size described in
“Image Tile Size” on page 1161. You can view
images of any size in ENVI; however, this setting
determines how much of that image is kept in
memory at any given time.
If you have an ENVI + IDL installation, see
“Optimizing Thread Pool Elements and Image
Tile Size Settings” on page 1172 for additional
information before setting this value.

Table A-6: Miscellaneous Tab Parameters (Continued)

Total Cache Size


ENVI uses an internal caching method to monitor memory management and optimize
memory usage. ENVI’s memory management does not impact you unless memory-
only items need to be stored to a disk file. Raw data and display data caching is
hidden and does not affect any open windows or processing functions.

ENVI User’s Guide Configuration Parameter Descriptions


1160 Appendix A: ENVI Preference Settings

The Cache Size setting in the ENVI configuration file does not directly affect
memory allocation, but it helps ENVI determine how much RAM is likely to be
available. The cache size is specified because IDL does not have any way to know
how much RAM is available on your machine.
ENVI uses the cache size you specify to determine when you have used up that much
RAM. ENVI should start to remove unnecessary items from RAM to make more
available. Sometimes, ENVI keeps certain kinds of data in RAM to speed
performance, although these are not required for ENVI to run and are released if
memory is low.
The first items removed are the raw data read from disk files (oldest-by-use first),
followed by byte-scaled display images (oldest-by-use first). If enough memory has
not been freed, the memory-only items are removed after requesting you to save or
remove them. If, however, the data in the current request is a memory-only item, you
are required to store (not remove) the item. If the request still exceeds the total cache
size with nothing in memory, the operation is still attempted. You should, however,
periodically store memory images to disk to avoid cases where the in memory request
is greater than the total cache size.
The Cache Size setting is not a fixed upper limit on the amount of RAM that ENVI
will use; it is just a benchmark that ENVI uses to gauge whether the amount of RAM
you have used is small or large. It is configurable because of the wide variety of RAM
on different machines.
If your Cache Size setting is large, then ENVI will not start cleaning up RAM until
that large amount of RAM has been used. This means that less RAM will be left
available for further processing. To minimize your chances of running out of RAM in
the middle of a process (when ENVI cannot clear RAM), you should have a
reasonable amount of RAM available even after your cache is full. On single-user
machines, we recommend you set the cache to 50-75% of the available physical
RAM on the system. For example, if you have 512 MB of RAM, then a reasonable
cache size is 256-384 MB. For multi-user systems (such as UNIX workstations), the
cache size should be reduced to reflect the amount of physical RAM that will
typically be available. Generally, it is best to err on the side of a smaller cache size.
Note
These are only suggestions; ENVI will work with any numbers you supply.

Configuration Parameter Descriptions ENVI User’s Guide


Appendix A: ENVI Preference Settings 1161

Image Tile Size


For ENVI to process images that are much larger than the total amount of RAM
available on the system, large images are broken into pieces that are small enough for
the system to handle. Each piece is called a tile.
For images stored as:
• BSQ, each tile is a spatial subset of an individual band.
• BIL, each tile is a single image line of all bands.
• BIP, each tile is all of the pixels in an image line for all bands.
ENVI uses the image tile size keyword to segment the processing of large images. It
specifies the amount of data processed in each segment. Image tile size only affects
the processing of data, not the displaying of images.
When the image is processed, only one tile is read into memory at a time. The Image
Tile Size setting in the ENVI configuration file determines the size for the tile, and
thus how much of an image is read into RAM and processed at a time. This setting
only affects how the data are processed, not how they are displayed. If the entire
image is smaller than the Image Tile Size setting, then the entire image is processed
in one tile. When a tile is processed, ENVI releases that tile’s memory and reads the
next tile for processing. If ENVI tries to read a tile that is larger than the amount of
contiguous RAM available on your machine at the time you start a process, it displays
an error, “unable to allocate memory to make array.”
Even if you have a very large amount of RAM, it is important to remember that each
tile must fit into a contiguous section of memory. Because RAM quickly becomes
fragmented, it is risky to have a large tile setting. So, a smaller size is better. Because
the Image Tile Size setting has very little effect on performance, it is recommended
you keep the default value of 1 MB and never let it exceed about 4 MB.
In one specific case, ENVI uses a tile size that is different than the Image Tile Size
setting in the configuration file. When spectral processing is being performed, the tile
size is equal to the number of samples times the number of bands, regardless of the
tile size setting. So, for spectral processing it is possible for the tile to exceed the tile
size setting, although this is rarely the case. In fact, spectral tiles are usually smaller
than the configuration file’s tile size setting.
Tiling is generally transparent to you and is used by ENVI to insure that hardware
memory limitations do not impose processing limitations when you are processing
large images. A tile is a piece of data read from the disk or from memory in one
piece.

ENVI User’s Guide Configuration Parameter Descriptions


1162 Appendix A: ENVI Preference Settings

Additional Preference Settings


The envi.cfg file includes these other settings that you can edit directly in the file:
annotation scale bar titles: Specifies the spelling of the annotation scale bar units,
(for example, change “kilometers” to “kilometres”).
menu border size and edge border size: Sets the window border sizes according to
system-specific parameters to allow consistent spacing of display group windows.
surfaceview depth offset: Sets a value used for hardware rendering to obtain the best
results for your graphics card.
zoom window zoom increment: Sets the integer zoom factor for each subsequent
zoom event.

Configuration Parameter Descriptions ENVI User’s Guide


Appendix A: ENVI Preference Settings 1163

Editing System Graphics Colors


To edit system graphics colors:
1. In the System Preferences dialog Display Defaults tab, click Edit System
Graphics Colors. The Edit Graphic Colors dialog appears.
2. In the Graphic Colors list, select the color to edit.
Note
It is not advisable to change the definitions for black, white, red, green, or
blue, as they are used throughout ENVI. Changing graphic colors may affect
previously saved graphic overlays.

3. Edit the definition as needed:


• To change the color name, enter the name in the Color Name field.
• To change the color system, select RGB, HLS, or HSV from the drop-
down list.
• To change the color, click Color and select a color from a list.
• To change the color values, adjust the Red, Green, and Blue sliders or
increase/decrease buttons.
• To reset all colors to their original values before saving the changes, click
Reset.
4. Click OK. ENVI prompts you to save the changes to a file. Either:
• Click No to use the color settings for this ENVI session only.
• Click Yes to save the color settings to a file and enter a filename. Saving to
a file makes the settings available for use in all future ENVI sessions, as
well as for the current session.

ENVI User’s Guide Editing System Graphics Colors


1164 Appendix A: ENVI Preference Settings

ENVI Graphic Colors File


The ENVI graphics colors file is a space-separated ASCII file that defines the graphic
colors used in ENVI. The file has four columns for the red, green, and blue DN
values, and color name. You can add colors to this file using a text editor, or you can
change them by selecting File → Preferences and clicking System Graphics Colors
to open the editing window, as described above. A portion of the ENVI colors.txt
file is shown below.
0 0 0 Black
255 255 255 White
255 0 0 Red
0 255 0 Green
0 0 255 Blue
255 255 0 Yellow
0 255 255 Cyan
255 0 255 Magenta
176 48 96 Maroon

Editing System Graphics Colors ENVI User’s Guide


Appendix A: ENVI Preference Settings 1165

Editing System Color Tables


Use the ENVI Color Table dialog to define new color tables, save them to ENVI’s
current list of color tables, and delete color tables from the current list. You can work
in RGB (red-green-blue), HLS (hue-lightness-saturation), or HSV (hue-saturation-
value) color spaces and define tables using user-defined interpolation paths.
Additionally, you can choose specific colors from a color palette for defined regions
of the color table or make a ramp to fill the color table.
Tip
Editing Color Tables works best when your monitor display is set to 16-bit or higher
color mode (it functions in 8-bit color mode, but the colors do not appear as exact).

Current Color
color menu

Color
system

Color
Sliders palette

Positioning
arrow Circle
cursor
Color bar

Figure A-13: Edit Color Table Dialog

ENVI User’s Guide Editing System Color Tables


1166 Appendix A: ENVI Preference Settings

To edit system color tables:


1. Close all display group and plot windows to ensure that all colors are available.
2. In the System Preferences dialog Display Defaults tab, click Edit System
Color Tables. The ENVI Color Table Editor dialog appears.
The current color table displays as a narrow gradiated color bar on the left side
of the dialog. A white positioning arrow appears at the far left and far right
ends of the color bar next to the color palette. The current system colors
display in the Color Palette Selection widget.
3. Select a color system (RGB, HLS, HSV) from the drop-down list. The color
palette and color bar reflect the system change.
4. Select from the following options when defining the color table.
• To keep one color or element constant (that is, red in RGB or lightness in
HLS), click on the toggle button next to the slider bar of that value. The
two remaining colors represent the horizontal and vertical axes of the color
palette.
• To move points on the interpolation line, left-click on a point on the line
and drag to the new position.
• To add points to the interpolation path through the colors, middle-click on
a position in the color palette.
• To remove points from the interpolation line, right-click on the square
interpolation points.
• To designate whether the color table automatically reflects the changes
made as you move the interpolation line, select On or Off using the
Update Color Table toggle button.
• To see the values of a specific color, left-click on the color. The circle
cursor jumps to that location on the palette and the slider bars show the
new values.
• To identify the color represented by a combination of values, move the
slider bars of the values or use the arrow increment buttons to change
them. The circle cursor moves to the corresponding location on the color
palette.

Editing System Color Tables ENVI User’s Guide


Appendix A: ENVI Preference Settings 1167

Defining Colors and Making Ramps


To define colors or make a color ramp for specific ranges of the output color table:
1. Click on the left positioning arrow (the white arrow at the far left corner of the
gradiated color bar) of the color table and drag it to the new lower location, or
enter the lower value in the Pos1 field.
2. Select the lower color value by left-clicking on the color in the color palette.
3. Click Replace.
4. Click on the right positioning arrow on the color table and drag it to the new
upper location, or enter the upper value in the Pos2 field.
5. Select the upper color value by left-clicking on the color in the color palette.
You may select the same color as the upper and lower value.
6. Click Interp to fill in the colors between the new values.
• Click Reset to reset the color table to a gray scale image.
• To clear the positioning arrows, click Clear.

Adding Color Tables to ENVI


To add the new color table to the current list of ENVI color tables:
1. In the ENVI Color Table Editor, click Add Current as New Color Table. The
Add Color Table dialog appears.
2. Enter a name into the field.
3. Click OK.
Tip
If you do not have permission to write to the colors1.tbl file, you are
prompted to enter a new color table filename.

Setting a New Color Table File


To use the new color table file in ENVI:
1. From the ENVI main menu bar, select File → Preferences. The System
Preferences dialog appears.
2. Select the User Defined Files tab.

ENVI User’s Guide Editing System Color Tables


1168 Appendix A: ENVI Preference Settings

3. In the Color Table File field, enter the new color table filename.
4. Click OK.

Deleting Existing Color Tables


To delete existing color tables from the color table list:
1. In the ENVI Color Table Editor, click Delete Existing Color Tables. The
Delete Existing Color Tables dialog appears with a list of all the system color
tables.
2. Select on the color table names to remove.
3. Click OK.
If you do not have permission to write to the colors1.tbl file, you are prompted to
enter a new color table filename.

Importing Color Tables from ASCII Files


1. In the ENVI Color Table Editor, click Import Color Table from ASCII.
2. Select an input filename.
The input file must be an ASCII file containing 256 lines, each containing 3 columns
of red, green, and blue values.

Editing System Color Tables ENVI User’s Guide


Appendix A: ENVI Preference Settings 1169

Installing Other TrueType Fonts with ENVI


ENVI allows you to use any text- or symbol-based TrueType font. After you
download a TrueType font, you can install it so that it is available to ENVI.
IDL and ENVI provide access to TrueType fonts through the resource file,
ttfont.map, located in the IDL resource/fonts/tt subdirectory of your IDL
installation. The ttfont.map file contains a listing of available font files. The
following contains an example of the font resource file.

Figure A-14: Sample ttfont.map File

The resource fields are:

Column Description

Fontname This column contains the name of the font that is available when
working with features such a QuickMap.
Filename This column contains the TrueType font filename.
Direct This column indicates the Direct Graphics scale, a correction factor
that is applied when rendering the font on a Direct Graphics device.
Object This column indicates the Object Graphics scale, a correction factor
that is applied when rendering the font on an Object Graphics device.

Table A-7: Description of the Font Resource File

For more information on scale factors, see the “Fonts” Appendix in the IDL
Reference Guide.

ENVI User’s Guide Installing Other TrueType Fonts with ENVI


1170 Appendix A: ENVI Preference Settings

To install TrueType fonts for use with ENVI:


1. Copy the font file, which has a .ttf extension, to the resource/fonts/tt
subdirectory of your IDL installation directory.
On Windows, you can install the font file in your operating system’s fonts
directory. In this case, you do not need to copy the file to the
resource/fonts/tt subdirectory.
2. Create a backup copy of the ttfont.map file.
3. Modify the ttfont.map file using any text editor by listing the new font you
added. Include the fields listed in Table A-7, separating each field with spaces
or tabs. Other applications that use text may look different on different
platforms if you alter the scale entries in the ttfont.map file.
On the Windows platform, if you installed the font in your operating system’s
fonts folder, you do not need to list the newly installed font in the
ttfont.map file.
4. Save the modified font resource file. The font is now available for use with
ENVI functions.

Installing Other TrueType Fonts with ENVI ENVI User’s Guide


Appendix A: ENVI Preference Settings 1171

Modifying IDL CPU Parameters


In IDL, certain routines are multi-threaded. Multi-threading is used to increase the
speed of numeric computations by using multiple system processors to
simultaneously carry out different parts of the computation. When an ENVI operation
uses a multi-threaded IDL routine, the ENVI operation exhibits improved
performance.
Only ENVI operations that use multi-threaded IDL routines are affected. For more
information, see the IDL documentation.
To change the settings for how ENVI uses IDL’s thread pool for the current ENVI
session:
1. In the ENVI main menu bar, select File → IDL CPU Parameters. The IDL
CPU Parameters dialog appears.

Figure A-15: IDL CPU Parameters Dialog

2. Set the following parameters:


• Thread Pool number of Processors: The number of threads that IDL uses
in thread pool computations. The default value is equal to the value of the
number of CPUs on your system, so that each thread has the potential to
run in parallel with the others. There is no benefit to using more threads
than your system has CPUs. However, depending on the size of the
problem and the number of other programs running on the system, there
may be a performance advantage to using fewer CPUs.

ENVI User’s Guide Modifying IDL CPU Parameters


1172 Appendix A: ENVI Preference Settings

• Thread Pool Minimum Elements: The number of data elements (each


element being a single data value of a particular data type) in a
computation that are necessary before IDL uses the thread pool. If the
number of elements is less than the number you specify, ENVI performs
the computation without using the thread pool. Use this parameter to
prevent ENVI from using the thread pool on tasks that are too small to
benefit from it. The default is 100000.
• Thread Pool Maximum Elements: The maximum number of elements in
a computation that is processed using the thread pool. Computations with
more than this number of elements do not use the IDL thread pool. Set this
parameter if large jobs are causing virtual memory paging on your system.
Setting this value to 0 removes any limit on maximum number of
elements. The default is 0.
3. Click OK.
To change the settings for how ENVI uses IDL’s thread pool for all ENVI sessions,
edit the values directly in the envi.cfg file.

Optimizing Thread Pool Elements and Image Tile


Size Settings
The Image Tile Size (Mb) parameter set in ENVI system preferences
(“Miscellaneous Preference Settings” on page 1156) is related to the Thread Pool
Minimum Elements parameter. Tile size is the size of the pieces into which ENVI
breaks large datasets so that certain processes can occur on machines with finite
resources. The default setting is 1 MB. If the tile size is such that each image tile has
fewer array elements than the Thread Pool Minimum Elements value, then ENVI
does not tile the process even if the image itself is relatively large. If this happens,
you can increase the Image Tile Size (Mb) value, so that the tiles are large enough to
exceed the Thread Pool Minimum Elements value. In general, the larger the Image
Tile Size, the more memory required for processing, but the larger the potential
performance from multi-threaded processing.
Correctly setting ENVI’s Image Tile Size (Mb) parameter is important to optimum
performance gains from multi-threading. On conventional (1 processor) machines,
the tile size has little to no impact on processing speed. Having it set to a relatively
small value (such as 1 MB) helps ensure that ENVI does not run out of memory,
especially if other applications are running on the same machine. Setting it to more
than 5 MB or so on most conventional machines is not recommended. However, on a
multi-processor machine, it is possible for a small tile size setting to result in
undesirable consequences for multi-threading.

Modifying IDL CPU Parameters ENVI User’s Guide


Appendix A: ENVI Preference Settings 1173

For example, a tile size setting of 1 MB, applied to an image containing double
precision complex data (16 bytes per array element) produces input arrays for
spatially tiled processes of 62,500 elements, which would fall quite short of the
default 100,000 element minimum required for multi-threading. Furthermore, multi-
threading performance gains are generally much better with larger input array sizes.
An unnecessarily small tile size might needlessly limit the benefits of multi-
threading.
While not all processes in ENVI are tiled and not all processes in IDL are multi-
threaded, it is best to set the tile size parameter on multi-processor machines with
multi-threading in mind so as to take full advantage of this feature.
Note
Do not just set the tile size to a large portion of your RAM. If the tile size parameter
is set to an amount greater than the amount of actually available memory (memory
still free after the operating system and any other applications have claimed what
they need) and ENVI is asked to use the full tile size for a large process, any number
of system and/or application errors could result.

Set the Image Tile Size (Mb) value to less than the smallest amount of free memory
that is expected on the machine where ENVI is installed, giving due consideration to
the memory demands of other applications and users at any given time. Depending on
how much memory the machine in question has and what demands are placed on it, a
safe tile size setting may be significantly larger than the 1 MB default value.

ENVI User’s Guide Modifying IDL CPU Parameters


1174 Appendix A: ENVI Preference Settings

Modifying IDL CPU Parameters ENVI User’s Guide


Appendix B
ENVI ASCII File
Formats
This appendix covers the following:

ENVI ASCII Files . . . . . . . . . . . . . . . . . . 1176

ENVI User’s Guide 1175


1176 Appendix B: ENVI ASCII File Formats

ENVI ASCII Files


Other ENVI ASCII file formats are described in the following sections. Files that are
not described below (for example, .ann, .roi, and so forth) are files that are in a
binary format.

Bad Lines List (.bll)


The ENVI Bad Line Removal file is used to save and recall lists of bad lines. Bad
Line List files are simple ASCII files with the .bll file extension. The keywords
ENVI Bad Lines List must appear on the first line of the file. Individual bad line
locations (in pixels) are listed in subsequent lines, one bad location per line. An
example of a typical .bll file is shown here:
ENVI Bad Lines List
111
532
729
924

Calibration Factors (.cff)


The ENVI Empirical Line Calibration file is used to save a calibration factor file that
you can use in subsequent calibration of the same or related image scenes. The file is
a simple ASCII file with the same format as the files saved by ENVI plotting
functions using the ASCII option. The first line of the file contains the keywords
ENVI ASCII Plot File. Subsequent lines indicate the date the file was created,
descriptions of the data columns, followed by the actual columns of ASCII data. An
example of a typical .cff file is shown here:
ENVI ASCII Plot File
[Fri May 13 22:31:30 1994]
Column 1: Wavelength
Column 2: Maximum Solar Irradiance
Column 3: Path Radiance
Column 4: RMS Error
0.45000 5217.36377 0.00000 0.00000
0.55000 310.44244 0.00000 0.00000
0.65000 67.52143 0.00000 0.00000

ENVI ASCII Files ENVI User’s Guide


Appendix B: ENVI ASCII File Formats 1177

Density Slice Range File (.dsr)


The ENVI density slice range file is used to save and restore density slice ranges and
colors. The file is an ASCII file and has the keywords ENVI Density Slice
Range File on the first line. It has 5 columns, the first two are the data range
minimum and maximum, the next three columns have the red, green, and blue DN
values that define the color. An example of a typical .dsr file is shown here:
ENVI Density Slice Range File
50.000000 70.000000 255 0 0
70.000000 90.000000 0 255 0
90.000000 110.00000 80 80 255
110.00000 130.00000 255 255 0
130.00000 150.00000 0 255 255

Band and/or Spectral Math Expressions (.exp)


Use the Band Math and Spectral Math utilities to save math expressions for later use.
The expressions are stored in a simple ASCII file with the .exp file extension. You
can recall them in either the Band Math or Spectral Math functions. The keyword
ENVI EXPRESSIONS must appear on the first line of the file. Individual math
expressions are listed on subsequent lines, one expression per line. An example of a
typical .exp file is shown here:
ENVI EXPRESSIONS
s1+s2+s3+s4+s5+s6
sqrt(s1)
s1+s2

Tape Script Format (.fmt)


Use the ENVI tape scan/dump script file to generate custom tape scripts for loading
common tape formats that are not directly supported by ENVI. The script file, which
you can load into the tape scan utility, is a simple ASCII file with the default file
extension .fmt. Each line (row) of the file describes the attributes to be used to read
the tape. The first column is the file number, the second and third the starting and
ending records to read, and the fourth and fifth the starting and ending bytes to read in
those records. An example of a typical .fmt file is shown here:
ENVI Tape Dump Record Format File
17 1 4298 1 32768
17 4299 4299 1 1000

ENVI User’s Guide ENVI ASCII Files


1178 Appendix B: ENVI ASCII File Formats

Grid File (.grd)


The ENVI grid file is used to save and restore grid parameters. It is an ASCII file and
has the keywords ENVI Grid Parameters File on the first line. It lists the three
grid types (pixel, map, and geographic) and their parameter values. An example of a
portion of a typical .grd file is shown here:
ENVI Grid Parameters File
Pixel Grid: On
Pixel Grid Spacing: 100
Pixel Grid Dist: 1.00
Pixel Grid Font: 3
Pixel Grid X-Axis Labels: Horizontal
Pixel Grid Y-Axis Labels: Vertical
Pixel Grid Labels: On
Pixel Grid Labels Color: 0
Pixel Grid Labels Thick: 1
Pixel Grid Labels Size: 12
Pixel Grid Lines: On
Pixel Grid Lines Color: 1
Pixel Grid Lines Thick: 1
Pixel Grid Lines Line Style: 0
Pixel Grid Corners: On
Pixel Grid Corners Color: 1
Pixel Grid Corners Thick: 1
Pixel Grid Box: On
Pixel Grid Box Color: 0
Pixel Grid Box Thick: 1
Pixel Grid Box Line Style: 0

Filter Kernels (.ker)


The ENVI Convolution Filtering files are used to save kernel files for user-defined
filters. The file is a simple ASCII file with the default file extension .ker. The
keyword ENVI KERNEL must appear on the first line of the file followed by the row,
column, and band filter dimensions (in pixels). The subsequent lines of the file are the
kernel weights (which must have the same number of rows and columns as indicated
by the first line of the file). An example of a typical .ker file is shown here:
ENVI KERNEL 3 3 1
-1 -1 -1
-1 8 -1
-1 -1 -1

ENVI ASCII Files ENVI User’s Guide


Appendix B: ENVI ASCII File Formats 1179

Map Key File (.key)


The ENVI map key ASCII file is used to save and restore annotation map keys. The
file has the keywords ENVI MAP KEY on the first line. It has 7 columns, the first three
columns have the red, green, and blue DN values that define the key color, followed
by the key fill, the fill orientation, fill spacing, and map key name. An example of a
typical .key file is shown here:
ENVI MAP KEY
0 255 0 1 45 0.100000 Vegetation
80 80 255 1 45 0.100000 Water
255 0 0 1 45 0.100000 Soil
255 255 0 1 45 0.100000 Rock

Contour Levels File (.lev)


The ENVI contour levels ASCII file is used to save and restore contour levels and
parameters. The file has the keywords ENVI CONTOUR LEVELS on the first line. It
has 5 columns, the first is the contour level, the next three columns define the line
color, style, and thickness, and the final column has the contour label. An example of
a typical .lev file is shown here:
ENVI CONTOUR LEVELS
1500.0000 1 0 1 1500 m
1600.0000 1 1 1
1700.0000 1 1 1
1800.0000 1 1 1
1900.0000 1 1 1
2000.0000 1 0 1 2000 m
2100.0000 1 1 1
2200.0000 1 1 1
2300.0000 1 1 1
2400.0000 1 1 1

ENVI User’s Guide ENVI ASCII Files


1180 Appendix B: ENVI ASCII File Formats

Mosaic Template File (.mos)


The ENVI mosaic template ASCII file is used to save and restore mosaic templates.
The file has the keywords ENVI MOSAIC TEMPLATE (G) or (P) on the first line.
The G is for georeferenced mosaics and the P is for pixel-based mosaics. The output
size is listed under the keywords. These are followed by the mosaic input filenames,
band numbers, file dimensions, and x and y offsets, feathering width, cutline, cutline
feathering width, and optional data value to ignore. An example of a typical .mos
file is shown here:
ENVI MOSAIC TEMPLATE (G)
Output Size: 1275 x 1934

File : E:\DATA\bldr_reg\bldr4m.img
Bands: 1
Dims : 1-359,1-516
Info : (1,1) {0} [ {0}] {}

File : E:\DATA\bldr_reg\bldr_sp.img
Bands: 1
Dims : 1-1071,1-1390
Info : (1,1) {20} [ {0}] {0.00}

GCP File Format (.pts)


The ENVI Ground Control Point (GCP) files are ASCII files that contain the pixel
coordinates of tie points selected from a base and warp image using ENVI’s
registration utilities. They are assigned the file extension .pts by default and begin
with the keywords ENVI Registration GCP File. For image-to-image
registration, pixel coordinates are listed in the order Base image x,y, Warp Image x,y.
An example of a typical image-to-image .pts file is shown here:
ENVI Registration GCP File
921.00000 2538.0000 2098.0000 111.00000
1381.0000 2291.0000 2145.0000 85.000000
1669.0000 2116.0000 2174.0000 66.000000
119.00000 3032.0000 2017.0000 164.00000
1286.0000 3820.0000 2140.0000 240.00000
1294.0000 1754.0000 2132.0000 28.000000
1783.0000 1814.0000 2184.0000 34.000000
715.00000 4504.0000 2083.0000 312.00000
351.00000 1708.0000 2039.0000 27.000000
207.00000 2357.0000 2025.0000 98.000000

ENVI ASCII Files ENVI User’s Guide


Appendix B: ENVI ASCII File Formats 1181

For image-to-map registration, coordinates are listed as map x, map y, image x, image
y. An example of a typical image-to-map .pts file is shown here:
ENVI Registration GCP File
359459.810 4143531.300 288.000 496.000
367681.530 4141772.000 232.000 23.000
366343.470 4138660.500 458.000 35.000
362337.840 4145969.500 71.000 388.000
361339.910 4138479.300 569.000 301.000
354457.530 4140550.300 591.000 714.000
354352.590 4145685.000 261.000 819.000
359918.310 4142412.000 351.000 448.000
364900.910 4141752.300 290.000 172.000

Vector Template File (.vec)


The ENVI vector template file is an ASCII file that is used to save and restore vector
parameters. The file has the keywords ENVI VECTOR TEMPLATE on the first line. It
lists the vector filenames, whether the vector is on (1) or off (0), line color, line style,
and line thickness. An example of a typical .vec file is shown here:
ENVI VECTOR TEMPLATE
[F:\envi_cd\data\bldr_reg\hydro.evf] (1,4,0,1)
[F:\envi_cd\data\bldr_reg\rail.evf] (1,2,0,1)
[F:\envi_cd\data\bldr_reg\roads.evf] (1,3,1,1)

ENVI User’s Guide ENVI ASCII Files


1182 Appendix B: ENVI ASCII File Formats

ENVI ASCII Files ENVI User’s Guide


Appendix C
ENVI Spectral Libraries

This appendix covers the following topics:

ENVI Spectral Library Files . . . . . . . . . . 1184 JPL Spectral Library . . . . . . . . . . . . . . . . 1188


USGS Spectral Library (Minerals) . . . . . 1185 IGCP264 Spectral Library . . . . . . . . . . . 1189
USGS Spectral Library (Vegetation) . . . . 1186 JHU Spectral Library . . . . . . . . . . . . . . . 1192
Additional Vegetation Libraries . . . . . . . . 1187

ENVI User’s Guide 1183


1184 Appendix C: ENVI Spectral Libraries

ENVI Spectral Library Files


ENVI Spectral Library files are stored in ENVI binary image format with the number
of samples equal to the number of bands and the number of lines equal to the number
of spectra in the library. The file type is set to spectral library in the header and there
are associated wavelengths. You can display and enhance the ENVI spectral libraries
using ENVI’s image display and analysis routines (see “Spectral Libraries” on
page 739 and also this chapter). The spectral libraries are contained in the spec_lib
directory in the ENVI installation tree.

ENVI Spectral Library Files ENVI User’s Guide


Appendix C: ENVI Spectral Libraries 1185

USGS Spectral Library (Minerals)


These spectra were measured on a custom-modified, computer-controlled Beckman
spectrometer at the USGS Denver Spectroscopy Lab. Wavelength accuracy is on the
order of 0.0005 micron (0.5 nm) in the near-IR and 0.0002 micron (0.2 nm) in the
visible.
The directory spec_lib\usgs_min directory contains the following files:

usgs_min.sli USGS Mineral Spectral Library


usgs_min.hdr ENVI header for USGS Mineral Spectral Library

The full details of the spectral library and the descriptions of the samples are
available at: http://speclab.cr.usgs.gov/
Hardcopy is also available from the USGS. The reference is given here:
Clark, R.N., G.A. Swayze, A.J. Gallagher, T.V.V. King, and W.M. Calvin, 1993, The
U. S. Geological Survey, Digital Spectral Library: Version 1: 0.2 to 3.0 microns, U.S.
Geological Survey Open File Report 93-592, 1340 pages.

ENVI User’s Guide USGS Spectral Library (Minerals)


1186 Appendix C: ENVI Spectral Libraries

USGS Spectral Library (Vegetation)


These spectra were measured on a custom-modified, computer-controlled Beckman
spectrometer at the USGS Denver Spectroscopy Lab. Wavelength accuracy is on the
order of 0.0005 micron (0.5 nm) in the near-IR and 0.0002 micron (0.2 nm) in the
visible. The following vegetation spectra were extracted from the main USGS Denver
spectral library for convenience.
The directory spec_lib\veg_lib directory contains the following files:

usgs_veg.sli USGS Vegetation Spectral Library


usgs_veg.hdr ENVI header for the USGS Vegetation Spectral
Library

The full details of the spectral library and the descriptions of the samples are
available at: http://speclab.cr.usgs.gov/
Hardcopy is also available from the USGS. The reference is given here:
Clark, R.N., G.A. Swayze, A.J. Gallagher, T.V.V. King, and W.M. Calvin, 1993, The
U. S. Geological Survey, Digital Spectral Library: Version 1: 0.2 to 3.0 microns, U.S.
Geological Survey Open File Report 93-592, 1340 pages.

USGS Spectral Library (Vegetation) ENVI User’s Guide


Appendix C: ENVI Spectral Libraries 1187

Additional Vegetation Libraries


The following libraries in the spec_lib/veg_lib directory are provided for dry
and green vegetation.
The following vegetation spectra were provided by Chris Elvidge, DRI.

veg_1dry.sli Published Dry Plant Material Spectra Library


veg_1dry.hdr ENVI header for the Published Dry Plant Material
Spectra Library

These spectra were measured as hemispherical reflectance using a Beckman UV-


5240 spectrophotometer equipped with an integrating sphere. A HALON plate was
used as the reflectance standard. Data were recorded every 1 nm in the 0.4 - 0.8
micrometer range and every 4 nm from 0.8 to 2.5 micrometers. Bandwidths ranged
from 1 to 28 nm, mostly better than 10 nm in the 0.4 - 1.9 micrometer range and 10-
28 in the 1.9 - 2.5 micrometer range. The resolution function and the complete
spectral descriptions and discussions of these spectra are in:
Elvidge, C. D., 1990, Visible and infrared reflectance characteristics of dry plant
materials: Int. J. of Remote Sensing, v. 11, no. 10, pp. 1775 - 1795.
The following vegetation spectra were also provided by Chris Elvidge, DRI. These
are unpublished data for vegetation and geologic materials for the Jasper Ridge
Biological Reserve owned by Stanford University. These spectra were measured as
hemispherical reflectance using a Beckman UV-5240 spectrophotometer as described
above.

veg_2grn.sli Jasper Ridge Spectral Library for Green Vegetation,


Dry Vegetation, and Rocks
veg_2grn.hdr ENVI header for the Jasper Ridge Spectral Library for
Green Vegetation, Dry Vegetation, and Rocks

ENVI User’s Guide Additional Vegetation Libraries


1188 Appendix C: ENVI Spectral Libraries

JPL Spectral Library


This library contains spectra for 160 minerals. Data for 135 of the minerals are
available at three different grain sizes: 125-500 microns, 45-125 microns, and
<45 microns. These serve to illustrate the effect of grain size on spectral reflectance.
Supporting X-Ray Defraction (XRD) analysis was performed.
The following data are contained in the spec_lib\jpl_lib directory:

jpl1.sli JPL Mineral Spectral Library with <45 micrometers


grainsize
jpl1.hdr ENVI header for the JPL Mineral Spectral Library
with <45 micrometers grainsize
jpl2.sli JPL Mineral Spectral Library with 45-125
micrometers grainsize
jpl2.hdr ENVI header for the JPL Mineral Spectral Library
with 45-125 micrometers grainsize
jpl3.sli JPL Mineral Spectral Library with 125-500
micrometers grainsize
jpl3.hdr ENVI header for the JPL Mineral Spectral Library
with 125-500 micrometers grainsize

The spectra are hemispherical reflectance made using a Beckman UV-5240


spectrophotometer. The sampling interval is .001 micrometers from 0.4 - 0.8 and .004
micrometers from 0.8 to 2.5 micrometers. Band-width ranges from 1-4 nm in the 0.4
to 0.8 micrometer range, less than 20nm in the 0.8 - 2.2 micro- meter range, and
20-40 in the 2.2 - 2.5 micrometer range. The bandwidths are published in Grove et
al., 1990. Illumination was via a single-pass monochronometer using a diffraction
grating.
The reference material was HALON.
Grove, C. I., Hook, S. J., and Paylor, E. D., 1992, Laboratory reflectance spectra for
160 minerals 0.4 - 2.5 micrometers: JPL Publication 92-2, Jet Propulsion Laboratory,
Pasadena, CA.
These data are also available upon request from the ASTER homepage:
http://speclib.jpl.nasa.gov/Order.com

JPL Spectral Library ENVI User’s Guide


Appendix C: ENVI Spectral Libraries 1189

IGCP264 Spectral Library


The IGCP 264 spectral libraries were collected as part of IGCP Project 264 during
1990. They consist of five libraries measured on five different spectrometers for 26
well-characterized samples. Samples were also characterized using Energy
Dispersive X-Ray (EDX), Scanning Electron Microscope (SEM), and X-Ray
Defraction (XRD). The purpose of these libraries is to allow comparison of the effect
of spectral resolution and sampling on spectral signatures.
Samples were hand picked where applicable and crushed in a carborundum mortar,
minimizing the grinding where possible. The sample material was passed through a
set of <100 and <200 mesh sieves and all the material that passed the <200 mesh
sieve was used. The fine powders were measured in a horizontal orientation on all
spectrometers.
The directory spec_lib\igcp264 contains the following files:

igcp-1.sli IGCP-264 Library - CSES Beckman Spectrometer


igcp-1.hdr ENVI header for the IGCP-264 Library - CSES
Beckman Spectrometer

These spectra were measured at the Center for the Study of Earth from Space (CSES)
at the University of Colorado on a custom modified Beckman 5270 dual beam
spectrometer. This spectrometer was under direct computer control measuring
reflectance spectra at constant high resolution (3.8 nm) sampled at 1.0 nm intervals
throughout the 0.7 to 2.5 µm range. A tungsten light source was used and HALON
was the reference material. The reference and sample spectra were collected
simultaneously and ratioed in real time.

igcp-2.sli IGCP-264 Library - Brown University Relab


Spectrometer
igcp-2.hdr ENVI header for the IGCP-264 Library - Brown
University Relab Spectrometer

ENVI User’s Guide IGCP264 Spectral Library


1190 Appendix C: ENVI Spectral Libraries

These spectra were measured at Brown University on the RELAB spectrometer.


RELAB spectra were collected at 2 - 13 nm resolution, sampled at 5nm in the 0.4 2.5
micrometer range using a HALON standard and quartz-halogen illumination. Contact
Dr. Carle Pieters at Brown University for additional information.

igcp-3.sli IGCP-264 Library - CSES SIRIS (GER) Spectrometer


igcp-3.hdr ENVI header for the IGCP-264 Library - CSES SIRIS
(GER) Spectrometer

These spectra were measured in the laboratory under quartz-halogen illumination


using a Single beam visible/InfraRed Intelligent Spectroradiometer SIRIS field
spectrometer at CSES. SIRIS is a field-portable grating spectrometer manufactured
by Geophysical and Environmental Research, Inc. The SIRIS measures radiance
using three separate gratings; from 0.35 µm to 1.08 µm using the first grating, from
1.08 µm to 1.8 µm with the second grating, and from 1.8 µm to 2.5 µm with the third
grating. Because the SIRIS is a single-beam instrument, it is necessary to measure
reference and sample radiance spectra separately. HALON was used as the
reflectance standard. The SIRIS spectral sampling interval varies continuously with
wavelength.

igcp-4.sli IGCP-264 Library - USGS Denver Beckman


Spectrometer
igcp-4.hdr ENVI header for the IGCP-264 Library - USGS
Denver Beckman Spectrometer

These spectra were measured on a custom-modified, computer-controlled Beckman


spectrometer at the USGS Denver Spectroscopy Lab. Wavelength accuracy is on the
order of 0.0005 micron (0.5 nm) in the near-IR and 0.0002 micron (0.2 nm) in the
visible.

IGCP264 Spectral Library ENVI User’s Guide


Appendix C: ENVI Spectral Libraries 1191

The full details of the spectral library and the descriptions of the samples are
available at: http://speclab.cr.usgs.gov/

IGCP-5.SLI IGCP-264 Library - CSES PIMA Spectrometer


IGCP-5.HDR ENVI header for the IGCP-264 Library - CSES PIMA
Spectrometer

These spectra were measured on a PIMA II field spectrometer under laboratory


conditions. PIMA, manufactured by Integrated Spectronics, Sydney, Australia, uses
internal illumination and an integrating sphere to provide approximately 2.5 nm
resolution.

ENVI User’s Guide IGCP264 Spectral Library


1192 Appendix C: ENVI Spectral Libraries

JHU Spectral Library


The Johns Hopkins University Spectral Library was provided by Jack Salisbury at
JHU. These data are available upon request from the data on the ASTER homepage
at: http://speclib.jpl.nasa.gov/Order.com
The following files are provided:

ign_crs.sli Igneous Rocks Library - Coarse (0.4 - 14 μm)


ign_crs.hdr ENVI header for the Igneous Rocks Library - Coarse
(0.4 - 14 μm)
ign_fn.sli Igneous Rocks Library - Fine (0.4 - 14 μm)
igne_fn.hdr ENVI header for the Igneous Rocks Library - Fine (0.4
- 14 μm)
lunar.sli Lunar Materials Library (2.08 - 14 μm)
lunar.hdr ENVI header for the Lunar Materials Library (2.08 -
14 μm)
manmade1.sli Man Made Materials Library (0.42 - 14 μm)
manmade1.hdr ENVI header for the Man Made Materials Library
(0.42 - 14 μm)
manmade2.sli Man Made Materials Library (0.3 - 12.5 μm)
manmade2.hdr ENVI header for the Man Made Materials Library (0.3
- 12.5 μm)
meta_crs.sli Metamorphic Rocks Library - Coarse (0.4 - 14.98 μm)
meta_crs.hdr ENVI header for the Metamorphic Rocks Library -
Coarse (0.4 - 14.98 μm)
meta_fn.sli Metamorphic Rocks Library - Fine (0.4 - 14.98 μm)
meta_fn.hdr ENVI header for the Metamorphic Rocks Library -
Fine (0.4 - 14.98 μm)
meteor.sli Meteorites Library (2.08 - 25 μm)
meteor.hdr ENVI header for the Meteorites Library (2.08 - 25 μm)
minerals.sli Minerals Library (2.08 - 25 μm)
minerals.hdr ENVI header for the Minerals Library (2.08 - 25 μm)

JHU Spectral Library ENVI User’s Guide


Appendix C: ENVI Spectral Libraries 1193

sed_crs.sli Sedimentary Rocks Library - Coarse (0.4 - 14 μm)


sed_crs.hdr ENVI header for the Sedimentary Rocks Library -
Coarse (0.4 - 14 μm)
sed_fn.sli Sedimentary Rocks Library - Fine (0.4 - 14.98 μm)
sed_fn.hdr ENVI header for the Sedimentary Rocks Library -
Fine (0.4 - 14.98 μm)
snow.sli Snow Library (0.3 - 14 μm)
snow.hdr ENVI header for the Snow Library (0.3 - 14 μm)
soils.sli Soils Library (0.42 - 14 μm)
soils.hdr ENVI header for the Soils Library (0.42 - 14 μm)
veg.sli Vegetation Library (0.3 - 14 μm)
veg.hdr ENVI header for the Vegetation Library (0.3 - 14 μm)
water.sli Water Library (2.08 - 14 μm)
water.hdr ENVI header for the Water Library (2.08 - 14 μm)

The following is reproduced verbatim from the README file provided by JHU with
the data:
With the exception of man-made materials, all spectra in the Johns Hopkins
Library were measured under the direction of John W. Salisbury. Most
measurements were made by Dana M. D'Aria, either at Johns Hopkins
University in Baltimore, MD, or at the U.S. Geological Survey in Reston, VA.
This text is a general introduction to the library, with an overview of
measurement techniques, which do differ for different materials. There is a
separate introductory text for each kind of material (rocks, minerals, lunar
soils, terrestrial soils, meteorites, and so forth) that contains more detailed
information.
Two different kinds of spectral data are resident in this library. Spectra of
minerals and meteorites were measured in bidirectional (actually biconical)
reflectance (see two Salisbury et al., 1991 references below for details). These
spectra, recorded from 2.08-25 micrometers, cannot be used to quantitatively
predict emissivity because only hemispherical reflectance can be used in this
way. However, when recorded properly, as described in the meteorite paper,
curve shape is accurate and can be used for remote sensing applications.

ENVI User’s Guide JHU Spectral Library


1194 Appendix C: ENVI Spectral Libraries

All other spectral data, with the exception of portions of generic snow and
vegetation spectra (see the introductory text for each type of material), were
measured in directional hemispherical reflectance. Under most conditions, the
infrared portion of these data can be used to calculate emissivity using
Kirchhoff's Law (E=1-R), which has been verified by both laboratory and field
measurements (Salisbury et al., 1994; Korb et al., 1996). The unusual
circumstances (for example, the lunar environment) where thermal gradients
may cause significant departure from Kirchhoffian behavior are discussed in
Salisbury et al., 1994.
The apparently seamless reflectance spectra from 0.4 to 14 micrometers of
rocks and soils were generated using two different instruments, both equipped
with integrating spheres for measurement of directional hemispherical
reflectance, with source radiation impinging on the sample from a centerline
angle 10 degrees from the vertical.
Unless specified otherwise (see relevant introductory texts for generic snow
and vegetation spectra, and spectra of man-made materials), all visible/near-
infrared (VNIR) spectra were recorded using a Beckman Instruments model
UV 5240 dual-beam, grating spectrophotometer at the U.S. Geological Survey,
Reston, VA. The data were obtained digitally and corrected for both instrument
function and the reflectance of the HALON reference using standards
traceable to the U. S. National Institute of Science and Technology.
Measurements of such standards indicate an absolute reflectance accuracy of
plus or minus 3 percent. Wavelength accuracy was checked using a holmium
oxide reference filter and is reproducible and accurate to within plus or minus
0.004 micrometers, or 4 nm (one digitization step). Spectral resolution is
variable because the Beckman uses an automatic slit program to keep the
energy on the detector constant. The result is a spectral bandwidth typically
less than 0.008 micrometers over the 0.4 to 2.5 micrometers spectral range
measured, but slightly larger at the two extremes of the range of the lead
sulfide detector (0.8-0.9 micrometers and 2.4- 2.5 micrometers). This
instrument has a grating change at 0.8 micrometers, which sometimes results
in a spectral artifact (either a small, sharp absorption band, or a slight offset of
the spectral curve) at that wavelength.
Two similar instruments were used to record reflectance in the infrared range
(2.08 to 15 micrometers). Briefly, both are Nicolet FTIR spectrophotometers
and both have a reproducibility and absolute accuracy better than plus or minus
1 percent over most of the spectral range. Early measurements of igneous
rocks with an older detector were noisy in the 13.5-14 micrometers range and
do not quite meet this standard. Because FTIR instruments record spectral data
in frequency space, both wavelength accuracy and spectral resolution are given

JHU Spectral Library ENVI User’s Guide


Appendix C: ENVI Spectral Libraries 1195

in wavenumbers (reciprocal centimeters). Wavelength accuracy of an


interferometer type of instrument is limited by the spectral resolution, which
yields a data point every 2 wavenumbers for these measurements. The x-axis
was changed from wavenumbers to micrometers for all of these data before the
infrared segment was joined to the VNIR data from the Beckman.
Spectra from the Beckman and the FTIR instruments were compared in the
overlap range of 2.08-2.5 micrometers. If the difference was greater than 3
percent, measurements were repeated. Typically, however, the agreement was
within the 3 percent limit. In view of the greater accuracy of the FTIR
measurements, any small discrepancy between the two spectral segments was
resolved by adjusting the Beckman data to fit the reflectance level of the
segment measured by the FTIR instruments.
See the following references:
Korb, A. R., Dybwad, P., Wadsworth, W., and Salisbury, J. W., 1996, Portable FTIR
spectrometer for field measurements of radiance and emissivity: Applied Optics, v.
35, pp. 1679-1692.
Salisbury, J. W., D'Aria, D. M., and Jarosevich, E., 1991a, Midinfrared (2.5-13.5
micrometers) reflectance spectra of powdered stony meteorites: Icarus, v. 92, pp.
280-297.
Salisbury, J. W., Wald, A., and D'Aria, D. M., 1994, Thermal-infrared remote sensing
and Kirchhoff's law 1. Laboratory measurements: Jour. of Geophysical Research, v.
99, pp. 11,897-11,911.
Salisbury, J. W., Walter, L. S., Vergo, N., and D'Aria, D. M., 1991b, Infrared (2.1- 25
micrometers) Spectra of Minerals: Johns Hopkins University Press, 294 p.

ENVI User’s Guide JHU Spectral Library


1196 Appendix C: ENVI Spectral Libraries

JHU Spectral Library ENVI User’s Guide


Appendix D
ENVI Map Projections

This chapter covers the following topics:

Introduction . . . . . . . . . . . . . . . . . . . . . . . 1198 Ellipsoids . . . . . . . . . . . . . . . . . . . . . . . . 1203


Map Projections . . . . . . . . . . . . . . . . . . . . 1199 Datums . . . . . . . . . . . . . . . . . . . . . . . . . . 1204
Coordinate Systems . . . . . . . . . . . . . . . . . 1203 Non-Standard Projections . . . . . . . . . . . 1206

ENVI User’s Guide 1197


1198 Appendix D: ENVI Map Projections

Introduction
ENVI supports many different map projection types. Brief descriptions and lists of
ENVI supported map projections, coordinates, ellipsoids, and datums are given
below. You can define your own parameters for the supported ENVI projection types
and select the desired ellipsoid or datum (see “Building Customized Map
Projections” on page 992). You can also define new projection types by providing the
formula used to translate latitude and longitude coordinates into the new projection
coordinates (see “ENVI_CONVERT_PROJECTION_COORDINATES” in the ENVI
Reference Guide). You can also define your own new projection types by providing
the formula used to translate latitude and longitude coordinates into the new
projection coordinates (see Chapter 6, “User-Defined Map Projection Types” in the
ENVI Programmer’s Guide). More information about map projections is in the
following references.
References:
Snyder, 1982. Map Projections Used by the U. S. Geological Survey. USGS Bulletin
1532.
Peter H. Dana, The Geographer’s Craft Project, Department of Geography,
University of Colorado at Boulder
http://www.colorado.edu/geography/gcraft/notes/datum/datum_f.html
http://www.connect.net/jbanta/

Introduction ENVI User’s Guide


Appendix D: ENVI Map Projections 1199

Map Projections
Use map projections to represent all or part of the 3D surface of the earth in two-
dimensions. Distortion always occurs when projecting a spherical surface onto a
planar map and different projections cause different map characteristics to be
distorted. You must choose the projection that shows the characteristics important to
your goals accurately at the expense of other characteristics, which will be distorted.
Map projections can have properties such as equal area, conformal, equidistant, or
true azimuth (direction) characteristics. On an equal area map projection, circles of a
fixed diameter drawn on any part of the map will encompass the same geographic
area. This projection is useful for comparing land areas. However, the shapes, angles,
and scales of equal area maps may be distorted. On a conformal map projection (for
example, UTM), the local angles are correct and the local scale in every direction is
constant showing the true shape correctly. This projection is useful for measuring
distance and direction between relatively near points. An equidistant map projection
has a true accurate scale between one or two points and every other point on the map.
Reference lines are called standard parallels or standard meridians. True direction
map projections show the correct directions or azimuths among all points on the map.
Many map projections use a compromise between these characteristics to reduce
distortion yet provide accurate measurements for local areas. Several map projections
are designed for specific uses, such as air and sea navigation, satellite mapping, and
so forth.
Map projections are typically projected onto one of three types of surface: cylinder,
cone, or plane. These surfaces wrap around or intersect with the globe and then are
cut and laid flat to produce a map.
• Cylindrical projections are made by wrapping a cylinder around the globe and
projecting the surface onto the cylinder. Often, the cylinder touches the globe
at the equator so the meridians of longitude are projected as equidistant
straight lines perpendicular to the equator and the parallels of latitude are
projected parallel to the equator (mathematically spaced). The Mercator
projection is an example of a cylindrical projection.
• Conical projections are made by placing a cone over the globe. Often, the apex
of the cone is along the polar axis of the globe and the cone touches the globe
at a parallel of latitude. In this case, the meridians are projected onto the cone
as equidistant straight lines and the parallels are lines around the
circumference of the cone that are circular when the map is laid flat.

ENVI User’s Guide Map Projections


1200 Appendix D: ENVI Map Projections

• Planar or azimuthal map projections are produced when a plane is placed


tangent to the globe’s surface. In a polar azimuthal projection, the plane is
tangent to one of the globe’s poles so the meridians are projected as straight
lines radiating from the pole and the parallels are circles centered on the pole.
Modifications are often made to these types of projections and there are other
projections that are not constructed in these ways.
You can add or modify map projections in ENVI. You can define your own
parameters for the supported ENVI projection types and select the desired ellipsoid
or datum (see “Building Customized Map Projections” on page 992). You can also
define new projection types by providing the formula used to translate latitude and
longitude coordinates into the new projection coordinates (see
“ENVI_CONVERT_PROJECTION_COORDINATES” in the ENVI Reference
Guide).
The map projections available in ENVI are listed in the following table. The ENVI
projection number is used when creating map information structures when
programming in ENVI.

ENVI Projection
Projection Name and Description
Number
Albers Conical Equal Area 9
a, b, lat0, lon0, x0, y0, sp1, sp2, [datum], name
Arbitrary 0
Azimuthal Equidistant 12
r, lat0, lon0, x0, y0, name
Equidistant Conic A 33
a, b, lat0, lon0, x0, y0, sp1, [datum], name
Equidistant Conic B 34
a, b, lat0, lon0, x0, y0, sp1, sp2, [datum], name
Equirectangular / Equidistant Cylindrical 17
r, lat0, lon0, x0, y0, name
General Vertical Nearside Perspective 15
r, lat0, lon0, x0, y0, height, [datum], name
Geographic 1

Table D-8: Map Projections Available in ENVI

Map Projections ENVI User’s Guide


Appendix D: ENVI Map Projections 1201

ENVI Projection
Projection Name and Description
Number

Gnomonic 13
r, lat0, lon0, x0, y0, name
Hammer 27
r, lon0, x0, y0, name
Hotine Oblique Mercator B 6
a, b, lat0, lon0, azimuth, x0, y0, k0, [datum], name
azimuth:azimuth of central line (degrees east of north)
Lambert Azimuthal Equal Area (sphere) 36
r, lat0, lon0, x0, y0, [datum], name
Lambert Azimuthal Equal Area 11
a, b, lat0, lon0, x0, y0, [datum], name
Lambert Conformal Conic 4
a, b, lat0, lon0, x0, y0, sp1, sp2, [datum], name
Mercator 20
a, b, lat0, lon0, x0, y0, [datum], name
Miller Cylindrical 18
r, lon0, x0, y0, name
Mollweide 25
r, lon0, x0, y0, name
New Zealand Map Grid 39
a, b, lat0, lon0, x0, y0, [datum], name
Orthographic 14
r, lat0, lon0, x0, y0, name
Polar Stereographic 31
a, b, lat0, lon0, x0, y0, [datum], name
Polyconic 10
a, b, lat0, lon0, x0, y0, [datum], name

Table D-8: Map Projections Available in ENVI (Continued)

ENVI User’s Guide Map Projections


1202 Appendix D: ENVI Map Projections

ENVI Projection
Projection Name and Description
Number

Rectified Skew Orthomorphic (RSO) 40


a, b, lat0, lon0, azimuth, x0, y0, k0, [datum],
name
azimuth: azimuth of central line at projection center
Robinson 21
r, lon0, x0, y0, name
Sinusoidal 16
r, lon0, x0, y0, name
State Plane 8
Stereographic (ellipsoid) 7
a, b, lat0, lon0, x0, y0, k0, [datum], name
Stereographic (sphere) 35
r, lat0, lon0, x0, y0, [datum], name
Transverse Mercator 3
a, b, lat0, lon0, x0, y0, k0, [datum], name
User Defined projection 99
a, b, lat0, lon0, x0, y0, [additional parameters],
[datum], name, user-defined projection name
UTM 2
Van der Griten 19
r, lat0, lon0, x0, y0, name

Table D-8: Map Projections Available in ENVI (Continued)


In addition to the projections listed in Table D-8, ENVI also reads any projection type
from a geodatabase or ESRI® layer file. See ArcGIS® Help for a full list of supported
projections, or refer to the ITT Visual Information Solutions Tech Tips:
1. Go to http://www.ittvis.com/services/search.asp.
2. In the Enter Keyword field, type projection engine.
3. Click Submit.
4. In the search results, open the Tech Tip titled, “ESRI Projection Engine
Reference v1.0.”

Map Projections ENVI User’s Guide


Appendix D: ENVI Map Projections 1203

Coordinate Systems
The position of a point on a globe is often represented in spherical coordinates by
degrees of latitude and longitude. The parallels of latitude run east-west and are
formed by 90 equally spaced circles around the globe from the equator to each pole
(north latitudes are positive and south latitudes are negative). The circle at the equator
is at 0 degrees and the numbers increase to the north and south poles which are at 90
degrees each. The meridians of longitude are defined by north-south lines passing
through each pole that intersect the equator at 360 equally spaced intervals. The
meridian that passes through Greenwich, England is defined as 0 degrees and is
called the prime meridian. Degrees of longitude are defined between 0 degrees and
180 degrees east (positive) or west (negative) of the prime meridian. ENVI uses map
projections to represent the latitude and longitude lines on a plan map.
The position of a point on a map is often represented in Cartesian (x, y) rectangular
coordinates. The x-axis coordinates typically increase to the east and the y-axis
coordinates increase to the north. The x and y coordinates are often called eastings
and northings and the origin may be defined with a false easting and false northing.
These coordinate grids are often divided into zones to reduce distortion. The
Universal Transverse Mercator (UTM) and State Plane projections are examples of
these type of coordinate systems.

Ellipsoids
The shape of the Earth is often represented by an oblate ellipsoid, which is an ellipse
that is rotated about its shorter axis. The ellipsoids are described by two parameters,
the semi-major and semi-minor axes. Reference ellipsoids are used to represent the
shape of the Earth and many are based on surface measurements to give a regional
best fit and not an entire Earth best fit. Therefore, different ellipsoids are often used
for different regions of the Earth.
The ellipsoids available in ENVI are listed in the following.

Airy IUGG
Australian National Krassovsky
Bessel 1841 Mercury
Clarke 1858 Modified Airy
Clarke 1866 Modified Everest

Table D-9: Ellipsoids Available in ENVI

ENVI User’s Guide Map Projections


1204 Appendix D: ENVI Map Projections

Clarke 1880 Modified Fischer 1960


Clarke IGN New International
Danish Plessis
Delambre South American 1969
Everest Southeast Asia
Fischer 1960 Struve
Fischer 1968 Walbeck
GRS 67 WGS 60
GRS 80 WGS 66
Helmert 1906 WGS 72
Hough WGS 84
IAU “165”
International

Table D-9: Ellipsoids Available in ENVI (Continued)

ENVI Ellipsoid File


The ellipse.txt file contains a list of the ellipsoids available for use in ENVI. It is
a comma-separated ASCII file containing three columns for the ellipsoid name,
major axis in meters (a), and minor axis in meters (b). A portion of the ENVI
ellipse.txt file is shown here:
Airy, 6377563.4, 6356256.9
Australian National, 6378160.0, 6356774.7
Bessel 1841, 6377397.2, 6356079.0
Clarke 1858, 6378293.0, 6356619.0
Clarke 1866, 6378206.4, 6356583.8
Clarke 1880, 6378249.1, 6356514.9
Clarke IGN, 6378249.2, 6356515.0

Datums
A datum is a smooth, mathematical surface that closely fits the mean sea level surface
throughout the area of interest. It is created when an ellipsoid model is fixed to a base

Map Projections ENVI User’s Guide


Appendix D: ENVI Map Projections 1205

point on the Earth. Since the ellipsoid models are approximate, as you move away
from the fixed point you get larger errors. Therefore, different datums exist for
different regional areas to reduce error. Because different datums are defined by
fixing an ellipsoid to different base points, changing datums changes the latitude and
longitude of a point on the surface of the Earth. Therefore, it is necessary to know
which datum is used when defining the coordinates of your points.
ENVI supports many datums which are listed in the datum.txt file in the
map_proj directory of the ENVI distribution. Contact ITT Visual Information
Solutions Technical Support for instructions on adding your own custom datum.

ENVI Datum File


The datum.txt file contains a list of the datums available for use in ENVI. It is a
comma-separated ASCII file containing five columns for the datum name, ellipsoid
name, x, y, and z offsets from the WGS84 datum. A portion of the ENVI datum.txt
file is shown here:
Adindan, Clarke 1880, -166, -15, 204
Ain El Abd 1970, International, -150, -251, -2
Alaska (NAD-27), Clarke 1866, -5, 135, 172
Anna 1 Astro 1965, Australian National, -491, -22, 435
ARC-1950 mean, Clarke 1880, -143, -90, -294

GeoTIFF Map Information


ENVI reads and writes ellipsoid semimajor and semiminor axes in GeoTIFF files,
and it also saves non-standard datum information. These values are stored in the
following GeoTIFF structure fields:
GEOGSEMIMAJORAXISGEOKEY
GEOSEMIMINORAXISGEOKEY
For radial datums, the semimajor and semiminor axis values are the same; these are
double-precision, floating-point values.
A GEOGCITATIONGEOKEY structure field stores the string value of the datum name.

ENVI User’s Guide Map Projections


1206 Appendix D: ENVI Map Projections

Non-Standard Projections
In addition to supporting standard map projections with known tie points and fixed
pixel sizes (see “Map Projections” on page 1199), ENVI also supports non-standard
projections such as affine map transformations, RPCs, and RSMs. These are not true
map projections, but they give a reliable estimate of geographic locations for each
pixel.

Affine Map Transformations


Projections define the physical relationship between image coordinates (i,j) and
ground/map coordinates (x,y). Figure D-16 illustrates the transformation from an
image to a standard map projection where the pixel size is fixed:

Figure D-16: Transformation from Image to Standard Map Projection

ENVI performs transformations from images to standard map projections using


information that you enter in the Edit Map Information dialog. (See “Entering Map
Information for Georeferenced Files” on page 199.)
In some cases, however, a standard map projection may not be available. The
simplest type of non-standard projection that ENVI supports involves an affine map
transformation. ENVI applies a mathematical transformation to warp the image and

Non-Standard Projections ENVI User’s Guide


Appendix D: ENVI Map Projections 1207

calculate geographic coordinates for each pixel. The pixel size varies in the rectified
image. This type of projection contains a high degree of variability and is not
geographically accurate; the (x,y) locations in the rectified image are only “best
guesses.”

Figure D-17: Affine Transformation from Image to Non-standard Projection

When you only know the geographic coordinates and map projection of the four
corner points of an image, you can enter coordinates in the Geographic Corners
dialog (see “Entering Geographic Corners for Non-Georeferenced Files” on
page 204). ENVI uses this information to calculate an affine map transformation for
the image.
Images that ENVI rectifies using an affine map transformation are designated by the
word “pseudo” under the Map Info icon in the Available Bands List (Figure D-18).

ENVI User’s Guide Non-Standard Projections


1208 Appendix D: ENVI Map Projections

Figure D-18: Affine Map Transformation

Sensor Models
Sensor models are another type of map information used to define the physical
relationship between image coordinates and ground coordinates. A sensor model is a
mathematical model that replaces the rigorous (physical) sensor model associated
with a specific image by representing the model’s ground-to-image relationship. It is
used to map a 3D ground point to a 2D image point. Various commercial spaceborne
image providers utilize sensor models, particularly RPCs, which are the most
common type in current use (McGlone, 1984).

RPCs
Rational polynomial coefficients (RPCs) model the ground-to-image relationship as a
third-order, rational, ground-to-image polynomial. See McGlone (1984) for the
theory behind the RPC model.
You can let ENVI compute RPCs prior to single-image orthorectification by building
interior and exterior orientation models. (See “Building RPCs” on page 972.) ENVI
uses an iterative, converging solution to compute RPCs and adds the RPC
information to the input file header so that you can use the file with ENVI’s generic
RPC and RSM orthorectification and DEM Extraction tools.
Some sensors such as Quickbird, IKONOS, OrbView-3, and CARTOSAT-1 provide
pre-computed RPCs along with the respective imagery. If your file has associated
RPC information, you can automatically derive RPC-based geolocation information
for individual pixels in an image. See “Emulating an RPC or RSM Projection” on

Non-Standard Projections ENVI User’s Guide


Appendix D: ENVI Map Projections 1209

page 201 for more information. This method is not as geographically accurate as
performing a full orthorectification, but it is less computationally and disk-space
intensive than orthorectification.
Note
If your image file has pre-computed RPC information, ENVI uses the mean
elevation value used in the RPC transformation for the entire image. However, you
can significantly increase the geolocation accuracy of the image if you associate the
image with a DEM. See “Associating a DEM to a File” on page 202. Once
initialized, this technique will result in accuracy equivalent to performing a full
orthorectification.

For NITF files, RPC information is contained in the RPC00A and RPC00B Tagged
Record Extensions (TREs). If either of these TREs exists in a NITF file, ENVI and
ENVI Zoom use the RPC model to emulate a projection by default. See Map
Information in the NITF/NSIF Module User’s Guide for details.

RSM
RSM is a more recent sensor model (Dowman and Dolloff, 2000) that corrects the
deficiencies of RPC-based sensor models. An RSM contains a variety of
enhancements over the RPC model, including:
• Increased accuracy over images with large number of rows or columns (such
as image strips) by breaking the image into tiles with separate models.
• The ability to store varying degrees of complexity in the polynomial
representation used.
• The ability to store error estimation information so that the precision of
individual solutions can be computed.
If your file has associated RSM information, ENVI can automatically derive RSM-
based geolocation information for individual pixels in an image. (See “Emulating an
RPC or RSM Projection” on page 201 for more information.) Use of this model has
the same behavior and limitations as using an RPC model in ENVI. In particular,
associating a DEM with an image will result in significantly higher accuracy.
For more information on using RSMs in NITF data, see Map Information in the
NITF/NSIF Module User’s Guide for details.

How ENVI Reads Map Information


Map information in an image file can come from multiple sources:

ENVI User’s Guide Non-Standard Projections


1210 Appendix D: ENVI Map Projections

Category 1: Standard map projection information, affine map transformations


Cagegory 2: RPCs and RSMs
An image file cannot have both RSM and RPC information, nor can it contain both
standard map projection information and affine map transformations. A file can,
however, contain one type of information from each category (such as standard map
projection information and RPCs).
If an image file contains multiple sources of map information, ENVI reads them in
the following order of precedence:
1. Standard map projection information
2. RSMs
3. RPCs
4. Affine map transformations
ENVI reads map information from NITF files in a different order than this. See Order
and Precedence for Reading Map Information in the NITF/NSIF Module User’s
Guide.
You can turn off RPC or RSM map information in your image file using the RPC or
RSM Projection Emulation Enabled toggle button on the RPC or RSM Parameters
dialog. See “Emulating an RPC or RSM Projection” on page 201. If you turn off this
map information, ENVI will use whatever remaining map information is available for
the file.

References
Dowman, I., and J. T. Dolloff. (2000). An evaluation of rational functions for
photogrammetric restitution. International Archives of Photogrammetry and Remote
Sensing 33(B3): pp. 254-266.
McGlone, J. C., editor. (2004). Manual of Photogrammetry, Fifth Edition, American
Society for Photogrammetry and Remote Sensing.

Non-Standard Projections ENVI User’s Guide


Appendix E
Vegetation Indices

This appendix describes the vegetation VIs used by ENVI’s vegetation analysis tool. It includes the
following:

Understanding Vegetation and Its Reflectance Vegetation Indices . . . . . . . . . . . . . . . . . 1221


Properties . . . . . . . . . . . . . . . . . . . . . . . . . 1212

ENVI User’s Guide 1211


1212 Appendix E: Vegetation Indices

Understanding Vegetation and Its


Reflectance Properties
Analyzing vegetation using remotely sensed data requires knowledge of the structure
and function of vegetation and its reflectance properties. This knowledge enables you
to link vegetative structures and their condition to their reflectance behavior in an
ecological system of interest. Vegetation reflectance properties are used to derive
vegetation indices (VIs). The VIs are used to analyze various ecologies. VIs are
constructed from reflectance measurements in two or more wavelengths to analyze
specific characteristics of vegetation, such as total leaf area and water content.
A VI is a simple measure of some vegetation property calculated from reflected solar
radiation measurements made across the optical spectrum. The solar-reflected optical
spectrum spans a wavelength range of 400 nm to 3000 nm. Of this range, the 400 nm
to 2500 nm region is routinely measured using a variety of optical sensors ranging
from multispectral (for example, Landsat TM, SPOT MSS, QuickBird) to
hyperspectral (for example, AVIRIS, HyMap, Hyperion). Vegetation interacts with
solar radiation differently from other natural materials, such as soils and water
bodies. The absorption and reflection of solar radiation is the result of many
interactions with different plant materials, which varies considerably by wavelength.
Water, pigments, nutrients, and carbon are each expressed in the reflected optical
spectrum from 400 nm to 2500 nm, with often overlapping, but spectrally distinct,
reflectance behaviors. These known signatures allow scientists to combine
reflectance measurements at different wavelengths to enhance specific vegetation
characteristics by defining VIs.
The optical spectrum is partitioned into four distinct wavelength ranges:
• Visible: 400 nm to 700 nm
• Near-infrared: 700 nm to 1300 nm
• Shortwave infrared 1 (SWIR-1): 1300 nm to 1900 nm
• Shortwave infrared 2 (SWIR-2): 1900 nm to 2500 nm
The transition from near-infrared to SWIR-1 is marked by the 1400 nm atmospheric
water absorption region in which satellites and aircraft cannot acquire measurements.
Similarly, the SWIR-1 and SWIR-2 transition is marked by the 1900 nm atmospheric
water absorption region.
The sections that follow provide background material needed to understand how
remote sensing aids vegetation analysis. This information is derived from the
published work of Dr. Gregory P. Asner of the Carnegie Institution of Washington,

Understanding Vegetation and Its Reflectance Properties ENVI User’s Guide


Appendix E: Vegetation Indices 1213

Department of Global Ecology, and related sources. See “Reference:” on page 1220
for additional information.
Vegetation is divided into the following general categories:
• Plant Foliage
• Canopies
• Non-Photosynthetic Vegetation

Plant Foliage
Plant foliage, including leaves, needles, and other green materials, often look similar
to the casual observer, but they vary widely in both shape and chemical composition.
The chemical composition of leaves can often be estimated using VIs, but doing so
requires some knowledge of the basic composition of leaves and how they change
under different environmental conditions. The most important leaf components that
affect their spectral properties are:
• Pigments
• Water
• Carbon
• Nitrogen
These components are described in the sections that follow. Other components (such
as phosphorus, calcium, and so forth) are significant to plant function, but they do not
directly contribute to the spectral properties of leaves, and therefore cannot be
directly measured using remotely sensed data.

Pigments
There are three main categories of leaf pigments in plants: chlorophyll, carotenoids,
and anthocyanins. These pigments serve a variety of purposes, and are critical to the
function and health of vegetation, though the relative concentrations of these
pigments in vegetation can vary significantly. Vegetation with a high concentration of
chlorophyll is generally very healthy, as chlorophyll is linked to greater light use
efficiency or photosynthetic rates. Conversely, carotenoid and anthocyanin pigments
often appear in higher concentrations in vegetation that is less healthy, typically due
to stress or the onset of senescence (dormant or dying vegetation that appears red,
yellow, or brown).

ENVI User’s Guide Understanding Vegetation and Its Reflectance Properties


1214 Appendix E: Vegetation Indices

Chlorophyll, the most well-known and most important pigment, causes the green
color of healthy plant leaves. It is primarily responsible for photosynthesis, the
process by which plants take up carbon dioxide (CO2) from the atmosphere and
convert it into organic forms such as sugar and starch. Chlorophyll concentrations in
leaves are broadly correlated with photosynthetic rates. Chlorophyll-a and -b
pigments most closely associated with photosynthesis.
Carotenoids are a group of pigments containing alpha-carotene, beta-carotene, and
xanthophyll pigments (for example, zeaxanthin). Carotene is the yellow-orange
pigment found in tree leaves as they change from green to brown (as seen during
autumn). Carotenoid pigments have multiple functions, but they are generally found
in higher concentrations in plant leaves that are either stressed (seen in drought or
nutrient depletion), senescent, or dead. Carotenoids assist the process of light
absorption in plants, and help protect plants from the harmful effects of very high
light conditions.
Anthocyanins also have multiple functions, but are typically related to changes in
foliage. Anthocyanins are reddish pigments abundant in both newly forming leaves
and leaves undergoing senescence. Anthocyanins also serve to protect leaves from
damage due to ultraviolet radiation.
As a group, leaf pigments only affect the visible portion of the shortwave spectrum
(400 nm to 700 nm), though the affects vary depending upon the type of pigment.

Understanding Vegetation and Its Reflectance Properties ENVI User’s Guide


Appendix E: Vegetation Indices 1215

Figure E-19 shows the absorption of each pigment type as a function of wavelength
throughout the visible range.

Figure E-19: Relative Light Absorption Intensity of Some Leaf Pigments

Water
Plants of different species inherently contain different amounts of water based on
their leaf geometry, canopy architecture, and water requirements. Among plants of
one species, there is still significant variation, depending upon leaf thickness, water
availability, and plant health. Water is critical for many plant processes, in particular,
photosynthesis. Generally, vegetation of the same type with greater water content is
more productive and less prone to burn.
Leaf water affects plant reflectance in the near-infrared and shortwave infrared
regions of the spectrum (see Figure E-20). Water has maximum absorptions centered
near 1400 and 1900 nm, but these spectral regions usually cannot be observed from
airborne or space-based sensors due to atmospheric water absorption, preventing their
practical use in the creation of VIs. Water features centered around 970 nm and 1190
nm are pronounced and can be readily measured from hyperspectral sensors. These
spectral regions are generally not sampled by multispectral sensors.

ENVI User’s Guide Understanding Vegetation and Its Reflectance Properties


1216 Appendix E: Vegetation Indices

Carbon
Plants contain carbon in many forms, including sugars, starch, cellulose, and lignin.
Sugars and starch are immediate products of photosynthesis; they are moved to other
locations in plants to construct cellulose and lignin. Cellulose is primarily used in the
construction of cell walls in plant tissues. Lignin is used for the most structurally
robust portions of plants, such as leaf vacuoles, veins, woody tissue, and roots.
Cellulose and lignin display spectral features in the shortwave infrared range of the
shortwave optical spectrum (Figure E-20).

Figure E-20: Relative Light Absorption Intensity of Leaf Water and Carbon
(Cellulose and Lignin)

Nitrogen
Leaves contain nitrogen bound in the chlorophyll pigment, proteins, and other
molecules. Nitrogen concentrations in foliage are linked to maximum photosynthetic
rate and net primary production. VIs sensitive to chlorophyll content (which is
approximately 6% nitrogen) are often broadly sensitive to nitrogen content as well.
Some proteins that contain nitrogen affect the spectral properties of leaves in the
1500 nm to 1720 nm range.

Understanding Vegetation and Its Reflectance Properties ENVI User’s Guide


Appendix E: Vegetation Indices 1217

Combined Leaf Level Absorption


The interaction of radiation with foliage is primarily a function of the reflectance
properties of leaf components. In the visible range, the main signal comes from the
absorption of incident radiation by the leaf pigments chlorophyll, carotenoids, and
anthocyanins. In the near-infrared, the primary contribution comes from the
absorption of water. The reflectance in the shortwave infrared range is partially
determined by water, but the reflectance also receives significant contributions from
the reflectance of nitrogen and various forms of carbon.
Figure E-21 shows examples of leaf reflectance and transmittance spectra:

Figure E-21: Example Leaf Reflectance and Transmittance Spectra of Foliage


from Woody Plants (A) and Herbaceous Plants (B)

ENVI User’s Guide Understanding Vegetation and Its Reflectance Properties


1218 Appendix E: Vegetation Indices

Canopies
Leaf reflectance properties, controlled by properties of pigments, water, and carbon,
play a significant role in reflectance at the canopy level. Additionally, the amount of
foliage and the architecture of the canopy are also meaningful in determining the
scattering and absorption properties of vegetation canopies. Different ecosystems,
whether they be forest, grassland, or agricultural field, have different reflectance
properties, even though the properties of individual leaves are usually quite similar.
Vegetation with mostly vertical foliage, such as grass, reflects light differently than
foliage with more horizontally-oriented foliage, seen frequently in trees and tropical
forest plants. The variation in reflectance caused by different canopy structures, much
like individual leaf reflectance, is highly variable with wavelength.
There are a variety of vegetation properties of interest to scientists at the canopy level,
and many of these have direct effects on canopy reflectance properties. The two most
significant are leaf area index (LAI) and leaf angle distribution (LAD). The LAI is the
green leaf area per unit ground area, which represents the total amount of green
vegetation present in the canopy. The LAI is an important property of vegetation, and
has the strongest effect on overall canopy reflectance. The LAD describes the overall
variety of directions in which the leaves are oriented, but is often simplified by
specifying the mean leaf angle (MLA) and making assumptions about the actual
distribution. The MLA is the average of the differences between the angle of each
leaf in a canopy and horizontal.

Understanding Vegetation and Its Reflectance Properties ENVI User’s Guide


Appendix E: Vegetation Indices 1219

Figure E-22 shows the effects of LAI and LAD on reflectance of radiation by
vegetation canopies. In this plot, MLA is the parameter that represents LAD.

Figure E-22: Example Effects of Increasing LAI (A) and Decreasing MLA (B) on
Canopy Reflectance

Whereas vegetation strongly reflects light in the near-infrared portion of the


spectrum, canopies strongly absorb photons in the visible and SWIR-2 ranges. This
results in a much shallower penetration of photons into the canopy in these
wavelengths. As such, VIs using spectral data from the visible and SWIR-2 are very
sensitive to upper-canopy conditions. In contrast, photons are scattered in the near-
infrared and SWIR-1 range. Therefore, these photons measured by a remote sensing
instrument come from reflections throughout much of a vegetation canopy.

Non-Photosynthetic Vegetation
The previous sections primarily discuss live, green vegetation, but many ecosystems
contain as much, or more, senescent or dead vegetation (also known as non-
photosynthetic vegetation, or NPV) as they do green vegetation. Examples include
grasslands, shrublands, savannas, and open woodlands, which collectively cover over
half of the global vegetated land surface. This material is often called non-
photosynthetic vegetation because it could be truly dead or simply dormant (such as
some grasses between rainfall events). Also included in the NPV category are woody
structures in many plants, including tree trunks, stems, and branches.

ENVI User’s Guide Understanding Vegetation and Its Reflectance Properties


1220 Appendix E: Vegetation Indices

NPV is composed largely of the carbon-based molecules lignin, cellulose, and starch.
As such, it has a similar reflectance signature to these materials, with most of the
variation in the shortwave infrared range. In many canopies, much of the NPV is
obscured below a potentially closed leaf canopy; the wavelengths used to measure
NPV (shortwave infrared) are often unable to penetrate through the upper canopy to
interact with this NPV. As such, only exposed NPV has a significant effect on the
spectral reflectance of vegetated ecosystems. When exposed, NPV scatters photons
very efficiently in the shortwave infrared range, in direct contrast to green vegetation
which absorbs strongly in the shortwave infrared range.
In general, photons in the visible wavelength region are efficiently absorbed by live,
green vegetation. Likewise, photons in the SWIR-2 region of the spectrum are
efficiently absorbed by water. In contrast to live vegetation, dead, dry, or senescent
vegetation scatters photons very efficiently throughout the spectrum, with the most
scattering occurring in the SWIR-1 and SWIR-2 ranges. The change in canopy
reflectance due to increasing amounts of NPV is shown in Figure E-23.

Figure E-23: Changes in a Canopy’s Reflectance Across the Optical Spectrum


(400 nm - 2500 nm) as it Transitions from Live/Green to Dry/Dead Status

Reference:
Asner, G.P., 1998, Biophysical and Biochemical Sources of Variability in Canopy
Reflectance, Remote Sensing of Environment, 64:234-253.

Understanding Vegetation and Its Reflectance Properties ENVI User’s Guide


Appendix E: Vegetation Indices 1221

Vegetation Indices
Vegetation Indices (VIs) are combinations of surface reflectance at two or more
wavelengths designed to highlight a particular property of vegetation. They are
derived using the reflectance properties of vegetation described in “Plant Foliage” on
page 1213. Each of the VIs is designed to accentuate a particular vegetation property.
More than 150 VIs have been published in scientific literature, but only a small subset
have substantial biophysical basis or have been systematically tested. ENVI provides
27 vegetation indices to use to detect the presence and relative abundance of
pigments, water, and carbon as expressed in the solar-reflected optical spectrum
(400 nm to 2500 nm).
Selection of the most important vegetation categories and the best representative
indices within each category was performed by Dr. Gregory P. Asner of the Carnegie
Institution of Washington, Department of Global Ecology. The selections were based
upon robustness, scientific basis, and general applicability. Many of these indices are
currently unknown or under-used in the commercial, government, and scientific
communities.
The indices are grouped into categories that calculate similar properties. The
categories and indices are:
• Broadband Greenness (5 indices):
• Normalized Difference Vegetation Index
• Simple Ratio Index
• Enhanced Vegetation Index
• Atmospherically Resistant Vegetation Index
• Sum Green Index
• Narrowband Greenness (7 indices):
• Red Edge Normalized Difference Vegetation Index
• Modified Red Edge Simple Ratio Index
• Modified Red Edge Normalized Difference Vegetation Index
• Vogelmann Red Edge Index 1
• Vogelmann Red Edge Index 2
• Vogelmann Red Edge Index 3
• Red Edge Position Index

ENVI User’s Guide Vegetation Indices


1222 Appendix E: Vegetation Indices

• Light Use Efficiency (3 indices):


• Photochemical Reflectance Index
• Structure Insensitive Pigment Index
• Red Green Ratio Index
• Canopy Nitrogen (1 index):
• Normalized Difference Nitrogen Index
• Dry or Senescent Carbon (3 indices):
• Normalized Difference Lignin Index
• Cellulose Absorption Index
• Plant Senescence Reflectance Index
• Leaf Pigments (4 indices):
• Carotenoid Reflectance Index 1
• Carotenoid Reflectance Index 2
• Anthocyanin Reflectance Index 1
• Anthocyanin Reflectance Index 2
• Canopy Water Content (4 indices):
• Water Band Index
• Normalized Difference Water Index
• Moisture Stress Index
• Normalized Difference Infrared Index
Each category of indices typically provides multiple techniques to estimate the
absence or presence of a single vegetation property. For different properties and field
conditions, some indices within a category provide results with higher validity than
others. By comparing the results of different VIs in a category, and correlating these
to field conditions measured on site, you can assess which indices in a particular
category do the best job of modelling the variability in your scene. By using the VI in
any category that best models the measured field conditions for a few measurements,
you can significantly increase the quality of the results from any further processing.

Vegetation Indices ENVI User’s Guide


Appendix E: Vegetation Indices 1223

Note
The VIs provided in ENVI are not designed to quantify the exact concentration or
abundance of any given vegetation component. Instead, they are intended for use in
geographically mapping relative amounts of vegetation components, which can then
be interpreted in terms of ecosystem conditions.

All VIs require high-quality reflectance measurements from either multispectral or


hyperspectral sensors. Measurements in radiance units that have not been
atmospherically corrected (by using the ENVI Atmospheric Correction Module:
QUAC and FLAASH or other atmospheric correction software) are unsuitable, and
typically provide poor results.
The VIs that can be calculated on a specific dataset are determined by the spectral
bands sampled in the input dataset. If all spectral bands required for a specific index
are available, that VI is available for the dataset. For example, an input dataset from a
sensor that matches only the near-infrared and red spectral bands (such as AVHRR,
TM, and others) is only able to calculate two of the indices: the NDVI (Normalized
Difference Vegetation Index) and SR (Simple Ratio). In contrast, for a high spectral
resolution input dataset, such as AVIRIS, 25 of the indices will be available.
The next sections describe the VIs available in ENVI, grouped by category.
Information about each index includes the formulation, expected range, usage,
limitations, and references for scientific studies performed with that index. Except for
the broadband greenness VI descriptions, the wavelength (in nanometers) is
represented as a subscript in the reflectance identifier for all inputs to the VI formulae
(for example, ρ680 means the reflectance at 680 nm). To indicate that the broadband
greenness indices require less precise wavelength bands, the formulae use the
subscripts NIR, RED, and BLUE to indicate the spectral region of the reflectance
input used to calculate the VI.

ENVI User’s Guide Vegetation Indices


1224 Appendix E: Vegetation Indices

Broadband Greenness
The broadband greenness VIs are among the simplest measures of the general
quantity and vigor of green vegetation. They are combinations of reflectance
measurements that are sensitive to the combined effects of foliage chlorophyll
concentration, canopy leaf area, foliage clumping, and canopy architecture. These
VIs are designed to provide a measure of the overall amount and quality of
photosynthetic material in vegetation, which is essential for understanding the state
of vegetation for any purpose. These VIs are an integrative measurement of these
factors and are well correlated with the fractional absorption of photosynthetically
active radiation (fAPAR) in plant canopies and vegetated pixels. They do not provide
quantitative information on any one biological or environmental factor contributing to
the fAPAR, but broad correlations have been found between the broadband greenness
VIs and canopy LAI.
Broadband greenness VIs compare reflectance measurements from the reflectance
peak of vegetation in the near-infrared range to another measurement taken in the red
range, where chlorophyll absorbs photons to store into energy through
photosynthesis. Use of near-infrared measurements, with much greater penetration
depth through the canopy than red, allows sounding of the total amount of green
vegetation in the column until the signal saturates at very high levels. Because these
features are spectrally quite broad, many of the broadband greenness indices can
work effectively, even with image data collected from broadband multispectral
sensors, such as AVHRR, Landsat TM, and QuickBird. Applications include
vegetation phenology (growth) studies, land-use and climatological impact
assessments, and vegetation productivity modeling.
The broadband greenness equations in the next sections represent the surface
reflectance in an image band with a center wavelength as follows: ρNIR = 800 nm,
ρRED = 680 nm, and ρBLUE = 450 nm. Increases in leaf chlorophyll concentration or
leaf area, decreases in foliage clumping, and changes in canopy architecture each can
contribute to ρNIR decreases and ρRED increases, thereby causing an increase in the
broadband greenness values.

Index Description

Normalized Difference Normalized difference of green leaf scattering in near-


Vegetation Index infrared, chlorophyll absorption in RED.
Simple Ratio Index Ratio of green leaf scattering in near-infrared,
chlorophyll absorption in RED.

Table E-10: Broadband Greenness Indices

Vegetation Indices ENVI User’s Guide


Appendix E: Vegetation Indices 1225

Index Description

Enhanced Vegetation An enhancement on the NDVI to better account for


Index soil background and atmospheric aerosol effects.
Atmospherically Resistant An enhancement of the NDVI to better account for
Vegetation Index atmospheric scattering.
Sum Green Index Integral of scattered light in the GREEN spectral range
is sensitive to gaps in vegetation canopy.

Table E-10: Broadband Greenness Indices (Continued)

Normalized Difference Vegetation Index


The Normalized Difference Vegetation Index (NDVI) is one of the oldest, most well
known, and most frequently used VIs. The combination of its normalized difference
formulation and use of the highest absorption and reflectance regions of chlorophyll
make it robust over a wide range of conditions. It can, however, saturate in dense
vegetation conditions when LAI becomes high. NDVI is defined by the following
equation:

ρ NIR – ρ RED
NDVI = ------------------------------
-
ρ NIR + ρ RED

The value of this index ranges from -1 to 1. The common range for green vegetation
is 0.2 to 0.8.
References:
Rouse, J.W., R.H. Haas, J.A. Schell, and D.W. Deering, 1973. Monitoring Vegetation
Systems in the Great Plains with ERTS. Third ERTS Symposium, NASA SP-351 I:
309-317.
Tucker, C.J., 1979. Red and Photographic Infrared Linear Combinations for
Monitoring Vegetation. Remote Sensing of the Environment 8:127-150.
Jackson, R.D., P.N. Slater, and P.J. Pinter, 1983. Discrimination of Growth and Water
Stress in Wheat by Various Vegetation Indices Through Clear and Turbid
Atmospheres. Remote Sensing of the Environment 15:187-208.
Sellers, P.J., 1985. Canopy Reflectance, Photosynthesis and Transpiration.
International Journal of Remote Sensing 6:1335-1372.

ENVI User’s Guide Vegetation Indices


1226 Appendix E: Vegetation Indices

Simple Ratio Index


The Simple Ratio (SR) index is another old and well known VI. The SR is the ratio of
the highest reflectance; absorption bands of chlorophyll makes it both easy to
understand and effective over a wide range of conditions. As with the NDVI, it can
saturate in dense vegetation when LAI becomes very high. SR is defined by the
following equation:

ρ NIR
SR = ------------
-
ρ RED

The value of this index ranges from 0 to more than 30. The common range for green
vegetation is 2 to 8.
References:
Rouse, J.W., R.H. Haas, J.A. Schell, and D.W. Deering, 1973. Monitoring Vegetation
Systems in the Great Plains with ERTS. Third ERTS Symposium, NASA SP-351 I:
309-317.
Tucker, C.J., 1979. Red and Photographic Infrared Linear Combinations for
Monitoring Vegetation. Remote Sensing of the Environment 8:127-150.
Sellers, P.J., 1985. Canopy Reflectance, Photosynthesis and Transpiration.
International Journal of Remote Sensing 6:1335-1372.

Enhanced Vegetation Index


The Enhanced Vegetation Index (EVI) was developed to improve the NDVI by
optimizing the vegetation signal in LAI regions by using the blue reflectance to
correct for soil background signals and reduce atmospheric influences, including
aerosol scattering. This VI is therefore most useful in LAI regions, where the NDVI
may saturate. EVI is defined by the following equation:

ρ NIR – ρ RED
EVI = 2.5 ⎛ -------------------------------------------------------------------------⎞
⎝ ρ NIR + 6ρ RED – 7.5ρ BLUE + 1⎠

The value of this index ranges from -1 to 1. The common range for green vegetation
is 0.2 to 0.8.

Vegetation Indices ENVI User’s Guide


Appendix E: Vegetation Indices 1227

Reference:
Huete, A.R., H. Liu, K. Batchily, and W. van Leeuwen, 1997. A Comparison of
Vegetation Indices Over a Global Set of TM Images for EOS-MODIS. Remote
Sensing of Environment 59(3):440-451.

Atmospherically Resistant Vegetation Index


The Atmospherically Resistant Vegetation Index (ARVI) is an enhancement to the
NDVI that is relatively resistant to atmospheric factors (for example, aerosol). It uses
the reflectance in blue to correct the red reflectance for atmospheric scattering. It is
most useful in regions of high atmospheric aerosol content, including tropical regions
contaminated by soot from slash-and-burn agriculture. ARVI is defined by the
following equation:

ρ NIR – ( 2ρ RED – ρ BLUE )


ARVI = ------------------------------------------------------------
-
ρ NIR + ( 2ρ RED – ρ BLUE )

The value of this index ranges from -1 to 1. The common range for green vegetation
is 0.2 to 0.8.
Reference:
Kaufman, Y.J. and D. Tanre, 1996. Strategy for Direct and Indirect Methods for
Correcting the Aerosol Effect on Remote Sensing: from AVHRR to EOS-MODIS.
Remote Sensing of Environment 55:65-79.

Sum Green Index


The Sum Green (SG) index is one of the simplest vegetation indices used for
detecting changes in vegetation greenness. Because light is strongly absorbed by
green vegetation in this spectral region, the SG index is highly sensitive to small
changes in vegetation canopy opening, such as what might occur with forest
disturbance. The SG index is the mean of reflectance across the 500 nm to 600 nm
portion of the spectrum.
This sum is then normalized by the number of bands to convert it back to units of
reflectance. The value of this index ranges from 0 to more than 50 (in units of %
reflectance). The common range for green vegetation is 10 to 25 percent reflectance.

ENVI User’s Guide Vegetation Indices


1228 Appendix E: Vegetation Indices

Reference:
Lobell, D.B. and G.P. Asner, 2003. Hyperion studies of crop stress in Mexico.
Proceedings of the 12th Annual JPL Airborne Earth Science Workshop. Pasadena,
CA. (ftp://popo.jpl.nasa.gov/pub/docs/workshops/aviris.proceedings.html).

Narrowband Greenness
Narrowband greenness VIs are a combination of reflectance measurements sensitive
to the combined effects of foliage chlorophyll concentration, canopy leaf area, foliage
clumping, and canopy architecture. Similar to the broadband greenness VIs,
narrowband greenness VIs are designed to provide a measure of the overall amount
and quality of photosynthetic material in vegetation, which is essential for
understanding the state of vegetation. These VIs use reflectance measurements in the
red and near-infrared regions to sample the red edge portion of the reflectance curve.
The red edge is a name used to describe the steeply sloped region of the vegetation
reflectance curve between 690 nm and 740 nm that is caused by the transition from
chlorophyll absorption and near-infrared leaf scattering. Use of near-infrared
measurements, with much greater penetration depth through the canopy than red
measurements, allows estimation of the total amount of green material in the column.
Narrowband greenness VIs are more sophisticated measures of general quantity and
vigor of green vegetation than the broadband greenness VIs. Making narrowband
measurements in the red edge allows these indices to be more sensitive to smaller
changes in vegetation health than the broadband greenness VIs, particularly in
conditions of dense vegetation where the broadband measures can saturate.
Narrowband greenness VIs are intended for use with high spectral resolution imaging
data, such as that acquired by hyperspectral sensors.

Index Description
Red Edge Normalized A modification of the NDVI using reflectance
Difference Vegetation measurements along the red edge.
Index
Modified Red Edge A ratio of reflectance along the red edge with blue
Simple Ratio Index reflection correction.
Modified Red Edge A modification of the Red Edge NDVI using blue to
Normalized Difference compensate for scattered light.
Vegetation Index

Table E-11: Narrowband Greenness Indices

Vegetation Indices ENVI User’s Guide


Appendix E: Vegetation Indices 1229

Index Description
Vogelmann Red Edge A shoulder of the RED-to-NIR transition that is
Index 1 indicative of canopy stress.
Vogelmann Red Edge A shape of the near-infrared transition that is
Index 2 indicative of the onset of canopy stress and
senescence.
Vogelmann Red Edge A shape of near-infrared transition that is indicative of
Index 3 the onset of canopy stress and senescence.
Red Edge Position Index The location of the maximum derivative in near-
infrared transition, which is sensitive to chlorophyll
concentration.

Table E-11: Narrowband Greenness Indices (Continued)

Red Edge Normalized Difference Vegetation Index


The Red Edge Normalized Difference Vegetation Index (NDVI 705) is a modification
of the traditional broadband NDVI. It is intended for use with very high spectral
resolution reflectance data, such as from hyperspectral sensors. Applications include
precision agriculture (an information- and technology-based agricultural
management system to identify, analyze, and manage site-soil spatial and temporal
variability), forest monitoring, and vegetation stress detection. This VI differs from
the NDVI by using bands along the red edge, instead of the main absorption and
reflectance peaks. The NDVI 705 capitalizes on the sensitivity of the vegetation red
edge to small changes in canopy foliage content, gap fraction, and senescence.
NDVI 705 is defined by an equation similar to the NDVI:

ρ 750 – ρ 705
NDVI 705 = --------------------------
ρ 750 + ρ 705

The value of this index ranges from -1 to 1. The common range for green vegetation
is 0.2 to 0.9.
References:
Gitelson, A.A. and M.N. Merzlyak, 1994. Spectral Reflectance Changes Associated
with Autumn Senescence of Aesculus Hippocastanum L. and Acer Platanoides L.

ENVI User’s Guide Vegetation Indices


1230 Appendix E: Vegetation Indices

Leaves. Spectral Features and Relation to Chlorophyll Estimation. Journal of Plant


Physiology 143:286-292.
Sims, D.A. and J.A. Gamon, 2002. Relationships Between Leaf Pigment Content and
Spectral Reflectance Across a Wide Range of Species, Leaf Structures and
Developmental Stages. Remote Sensing of Environment 81:337-354.

Modified Red Edge Simple Ratio Index


The Modified Red Edge Simple Ratio (mSR 705) index is a modification of the
traditional broadband SR index. It differs from the standard SR because it uses bands
in the red edge and incorporates a correction for leaf specular reflection. Applications
include precision agriculture, forest monitoring, and vegetation stress detection. The
mSR 705 index is defined by the following equation:

ρ 750 – ρ 445
mSR 705 = -------------------------
-
ρ 705 – ρ 445

The value of this index ranges from 0 to 30. The common range for green vegetation
is 2 to 8.
References:
Sims, D.A. and J.A. Gamon, 2002. Relationships Between Leaf Pigment Content and
Spectral Reflectance Across a Wide Range of Species, Leaf Structures and
Developmental Stages. Remote Sensing of Environment 81:337-354.
Datt, B., 1999. A New Reflectance Index for Remote Sensing of Chlorophyll Content
in Higher Plants: Tests Using Eucalyptus Leaves. Journal of Plant Physiology
154:30-36.

Vegetation Indices ENVI User’s Guide


Appendix E: Vegetation Indices 1231

Modified Red Edge Normalized Difference Vegetation Index


The Modified Red Edge Normalized Difference Vegetation Index (mNDVI 705) is a
modification of the Red Edge NDVI. It differs from the Red Edge NDVI by
incorporating a correction for leaf specular reflection. The mNDVI 705 capitalizes on
the sensitivity of the vegetation red edge to small changes in canopy foliage content,
gap fraction, and senescence. Applications include precision agriculture, forest
monitoring, and vegetation stress detection. The mNDVI 705 index is defined by the
following equation:

ρ 750 – ρ 705
mNDVI 705 = ---------------------------------------------
-
ρ 750 + ρ 705 – 2ρ 445

The value of this index ranges from -1 to 1. The common range for green vegetation
is 0.2 to 0.7.
References:
Datt, B., 1999. A New Reflectance Index for Remote Sensing of Chlorophyll Content
in Higher Plants: Tests Using Eucalyptus Leaves. Journal of Plant Physiology
154:30-36.
Sims, D.A. and J.A. Gamon, 2002. Relationships Between Leaf Pigment Content and
Spectral Reflectance Across a Wide Range of Species, Leaf Structures and
Developmental Stages. Remote Sensing of Environment 81:337-354.

Vogelmann Red Edge Index 1


The Vogelmann Red Edge Index 1 (VOG1) is a narrowband reflectance measurement
that is sensitive to the combined effects of foliage chlorophyll concentration, canopy
leaf area, and water content. Applications include vegetation phenology (growth)
studies, precision agriculture, and vegetation productivity modeling. VOG1 is defined
by the following equation:

ρ 740
VOG1 = ---------
-
ρ 720

The value of this index ranges from 0 to 20. The common range for green vegetation
is 4 to 8.

ENVI User’s Guide Vegetation Indices


1232 Appendix E: Vegetation Indices

Reference:
Vogelmann, J.E., B.N. Rock, and D.M. Moss, 1993. Red Edge Spectral
Measurements from Sugar Maple Leaves. International Journal of Remote Sensing
14:1563-1575.

Vogelmann Red Edge Index 2


The Vogelmann Red Edge Index 2 (VOG2) is a narrowband reflectance measurement
that is sensitive to the combined effects of foliage chlorophyll concentration, canopy
leaf area, and water content. Applications include vegetation phenology (growth)
studies, precision agriculture, and vegetation productivity modeling. VOG2 is defined
by the following equation:

ρ 734 – ρ 747
VOG2 = --------------------------
ρ 715 + ρ 726

The value of this index ranges from 0 to 20. The common range for green vegetation
is 4 to 8.
Reference:
Vogelmann, J.E., B.N. Rock, and D.M. Moss, 1993. Red Edge Spectral
Measurements from Sugar Maple Leaves. International Journal of Remote Sensing
14:1563-1575.

Vogelmann Red Edge Index 3


The Vogelmann Red Edge Index 3 (VOG3) is a narrowband reflectance measurement
that is sensitive to the combined effects of foliage chlorophyll concentration, canopy
leaf area, and water content. Applications include vegetation phenology (growth)
studies, precision agriculture, and vegetation productivity modeling. VOG3 is defined
by the following equation:

ρ 734 – ρ 747
VOG3 = --------------------------
ρ 715 + ρ 720

The value of this index ranges from 0 to 20. The common range for green vegetation
is 4 to 8.

Vegetation Indices ENVI User’s Guide


Appendix E: Vegetation Indices 1233

Reference:
Vogelmann, J.E., B.N. Rock, and D.M. Moss, 1993. Red Edge Spectral
Measurements from Sugar Maple Leaves. International Journal of Remote Sensing
14:1563-1575.

Red Edge Position Index


The Red Edge Position (REP) index is a narrowband reflectance measurement that is
sensitive to changes in chlorophyll concentration. Increased chlorophyll
concentration broadens the absorption feature and moves the red edge to longer
wavelengths. The red edge position refers to the wavelength of steepest slope within
the range 690 nm to 740 nm. The common range for green vegetation is 700 nm to
730 nm.
Results are reported as the wavelength of the maximum derivative of reflectance in
the vegetation red edge region of the spectrum in microns from .69 microns to .74
microns. Applications include crop monitoring and yield prediction, ecosystem
disturbance detection, photosynthesis modeling, and canopy stress caused by climate
and other factors.
Reference:
Curran, P.J., Windham, W.R., and H.L. Gholz, 1995. Exploring the Relationship
Between Reflectance Red Edge and Chlorophyll Concentration in Slash Pine Leaves.
Tree Physiology 15:203-206.

ENVI User’s Guide Vegetation Indices


1234 Appendix E: Vegetation Indices

Light Use Efficiency


The light use efficiency VIs are designed to provide a measure of the efficiency with
which vegetation is able to use incident light for photosynthesis. Light use efficiency
is highly related to carbon uptake efficiency and vegetative growth rates, and is
somewhat related to fractional absorption of photosynthetically active radiation
(fAPAR). These VIs help to estimate growth rate and production, which is useful in
precision agriculture. These VIs use reflectance measurements in the visible
spectrum to take advantage of relationships between different pigment types to assess
the overall light use efficiency of the vegetation.

Index Description
Photochemical Useful to estimate absorption by leaf carotenoids
Reflectance Index (especially xanthophyll) pigments, leaf stress, and
carbon dioxide uptake.
Structure Insensitive Indicator of leaf pigment concentrations normalized
Pigment Index for variations in overall canopy structure and foliage
content.
Red Green Ratio Index Ratio of reflectance in RED-to-GREEN sensitive to
ratio of anthocyanin to chlorophyll.

Table E-12: Light Use Efficiency Indices

Photochemical Reflectance Index


The Photochemical Reflectance Index (PRI) is a reflectance measurement that is
sensitive to changes in carotenoid pigments (particularly xanthophyll pigments) in
live foliage. Carotenoid pigments are indicative of photosynthetic light use efficiency,
or the rate of carbon dioxide uptake by foliage per unit energy absorbed. As such, it is
used in studies of vegetation productivity and stress. Applications include vegetation
health in evergreen shrublands, forests, and agricultural crops prior to senescence.
PRI is defined by the following equation:

ρ 531 – ρ 570
PRI = --------------------------
ρ 531 + ρ 570

Vegetation Indices ENVI User’s Guide


Appendix E: Vegetation Indices 1235

The value of this index ranges from -1 to 1. The common range for green vegetation
is -0.2 to 0.2.
References:
Gamon, J.A., J. Penuelas, and C.B. Field, 1992. A Narrow-Waveband Spectral Index
That Tracks Diurnal Changes in Photosynthetic Efficiency. Remote Sensing of
Environment 41:35-44.
Gamon, J.A., L. Serrano, and J.S. Surfus, 1997. The Photochemical Reflectance
Index: An Optical Indicator of Photosynthetic Radiation Use Efficiency Across
Species, Functional Types and Nutrient Levels. Oecologia 112:492-501.

Structure Insensitive Pigment Index


The Structure Insensitive Pigment Index (SIPI) is a reflectance measurement
designed to maximize the sensitivity of the index to the ratio of bulk carotenoids (for
example, alpha-carotene and beta-carotene) to chlorophyll while decreasing
sensitivity to variation in canopy structure (for example, leaf area index). Increases in
SIPI are thought to indicate increased canopy stress (carotenoid pigment).
Applications include vegetation health monitoring, plant physiological stress
detection, and crop production and yield analysis. SIPI is defined by the following
equation:

ρ 800 – ρ 445
SIPI = -------------------------
-
ρ 800 – ρ 680

The value of this index ranges from 0 to 2. The common range for green vegetation is
0.8 to 1.8.
Reference:
Penuelas, J., F. Baret, and I. Filella, 1995. Semi-Empirical Indices to Assess
Carotenoids/Chlorophyll-a Ratio from Leaf Spectral Reflectance. Photosynthetica
31:221-230.

Red Green Ratio Index


The Red Green Ratio (RG Ratio) index is a reflectance measurement that indicates
the relative expression of leaf redness caused by anthocyanin to that of chlorophyll.
The RG Ratio has been used to estimate the course of foliage development in
canopies. The RG Ratio index is an indicator of leaf production and stress, and may
also indicate flowering in some canopies.

ENVI User’s Guide Vegetation Indices


1236 Appendix E: Vegetation Indices

Applications include plant growth cycle (phenology) studies, canopy stress detection,
and crop yield prediction. Results are reported as the mean of all bands in the red
range divided by the mean of all bands in the green range. The value of this index
ranges from 0.1 to more than 8. The common range for green vegetation is 0.7 to 3.
Reference:
Gamon, J.A. and J.S. Surfus, 1999. Assessing Leaf Pigment Content and Activity With
a Reflectometer. New Phytologist 143:105-117.

Canopy Nitrogen
The Canopy Nitrogen VI is designed to provide a measure of nitrogen concentration
of remotely sensed foliage. Nitrogen is an important component of chlorophyll and is
generally present in high concentration in vegetation that is growing quickly.
“Nitrogen” on page 1216 provides more information on the importance of nitrogen in
vegetation. This VI uses reflectance measurements in the shortwave infrared range to
measure relative amounts of nitrogen contained in vegetation canopies.

Normalized Difference Nitrogen Index


The Normalized Difference Nitrogen Index (NDNI) is designed to estimate the
relative amounts of nitrogen contained in vegetation canopies. Reflectance at 1510
nm is largely determined by nitrogen concentration of leaves, as well as the overall
foliage biomass of the canopy. Together, leaf nitrogen concentration and canopy
foliar biomass are combined in the 1510 nm range to predict total canopy nitrogen
content. This is compared to a reference reflectance at 1680 nm, which should
contain a similar signal due to foliar biomass, but without the influence of nitrogen
absorption. The NDNI is experimental, but it does show strong sensitivity to
changing nitrogen status when the canopy is green (not senescent) and closed in
architecture. Applications include precision agriculture, ecosystem analysis, and
forest management. NDNI is defined by the following equation:

log ( 1 ⁄ ρ 1510 ) – log ( 1 ⁄ ρ 1680 )


NDNI = ----------------------------------------------------------------------
-
log ( 1 ⁄ ρ 1510 ) + log ( 1 ⁄ ρ 1680 )

The value of this index ranges from 0 to 1. The common range for green vegetation is
0.02 to 0.1.

Vegetation Indices ENVI User’s Guide


Appendix E: Vegetation Indices 1237

References:
Serrano, L., J. Penuelas, and S.L. Ustin, 2002. Remote Sensing of Nitrogen and
Lignin in Mediterranean Vegetation from AVIRIS Data: Decomposing Biochemical
from Structural Signals. Remote Sensing of Environment 81:355-364.
Fourty, T., F. Baret, S. Jacquemoud, G. Schmuck, and J. Verdebout, 1996. Leaf
Optical Properties with Explicit Description of Its Biochemical Composition: Direct
and Inverse Problems. Remote Sensing of Environment 56:104-117.

Dry or Senescent Carbon


The dry or senescent carbon VIs are designed to provide an estimate of the amount of
carbon in dry states of lignin and cellulose. Lignin is a carbon-based molecule used
by plants for structural components; cellulose is primarily used in the construction of
cell walls in plant tissues. Dry carbon molecules are present in large amounts in
woody materials and senescent, dead, or dormant vegetation. These materials are
highly flammable when dry. Increases in these materials can indicate when
vegetation is undergoing senescence. For more information on this vegetation
property, see “Carbon” on page 1216. You can use these VIs for fire fuel analysis and
detection of surface litter. They use reflectance measurements in the shortwave
infrared range to take advantage of known absorption features of cellulose and lignin.
Note
These indices provide suspect results in wet environments, or when the dry
materials are obscured by a green canopy.

Index Description

Normalized Difference Detects leaf lignin increases at the 1754 nm feature


Lignin Index relative to 1680 nm canopy structure region.
Cellulose Absorption Detects absorption features due to cellulose above
Index 2000 nm.
Plant Senescence Uses a ratio of carotenoids to chlorophyll to detect
Reflectance Index onset and degree of plant senescence.

Table E-13: Dry or Senescent Carbon Indices

ENVI User’s Guide Vegetation Indices


1238 Appendix E: Vegetation Indices

Normalized Difference Lignin Index


The Normalized Difference Lignin Index (NDLI) is designed to estimate the relative
amounts of lignin contained in vegetation canopies. Reflectance at 1754 nm is largely
determined by lignin concentration of leaves, as well as the overall foliage biomass of
the canopy. Together, leaf lignin concentration and canopy foliar biomass are
combined in the 1750 nm range to predict total canopy lignin content. Applications
include ecosystem analysis and detection of surface plant litter. The NDLI is highly
experimental. NDLI is defined by the following equation:

log ( 1 ⁄ ρ 1754 ) – log ( 1 ⁄ ρ 1680 )


NDLI = ----------------------------------------------------------------------
-
log ( 1 ⁄ ρ 1754 ) + log ( 1 ⁄ ρ 1680 )

The value of this index ranges from 0 to 1. The common range for green vegetation is
0.005 to 0.05.
References:
Serrano, L., J. Penuelas, and S.L. Ustin, 2002. Remote Sensing of Nitrogen and
Lignin in Mediterranean Vegetation from AVIRIS Data: Decomposing Biochemical
from Structural Signals. Remote Sensing of Environment 81:355-364.
Fourty, T., F. Baret, S. Jacquemoud, G. Schmuck, and J. Verdebout, 1996. Leaf
Optical Properties with Explicit Description of Its Biochemical Composition: Direct
and Inverse Problems. Remote Sensing of Environment 56:104-117.
Melillo, J.M., J.D. Aber, and J.F. Muratore, 1982. Nitrogen and Lignin Control of
Hardwood Leaf Litter Decomposition Dynamics. Ecology 63:621-626.

Cellulose Absorption Index


The Cellulose Absorption Index (CAI) is a vegetation index indicating exposed
surfaces containing dried plant material. Absorptions in the 2000 nm to 2200 nm
range are sensitive to cellulose. Applications include crop residue monitoring, plant
canopy senescence, fire fuel conditions in ecosystems, and grazing management. CAI
is defined by the following equation:

CAI = 0.5 ( ρ2000 + ρ2200 ) – ρ2100

Vegetation Indices ENVI User’s Guide


Appendix E: Vegetation Indices 1239

The value of this index ranges from -3 to more than 4. The common range for green
vegetation is -2 to 4.
References:
Daughtry, C.S.T., 2001. Discriminating Crop Residues from Soil by Short-Wave
Infrared Reflectance. Agronomy Journal 93:125-131.
Daughtry, C.S.T., E.R. Hunt Jr., and J.E. McMurtrey III. 2004. Assessing Crop
Residue Cover Using Shortwave Infrared Reflectance. Remote Sensing of
Environment 90:126-134.

Plant Senescence Reflectance Index


The Plant Senescence Reflectance Index (PSRI) is designed to maximize the
sensitivity of the index to the ratio of bulk carotenoids (for example, alpha-carotene
and beta-carotene) to chlorophyll. An increase in PSRI indicates increased canopy
stress (carotenoid pigment), the onset of canopy senescence, and plant fruit ripening.
Applications include vegetation health monitoring, plant physiological stress
detection, and crop production and yield analysis. PSRI is defined by the following
equation:

ρ 680 – ρ 500
PSRI = -------------------------
-
ρ 750

The value of this index ranges from -1 to 1. The common range for green vegetation
is -0.1 to 0.2.
Reference:
Merzlyak, J.R., A.A. Gitelson, O.B. Chivkunova, and V.Y. Rakitin, 1999. Non-
destructive Optical Detection of Pigment Changes During Leaf Senescence and Fruit
Ripening. Physiologia Plantarum 106:135-141.

ENVI User’s Guide Vegetation Indices


1240 Appendix E: Vegetation Indices

Leaf Pigments
The leaf pigment VIs are designed to provide a measure of stress-related pigments
present in vegetation. Stress-related pigments include carotenoids and anthocyanins,
which are present in higher concentrations in weakened vegetation. These VIs do not
measure chlorophyll, which is measured using the greenness indices. Carotenoids
function in light absorption processes in plants, as well as in protecting plants from
the harmful effects of high light conditions. Anthocyanins are water-soluble pigments
abundant in newly forming leaves and leaves undergoing senescence. Applications
for leaf pigment VIs include crop monitoring, ecosystem studies, analyses of canopy
stress, and precision agriculture. Stress pigments can indicate the presence of
vegetation stress, often before it is observable using the unaided eye. The pigments
are described in greater detail in “Pigments” on page 1213. The VIs use reflectance
measurements in the visible spectrum to take advantage of the absorption signatures
of stress-related pigments. For leaf pigment indices, reflectance needs to be scaled
between 0 and 1. If reflectance data are scaled, use the Reflectance Scale Factor
field in the Header Info dialog instead of creating a copy of your data. See “Entering
a Reflectance Scale Factor” on page 207 for details.

Index Description

Carotenoid Reflectance Detects a relative difference in absorption indicative of


Index 1 changes in leaf total carotenoid concentration relative
to chlorophyll concentration.
Carotenoid Reflectance Similar to CRI1, but uses a different wavelength to
Index 2 estimate the chlorophyll content.
Anthocyanin Reflectance Changes in GREEN absorption relative to RED
Index 1 indicate leaf anthocyanins.
Anthocyanin Reflectance A variant of the ARI1, which is sensitive to changes in
Index 2 GREEN absorption relative to RED, indicating leaf
anthocyanins.

Table E-14: Leaf Pigments Indices

Vegetation Indices ENVI User’s Guide


Appendix E: Vegetation Indices 1241

Carotenoid Reflectance Index 1


The Carotenoid Reflectance Index 1 (CRI1) is a reflectance measurement that is
sensitive to carotenoid pigments in plant foliage. Higher CRI1 values mean greater
caratenoid concentration relative to chlorophyll. CRI1 is defined by the following
equation:

1 1
CRI1 = ⎛ ----------⎞ – ⎛ ----------⎞
⎝ ρ 510⎠ ⎝ ρ 550⎠

The value of this index ranges from 0 to more than 15. The common range for green
vegetation is 1 to 12.
Reference:
Gitelson, A.A., Y. Zur, O.B. Chivkunova, and M.N. Merzlyak, 2002. Assessing
Carotenoid Content in Plant Leaves with Reflectance Spectroscopy. Photochemistry
and Photobiology 75:272-281.

Carotenoid Reflectance Index 2


The Carotenoid Reflectance Index 2 (CRI2) is a reflectance measurement that is
sensitive to carotenoid pigments in plant foliage. CRI2 is a modification of CRI1. It
provides better results in areas of high carotenoid concentration. Higher CRI2 values
mean greater caratenoid concentration relative to chlorophyll. CRI2 is defined by the
following equation:

1 1
CRI2 = ⎛ ----------⎞ – ⎛ ----------⎞
⎝ ρ 510⎠ ⎝ ρ 700⎠

The value of this index ranges from 0 to more than 15. The common range for green
vegetation is 1 to 11.
Reference:
Gitelson, A.A., Y. Zur, O.B. Chivkunova, and M.N. Merzlyak, 2002. Assessing
Carotenoid Content in Plant Leaves with Reflectance Spectroscopy. Photochemistry
and Photobiology 75:272-281.

ENVI User’s Guide Vegetation Indices


1242 Appendix E: Vegetation Indices

Anthocyanin Reflectance Index 1


The Anthocyanin Reflectance Index 1 (ARI1) is a reflectance measurement that is
sensitive to anthocynanins in plant foliage. Increases in ARI1 indicate canopy
changes in foliage via new growth or death. ARI1 is defined by the following
equation:

1 1
ARI1 = ⎛ ----------⎞ – ⎛ ----------⎞
⎝ ρ 550⎠ ⎝ ρ 700⎠

The value of this index ranges from 0 to more than 0.2. The common range for green
vegetation is 0.001 to 0.1.
Reference:
Gitelson, A.A., M.N. Merzlyak, and O.B. Chivkunova, 2001. Optical Properties and
Nondestructive Estimation of Anthocyanin Content in Plant Leaves. Photochemistry
and Photobiology 71:38-45.

Anthocyanin Reflectance Index 2


The Anthocyanin Reflectance Index 2 (ARI2) is a reflectance measurement that is
sensitive to anthocynanins in plant foliage. Increases in ARI2 indicate canopy
changes in foliage via new growth or death. The ARI2 is a modification of the ARI1
which detects higher concentrations of anthocynanins in vegetation. ARI2 is defined
by the following equation:

1 1
ARI2 = ρ 800 ⎛ ----------⎞ – ⎛ ----------⎞
⎝ ρ 550⎠ ⎝ ρ 700⎠

The value of this index ranges from 0 to more than 0.2. The common range for green
vegetation is 0.001 to 0.1.
Reference:
Gitelson, A.A., M.N. Merzlyak, and O.B. Chivkunova, 2001. Optical Properties and
Nondestructive Estimation of Anthocyanin Content in Plant Leaves. Photochemistry
and Photobiology 71:38-45.

Vegetation Indices ENVI User’s Guide


Appendix E: Vegetation Indices 1243

Canopy Water Content


The canopy water content VIs are designed to provide a measure of the amount of
water contained in the foliage canopy. Water content is an important quantity of
vegetation because higher water content indicates healthier vegetation that is likely to
grow faster and be more fire-resistant. This vegetation property is described in detail
in “Water” on page 1215. Canopy water content VIs use reflectance measurements in
the near-infrared and shortwave infrared regions to take advantage of known
absorption features of water and the penetration depth of light in the near-infrared
region to make integrated measurements of total column water content.

Index Description
Water Band Index Absorption intensity at 900 nm increases with canopy
water content.
Normalized Difference The rate of increase at 857 nm absorption relative to
Water Index 1241 nm is a direct metric of total volumetric water
content of vegetation.
Moisture Stress Index Detects changes at 1599 nm absorption that is sensitive
to the onset of moisture stress in vegetation.
Normalized Difference Absorption intensity at 1649 nm increases with canopy
Infrared Index water content.

Table E-15: Canopy Water Content Indices

Water Band Index


The Water Band Index (WBI) is a reflectance measurement that is sensitive to
changes in canopy water status. As the water content of vegetation canopies
increases, the strength of the absorption around 970 nm increases relative to that of
900 nm. Applications include canopy stress analysis, productivity prediction and
modeling, fire hazard condition analysis, cropland management, and studies of
ecosystem physiology. WBI is defined by the following equation:

ρ 900
WBI = ---------
-
ρ 970

The common range for green vegetation is 0.8 to 1.2.

ENVI User’s Guide Vegetation Indices


1244 Appendix E: Vegetation Indices

References:
Penuelas, J., I. Filella, C. Biel, L. Serrano, and R. Save, 1995. The Reflectance at the
950-970 Region as an Indicator of Plant Water Status. International Journal of
Remote Sensing 14:1887-1905.
Champagne, C., E. Pattey, A. Bannari, and I.B. Stratchan, 2001. Mapping Crop Water
Status: Issues of Scale in the Detection of Crop Water Stress Using Hyperspectral
Indices. Proceedings of the 8th International Symposium on Physical Measurements
and Signatures in Remote Sensing, Aussois, France. Pp.79-84.

Normalized Difference Water Index


The Normalized Difference Water Index (NDWI) is sensitive to changes in vegetation
canopy water content because reflectance at 857 nm and 1241 nm has similar but
slightly different liquid water absorption properties. The scattering of light by
vegetation canopies enhances the weak liquid water absorption at 1241 nm.
Applications include forest canopy stress analysis, leaf area index studies in densely
foliated vegetation, plant productivity modeling, and fire susceptibility studies.
NDWI is defined by the following equation:

ρ 857 – ρ 1241
NDWI = ----------------------------
-
ρ 857 + ρ 1241

The value of this index ranges from -1 to 1. The common range for green vegetation
is -0.1 to 0.4.
Reference:
Gao, B.C., 1995. Normalized Difference Water Index for Remote Sensing of
Vegetation Liquid Water from Space. Proceedings of SPIE 2480: 225-236.

Moisture Stress Index


The Moisture Stress Index (MSI) is a reflectance measurement that is sensitive to
increasing leaf water content. As the water content of leaves in vegetation canopies
increases, the strength of the absorption around 1599 nm increases. Absorption at
819 nm is nearly unaffected by changing water content, so it is used as the reference.
Applications include canopy stress analysis, productivity prediction and modeling,
fire hazard condition analysis, and studies of ecosystem physiology. The MSI is

Vegetation Indices ENVI User’s Guide


Appendix E: Vegetation Indices 1245

inverted relative to the other water VIs; higher values indicate greater water stress and
less water content. MSI is defined by the following equation:

ρ 1599
MSI = -----------
-
ρ 819

The value of this index ranges from 0 to more than 3. The common range for green
vegetation is 0.4 to 2.
References:
Hunt Jr., E.R. and B.N. Rock, 1989. Detection of Changes in Leaf Water Content
Using Near- And Middle-Infrared Reflectances. Remote Sensing of Environment
30:43-54.
Ceccato, P., S. Flasse, S. Tarantola, S. Jacquemoud, and J.M. Gregoire, 2001.
Detecting Vegetation Leaf Water Content Using Reflectance in the Optical Domain.
Remote Sensing of Environment 77:22-33.

Normalized Difference Infrared Index


The Normalized Difference Infrared Index (NDII) is a reflectance measurement that
is sensitive to changes in water content of plant canopies. The NDII uses a
normalized difference formulation instead of a simple ratio, and the index values
increase with increasing water content. Applications include crop agricultural
management, forest canopy monitoring, and vegetation stress detection. NDII is
defined by the following equation:

ρ 819 – ρ 1649
NDII = ----------------------------
-
ρ 819 + ρ 1649

The value of this index ranges from -1 to 1. The common range for green vegetation
is 0.02 to 0.6.
References:
Hardisky, M.A., V. Klemas, and R.M. Smart, 1983. The Influences of Soil Salinity,
Growth Form, and Leaf Moisture on the Spectral Reflectance of Spartina Alterniflora
Canopies. Photogrammetric Engineering and Remote Sensing 49:77-83.

ENVI User’s Guide Vegetation Indices


1246 Appendix E: Vegetation Indices

Jackson, T.L., D. Chen, M. Cosh, F. Li, M. Anderson, C. Walthall, P. Doriaswamy,


and E.R. Hunt, 2004. Vegetation Water Content Mapping Using Landsat Data
Derived Normalized Difference Water Index for Corn and Soybeans. Remote Sensing
of Environment 92:475-482.

Vegetation Indices ENVI User’s Guide


Index
Numerics resetting views, 1086
rotating, zooming, and translating, 1086
2D scatter plots. See scatter plots saving files, 1097
3D image cubes, 872 smoothing images, 1096
3D shapefiles, 130 surface style, 1087
3D SurfaceView, 1081 vertical exaggeration, 1087
animating flight paths, 1092
annotation trace, 1091
background colors, 1095 A
cursor functions, 1084
DEM resolution, 1087 AATSR data (ENVISAT), 174
depth offset, 1087 ACRES data
displaying 3D files, 1081 CCRS (Landsat), 164
flight paths, 1088 SPOT, 165
modes, 1088 adaptive coherence estimator, 782
overlaying ROIs and vectors, 1096 adaptive filters, 553
printing, 1097 bit error, 559
resampling, 1083 Frost, 555

ENVI User’s Guide 1247


1248

gamma, 557 mouse button functions, 34


Kuan, 558 QuickMaps, 24
Lee, 553 scale bar titles, 1162
local sigma, 559 snap factors, 42
ADRG data, 181 symbols, 1169
ADS40 data, 174 3D flight path, 1090
aerial photographs tracing 3D surface views, 1091
building RPCs, 972 transects, 102
digital, 972 TrueType fonts, 1169
exterior orientation, 980 virtual borders, 31
interior orientation, 980 anomaly detection, 827
scanned, 972 antenna pattern correction, 1105
affine map transformations, 1206 arbitrary histograms, 84
AGATE tie point tool, 677 arbitrary map projections, 990
agricultural stress tool, 803 arbitrary profiles, 101
AIRSAR data, 1113 creating from ASCII, 105
incidence angle images, 1109 creating from endpoints, 104
opening TOPSAR files, 1140 creating from polylines, 104
pedestal height images, 1138 measurements, 103
phase images, 1137 saving as annotation, 102
polarization signatures, 1122 saving as ASCII, 102
extracting, 1122 arbitrary spectral slices, 747
viewing, 1128 ArcMap
radar tools, 1100 exporting image display to, 23
resampling to ground ranges, 1107 ArcView Raster format, 186
scattering classification images, 1139 creating output, 226
synthesizing images, 1113 opening files, 186
viewing headers, 1101 ASAR data (ENVISAT), 174
ALOS data, 175 ASCII, 188
alpha residual spectra, 397 converting map coordinates, 1001
animations ENVI files, 1176
controls, 142 opening files, 188
creating, 140 aspect, 1066
resampling, 141 aspect ratio (MSS), 386
3D SurfaceView, 1092 ASTER data, 173
annotation, 31 building geometry files, 949
burning into images and plots, 43 georeferencing, 950
converting to DXF, 1061 retaining RPCs, 989
images and plots, 31 utilities, 379
managing files, 43 atmospheric correction
map key files, 1179 SPEAR tools, 598

Index ENVI User’s Guide


1249

thermal IR data, 391 bilinear resampling, 906


TIMS thermal IR data, 388 binary encoding classification, 416
ATSR data, 176 bit error filters, 559
autocorrelation, 283 blending images, 930
autoregistration, 892 BMP format, 188
AGATE, 677 borders, 31
available vectors list, 73 Brovey sharpening, 494
AVHRR data, 170 buffer zone images, 486
building geometry files, 952 classified images, 486
calibrating, 380 vectors, 1028
computing SST, 380 building RPCs, 972
ESA sharp format, 171
georeferencing, 953
importing TerraScan data, 171 C
KLMN 1B format, 170
cache size, 1159
MetOp-A FRAC format, 382
calculating extracted feature length, 1050
Quorum station, 170
calibrating, 357
reading tapes, 238
AVHRR data, 380
utilities, 379
beta nought, 1103
viewing header information, 379
empirical line, 366
ERS data, 1103
factors, 1176
B
flat field, 364
background colors IAR reflectance, 366
3D SurfaceView, 1095 Landsat data, 357
background spectra, 820 log residuals, 364
bad bands list, 198 QuickBird data, 361
bad lines RADARSAT data, 1103
list, 1176 sigma nought, 1103
replacing, 371 thermal IR to emissivity, 391
band math, 306 TIMS data, 390
assigning values to variables, 308 WorldView data, 362
entering expressions, 307 CARTOSAT-1 data, 176
file formats, 1177 opening, 176
IDL tips, 311 utilities, 385
multiband images, 309 CEOS
writing expressions, 310 headers, 1101
band ratios, 501 reading tapes, 247
BandMax, 814 SeaWiFS, 173
basic statistics, 126, 275 tape options, 248
beta nought, 1103 change detection, 574

ENVI User’s Guide Index


1250

classificiation mask images, 301 Munsell, 527


principal components, 574 Munsell HSV to RGB, 529
reports, 299 RGB to HLS, 527
statistics, 298 RGB to HSV, 527
class color mapping, 123, 457 RGB to Munsell HSV, 527
classification, 400 colors, 1163
See also post classification. defining, 1167
binary encoding, 416 editing system preferences, 1163
collecting endmembers, 439 file format, 1164
converting classes to vectors, 1057 ramping, 1167
converting ROIs to classes, 339 combining classes, 484
editing ENVI header file, 205 complex data
ISODATA, 425 converting, 377
k-means, 427 lookup function, 208
Mahalanobis, 408 configuring
maximum likelihood, 409 annotation scale bar titles, 1162
minimum distance, 405 cache size, 1159
neural net, 419 image tile sizes, 1161
parallelepiped, 402 menu/edge border sizes, 1162
spectral information divergence, 414 previous files list, 1155
supervised, 401 zoom window increments, 1162
SVM, 421 confusion matrices, 464
unsupervised, 425 computing, 464
clumping classes, 482 example, 467
CN sharpening, 498 constrained energy minimization, 781
collecting endmembers, 439 contingency matrices. See confusion matrices
collecting points, 127 continuum removal, 785
color mapping, 120 contour levels file formats, 1179
classes, 123 contour lines, 50
color tables, 120 exporting to vector files, 56
density slicing, 120 plotting on images, 50
RGB image planes, 122 contrast stretching, 76, 76
color normalized sharpening, 494 See also interactive stretching.
color tables, 1165 arbitrary, 84
adding, 1167 default, 78
applying, 120 setting, 207
deleting, 1168 types, 78
system, 1165 equalization (default), 78
color transforms, 527 equalization (interactive), 84
HLS to RGB, 529 file-to-file, 272
HSV to RGB, 529 gaussian (default), 78

Index ENVI User’s Guide


1251

gaussian (interactive), 83 cutline feathering, 931


linear (default), 78
linear (interactive), 82
linear 0-255, 78 D
linear 2%, 78
dancing pixels
lookup tables, 85
images, 147
matching histograms, 79, 85
scatter plots, 146
piecewise linear, 83
dark subtraction, 373
square root (default), 78
data fusion, 493
square root (interactive), 84
3D SurfaceView, 1081
convolution filters, 541
hill shade images, 1074
directional, 541
image sharpening, 493
gaussian, 541
data types
high pass, 541
converting interleave types, 271
Laplacian, 541
converting stretched data, 89
low pass filters, 541
data viewer, 212
median, 542
data-specific utilities, 378
Roberts, 542
ASTER, 379
Sobel, 542
AVHRR, 379
user-defined, 542
CARTOSAT-1, 385
co-occurrence texture filters, 549
ENVISAT, 385
coordinate systems, 1203
HDF global attributes, 378
copyrights, 2
Landsat MSS, 385
correlation matrices, 276
Landsat TM, 386
COSMO-SkyMed data, 179
MODIS, 386
georeferencing, 967
OrbView-3, 386
saving metadata to XML, 1101
QuickBird, 387
viewing headers, 1101
SeaWiFS, 387
covariance matrices, 276
SPOT, 387
CPU parameters, 1171
thermal IR, 391
cross-track illumination correction, 376
TIMS, 388
cubic convolution resampling, 906
WorldView, 387
cursors
datums, 1204
controlling 3D plots, 1084
decision trees, 430
linking georeferenced images, 96
adding children, 437
linking images, 91
building, 434
querying vector attributes, 1030
children nodes, 437
querying vectors, 1024
editing, 437
x-y in plots, 106
executing, 435, 438
customizing
expressions, 431
map projections, 992
file management, 437

ENVI User’s Guide Index


1252

node expressions, 434 formats, 181


pruning, 437 overlaying contour lines, 50
reassigning class values, 436 SDTS DEMs, 182
rotating graphics, 436 SRTM DEMs, 182
zooming, 436 dilate filters, 542
decorrelation stretching, 531 DIMAP format (SPOT), 165
default bands, 197 directional filters, 541
default stretches, 78 display filters. See also quick filters
setting, 207 display groups
types, 78 configuring borders, 1162
Delaunay triangulation, 906 linking, 91
DEMs, 182 menu bars, 13
aspect, slope, shaded relief, 1066 DMSP OLS data, 177
associating with images, 202 DOQ data, 183
draping images, 1081 draping images over DEMs, 1081
extracting DRG data, 183
building RPCs, 972 DTED data, 181
replacing bad values, 1077 DXF format
resolutions, 1087 converting annotation, 1061
vertical exaggeration, 1087 converting EVFs, 1062
density slicing, 120 converting ROIs, 1060
exporting ranges to class images, 62 dynamic overlays, 92
file formats, 1177 mouse button functions, 95
interactive, 121 using, 92
deskewing MSS data, 385
destriping data, 376
digital cameras E
examples, 972
ECW format, 186
parameters, 974
edge feathering, 930
digital elevation data, 181
EFFORT polishing, 867, 867
See also topographic tools.
eigenvalues, 276
arbitrary profiles (transects), 101
computing, 504
DEMs, 182
subsetting IC rotations, 510
associating with images, 202
subsetting PC rotations, 504
draping images, 1081
eigenvectors, 276
replacing bad values, 1077
ellipsoids, 1203
resolutions, 1087
defined, 1203
vertical exaggeration, 1087
file format, 1204
DTED, 181
emissivity
exporting contours to EVF, 56
alpha residual spectra, 397
exporting to 3D shapefiles, 130
calculating from thermal IR, 395

Index ENVI User’s Guide


1253

calibration, 391 equalization stretches


normalization, 396 default, 78
empirical line calibration, 366 interactive, 84
emulating RPC and RSM projections, 201 ER Mapper format, 186
endmember collection, 439 creating output, 229
importing text files, 449 opening files, 186
saving, 453 ERDAS IMAGINE format, 186
suppressing background data, 450 creating output, 229
endmembers, 754 large 8.x files, 187
defined, 754 opening files, 186
locating in a spectral data cloud, 755 pyramid layers, 187
ENVI header file erode filters, 542
associating DEMs to images, 202 EROS A data, 174
default bands to load, 197 error messages, 412, 505, 519
editing ERS data, 179
band names, 195 ESA CEOS data (Landsat), 164
classification information, 205 ESA sharp format (AVHRR), 171
complex lookup function, 208 ESRI GRID format, 186
default stretches, 207 creating output, 232
emulating RPC and RSM projections, 201 opening files, 186
FWHM, 198 EVF
gains and offsets, 199 contour lines, 56
geographic corners, 204 converting to DXF, 1062
map information, 199 external file formats, 163
pixel sizes, 205
reflectance scale factors, 207
row offsets, 208 F
sensor types, 207
FAST format
spectral library names, 195
IRS, 170
wavelengths, 198
Landsat TM, 163
z plots and profiles, 206
fast Fourier transforms. See FFT filters
importing data from ASCII files, 195
fast orthorectification, 916
optional information, 194
feathering, 930
selecting bad bands, 198
cutline, 931
ENVI tape format, 249
edge, 930
ENVISAT data, 174
feature extraction
georeferencing, 956
linear, 1043
utilities, 385
length attribute parameters, 1054
EOS data, 173
parameters, 1053
ASTER, 173
renaming layers, 1052
MODIS, 173
saving layers, 1051

ENVI User’s Guide Index


1254

shapefile output, 1052 installing TrueType, 1169


mouse buttons, 1048 forest health tool, 809
FFT filters, 561 FORMOSAT-2 data, 177
defining, 562 retaining RPCs, 989
forward, 561 forward FFT filters, 561
inverse, 565 frame central projections, 973
file formats frame offsets, 208
ASCII, 1176 Frost filters, 555
bad lines list (.bil), 1176 FWHM, 198
calibration factors (.cff), 1176
contour levels files (.lev), 1179
density slice range files (.dsr), 1177 G
filter kernels (.ker), 1178
gains and offsets, 375
grid files (.grd), 1178
applying, 375
lookup tables (.lut), 90
specifying in ENVI header file, 199
map key files (.key), 1179
gamma filters, 557
math expressions (.exp), 1177
gaussian filters, 541
mosaic template files (.mos), 1180
gaussian stretches
tape script formats (.fmt), 1177
default, 78
vector template files (.vec), 1181
interactive, 83
datum files, 1205
GCPs, 878
ellipsoid files, 1204
autoregistration, 893
GCP file formats (.pts), 1180
collecting
graphic colors file, 1164
image-to-image, 879
map projections files, 994
minimizing RMS error, 881
previous files list, 1155
editing locations, 882
spectral libraries, 1184
entering from GPS, 1003
file management
exporting from vector windows, 1027
saving files, 226
extracting from vectors, 891
filters, 540
file formats, 1180
adaptive, 553
image-to-image registration, 878
convolution, 541
image-to-map registration, 887
display, 77
labels, 884
FFT, 561
lists, 882
kernel file formats, 1178
order, 885
morphological, 542
predicting locations, 884
texture, 548
restoring, 886
fire fuel tool, 806
reversing base/warp images, 884
flat field calibration, 364
saving, 885
fly-through. See flight paths
saving as EVF, 1007
fonts
Geary’s C index

Index ENVI User’s Guide


1255

global, 283 GeoSPOT format, 165


local, 290 GeoTIFF format, 190
plotting, 286 creating output, 232
Geo-Browser, 256 map information, 1205
geodatabases opening files, 190
retaining display enhancements when saving, Getis-Ord index, 290
228 GIS
saving, 226 attributes, 1029
Geoeye-1 data, 169 digitizing, 1019
geographic corners, 204 exporting vectors to shapefiles, 1028
geographic lookup table. See GLTs vector layers, 73
geometry files GLTs, 934
ASTER data, 949 building, 934
AVHRR, 952 building super GLT files, 937
SeaWiFS data, 946 georeferencing, 935
SPOT data, 943 georeferencing from super GLT files, 939
georeferencing, 934 GPS
See also map projections. importing ASCII points, 1006
attaching GPS links to images, 1004 linking to image windows, 1004
data types managing locations, 1005
ASTER, 950 GPS-link, 1003
AVHRR, 953 Gram-Schmidt sharpening, 494
COSMO-SkyMed, 967 grid lines
ENVISAT, 956 file formats, 1178
MODIS, 957 georeferenced, 66
RADARSAT, 969 overlaying, 63
SeaWiFS, 947 pixel-based, 65
SPOT, 944 ground control points. See GCPs
Geo-Browser, 256
grid lines, 66
IGMs and super GLTs (combined), 941 H
image-to-map, 887
HDF, 189
input geometry, 934
Landsat, 164
GLTs, 935
opening files, 189
IGM filles, 936
SeaWiFS, 173
super GLTs, 937
viewing global attributes, 378
layer stacking, 269
headers
linking images, 96
AIRSAR/TOPSAR, 1101
map information in ENVI header, 199
AVHRR, 379
mosaicking images, 926
CEOS, 1101
multiple sources of map information, 1209
COSMO-SkyMed, 1101

ENVI User’s Guide Index


1256

Landsat, 163 georeferencing, 936


LAS LIDAR, 183 super georeferencing, 941
RADARSAT, 1101 IKONOS data, 165
heads-up digitizing, 1019 illumination correction, 376
high pass filters, 541 image processing formats, 186
hill shade images ArcView Raster, 186
creating from color images, 1074 ECW, 186
creating from color tables, 1075 ER Mapper, 186
sun elevation, 1069 ERDAS IMAGINE, 186
histogram equalization stretches, 84 large 8.x files, 187
histograms, 275 pyramid layers, 187
applying ranges to new data, 88 ESRI GRID, 186
arbitrary, 84 PCI, 186
interactive stretching, 80 images
lookup tables, 85 3D cubes, 872
matching, 79, 85 animating, 140
min/max values, 87 annotating, 31
numbers of bins, 87 contrast stretching, 76
plotting, 89 coregistering, 892
rule bands, 460 dancing pixels, 147
saving, 89 flickering, 92
source information, 86 generic formats, 188
vertical scales, 87 grid lines, 63
HLS transforms, 527 linking, 91
forward, 527 masking, 349
inverse, 529 mosaicking, 919
horizontal profiles, 97 output color resolution, 19
HSV sharpening, 493 output options, 18
HSV transforms, 527 overlays, 29
forward, 527 pixel distributions, 147
inverse, 529 quick filters, 76, 77
registering, 877
resizing, 265
I rotating, 267
segmenting by pixel, 321
IAR reflectance calibration, 366
sharpening, 493
IDL
subsetting, 215
CPU parameters, 1171
synthetic color, 534
data from plots, 117
transects, 101
thread pool, 1171
virtual borders, 31
IGCP spectral libraries, 1189
x and y profiles, 97
IGM files

Index ENVI User’s Guide


1257

image-to-image registration, 878 spectral pixel editor, 139


automatic, 895 interactive stretching, 80
collecting GCPs, 879, 879 applying, 88
reversing base/warp images, 884 arbitrary histograms, 84
warping and resampling, 904 converting data types, 89
warping from GCPs, 909 data details, 80
image-to-map registration, 887 equalization, 84
extracting GCPs from vectors, 891 floating-point precision, 88
warping and resampling, 907 gaussian, 83
incidence angle images, 1109 linear, 82
independent components locking stretch bars, 82
analysis, 509 lookup tables, 85
forward rotation, 511 defining, 85
inverse rotation, 514 saving, 89
rotating from existing statistics, 513 managing, 88
rotating from existing transform, 514 matching histograms, 85
intelligent digitizer, 1043 min/max values, 81
calculating feature length, 1050 options, 88
editing features automatically, 1049 piecewise linear, 83
editing features manually, 1049 resetting, 88
exporting layers, 1052 square root, 84
length attribute parameters, 1054 interleaving
linear extraction, 1043 converting, 271
mouse buttons, 1048 interpolating data, 1058
parameters, 1053 inverse FFT transforms, 565
renaming layers, 1052 IRS data, 170
saving layers, 1051 ISODATA classification, 425
selecting different bands, 1051
selecting multiple bands, 1044
selecting one band, 1044 J
interactive analysis tools, 11
JERS data, 179
classification overlays, 44, 485
JHU spectral libraries, 1192
color mapping, 120
JPEG format, 188
density slicing, 121
georeferenced files, 19
dynamic overlays, 92
opening files, 188
linking images, 91
JPEG2000 format, 188
overlaying classification results, 44
creating output, 231
profiles and spectral plots, 97
opening files, 188
scatter plots, 145
JPL spectral libraries, 1188
spatial pixel editor, 136

ENVI User’s Guide Index


1258

K linear band prediction, 771


linear feature extraction, 1043
kappa coefficient, 464 calculating feature length, 1050
KLMN 1B format (AVHRR), 170 editing automatically, 1049
k-means classification, 427 editing manually, 1049
KOMPSAT-2 data, 177 exporting layers, 1052
Kuan filters, 558 mouse buttons, 1048
renaming layers, 1052
saving layers, 1051
L linear spectral unmixing, 773
Landsat data, 163 linear stretches
ACRES CCRS, 164 default, 78
calibrating, 357 interactive, 82
ESA CEOS, 164 lines of communication, 591
FAST, 163 roads, 591
GeoTIFF with metadata, 164 water, 603
HDF, 164 linking
MRLC, 164 georeferenced images, 96
MSS, 385 images, 91
aspect ratio, 386 local sigma filters, 559
deskewing, 385 log residuals calibration, 364
reading tapes, 236 logging ENVI sessions, 260
utilities, 385 lookup tables
NLAPS, 164 defining, 85
opening, 163 restoring, 90
reading tapes, 236 saving, 89
TM, 386 user-defined, 85
reading tapes, 237 LS-Fit, 771
utilities, 386 LUTs. See lookup tables
Laplacian filters, 541
LAS LIDAR data, 183
converting, 183 M
headers, 183 Mahalanobis distance classification, 408
layer stacking, 269 majority analysis, 481
Lee filters, 553 map projections, 1199
legalities, 2 arbitrary, 990
LIDAR data, 183 converting, 996
line central projections, 973 ASCII coordinates, 1001
line of sight calculator, 134 between projections, 996
linear 0-255 stretches, 78 latitude/longitude coordinates, 999
linear 2% stretches, 78 coordinate systems, 1203

Index ENVI User’s Guide


1259

custom, 992 forward MNFs and spectra, 525


ENVI map projections files, 994 inverse, 524
map based, 990 inverse MNFs and spectra, 526
merging old files, 1002 noise statistics, 518
non-standard, 1206 dark images, 523
pixel based, 990 estimating, 518
selecting types, 990 estimating from dark images, 523
summary, 1199 previous, 521
type codes, 1200 subsetting, 519
mapping methods spectral hourglass wizard, 834
spectral similarity mapper, 694 MODIS data, 173
maps. See QuickMaps bow tie effect, 963
masking, 349 georeferencing, 957
applying, 355 utilities, 386
building, 350 Moran’s I index
data values to ignore, 355 global, 283
image output, 21 local, 290
NaNs, 355 plotting, 286
PostScript file output, 18 morphological filters, 542
ROIs, 353 closing, 543
spatial, 224 dilate, 542
matched filtering, 776 erode, 542
MTMF, 778 opening, 542
results, 777 mosaic template formats, 1180
math, 306 mosaic tiled files
band, 306 QuickBird, 166
spectral, 857 mosaicking, 348
maximum likelihood classification, 409 feathering images, 930
measurement tool, 303 georeferenced images, 926
median filters, 77, 542 virtual mosaics, 924
MERIS data (ENVISAT), 174 mouse buttons
MetOp-A FRAC format (AVHRR), 382 3D SurfaceView window, 1084
military data annotation, 34
ADRG, 181 dynamic overlays, 95
military file formats, 181 linear feature extraction, 1048
minimum distance classification, 405 ROIs, 324
minimum noise fraction. See MNF transforms movies. See animations
minority analysis, 481 MPEG format, 1093
mixture tuned matched filtering. See MTMF MRLC data (Landsat TM), 164
MNF transforms, 516 MrSID format, 189
forward, 518 MTMF, 778

ENVI User’s Guide Index


1260

defined, 778 ADS40, 174


spectral hourglass wizard, 839 ALOS, 175
multilooking SIR-C data, 244, 1135 ATSR, 176
multi-threading, 1171 AVHRR, 170
Munsell transforms ESA sharp, 171
defined, 527 KLMN 1B, 170
HSV to RGB, 529 CARTOSAT-1, 176
RGB to HSV, 527 digital elevation, 181
DTED, 181
SDTS DEMs, 182
N SRTM DEMs, 182
USGS DEMs, 182
NaN masks, 355
DMSP (OLS), 177
n-D visualizer, 754
ENVISAT, 174
class controls, 762
EOS, 173
collapsing classes, 764
ASTER, 173
defining classes, 762
MODIS, 173
exporting classes to ROIs, 769
EROS A, 174
importing spectra, 767
external, 163
interacting with classes, 762
FORMOSAT-2, 177
plotting Z Profiles, 767
Geoeye-1, 169
pre-clustering, 758
GeoTIFF, 190
ROIs, 344
HDF, 189
spectral hourglass wizard, 838
IKONOS, 165
NDVI, 1225
image processing, 186
nearest neighbor resampling, 906
ArcView Raster, 186
neural net classification, 419
ECW, 186
NLAPS data (Landsat), 164
ER Mapper, 186
NMEA format, 1003
ERDAS IMAGINE, 186
noise statistics, 518
ESRI GRID, 186
dark images, 523
PCI, 186
estimating, 518
images
estimating from dark images, 523
ASCII, 188
previous, 521
generic formats, 188
subsetting, 519
IRS, 170
FAST, 170
O super structured, 170
KOMPSAT-2, 177
occurrence texture filters, 548 Landsat, 163
OLS data, 177 ACRES CCRS, 164
opening files ESA CEOS, 164

Index ENVI User’s Guide


1261

FAST, 163 orthogonal subspace projection, 784


GeoTIFF with metadata, 164 orthorectifying, 911
HDF, 164 fast mode, 916
MRLC, 164 generic RPC and RSM, 918
NLAPS, 164 using GCPs, 917
LAS LIDAR, 183 using RPCs, 911
military, 181 outline maps, 1041
ADRG, 181 output
MrSID, 189 display options, 15
OrbView-3, 169 image scaling, 16
PDS, 190 page sizes, 16
QuickBird, 166 plots, 118
mosaic tiled files, 166 output formats
radar, 179 ArcView Raster, 226
COSMO-SkyMed, 179 ER Mapper, 229
ERS, 179 ERDAS IMAGINE, 229
JERS, 179 ESRI GRID, 232
RADARSAT, 180 GeoTIFF, 232
TOPSAR, 1140 images, 18
RapidEye, 177 JPEG2000, 231
scan directory list, 254 PCI, 231
SeaWiFS, 173 TIFF, 232
SPOT, 164 overlapping images, 930
ACRES, 165 overlays, 29
DIMAP, 165 annotating images and plots, 31
GeoSPOT, 165 classification results, 44, 485
vegetation, 165 contours, 50
statistics, 280 density slices, 121
thermal, 178 dynamic, 92
TIFF, 190 grid lines, 63
TIMS, 178 hiding dialogs and layers, 29
USGS, 183 setting options, 20
using Geo-Browser, 256 vector layers, 70
with RPCs, 165 virtrual borders, 31
WorldView, 167
mosaic tiled files
WorldView, 168 P
OrbView-3 data, 169
pan sharpening, 494
opening files, 169
Gram-Schmidt, 494
RPCs, 169, 169
PC, 497
utilities, 386
SPEAR tools, 612

ENVI User’s Guide Index


1262

parallelepiped classification, 402 points


patch sizes, 153 collecting, 127
PC sharpening, 497 importing from ASCII, 128
PCI format, 186 saving as 3D shapefiles, 130
creating output, 231 saving as EVF, 129
opening files, 186 polarimetric tools, 1113
PDS format, 190 polarization signatures, 1122
pedestal height images displaying as images, 1134
AIRSAR, 1138 extracting, 1122
SIR-C, 1138 extracting from ROIs, 1126
phase images, 1137 single pixel, 1125
AIRSAR, 1137 viewing, 1128
SIR-C, 1137 polynomial warping, 906
PICT format, 188 post classification, 457
piecewise linear stretches, 83 accuracy, 464
pixel purity index. See PPI buffer zone images, 486
pixel-based mosaics, 919 class color mapping, 123, 457
pixels class distribution reports, 47
editing size in ENVI header file, 205 clumping classes, 482
n-D visualizer, 758 combining classes, 484
spatial pixel editor, 136 computing statistics, 48, 461
spectral pixel editor, 139 confusion matrices, 464
plots editing classes, 45
2D scatter plots, 145 exporting classes to vectors, 488
annotating, 31 kappa coefficient, 464
data labels (legends), 106 majority/minority analysis, 481
exporting data to IDL command line, 117 overlaying classes, 44, 485
functions, 115 previewing results, 404
histograms, 89 ROC curves, 470
importing ASCII spectra, 108 rule images, 404, 458
importing spectral library data, 109 saving results to statistics file, 462
moving data to other windows, 106 saving results to text file, 462
parameters, 110 segmenting images, 488
profiles and transects, 97 sieving classes, 483
rescaling (magnifying), 106 PostScript files, 15
saving data to ASCII, 116 graphics options, 17
saving data to files and printers, 118 multiple pages, 16
saving data to spectral libraries, 117 saving images, 15
stacking data, 114 scaling, 16
x-y cursors, 106 PPI, 749
PNG format, 188 fast method, 749

Index ENVI User’s Guide


1263

maximum iterations, 751 QuickMaps, 24


restarting, 752 parameters, 26
spectral hourglass wizard, 837 printing, 28
using images for endmember collection, 753 templates, 28
preferences Quorum station (AVHRR), 170
color tables, 1165
colors, 1163
TrueType fonts, 1169 R
user-defined, 1144
radar data, 179
previous files
COSMO-SkyMed, 179
lists, 1155
ERS, 179
principal components
JERS, 179
analysis, 504
RADARSAT, 180
computing statistics, 504
byte scaling, 180
forward rotation, 504
integer format, 180
inverse rotation, 508
TOPSAR, 1140
rotating from existing statistics, 507
radar tools, 1100
SPEAR tools, 574
AIRSAR scattering classification images,
profiles, 97
1139
arbitrary, 101
antenna pattern correction, 1105
x and y, 97
incidence angle images, 1109
projections. See map projections
multilooking SIR-C data, 244, 1135
pseudo map transformations, 1206
pedestal height images, 1138
pushbroom sensors
phase images, 1137
building RPCs, 972
polarimetric tools, 1113
examples, 911
polarization signatures, 1122
parameters, 974
single pixel polarization signatures, 1125
slant to ground range, 1107
synthesizing AIRSAR images, 1113
Q
synthesizing SIR-C images, 1117
quick filters TOPSAR, 1140
median, 77 viewing headers, 1101
sharpen, 77 viewing polarization signatures, 1128
smooth, 77 RADARSAT data, 180
stretching, 76 byte scaling, 180
quick statistics, 126 georeferencing, 969
quick stretches, 78 incidence angle images, 1109
QuickBird data, 166 integer format, 180
calibrating, 361 reading CEOS tapes, 246
mosaic tiled files, 166 resampling to ground ranges, 1107
utilities, 387 viewing headers, 1101

ENVI User’s Guide Index


1264

RapidEye data, 177 spectral data files, 863


raster to vector conversion, 1056 rescaling plots, 106
rasterizing point data, 1058 resizing images, 265
reading tape formats, 235 RGB
AVHRR, 238 color transforms, 527
ENVI format, 249 image planes, 122
generic CEOS, 247 sharpening, 493
Landsat MSS, 236 Roberts filters, 542
Landsat TM, 237 ROC curves, 470
RADARSAT, 246 ROIs
SIR-C CEOS, 242 converting band values, 337
SPOT, 238 converting to DXF, 1060
reference channel emissivity, 395 creating classification images, 339
reflectance spectra. See spectral libraries creating new, 326
registration, 877 deleting, 328
accuracy, 909 drawing, 323
automatic drawing in scatter plots, 149
coregistration, 892 editing attributes, 326
image-to-image, 895 exporting to ASCII, 344
using GCPs, 893 exporting to EVF, 343
image-to-image, 878 exporting to n-D Visualizer, 344
automatic registration, 895 growing, 330
reversing base/warp images, 884 importing from ASCII, 331
using GCPs, 909 intersecting, 332
warping and resampling, 904 masking, 353
image-to-map, 887 measurements, 333
entering GCPs from GPS, 1003 merging, 332
extracting GCPs from vectors, 891 mouse buttons, 324
warping and resampling, 907 reconciling, 335
mosaicking images, 919 reconciling via maps, 337
relative water depth, 615 reporting areas, 333
resampling, 904 restoring, 341
animations, 141 saving, 340
bilinear, 906 saving results to ENVI statistics files, 329
cubic convolution, 906 saving results to text files, 329
image-to-image, 904 spectral separability, 339
image-to-map, 907 statistics, 329
library spectra, 741 rotating images, 267
nearest neighbor, 906 rotations
radial, 939 forward IC, 511
slant to ground range, 1107 forward MNF, 518

Index ENVI User’s Guide


1265

forward PC, 504 lookup tables, 89


inverse IC, 514 PostScript files, 15
inverse MNF, 524 ROIs, 340
inverse PC, 508 scale factors
RPCs, 1208 reflectance, 207
ALOS files, 175 scatter plots, 145
ASTER and SPOT files, 989 associating with z profiles, 153
building, 972 axis ranges, 153
CARTOSAT-1 files, 176 changing bands, 154
definition, 1208 dancing pixels, 146
emulating projections, 201 density distribution, 148
IKONOS files, 165 drawing ROIs, 149
OrbView-3 files, 169, 169 full band, 735
orthorectifying images, 918 importing ROIs, 155
QuickBird files, 166, 167 n-dimensional, 754
RSM, 1209 new, 154
definition, 1209 output formats, 154
emulating projections, 201 patch sizes, 153
orthorectifying images, 918 pixel distributions, 146
RST warping, 905 resetting window sizes, 154
rule images, 404, 458 right-click menus, 151
RX anomaly detection, 827 zooming, 148
RXD-UTD anomaly detection, 572, 828 SDTS DEMs, 182
sea surface temperature (AVHRR), 380
SeaWiFS data, 173
S building geometry files, 946
georeferencing, 947
SAM
utilities, 387
classification, 412
segmenting images, 321, 488
spectral hourglass wizard, 839
semivariance, 283
target finder, 814
sensor models, 1208
examining results, 824
SFF, 788
selecting backgrounds, 820
shaded relief, 1066
selecting targets, 819
shapefiles
significant bands, 823
3D, 130
workflow, 815
exporting linear feature extraction layers,
SAR. See radar tools
1052
saturation stretching, 533
exporting vector layers, 1028
saving, 226
sharpening, 493
complex data, 377
CN, 498
display groups as images, 18
color normalized (Brovey), 494
histograms, 89

ENVI User’s Guide Index


1266

filters, 77 coregistering images, 580


Gram-Schmidt, 494 delineating vegetation, 634
HSV, 493 detecting watercraft, 641
PC, 497 lines of communication
shift differencing, 518 roads, 591
sieving classes, 483 water, 603
sigma nought, 1103 pan sharpening, 612
SIR-C data, 1117 relative water depth, 615
incidence angle images, 1109 spectral analogues, 624
multilooking, 1135 terrain categorization, 628
multilooking from tape, 244 spectra, 439
pedestal height images, 1138 applying forward MNFs, 525
phase images, 1137 applying inverse MNFs, 526
polarization signatures backgrounds, 820
extracting, 1122 importing, 442
viewing, 1128 from ASCII, 444
radar tools, 1100 from ASD binary files, 446
reading CEOS tapes, 242 from display groups, 442
reading data from disk, 1120 from endmember collection files, 449
resampling to ground ranges, 1107 from plot windows, 444
synthesizing images, 1117 from ROIs and vectors
using the CEOS header tool, 1120 , 448
viewing CEOS headers, 1101 from spectral libraries, 446
slant to ground range, 1107, 1107 from statistics files, 449
slope, 1066 n-D visualizer, 767
SMACC spectral tool, 853 targets, 819
smoothing filters, 77 spectral analogues, 624
snap factors, 42 spectral analyst, 845
Sobel filters, 542 spectral angle mapper. See SAM
spatial pixel editor, 136 spectral feature fitting. See SFF
spatial profiles, 102 spectral hourglass wizard, 829
spatial statistics, 283 spectral information divergence, 414
global, 283 spectral libraries
definition, 283 adding data from plots, 117
viewing data, 286 file formats, 1184
local, 290 IGCP, 1189
spatial subsetting. See subsetting JHU, 1192
SPEAR tools, 570 JPL, 1188
atmospheric correction, 598 plot options, 741
change detection resampling, 741
principal components, 574 USGS mineral, 1185

Index ENVI User’s Guide


1267

USGS vegetation, 1186 utilities, 387


vegetation, 1187 vegetation, 165
viewing spectra, 739 square root stretches
spectral mapping methods default, 78
adaptive coherence estimator, 782 interactive, 84
binary encoding, 771 SRF format, 188
constrained energy minimization, 781 SRTM DEMs, 182
continuum removal, 785 SST, 380
linear spectral unmixing, 773 stacking plot data, 114
LS-Fit, 771 statistics, 274
matched filtering, 776 autocorrelation, 283
MTMF, 778 basic, 126, 275
normalized Euclidean distance, 694 change detection, 298
orthogonal subspace projection, 784 classification, 48, 461
SFF, 788 correlation, 504
TCIMF, 694 correlogram, 284
unsupervised water detection, 694 covariance, 504
spectral math, 857 dark image noise statistics, 523
entering expressions, 858 eigenvalues, 504
execution, 860 histograms, 275
file formats, 1177 noise (MNF), 518
math expressions, 858 opening files, 280
variable assignment, 860 output to ENVI statistics file, 276
spectral pixel editor, 139 output to text file, 276
spectral plots, 98 reports, 278
spectral resampling, 863 ROIs, 329
spectral separability (ROIs), 339 semivariance, 283
spectral slices, 746 semivariogram, 284
arbitrary, 747 spatial, 283
extracting, 746 global, 283
horizontal, 746 local, 290
vertical, 747 summing bands, 280
spectral subsetting. See subsetting subsetting, 215
SPOT data, 164 spatial
ACRES, 165 masks, 224
building geometry files, 943 samples and lines, 216
DIMAP, 165 statistics, 223
georeferencing, 944 summary of methods
GeoSPOT, 165 using another subset, 219
reading tapes, 238 using images, 217
retaining RPCs, 989 using map coordinates, 218

ENVI User’s Guide Index


1268

using ROIs, 219 Landsat MSS, 236


using scroll window, 220 Landsat TM, 237
spectral RADARSAT, 246
by bands, 220 reading tape contents, 251
by ranges, 222 scanning, 251
from ASCII file, 222 selecting files, 251
using previous subsets, 221 SIR-C CEOS, 242
using ROIs, 266 SPOT, 238
sun elevation, 1069 UNIX, 236
super GLTs Windows PCs, 235
building, 937 target detection, 723
georeferencing, 939 methods, 732
super structured format (IRS), 170 target spectra, 819
supervised classification, 401 tasseled cap transforms, 537
binary encoding, 416 templates
Mahalanobis distance, 408 mosaics, 924
masked pixels, 401 QuickMap, 28
maximum likelihood, 409 vectors, 1027
minimum distance, 405 terrain categorization, 628
neural net, 419 TerraScan data, 171
parallelepiped, 402 test data, 210
SAM, 412 texture filters, 548
spectral information divergence, 414 co-occurrence measures, 549
SVM, 421 occurrence measures, 548
support vector machine. See SVM thermal data, 178
surface plots. See 3D SurfaceView thermal IR utilities, 391
SVM classification, 421 alpha residual spectra, 397
symbols, 1169 atmospheric correction, 391
TrueType fonts, 1169 emissivity and temperature, 394
synthetic color images, 534 emissivity normalization, 396
reference channel emissivity, 395
THOR tools, 653
T common tools, 671
background signature selection, 682
TAD anomaly detection, 653
band selection, 685
tape script formats, 1177
coregistration, 674
tape utilities, 235
dataset dimensionality, 685
AVHRR, 238
edit metadata, 713
customizing dumps, 251
export spectral libraries, 719
dumping data to disk, 253
export targets, 721
ENVI format, 249
file selection, 671
generic CEOS, 247

Index ENVI User’s Guide


1269

image transforms, 685 line of sight calculator, 134


import signatures, 696 modeling, 1066
material identification, 700 opening files, 1065
query library, 681 replacing bad DEM values, 1077, 1141
review detections, 711 3D SurfaceView, 1081
rule thresholding, 705 TOPSAR data, 1140
signature matching, 693 converting, 1140
spatial filtering, 708 opening files, 1140
spectral library viewer, 709 replacing bad DEM values, 1141
spectral subsetting, 672 viewing headers, 1101
target signature selection, 680 trademarks, 2
transform band weights, 715 transects, 101
viewer, 663 creating from ASCII, 105
workflows creating from endpoints, 104
anomaly detection, 653 creating from polylines, 104
atmospheric correction, 654 measurements, 103
change detection, 658 saving as annotation, 102
LOCs - water and trails, 660 saving as ASCII, 102
spectral library builder, 711 transforms, 492
stressed vegetation, 661 band ratios, 501
target detection, 662 color, 527
thread pool, 1171 decorrelation stretching, 531
tie points, 878 independent components, 509
collecting, 879 MNF, 516
generating automatically, 892 NDVI, 535
SPEAR tools, 580, 675 principal components, 504
TIFF format, 190 saturation stretching, 533
creating output, 232 sharpening, 493
opening files, 190 synthetic color images, 534
tiling tasseled cap, 537
sizes, 1161 two-dimensional scatter plots. See scatter plots
TIMS data, 178
radiance calibration, 390
thermal IR correction, 388 U
utilities, 388
unmixing, 773
toggling between images, 92
unsupervised classification, 425
topographic data. See digital elevation data
ISODATA, 425
topographic tools, 1064
k-means, 427
classifying features, 1070
user-defined
converting vector maps into DEMs, 1079
filters, 542
hill shade images, 1074
USGS

ENVI User’s Guide Index


1270

data types, 183 creating empty layers, 1026


DEMs, 182 creating from existing, 1038
mineral spectral libraries, 1185 creating from raster, 1038
Munsell transforms, 527 creating from user-defined parameters,
opening files, 183 1039
vegetation spectral libraries, 1186 deleting vectors, 1023
UTD anomaly detection, 572, 828 display order, 1015
exporting coordinates, 1027
opening additional files, 1026
V plotting vector points, 1018
removing, 1016
VAX to IEEE conversion, 377
linear feature extraction, 1043
vector to raster conversion, 1027
nodes, 1022
vector windows
overlaying on images, 70
borders and tick marks, 1025
polyline operations, 1021
cursor modes, 1016
rasterizing point data, 1058
display ranges, 1025
reading from ASCII, 1023
vectors, 1011
saving to templates, 1027
adding, 1019
selecting GCPs, 891
attributes, 1029
template format, 1181
adding, 1031
windows, 1013
importing from ASCII, 1032
world boundaries, 1040
querying, 1030
vegetation analysis, 799
tables, 1033
vegetation delineation, 634
available vectors list, 73
vegetation indices, 1221
buffer zone images, 1028
broadband greenness, 1224
computing area, 1025
ARVI, 1227
converting
EVI, 1226
annotation to DXF, 1061
NDVI, 1225
classes to vectors, 1057
SG, 1227
EVF to DXF, 1062
SR, 1226
ROIs to DXF, 1060
calculating, 799
creating from raster, 1056
canopy nitrogen, 1236
exporting classes to vectors, 488
NDNI, 1236
exporting to ROIs, 1027
canopy water content, 1243
exporting to shapefiles, 1028
MSI, 1244
GPS points, 1007
NDII, 1245
importing attributes to tables, 1033
NDWI, 1244
intelligent digitizer, 1043
WBI, 1243
layers, 73, 1014
dry or senescent carbon, 1237
active, 1014
CAI, 1238
creating, 1038

Index ENVI User’s Guide


1271

NDLI, 1238 virtual mosaics, 924


PSRI, 1239 VRML format, 1097
leaf pigments, 1240
ARI1, 1242
ARI2, 1242 W
CRI1, 1241
warping, 904
CRI2, 1241
Delaunay triangulation, 906
light use efficiency, 1234
image-to-image, 904
PRI, 1234
image-to-image using GCPs, 909
RG ratio, 1235
image-to-map, 907
SIPI, 1235
orthorectifying, 911
narrowband greenness, 1228
polynomial, 906
modified red edge NDVI, 1231
RST, 905
modified red edge SR, 1230
saving images, 909
red edge NDVI, 1229
watercraft detection, 641
REP, 1233
wavelengths
Vogelmann red edge 1, 1231
ENVI header file, 198
Vogelmann red edge 2, 1232
world boundaries, 1040
Vogelmann red edge 3, 1232
creating outline maps, 1041
tasseled cap, 537
creating vector layers, 1040
vegetation properties, 1212
WorldView data, 167
canopies, 1218
calibrating, 362
carbon, 1216
mosaic tiled files, 168
foliage, 1213
utilities, 387
leaf absorption, 1217
nitrogen, 1216
non-photosynthetic, 1219 X
pigments, 1213
water, 1215 x profiles, 97
vegetation spectral libraries, 1187 XWD format, 188
other, 1187
USGS, 1186
vegetation suppression, 812 Y
vegetation tools y profiles, 97
agricultural stress, 803
fire fuel, 806
forest health, 809 Z
VI calculator, 799
vertical exaggeration, 1087 z plots, 206
vertical profiles, 97 z profiles, 98
virtual borders, 31 adding new, 101

ENVI User’s Guide Index


1272

associating with scatter plots, 153 plotting multiple spectra, 100


browsing spectra, 100 zoom windows
changing bands, 100 configuring zoom increments, 1162
plotting average spectra, 100

Index ENVI User’s Guide

You might also like