0% found this document useful (0 votes)
78 views

User Guid

Uploaded by

Nada Marcela
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views

User Guid

Uploaded by

Nada Marcela
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 948

ENVI User’s

Guide

September, 2001 Edition


Copyright © Research Systems, Inc.
All Rights Reserved

0901ENV35USR
Restricted Rights Notice
The ENVI® and IDL® software programs and the accompanying procedures, functions, and docu-
mentation described herein are sold under license agreement. Their use, duplication, and disclosure
are subject to the restrictions stated in the license agreement. Research System, Inc., reserves the
right to make changes to this document at any time and without notice.

Limitation of Warranty
Research Systems, Inc. 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 soft-
ware, merchantability, or fitness for any particular purpose.
Research Systems, Inc. shall not be liable for any direct, consequential, or other damages suffered
by the Licensee or any others resulting from use of the ENVI and IDL software packages or their
documentation.

Permission to Reproduce this Manual


If you are a licensed user of these products, Research Systems, Inc. grants you a limited, nontrans-
ferable 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.

Acknowledgments
ENVI® and IDL ® are registered trademarks of Research Systems, Inc., registered in the United States Patent and Trademark
Office, for the computer program described herein. Dancing Pixels, Pixel Purity Index, PPI, n-Dimensional Visualizer, Spec-
tral Analyst, Spectral Feature Fitting, SFF, Mixture-Tuned Matched Filtering, MTMF, 3D-SurfaceView, Band Math, Spectral
Math, ENVI Extension, Empirical Flat Field Optimal Reflectance Transformation (EFFORT), and Virtual Mosaic are trade-
marks of Research Systems, Inc.
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-1998 The Board of Trustees of the University of Illinois
All rights reserved.
CDF Library
Copyright © 1999
National Space Science Data Center
NASA/Goddard Space Flight Center
NetCDF Library
Copyright © 1993-1996 University Corporation for Atmospheric Research/Unidata
HDF EOS Library
Copyright © 1996 Hughes and Applied Research Corporation
This software is based in part on the work of the Independent JPEG Group.
This product contains StoneTable™, by StoneTablet Publishing. All rights to StoneTable™ and its documentation are retained by
StoneTablet Publishing, PO Box 12665, Portland OR 97212-0665. Copyright © 1992-1997 StoneTablet Publishing
WASTE text engine © 1993-1996 Marco Piovanelli
Portions of this software are copyrighted by INTERSOLV, Inc., 1991-1998.
Use of this software for providing LZW capability for any purpose is not authorized unless user first enters into a license agreement
with Unisys under U.S. Patent No. 4,558,302 and foreign counterparts. For information concerning licensing, please contact: Unisys
Corporation, Welch Licensing Department - C1SW19, Township Line & Union Meeting Roads, P.O. Box 500, Blue Bell, PA 19424.
Portions of this computer program are copyright © 1995-1999 LizardTech, Inc. All rights reserved. MrSID is protected by U.S. Patent
No. 5,710,835. Foreign Patents Pending.
Other trademarks and registered trademarks are the property of the respective trademark holders.
Contents
Preface ................................................................................................... 11
Introduction to ENVI ....................................................................................................... 12
ENVI, ENVI RT, and IDL .............................................................................................. 14
General Review of ENVI Functionality .......................................................................... 15
ENVI Documentation ...................................................................................................... 18
About this Manual ........................................................................................................... 20
Using ENVI Online Help ................................................................................................ 21
Reporting Problems ......................................................................................................... 28

Chapter 1:
Introduction to ENVI .............................................................................. 31
Starting ENVI .................................................................................................................. 32
ENVI Graphical User Interface (GUI) ............................................................................ 33
General Image Display Concepts .................................................................................... 34
Data Management ............................................................................................................ 39
Memory Management ..................................................................................................... 41

ENVI User’s Guide 3


4

ENVI Basics ..................................................................................................................... 42


ENVI File Formats ........................................................................................................... 56
ENVI Supported Input File Formats ................................................................................ 59
ENVI Supported Output File Formats ............................................................................. 62

Chapter 2:
File Management .................................................................................. 63
The File Menu .................................................................................................................. 64
Opening Image Files ........................................................................................................ 65
Opening External Files .................................................................................................... 68
Opening Vector Files ....................................................................................................... 89
Opening Previous Files .................................................................................................... 98
Editing ENVI Headers ..................................................................................................... 99
Generating Test Data ..................................................................................................... 112
Using the Data Viewer ................................................................................................... 115
Saving Files .................................................................................................................... 117
Importing IDL Variables ................................................................................................ 124
Exporting to IDL Variables ........................................................................................... 125
Compiling IDL Code ..................................................................................................... 126
IDL CPU Parameters ..................................................................................................... 127
Tape Utilities .................................................................................................................. 129
The Scan Directory List ................................................................................................. 153
Changing Output Directories ......................................................................................... 157
Saving Sessions to Scripts ............................................................................................. 157
Executing Startup Scripts ............................................................................................... 157
Restoring Display Groups .............................................................................................. 157
Using the ENVI Queue Manager ................................................................................... 158
Logging Processing Information .................................................................................... 159
Closing all Files ............................................................................................................. 159
Setting ENVI Preferences .............................................................................................. 160

Chapter 3:
Display Management .......................................................................... 169
The Window Menu ........................................................................................................ 170
Using the Window Finder .............................................................................................. 171
Starting New Displays ................................................................................................... 172
Starting New Vector Windows ...................................................................................... 172

Contents ENVI User’s Guide


5

Starting New Plot Windows .......................................................................................... 172


The Available Files List ................................................................................................ 173
The Available Bands List .............................................................................................. 176
ENVI Image Display Windows ..................................................................................... 185
The Available Vectors List ............................................................................................ 196
ENVI Vector Windows ................................................................................................. 204
Displaying Mouse Button Descriptions ........................................................................ 208
Showing Display Information ....................................................................................... 209
Displaying Cursor Location/Value ................................................................................ 209
Collecting Points ........................................................................................................... 210
Maximizing Open Displays ........................................................................................... 210
Linking Displays ........................................................................................................... 210
Closing all Display Windows ........................................................................................ 210
Closing all Plot Windows .............................................................................................. 210

Chapter 4:
Interactive Display Functions ............................................................ 211
The Display Menu ......................................................................................................... 212
Display Functions .......................................................................................................... 214
Creating Vector Layers ................................................................................................. 215
Saving Display Groups .................................................................................................. 216
Setting Display Preferences ........................................................................................... 217
Overlays ......................................................................................................................... 220
Annotating Images ........................................................................................................ 222
Overlaying Classes ........................................................................................................ 243
Plotting Contour Lines .................................................................................................. 249
Interactive Density Slicing ............................................................................................ 255
Grid Lines ...................................................................................................................... 256
Defining Regions of Interest ......................................................................................... 261
Creating QuickMaps ...................................................................................................... 289
Overlaying Vectors ........................................................................................................ 295
Contrast Stretching and Quick Filtering ........................................................................ 316
Display Filtering ............................................................................................................ 317
Applying Default (Quick) Stretches .............................................................................. 318
Matching Histograms .................................................................................................... 320
Using Interactive Stretching .......................................................................................... 321

ENVI User’s Guide Contents


6

Interactive Analysis Tools ............................................................................................. 332


Display Linking and Dynamic Overlays ........................................................................ 333
Interactive Profiles and Spectral Plots ........................................................................... 337
Using Interactive Plot Functions .................................................................................... 343
Extracting Polarization Signatures ................................................................................. 356
Color Mapping ............................................................................................................... 358
Using the Pixel Locator ................................................................................................. 366
Collecting Points ............................................................................................................ 368
Measurement Tool ......................................................................................................... 371
Using the Line of Sight Calculator ................................................................................ 372
Using the Spatial Pixel Editor ........................................................................................ 374
Using the Spectral Pixel Editor ...................................................................................... 377
Creating Animations ...................................................................................................... 378
Using 2-D Scatter Plots .................................................................................................. 382
3-D Surface Views ......................................................................................................... 391
Managing Displays ........................................................................................................ 392
Display Output Options ................................................................................................. 398

Chapter 5:
Basic Tools .......................................................................................... 409
The Basic Tools Menu ................................................................................................... 410
Resizing Data (Spatial/Spectral) .................................................................................... 411
Subsetting Data via ROIs ............................................................................................... 418
Rotating Images ............................................................................................................. 419
Layer Stacking ............................................................................................................... 421
Converting Data (BSQ, BIL, BIP) ................................................................................. 423
Stretching Data ............................................................................................................... 425
Statistics ......................................................................................................................... 427
Using the Measurement Tool ......................................................................................... 437
Band Math ...................................................................................................................... 441
Spectral Math ................................................................................................................. 449
Segmenting Images ........................................................................................................ 450
Regions of Interest ......................................................................................................... 452
Mosaicking Images ........................................................................................................ 457
Masking .......................................................................................................................... 458
General Purpose Utilities ............................................................................................... 464

Contents ENVI User’s Guide


7

Data-Specific Utilities ................................................................................................... 471


Calibration Utilities ....................................................................................................... 480

Chapter 6:
Classification ....................................................................................... 493
The Classification Menu ............................................................................................... 494
Collecting Endmember Spectra ..................................................................................... 495
Supervised Classification .............................................................................................. 503
Unsupervised Classification .......................................................................................... 517
Creating Class Images from ROIs ................................................................................. 522
Post Classification ......................................................................................................... 523

Chapter 7:
Transforms ........................................................................................... 549
The Transforms Menu ................................................................................................... 550
Image Sharpening .......................................................................................................... 551
Calculating Band Ratios ................................................................................................ 553
Principal Component Analysis ...................................................................................... 556
Minimum Noise Fraction Transform ............................................................................ 563
Color Transforms .......................................................................................................... 575
Applying Decorrelation Stretch ..................................................................................... 580
Applying Saturation Stretch .......................................................................................... 581
Creating Synthetic Color Images .................................................................................. 582
Calculating Vegetation Indices ..................................................................................... 584

Chapter 8:
Filters ................................................................................................... 587
The Filter Menu ............................................................................................................. 588
Convolution Filters ........................................................................................................ 589
Morphology Filters ........................................................................................................ 594
Using Texture Filters ..................................................................................................... 599
Using Adaptive Filters ................................................................................................... 604
Using Frequency Filters (FFTs) .................................................................................... 611

Chapter 9:
Spectral Tools ...................................................................................... 617
The Spectral Menu ........................................................................................................ 618
Spectral Libraries .......................................................................................................... 619

ENVI User’s Guide Contents


8

Spectral Slices ................................................................................................................ 627


MNF Rotations ............................................................................................................... 630
Pixel Purity Index .......................................................................................................... 631
The n-Dimensional Visualizer ....................................................................................... 636
Mapping Methods .......................................................................................................... 649
Spectral Mapping Wizard .............................................................................................. 664
Spectral Analyst ............................................................................................................. 673
Spectral Math ................................................................................................................. 679
Resampling Spectral Data Files ..................................................................................... 686
EFFORT Polishing ......................................................................................................... 687
Generating 3-D Image Cubes ......................................................................................... 692

Chapter 10:
Map Tools ............................................................................................ 699
The Map Menu ............................................................................................................... 700
Registration .................................................................................................................... 701
Orthorectification ........................................................................................................... 720
Image Mosaicking .......................................................................................................... 731
Georeferencing from Input Geometry ........................................................................... 745
Georeferencing SeaWiFS Data ...................................................................................... 752
Georeference AVHRR Data .......................................................................................... 755
Selecting Map Projection Types .................................................................................... 757
Building Customized Map Projections .......................................................................... 758
Converting Map Projections .......................................................................................... 762
Layer Stacking ............................................................................................................... 764
Converting Map Coordinates ......................................................................................... 765
Converting ASCII Coordinates ...................................................................................... 767
Merging Old Projection Files ......................................................................................... 769
Using GPS-Link ............................................................................................................. 770

Chapter 11:
Vector Tools ........................................................................................ 773
The Vector Menu ........................................................................................................... 774
Opening Vector Files ..................................................................................................... 775
The Available Vectors List ............................................................................................ 776
Creating Vector Layers .................................................................................................. 777
Creating World Boundary Layers .................................................................................. 779

Contents ENVI User’s Guide


9

Converting Raster Images ............................................................................................. 780


Converting Classification Images ................................................................................. 781
Rasterizing Point Data ................................................................................................... 782
Converting ROIs to DXF Files ...................................................................................... 784
Converting Annotation Files to DXF Files ................................................................... 785
Converting EVFs to DXF Files ..................................................................................... 786

Chapter 12:
Topographic Tools .............................................................................. 787
The Topographic Menu ................................................................................................. 788
Opening Topographic Files ........................................................................................... 789
Using Topographic Modeling ....................................................................................... 790
Extracting Topographic Features .................................................................................. 794
Creating Hill Shade Images ........................................................................................... 797
Replacing Bad Values ................................................................................................... 800
Rasterizing Point Data ................................................................................................... 801
Using 3-D SurfaceView ................................................................................................ 802

Chapter 13:
Radar Tools .......................................................................................... 819
The Radar Menu ............................................................................................................ 820
Opening Radar Files ...................................................................................................... 821
Removing Antenna Gain Variations ............................................................................. 824
Resampling to Ground Ranges ...................................................................................... 826
Generating Incidence Angle Images ............................................................................. 828
Adaptive Filters ............................................................................................................. 829
Texture Filters ............................................................................................................... 830
Creating Synthetic Color Images .................................................................................. 831
Using Polarimetric Tools ............................................................................................... 832
Using TOPSAR Tools ................................................................................................... 857

Appendix A:
Installing and Customizing ENVI ....................................................... 859
ENVI Hardware Requirements ..................................................................................... 860
Installing and Starting ENVI ......................................................................................... 861
Platform Dependencies .................................................................................................. 862
ENVI Items to be Aware of ........................................................................................... 864

ENVI User’s Guide Contents


10

Customizing ENVI ......................................................................................................... 865


The ENVI Configuration File ........................................................................................ 867
The ENVI Main Menu Definition File .......................................................................... 873
The ENVI Display Menu Definition File ...................................................................... 874
ENVI Startup Script ....................................................................................................... 875
Additional Caching Information .................................................................................... 876

Appendix B:
ENVI File Formats ............................................................................... 877
ENVI Header Format ..................................................................................................... 879
ENVI Graphic Colors File ............................................................................................. 883
ENVI File Type File (filetype.txt) ................................................................................. 884
ENVI Sensor File (sensor.txt) ........................................................................................ 885
ENVI Map Projections File ........................................................................................... 886
ENVI Ellipsoid File (ellipse.txt) .................................................................................... 887
ENVI Datum File (datum.txt) ........................................................................................ 888
ENVI State Plane Projection Files ................................................................................. 889
ENVI Spectral Library Files .......................................................................................... 890
ENVI Previous Files List ............................................................................................... 891
Other ENVI ASCII Files ................................................................................................ 892

Appendix C:
ENVI Spectral Libraries ...................................................................... 899
General Information ....................................................................................................... 900
USGS Spectral Library (Minerals) ................................................................................ 901
USGS Spectral Library (Vegetation) ............................................................................. 902
Additional Vegetation Libraries .................................................................................... 903
JPL Spectral Library ...................................................................................................... 904
IGCP264 Spectral Library ............................................................................................. 905
JHU Spectral Library ..................................................................................................... 907

Appendix D:
ENVI Map Projections ........................................................................ 911
Map Projections ............................................................................................................. 913

Index .................................................................................................... 921

Contents ENVI User’s Guide


Preface

This preface covers the following topics:

Introduction to ENVI . . . . . . . . . . . . . . . . . . 12 About this Manual . . . . . . . . . . . . . . . . . . . 20


ENVI, ENVI RT, and IDL . . . . . . . . . . . . . . 14 Using ENVI Online Help . . . . . . . . . . . . . . 21
General Review of ENVI Functionality . . . 15 Reporting Problems . . . . . . . . . . . . . . . . . . 28
ENVI Documentation . . . . . . . . . . . . . . . . . 18

ENVI User’s Guide 11


12 Preface

Introduction to ENVI
ENVI® (the Environment for Visualizing Images) is a revolutionary image
processing system. From its inception, ENVI was designed to address the numerous
and specific needs of those who regularly use satellite and aircraft remote sensing
data. ENVI provides comprehensive data visualization and analysis for images of any
size and any type—all from within an innovative and user-friendly environment.

Platforms Supported by ENVI


ENVI runs on the following platforms:
• multiple UNIX platforms and LINUX.
• Microsoft Windows 98, Windows 2000, and Windows NT on 80386 (and
higher) processors.
For a list of the specific supported platforms and hardware, see the ENVI Installation
Guide.

Advantages of ENVI
ENVI’s developers are scientists who actively participate in remote sensing research.
Because of their interests in the development of the field, these scientists continually
supplement ENVI with leading-edge technology and innovative and useful functions.
ENVI’s power and applicability to current remote sensing problems are continually
expanding.
One of ENVI’s strengths lies in its unique approach to image processing—it
combines file-based and band-based techniques with interactive functions. When a
data input file is opened, its bands are stored in a list, where they can be accessed by
all system functions. If multiple files are opened, bands of disparate data types can be
processed as a group. ENVI displays these bands in 8- or 24- bit displays windows.
ENVI’s display window groups consist of a main image window, a zoom window,
and a scroll window, all of which are re-sizeable. ENVI provides its users with many
unique interactive analysis capabilities, accessed from within these windows. ENVI’s
multiple dynamic overlay capabilities allow easy comparison of images in multiple
displays. Real-time extraction and linked spatial/spectral profiling from multiband
and hyperspectral data give users new ways of looking at high-dimensional data.
ENVI also provides interactive tools to view and analyze vectors and GIS attributes.
Standard capabilities such as contrast stretching and 2-dimensional scatter plots are
just a few of the interactive functions available to ENVI users.

Introduction to ENVI ENVI User’s Guide


Preface 13

ENVI’s strong visual interface is complemented by its comprehensive library of


processing algorithms. ENVI includes all the basic image processing functions within
a friendly, interactive point-and-click graphical user interface (GUI). Because of
ENVI’s GUI, many basic processing functions are easier to use. Some of these
functions include data transforms, filtering, classification, registration and geometric
corrections, spectral analysis tools, and radar tools. ENVI does not impose limitations
on the number of spectral bands that can be processed, so multi-spectral or
hyperspectral data sets can be used. ENVI also includes many advanced functions
that allow for analysis of radar data sets.
ENVI addresses common image processing problem areas such as input of non-
standard data types, viewing and analysis of large images, and simple extension of
analysis capabilities by users (plug-in functions). The software includes essential
tools required for image processing across multiple disciplines, and has the flexibility
to allow the user to implement his or her own analysis strategies.

ENVI User’s Guide Introduction to ENVI


14 Preface

ENVI, ENVI RT, and IDL


ENVI is written in Interactive Data Language (IDL®), a powerful structured
programming language that offers integrated image processing. IDL is required to
run ENVI and the flexibility of ENVI is due largely to IDL’s capabilities. There are
two types of ENVI licenses, ENVI with a full version of IDL, and ENVI RT which
includes a runtime version of IDL. ENVI users can utilize IDL’s strengths by
customizing their own command-line functions. Advanced ENVI users should find
the flexibility offered by IDL’s interactive features helpful for their dynamic image
analyses. ENVI RT provides complete ENVI functionality, but custom routines
cannot be written.
More information on IDL can be found in the IDL User’s Guide, IDL Reference
Guide, and other IDL documentation.

ENVI, ENVI RT, and IDL ENVI User’s Guide


Preface 15

General Review of ENVI Functionality


ENVI simplifies comprehensive interactive processing of large multiband data sets,
screen-sized images, spectral plots and libraries, and image regions-of-interest, all
while providing flexible display capabilities and geographic-based image browsing.
ENVI provides a multitude of interactive functions, including X, Y, Z profiling;
image transects; linear and non-linear histogramming and contrast stretching; color
tables, density slicing and classification color mapping; quick filter preview; and
Region of Interest definition and processing. Simple methods are provided for
locating specific pixels, and for interactive spatial/spectral pixel editing. ENVI also
offers interactive scatter plot functions, including 2-D Dancing PixelsTM and
n-Dimensional VisualizationTM. With ENVI, images can be linked together and
“dynamic overlays” created interactively. Comprehensive vector overlays with GIS
attributes can be created, and map and pixel grids as well as annotations can be added
to images. Other ENVI interactive functions include 3-D (perspective) viewing,
surface shading, image draping, image animation (“movies”), and geometric
rectification and mosaicking.
ENVI’s strengths are not limited to its interactive mode: ENVI functions work with
full data files and subsets. We provide the user with a complete set of tools to process
panchromatic images, AVHRR, Landsat MSS data, Landsat TM data, and other
multispectral and hyperspectral images as well as data from today’s and tomorrow’s
advanced SAR systems. AVHRR tools allow display of ephemeris data, data
calibration, geometric rectification, and calculation of sea-surface temperature.
Landsat tools include functions for de-skewing and correcting aspect ratios for pre-
1979 MSS data, destriping and correcting for atmospheric interference, and
calibrating to reflectance using pre-launch gains and offsets. Tools for calibrating
thermal infrared data to emissivity using three methods are also included in ENVI.
General-purpose image processing functions include data transformations such as
principal components transformations, band ratios transformations, hue-saturation-
intensity (HSI), decorrelation stretching, and generation of vegetation indices.
Filtering functions include convolution kernels for low pass, high pass, median,
directional, and edge detection. ENVI supports user-defined convolution kernels up
to M x N; all kernels can be interactively edited. Other specific filter types such as
Sobel, Roberts, dilation, and erosion are also provided, along with adaptive filters
such as Lee, Frost, Gamma, and Kuan. Texture filters, including measures for data
range, mean, variance, entropy, skewness, variance, homogeneity, contrast,
dissimilarity, entropy, and correlation are provided. With ENVI, frequency-domain
filtering (FFT filtering) functions such as forward FFT transformations, interactive
frequency domain filtering, and inverse FFT computations are easily performed.

ENVI User’s Guide General Review of ENVI Functionality


16 Preface

ENVI provides KMEANS and Isodata unsupervised classification methods.


Supervised classification in ENVI uses standardized training-set collection
methodologies to simplify parallelepiped, minimum distance, maximum likelihood,
and mahalanobis distance classifiers. ENVI also provides the Binary Encoding and
Spectral Angle Mapper (SAM) spectral classifiers. Post-classification processing
includes clump, sieve, combine classes, and an interactive classification display tool,
which allow generalization of image-maps prior to export to GIS vector files. ENVI’s
confusion matrix/Kappa Coefficient images and statistics allow assessment of
classification accuracy. Generation of ROC Curves can be used to visualize a
classifier’s performance in order to select a decision threshold.
ENVI provides a full suite of tools for processing hyperspectral data, including
special mapping tools that use either image or library endmembers for linear spectral
unmixing and matched filtering. ENVI routines can be used to access spectral
libraries and compare library spectra to image spectra. The Pixel Purity IndexTM
(PPITM) allows users to find the most spectrally pure pixels in an images to determine
spectral endmembers. The unique n-Dimensional visualizer in ENVI performs
interactive animation of scatter plots in n-dimensions, providing a dynamic view of
the data that allows determinative selection of endmember materials and their
corresponding spectra. Spectral Feature FittingTM of hyperspectral data to library
spectra aids in identifying rocks, minerals, vegetation, and other materials. The linear
spectral unmixing function allows determination of relative spectral abundances
using multispectral and hyperspectral data. ENVI also provides the Spectral
AnalystTM to identify materials based on comparison to spectral libraries. Flexible
Band MathTMand Spectral MathTM functions allow users to enter complex
mathematical expressions, functions, and procedures that access IDL’s powerful
array-processing functions.
ENVI also contains comprehensive SAR processing capabilities. All standard ENVI
processing routines are inherently SAR-capable. In addition, a full suite of SAR-
specific analysis methods is provided, including ingest of standard SAR formats such
as Radarsat and ERS-1; review and reading of header information from CEOS-
format data; antenna pattern correction, slant-to-ground range correction and
generation of incidence angle images. Other SAR functions include adaptive and
texture filters, creating a synthetic color image, and a broad range of polarimetric
data analysis methods.

General Review of ENVI Functionality ENVI User’s Guide


Preface 17

Finally, ENVI provides tools to take image data to final map form. These include
both image-to-image and image-to-map registration, basic orthorectification, image
mosaicking, and map composition utilities. An integrated set of vector GIS import,
export, and analysis tools provide the capability to bring industry-standard GIS data
into ENVI, view and analyze vectors and GIS attributes (as image overlays as well as
in a separate vector analysis window), modify existing vectors, query attributes,
utilize vector layers for raster analysis or generate new vector GIS layers from raster
image processing results, and create standard GIS export-format files.
ENVI provides all of these capabilities and more in one tightly integrated image
analysis package. For additional information about specific functionality, please see
the corresponding sections of interest in this Users’ Guide.

ENVI User’s Guide General Review of ENVI Functionality


18 Preface

ENVI Documentation
ENVI’s documentation set includes Release Notes (distributed as a .txt file on the
ENVI CD and installed into the ENVI installation directory), the What’s New in
ENVI guide, the ENVI User’s Guide, the ENVI Programmer’s Guide and the ENVI
Tutorials. All documentation (except the Release Notes) is distributed with ENVI in
Adobe Acrobat PDF format.
Note
To view the ENVI manuals in PDF format, you need Adobe Acrobat 3.0 or later.
Acrobat Reader 4.0 with Search is included on your product CD-ROM. Visit Adobe
Systems Web site at www.adobe.com for the latest information and downloads
concerning Acrobat Reader.

ENVI Release Notes


The Release Notes are included on the ENVI CD and installed into the ENVI
installation directory. The file contains information about new functions, changes,
updates, and issues related to the new release.

ENVI What’s New


The What’s New in ENVI guide provides a synopsis of all new functions and changes
in the new release. Detailed instructions are included in the ENVI User’s Guide and
ENVI Programmer’s Guide.

Installation Guide
Describes how to install and license ENVI.

ENVI User’s Guide


The ENVI User’s Guide provides step-by-step instructions for using ENVI’s
graphical user interface, interactive functions, display capabilities, function
parameter descriptions, and customizing options. All general information about
ENVI and its functionality is found in this guide.

ENVI Programmer’s Guide


The ENVI Programmers’s Guide provides instructions on programming in ENVI.
Common ENVI extensions include band and spectral math functions, user functions,
custom spatial, spectral or region of interest (ROI) processing, custom file input

ENVI Documentation ENVI User’s Guide


Preface 19

routines, batch processing, and other report and plotting tools. The suite of ENVI
routines available to the programmer greatly simplifies development of these routines
while maintaining the same “look-and-feel”.

ENVI Tutorials
ENVI includes tutorials designed to lead the new user through the program’s basic
functionality. These include some remote sensing background and step-by-step
procedures to execute the corresponding ENVI functions. Some of the tutorials
provided are: multispectral classification, georeferencing and registration,
mosaicking, vector overlay and GIS analysis, map composition, several hyperspectral
data analysis tutorials, and both basic and advanced SAR processing. Sample datasets
are provided on the ENVI Tutorial and Data CD’s for use with these tutorials.

ENVI User’s Guide ENVI Documentation


20 Preface

About this Manual


This chapter is an introduction to ENVI. Each following chapter addresses a certain
family of ENVI’s processing routines. In general, the chapters follow the menu
structure of ENVI. For example, Chapter 5, “Basic Tools” describes the functions
found under the ENVI Basic Tools pulldown menu.
The appendices included in this manual address ENVI customizations, file formats,
spectral libraries, and map projections.
Tip
New ENVI users should also refer to the ENVI Tutorials, which are included with
the ENVI documentation set.

Conventions Used in Procedures


Procedures in this guide were written using the following conventions:
• Required steps are numbered sequentially.
• Optional steps and stand-alone steps appear as bulleted items.
• Pulldown menu and sub-menu selections are italicized and appear in
step-by-step instructions connected by an “>”. For example, select File > Exit.
• “Button titles,” “button menu titles,” “check box titles,” and “text box titles,”
are enclosed in quotation marks.
• The names of dialog boxes (dialogs) and windows are Capitalized.
Note
Special notes appear in this format.

Warning
Warnings appear in this format.

Tip
Helpful hints and tips appear in this format.

About this Manual ENVI User’s Guide


Preface 21

Using ENVI Online Help


This section provides an overview of ENVI’s Online Help system.
1. To access ENVI Online Help, select from the following options:
• Select Help > Start ENVI Online Help.
The ENVI Online Help window appears. It is separated into two panes: the
Contents is displayed in the left pane, and the ENVI Online Help
Navigator is displayed in the right pane.
• Click the “Help” button or select from the Help menu in any dialog (see
“Using Context-Sensitive Help” on page 27 for more information.)

Figure 1: The ENVI Online Help Navigator.

ENVI User’s Guide Using ENVI Online Help


22 Preface

2. In the ENVI Online Help Window, select from the following options:
• Click on the colored underlined links to view more information.
• Click on the “Contents,” “Index,” or “Search” tabs in the left window
pane.
• Click on the “Contents,” “Index,” or “Find” buttons at the top of the
window.
See the following sections for details.

Using the Contents


1. With the “Contents” tab selected (see Figure 2), double-click on a book icon,
or the “+” next to it to display the list of related main topics.
The available topics are listed below the book icon.
2. To display a topic, double-click it.
The topic is displayed in the right pane of the ENVI Online Help window.
3. When the topic is displayed, follow the instructions given in “Navigating
Through Topics” on page 26.
Tip
To return to the Contents tab at any time, click the “Contents” tab.

Using ENVI Online Help ENVI User’s Guide


Preface 23

1. Double-click
on a book or
click the “+” to
reveal the list of
topics.
2. Double-click
on a topic to
display it.

The topic is displayed in the


right pane of the window.

Figure 2: The ENVI Online Help Contents window with the highlighted
topic displayed.

ENVI User’s Guide Using ENVI Online Help


24 Preface

Using the Index


Use the ENVI Online Help Index to search for information on specific topics.
1. To access the ENVI Online Help Index, select from the following options:
• In the ENVI Online Help window, click the “Index” tab.
• In the ENVI Online Help window, click the “Index” button to open a
separate Help window.
2. With the “Index” tab selected, enter the first few letters of the word you are
searching for.
3. Select from the following options:
• Click on any index entry to view the topic (see Figure 3).
• In the separate Help window, click on the index entry to highlight it, then
click “Display” to view the topic.

Figure 3: The ENVI Online Help Index window with the highlighted
topic displayed.

Using ENVI Online Help ENVI User’s Guide


Preface 25

Using the Find Feature


1. To open the Find window, select from the following options:
• In the ENVI Online Help window, click the “Search” tab.
• In the ENVI Online Help window, click the “Find” button to open a
separate Help window.
2. With the “Find” or “Search” tab selected, follow the on-screen instructions to
find and display a topic (see Figure 4).

Figure 4: The ENVI Online Help Find window with the highlighted
topic displayed.

ENVI User’s Guide Using ENVI Online Help


26 Preface

Navigating Through Topics


In a topic window, use the following procedures and the instructions shown in Figure
5 to navigate through topics.
• To view more information about an underlined colored item, click on it.
• To return to the last topic window that you viewed, click the “Back” button at
the top of the topic window.
• To browse forward or backward through related topics, click the “>>” or “<<”
buttons at the top of the topic window.

Click the Click these


“Contents,” Click “Back” to buttons to browse
“Index,” or jump to the last backward or Use the scroll bar
“Search” tabs topic viewed. forward through to view all of the
to find topics. related topics. This is the information.
Topic title

Click on
these links
to view the
details.

Figure 5: Basic Function in an ENVI Online Help topic window.

Using ENVI Online Help ENVI User’s Guide


Preface 27

Printing Help Topics


To print a displayed topic, select one of the following options:
• At the top of the topic window, click the “Print” button.
• From the menu at the top of the topic window, select File > Print Topic.

Using Context-Sensitive Help


The ENVI Online Help displays the topic specific to the dialog or window from
which it was started.
• You can now access help topics from within select dialogs and windows by
clicking the “Help” button or by selecting from the Help menu (if present).

Displaying Information About ENVI


Use About ENVI to display the ENVI copyright banner, contact numbers for ENVI
technical support at Research Systems, Inc., the ENVI URL, and other contact
information.
1. Select Help > About ENVI.
2. Click “Cancel” to dismiss the About ENVI window.

ENVI User’s Guide Using ENVI Online Help


28 Preface

Reporting Problems
When you encounter a problem with ENVI, please report them as quickly as possible
so we can fix it. This section is intended to help you report problems in a way that
will help us correct the problem rapidly.

Background Information
When a bug is reported and verified, we correct it in a later release. Sometimes, a bug
only occurs when running on a certain machine, operating system, or graphics device.
For these reasons, we need to know the following facts when you report a bug:
• Your ENVI installation number.
• The version of ENVI you are running.
• The type of machine it is running on.
• The operating system version it is running under.
• The type and version of your windowing system.
• The graphics device, if the problem involves graphics.
The installation number is assigned by us when you purchase ENVI. The ENVI
version, site number, and type of machine are printed when ENVI is started.
Under Unix, the version of the operating system can usually be found in the file
/etc/motd. It is also printed when the machine boots. In any event, your system
administrator should know.
Under Windows 95, Windows 98, Windows 2000, and Windows NT version 4, select
“About” from the Help menu in the Windows Explorer.
On the Macintosh, select “About this Macintosh” from the apple menu.
Double Check
Before reporting a problem, you should verify that the problem is a bug and not
simply a matter of misinterpreting the expected outcome of a specific function or
action. Double check by reviewing the documentation and the online help or by
checking with a local expert. Make sure your system is properly configured with
enough virtual memory and sufficient operating system quotas.
If you cannot find the information you need in the ENVI written guides or online
help, please let us know so we can improve the clarity and content of the
documentation.

Reporting Problems ENVI User’s Guide


Preface 29

Describing the Problem


When describing the problem, it is important to use precise language. Vague terms
like “crashes,” “blows up,” and “fails” are open to many interpretations. Does it
really crash ENVI and leave you looking at an operating system prompt? This would
be our interpretation of “crash.” Perhaps, however, it just issues an unexpected error
message and gives another prompt. What is really meant by a term like “fails?”

Sending Data with Your Bug Report


If the data files are required to reproduce the bug, we will need you to send them to us
on magnetic media or via e-mail. Call us for details.
Contact Us
To report a problem, contact us at the following addresses.

Mail
Research Systems, Inc.
4990 Pearl East Circle
Boulder, Colorado 80301
Telephone
(303) 786-9900 (Voice)
(303) 786-9909 (Fax)
(303) 413-3920 (IDL technical support direct line)

Electronic Mail
[email protected]

ENVI User’s Guide Reporting Problems


30 Preface

Reporting Problems ENVI User’s Guide


Chapter 1:
Introduction to ENVI

This chapter covers the following topics:

Starting ENVI . . . . . . . . . . . . . . . . . . . . . . . 32 ENVI Basics . . . . . . . . . . . . . . . . . . . . . . . . 42


ENVI Graphical User Interface (GUI) . . . . 33 Selecting Files in ENVI . . . . . . . . . . . . . . . 42
General Image Display Concepts . . . . . . . . 34 ENVI File Formats . . . . . . . . . . . . . . . . . . . 56
Data Management . . . . . . . . . . . . . . . . . . . . 39 ENVI Supported Input File Formats . . . . . 59
Memory Management . . . . . . . . . . . . . . . . . 41 ENVI Supported Output File Formats . . . . 62

ENVI User’s Guide 31


32 Chapter 1: Introduction to ENVI

Starting ENVI
Before starting ENVI, ensure that it is properly installed as described in the
installation guide. The installation guide is included with the ENVI CDs.
• To start ENVI in Unix, enter “envi” at the UNIX command line.
• To start ENVI RT in Unix, enter “envi_rt” at the UNIX command line.
• To start ENVI (or ENVI RT) from a Macintosh system, drag the ENVI or
ENVI RT icon onto the IDL 5.4 icon.
• To start ENVI (or ENVI Runtime) from a Windows system, select Start >
Programs > ENVI 3.4 > ENVI.
The ENVI Main Menu appears when the program has successfully loaded and
executed.

Command Line Options for Starting ENVI


You can alter the way in which ENVI and IDL are started by supplying command line
switches along with the command.

ENVI for UNIX Switches


The following command line switches are available for ENVI on the UNIX platform:
-32
Start IDL in 32-bit mode, otherwise IDL starts in 64-bit mode by default for
those platforms that support 64-bit. If you have not installed the 64-bit version,
the 32-bit version will automatically be started. If you have not installed the
32-bit version, this flag will not work. For example:
%eniv -32

Starting ENVI ENVI User’s Guide


Chapter 1: Introduction to ENVI 33

ENVI Graphical User Interface (GUI)


To effectively use ENVI, you must be familiar with the concept
of a Graphical User Interface (GUI). A GUI provides a graphical
means (buttons, menus, dialog boxes, etc.) of interacting with
software and data. You make selections by pointing and clicking
or clicking and dragging using a mouse or other pointing device.
This guide assumes that you are familiar with these concepts.
In ENVI, activities are initiated by using the ENVI main menu,
which may be oriented horizontally as shown above, or
vertically as shown on the right. The default arrangement
depends on user-selected configuration parameters (see “The
ENVI Configuration File” on page 867).
Tip
To change the orientation of the ENVI main menu on-the-fly,
grab a corner of the menu with the mouse and drag.

Emulating a Three-Button Mouse


To use all of ENVI’s functions, you need a three-button mouse or a way to emulate a
three-button mouse. Systems that do not have a mouse with at least three buttons (or
a way to emulate 3 buttons) and the appropriate mouse driver software will not be
able to run portions of ENVI that require the third mouse button. A three-button
emulation is included with ENVI for Windows and ENVI for Macintosh.
With Windows:
• To emulate the middle button, press the “Ctrl” key and the left mouse button.

ENVI User’s Guide ENVI Graphical User Interface (GUI)


34 Chapter 1: Introduction to ENVI

General Image Display Concepts


An image display group in ENVI consists of three different image windows: a Main
Image window, a Zoom window, and a Scroll window. An example of an ENVI
image display group is shown in Figure 1-1. The individual image windows of a
display group can be re-sized and moved to anywhere on the screen. Multiple image
display groups can be used to display many images at one time.

The Main Image Window


The Main Image window consists of a portion of an image displayed at full
resolution. This window is automatically displayed the first time you load an image.
The initial size of the window is controlled by parameters set in the envi.cfg
configuration file (see “The ENVI Configuration File” on page 867). It can also be
dynamically resized (see “Resizing Windows” on page 36). ENVI allows loading
multiple Main Image windows and their associated Scroll and Zoom windows.

The Display Menu in the Main Image Window


In the Main Image window, the Display menu bar contains five pulldown menus that
control all of the ENVI interactive display functions including image linking and
dynamic overlays; spatial and spectral profiles; contrast stretching; color mapping;
interactive features such as ROI definition, cursor location and value, scatter plots
and surface plots; overlays such as annotation, grids, image contouring, and vector
layers; animation; file management tools such as saving and printing images; and
display controls such as viewing display information and opening displays. For more
information and step-by-step procedures, see Chapter 4, “Interactive Display
Functions”.

The Scroll Window


The Scroll window is a small image display window that appears when an image is
larger than can be displayed in the Main Image window at full resolution. The image
in the Scroll window is displayed at subsampled resolution. The Scroll window
controls what portion of the image is displayed in the Main Image window. The
Scroll window location and size are initially set in the envi.cfg file and can be
modified. You may dynamically resize it to any size up to the screen dimensions (see
“Resizing Windows” on page 36). Multiple Scroll windows may be present—one for
each Main Image window loaded.

General Image Display Concepts ENVI User’s Guide


Chapter 1: Introduction to ENVI 35

Figure 1-1: An ENVI Display Group. These windows can be individually placed
anywhere on the screen.

ENVI User’s Guide General Image Display Concepts


36 Chapter 1: Introduction to ENVI

The Zoom Window


The Zoom window is a small image display window that displays a portion of the
Main Image window at a user-defined zoom factor based on pixel replication or
interpolation. The zoom window size, location and the default zoom factor are
initially set in the envi.cfg file and can be modified. The Zoom window provides
unlimited zoom capabilities, and the zoom factor is displayed as a number in
parentheses in the window’s title bar. The Zoom window can be dynamically resized
up to the available screen dimensions (see “Resizing Windows” on page 36).
Multiple Zoom windows may be present—one for each Main Display window
loaded.

Resizing Windows
Most ENVI windows and dialogs, including all image display windows, can be
dynamically resized up to the full screen dimensions.
1. Place the mouse cursor on the edge or corner of the dialog or window until the
cursor becomes a two-way arrow (see Figure 1-2).
2. Click with the left mouse button and drag the window to the desired size and
shape.
Tip
When you resize a Scroll window, the resampling factor is automatically changed to
take advantage of the new image size. The resampling factor appears in parentheses
in the Scroll window’s title bar. If you resize the Main image window so that it is
large enough to contain the entire image, the scroll window will disappear. It will
reappear if the image window is made smaller.

General Image Display Concepts ENVI User’s Guide


Chapter 1: Introduction to ENVI 37

Figure 1-2: An ENVI display window. Notice the two-way arrow cursor on
the right edge.

The Active Display


At any given time, only one image display group (Main Image, Scroll, and Zoom
windows) can be active. The active display is the display group into which the next
image will be loaded.

Supplemental Windows
ENVI image displays may have a large number of associated supplemental windows.
Supplemental windows are typically started from the Display menu (see “The
Display Menu” on page 212), and may include X, Y, Z, and arbitrary profiles,
histograms, scatter plots, and animation windows. Each supplemental window is
associated with a specific image display group. Multiple displays can have
independent groups of supplemental windows.

ENVI User’s Guide General Image Display Concepts


38 Chapter 1: Introduction to ENVI

Vector Display Groups


A vector display group consists of a Vector Window and its associated “Vector
Window Parameters” dialog. An example of a vector display group is shown in
Figure 1-3.
Like image display windows, vector windows can be re-sized and placed anywhere
on the screen (see “Overlaying Vectors” on page 295).

Figure 1-3: An ENVI Vector Display Group.

General Image Display Concepts ENVI User’s Guide


Chapter 1: Introduction to ENVI 39

Data Management
ENVI provides a number of tools for managing images, vector data, dialogs, and
individual windows. These tools are discussed in the following sections.

The Available Bands List


The Available Bands List is the main control panel for accessing ENVI image files
and the individual image bands within those files. The Available Bands List appears
in its own dialog whenever an image file is opened, and contains a list of all of the
available image bands for all of the open files and any memory items (calculations
performed in memory but not saved). If multiple files are open, all of the bands for all
of the files are listed sequentially with the bands of the most recently opened file at
the top of the list. Use the Available Bands List to load both gray scale and color
images into the active display, to open and close files, or to delete individual bands
from memory (see “The Available Bands List” on page 176).

The Available Vectors List


The Available Vectors List contains a list of all vector files that are available in
memory for display in either image display windows or in a vector display window.
Once loaded, all of the vector layers read into memory are listed sequentially with the
most recently read vectors at the top of the list. Use the Available Vectors List to start
vector display groups and to delete vector layers from memory (see “The Available
Vectors List” on page 196).

Scan Directory List and Geo-Browser


The Scan Directory List lists all the ENVI files in a selected directory or directories,
prints file information, allows opening of selected files, and starts the Geo-Browser
file display. The Geo-Browser marks the location of all geocoded data with a red flag
on a world map (see “The Scan Directory List” on page 153).

The Available Files List


The Available Files List is a tool for managing ENVI image files. It lists the names of
all currently open files and memory items. Selecting one of the file names lists all of
the available information about the selected file. This includes parameters such as the
full path and image name; the number of lines, samples, and bands; the header size;
the file type; the data type; the interleave; the byte order of the data; and whether or
not the data is georeferenced and if any wavelengths are associated with the bands.
Options include removal of memory items, closing or deletion of individual files, and

ENVI User’s Guide Data Management


40 Chapter 1: Introduction to ENVI

writing of memory calculations to disk files. These actions allow optimized use of
system memory (see “The Available Files List” on page 173).

The ENVI Window Finder


The ENVI Window Finder lists all open major ENVI windows. This includes the
Main Image, Scroll, and Zoom windows, all of the supplemental windows, and many
other windows and dialogs used by ENVI’s interactive functions. Use the Window
Finder to call any window or dialog to the foreground (see “Using the Window
Finder” on page 171).

ENVI Processing Status Window


Most ENVI functions report processing status as calculations proceed. A standard
status window appears immediately after the function is started. The window title
matches the function being executed and indicates whether the results are being
placed in memory or an output file. A slider labeled “% Complete” is updated
periodically as data are processed. The text box labeled “Inc:” indicates the size of
each data increment processed, based on the tile size (see “Tiling Operations” on
page 41). The function automatically determines the size of the processing increment.
For example, the value of “10.00%” shown in Figure 1-4 indicates that the data is
being processed in several tiles, each of which contains 10.00% of the total data.

Figure 1-4: The Processing Status Window.

Note
Use the “Cancel” button to terminate processing if the increment is less than 100%.
If the increment is equal to 100%, interruption of the function is not possible.

Data Management ENVI User’s Guide


Chapter 1: Introduction to ENVI 41

Memory Management
ENVI allows processing of large data sets by tailoring to system memory resources.
ENVI uses tiling to break data sets into manageable pieces and allows you to set the
size of a tile in the ENVI configuration file.

Tiling Operations
ENVI uses “tiling” to allow the processing of large images and to control system
memory usage. A tile is a piece of data read from the disk or from memory in one
piece. The size of an individual tile in ENVI is controlled by setting the desired value
in the ENVI configuration file (see “The ENVI Configuration File” on page 867). For
images stored as BSQ (Band Sequential), each tile is a spatial subset of an individual
band. For images stored sequentially in BIL (Band Interleaved by Line) format, each
tile is a single image line of all bands. For BIP (Band Interleaved by Pixel) format,
each tile is all of the pixels in an image line for all bands. Tiling is generally
transparent to you as the user and is used by ENVI to insure that hardware memory
limitations do not impose processing limitations (see “Configuration File Details” on
page 867 and “Additional Caching Information” on page 876).

File vs. Memory


For systems with large amounts of random access memory (RAM), efficient image
processing without repeated storage of intermediate processing results in disk files is
possible. For most functions, ENVI offers the option of either writing image
processing results to a disk file or of keeping the results in system memory.
Note
If you elect to use the memory option, save your results to disk files periodically.

ENVI User’s Guide Memory Management


42 Chapter 1: Introduction to ENVI

ENVI Basics
This section describes standard ENVI file opening procedures and options and other
standard ENVI functions that are common in many ENVI windows and dialogs.

Selecting Files in ENVI


Before you apply any of ENVI’s functions to a specific data set, you must first select
the file containing the data. To assure consistency, nearly every ENVI image
processing function uses a standard input file selection dialog (Figure 1-5). In the
input selection dialog you can select an input file or a single band, a spatial or spectral
subset, and, in some cases, mask the input data.
The title bar of the input file selection dialog changes to reflect the current function
and/or input file type. For example, in Figure 1-5 the title bar reads “Calculate
Statistics Input File” because the current function is statistics calculation.

Figure 1-5: The File Selection Dialog.

ENVI Basics ENVI User’s Guide


Chapter 1: Introduction to ENVI 43

Selecting Bands or Files for Processing


1. Use the “Select By” arrow toggle button to select “File” or “Band” input.
2. Click on the desired file or band name in the column labeled “Select Input
File” or “Select Input Band.”
When you are selecting by “Band,” data sets appear in an “unfolded” state by
default. The names of unfolded data sets appear in this format:
-<filename>
Band
Band
• To fold a data set, click on the name of the data set.
All of the bands of the data set are compressed and the data set appears in
the list in this format:
+<filename>[number of bands] (see Figure 1-6)
• To “unfold” a data set and make it available for processing, simply click
the folded filename.
3. Select the input band or file by clicking on the name.
• To select a subset, click the “Spatial Subset” or “Spectral Subset” buttons
and use standard subsetting procedures (see “Selecting a Spatial Subset”
on page 45 or “Selecting a Spectral Subset” on page 50).
Tip
To automatically start the selected function without selecting any subsetting,
double-click on the file or band name.

4. Click “OK.”

ENVI User’s Guide ENVI Basics


44 Chapter 1: Introduction to ENVI

Figure 1-6: The Input File dialog shows expanded and collapsed image file
bands.

Opening New Image Files for Processing


1. In the Input File dialog, click “Open File” or “Open Spec Lib.”
2. When the file selection dialog appears, select the desired file name.
3. Click “OK” or “Open.”
• To exit the file selection dialog without loading any files, click “Cancel.”
• To apply the selected function only to a portion of the entire file or band, see
“Selecting a Spatial Subset” on page 45 or “Selecting a Spectral Subset” on
page 50.

ENVI Basics ENVI User’s Guide


Chapter 1: Introduction to ENVI 45

Opening Previously Opened Files


In the Input File dialog, use the “Previous” button to select the same files and subsets
that you used previously.
• To use the same input file as the one used last for input, click the “Previous”
button.
• To use the same spatial or spectral subset as you used for the last file of the
same size, click the “Previous” button again. For subsetting information, see
“Selecting a Spatial Subset” on page 45 or “Selecting a Spectral Subset” on
page 50.

Selecting a Spatial Subset


Use spatial subsetting to limit application of a function to a spatial subset of the
image. Spatial subsets can be selected 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, or by using the
bounding box around a region of interest(s).
For subsetting by spectral bands instead of by spatial regions, see “Selecting a
Spectral Subset” on page 50.
1. In the file selection dialog, click the “Spatial Subset” button.
The Spatial Subset dialog appears. Its appearance varies depending on whether
the current data is sample-line-based or georeferenced (Figure 1-7).
2. Select a subset using one of the methods described in the following sections.
3. Click “OK” to enter the selected subset into the Spatial Subset dialog.
4. Click “OK” to return to the file selection dialog.

ENVI User’s Guide ENVI Basics


46 Chapter 1: Introduction to ENVI

Figure 1-7: The Spatial Subset dialog for a Georeferenced image.

Subsetting by Samples/Lines
• To select by starting and ending values of the subset, enter the starting and
ending values of the samples and/or lines into the appropriate text boxes, or
enter the desired number of lines or pixels in the boxes labeled “NS” or “NL”
respectively.
The size of the original data set and the size of the currently-selected subset
appear below the text boxes.
Subsetting by Images
To select the spatial subset interactively from the image:
1. In the Select Spatial Subset dialog, click on the “Image” button.
The Subset Function dialog appears. A subsampled version of the selected
image band is displayed (Figure 1-8). A box on the image outlines the
currently selected subset.

ENVI Basics ENVI User’s Guide


Chapter 1: Introduction to ENVI 47

Figure 1-8: The Subset Function Window.

2. To change the subset size or location, select from the following options:
• In the Subset Function 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” text boxes.
3. Click “OK.”
The starting and ending sample and line coordinates appear in the text boxes
labeled “Samples” and “Lines.”
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 on the “Map” button.
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 text boxes.

ENVI User’s Guide ENVI Basics


48 Chapter 1: Introduction to ENVI

Note
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 on the
corresponding “Change Proj” button and follow the instructions in
“Selecting Map Projection Types” on page 757.
4. Click “OK.”

Figure 1-9: The Spatial Subset by Map Coordinates Window.

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.

ENVI Basics ENVI User’s Guide


Chapter 1: Introduction to ENVI 49

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 the “Previous” button in the File Selection 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 the “File” button.
2. In the file selection dialog, select the previously subsetted file (which must
have originally been the same size as or smaller than the file you are currently
subsetting).
The input file will be subset based on the subset parameters of the file you
select.
Subsetting Using ROIs
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 the “ROI” button.
Tip
To make previously saved ROIs available for selection in the Subset Image by ROI
Extent dialog, click the “Restore ROIs” button in the Select Spatial Subset dialog
and select the ROI file in the subsequent file selection dialog.

Figure 1-10: In the Subset Image by ROI Extent dialog, select the ROI(s) to use
as the area of a spatial subset.

ENVI User’s Guide ENVI Basics


50 Chapter 1: Introduction to ENVI

2. In the Subset Image by ROI Extent dialog, select the ROI(s) and click “OK.”
The file will be subset to the area encompassing the selected ROI(s).
Selecting a Spectral Subset
Use spectral subsetting to limit application of a function to selected bands of an
image. For subsetting by spatial regions instead of spectral bands, see “Selecting a
Spatial Subset” on page 45.
1. From within the file selection dialog, click the “Spectral Subset” button.
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 will not be
included in the processing (Figure 1-11).
A list of bands available for selection appear in the center of the dialog.
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 depressing 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 will be selected
when you click the “Add Range” button.
For images with a “Bad Bands” list, click on the “Apply BBL” button to apply
the Band Bands List (see “Editing Ancillary Header Information” on
page 102). ENVI automatically deselects individual bands that are marked
“Bad.” Bad bands do not appear in the output image.
3. Click “OK” to return to the file selection dialog.

ENVI Basics ENVI User’s Guide


Chapter 1: Introduction to ENVI 51

Figure 1-11: The Spectral Subset dialog with three bands selected.

Using Previous Subsets


• To select the same spectral subset previously used for a file with the same
number of spectral bands, click the “Previous” button.
Subsetting by Ranges
To select a specific range of bands:
1. In the File Spectral Subset dialog, enter the starting and ending band numbers
into the two text boxes next to the “Add Range” button.
2. Click “Add Range.”
Selecting a Mask
When you select a file to be processed you can apply a spatial mask. When a mask is
used, ENVI does not apply the selected function to the masked portion of the image.
A mask must be previously defined using Basic Tools > Masking > Build Mask. You
can build a spatial mask from data ranges, Regions of Interest, and other types of
input. For details about building masks, see “Masking” on page 458.
Note
Only certain ENVI functions allow spatial masking before processing. These
functions include statistics, classification, unmixing, matched filtering, continuum
removal, and spectral feature fitting.

ENVI User’s Guide ENVI Basics


52 Chapter 1: Introduction to ENVI

To apply a previously built spatial mask to your image:


1. In the file selection 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.
2. Select the band containing the mask.
• To remove the mask, click “Clear Mask Band.”

Selecting Multiple Items in Lists


When using ENVI, you often have to select from a list of items. Some lists in ENVI
allow you to select more than one item (see Figure 1-12). The following describes the
different ways to select multiple items in a list.
Note
You cannot select multiple items from the Available Bands List or the Available
Vectors List.

• To select a group of files that are listed consecutively, click on the first file in
the group, press and hold the “shift” key, and click the last file in the group. Or,
click and drag the cursor over the group of items with the left mouse button.
The items are “selected” when they are “highlighted.”
• To select multiple files that are not listed consecutively, press and hold the
“ctrl” key on your keyboard and click on each desired file.
• If the dialog you’re working in displays a “Select All Items” button, click the
button to select all of the items in the list.
De-Selecting Items
• To de-select a single item, hold the “crtl” key down and click on the item.
• If the dialog you’re working in displays a “Clear All Items” or “Clear” button,
click it to de-select all of the items in the list.

ENVI Basics ENVI User’s Guide


Chapter 1: Introduction to ENVI 53

Figure 1-12: In the list on the left, you can select only one item. In the list on the
right, you can select multiple items.

Selecting File or Memory Output


You are given the option to save your images and data to “File” or “Memory.” Saving
an image to memory saves it in your computer’s system memory and allows the
image to be displayed from the Available Bands List or the Available Vectors List.
When you close ENVI, the image is deleted. Saving an image to a file saves the
image to your hard drive. When you close ENVI, the item is not deleted. For more
information, see “File vs. Memory” on page 41.
1. In any dialog where you are given the option to select output to “File” or
“Memory,” click the “File” or “Memory” toggle button.
• If you select output to “File,” enter the desired output filename in the
“Enter Output Filename” text box or click the “Choose” button to select an
output filename (see Figure 1-13).

ENVI User’s Guide ENVI Basics


54 Chapter 1: Introduction to ENVI

Figure 1-13: Select output to “File” or “Memory” (top). If you click “Choose,” the
Output Filename window appears.(bottom).

Placing Un-executed Functions in Queue


Use the “Queue” button to save the parameters that you’ve set for a particular
function (without executing the function) so that you can execute the function later.
To execute the function later, use the ENVI Queue Manager (see “Using the ENVI
Queue Manager” on page 158).
1. Start an ENVI function (for example, Basic Tools > Stretch Data).
2. In the file selection dialog, select the input file.
3. Enter the parameters for the function (for example, enter the stretch parameters
in the Data Stretching dialog).
4. Instead of clicking “OK” to execute the function, click the “Queue” button.

ENVI Basics ENVI User’s Guide


Chapter 1: Introduction to ENVI 55

The dialog closes, the parameters are saved, and the function can be executed later
from the ENVI Queue Manager.
Note
If you exit ENVI without executing the queued functions, a warning will appear.

Compressing Output
Use the “Compress” check box to compress your output. ENVI applies a lossless
GZIP format compression to the output file. When a compressed file is opened in
ENVI, ENVI reads the file and uncompresses it on-the-fly.
Warning
Be aware that ENVI cannot read compressed files that are larger than two
gigabytes. If you compress a large file and it remains larger than two gigabytes
when compressed, you will not be able to read it with ENVI.

To output a file in compressed format:


• In any dialog where the “Compress” check box appears, select the “Compress”
check box before clicking “OK.”
Note
Compressed files are slower to output and input than uncompressed files; the
“Compress” check box is only available in functions that output files sequentially.

ENVI User’s Guide ENVI Basics


56 Chapter 1: Introduction to ENVI

ENVI File Formats


ENVI supports several image file formats, which are described in this section. Also
discussed in this section are ENVI header files, file naming conventions, and cross-
platform portability issues.

ENVI Image Files


ENVI uses a generalized raster data format consisting of a simple “flat binary file”
and a small associated ASCII (text) header file. This approach permits ENVI’s
flexible use of nearly any image format, including those with embedded header
information. All data types are supported in their native formats (byte, signed and
unsigned integer, long integer, floating point, double precision, 64-bit integer,
unsigned 64-bit integer, complex, or double complex). The generalized raster data is
stored as a binary stream of bytes either in BSQ, BIP, or BIL formats (see “ENVI File
Formats” on page 877).
BSQ (Band Sequential Format)
In its simplest form, the data is in BSQ format, with each line of the data followed
immediately by the next line in the same spectral band. This format is optimal for
spatial (X, Y) access of any part of a single spectral band.

BIP (Band Interleaved by Pixel Format)


Images stored in BIP format have the first pixel for all bands in sequential order,
followed by the second pixel for all bands, followed by the third pixel for all bands,
etc., interleaved up to the number of pixels. This format provides optimum
performance for spectral (Z) access of the image data.

BIL (Band Interleaved by Line Format)


Images stored in BIL format have the first line of the first band followed by the
first line of the second band, followed by the first line of the third band, interleaved
up to the number of bands. Subsequent lines for each band are interleaved in
similar fashion. This format provides a compromise in performance between spatial
and spectral processing and is the recommended file format for most ENVI
processing tasks.

ENVI Header Files


The ENVI header file contains information used to read an image data file and is
normally created the first time a data file is accessed by ENVI. The separate ENVI

ENVI File Formats ENVI User’s Guide


Chapter 1: Introduction to ENVI 57

text header file provides information to ENVI about the dimensions of the image, the
imbedded header if present, the data format, and other pertinent information. The
required information is entered interactively or is automatically created with file
ingest, and can be edited and changed later. You can generate an ENVI header outside
ENVI by using a text editor (see “ENVI Header Format” on page 879).

ENVI File Naming Conventions


ENVI’s file handling routines were designed to be extremely flexible. ENVI does not
impose any constraints on the way that files are named with the exception of the use
of the.hdr extension used for header files. Some ENVI functions do pre-load lists of
files with specific extensions for ease of use. These are listed in the Table 1-1 and
should be used consistently when running ENVI to maximize file handling
efficiency. This does not preclude you from using different file names if desired.

File Type Extension

ENVI Bad Lines List .bll

ENVI Band Math or Spectral Math Expression .exp

ENVI Calibration Factors .cff

ENVI Contour Levels File .lev

ENVI Density Slice Range File .dsr

ENVI Display Group .grp

ENVI Filter Kernels .ker

ENVI GCP file .pts

ENVI Grid File .grd

ENVI Header File .hdr

ENVI Image None defined


ENVI Look Up Table .lut

ENVI Map Key .key

ENVI Mosaic Template File .mos

ENVI n-D Visualizer State .ndv

Table 1-1: ENVI File Types

ENVI User’s Guide ENVI File Formats


58 Chapter 1: Introduction to ENVI

File Type Extension

ENVI PPI Count File .cnt

ENVI Region of Interest .roi

ENVI Spectral Library .sli

ENVI Statistics File .sta

ENVI Statistics Report .txt

ENVI Surface View Path File .pat

ENVI Tape Script .fmt

ENVI Vector File .evf

ENVI Vector Template File .vec

JPL AIRSAR Compressed Stokes Matrix Radar Data .stk

SIR-C Compressed Data Product .cdp

Table 1-1: ENVI File Types (Continued)

Cross-Platform File Portability


One additional factor to consider when naming files used with ENVI is cross-
platform portability. The filenames on UNIX systems have a .hdr appended to the
file name. On Windows systems the .hdr replaces the current extension. This is
particularly important for preserving the relation between image files and their
corresponding header (.hdr) files. For example, a UNIX image file with the name
image_1.img would have image_1.img.hdr. as its corresponding header file. A
Windows image file named image_1.img would have image_1.hdr. as its
corresponding header file. In Windows, the two images, image_1.img and
image_1.dat, would have the same header file name of image_1.hdr and ENVI
would have problems if the two images were of different sizes and characteristics.
Under UNIX, the same two files would have the corresponding header file names of
image_1.img.hdr and image_1.dat.hdr and no confusion would occur. If cross
platform portability of images is an issue, then the easiest solution is to name image
files without an extension. Thus the image file image_1 has the same header file
name (image_1.hdr) under both UNIX and Windows. Alternatively, images and
header files can be renamed to the Windows convention before moving the images
from UNIX to Windows systems.

ENVI File Formats ENVI User’s Guide


Chapter 1: Introduction to ENVI 59

ENVI Supported Input File Formats


The input file formats supported by ENVI are listed below. More information about
these formats are found in “Opening Image Files” on page 65, “Opening External
Files” on page 68, and “Opening Vector Files” on page 89. ENVI supports numerous
input file formats:
Flat Binary Files:
• BSQ (Band Sequential)
• BIL (Band Interleaved by Line)
• BIP (Band Interleaved by Pixel)
Landsat Files

• FAST • MRLC
• GeoTIFF • ACRES CCRS
• HDF • ESA CEOS
• NLAPS

SPOT Files

• SPOT • ACRES SPOT


• GEOSPOT • Vegetation

IKONOS Files
• GeoTIFF
• NITF
AVHRR
• KLM/Level 1b
• SHARP

ENVI User’s Guide ENVI Supported Input File Formats


60 Chapter 1: Introduction to ENVI

SeaWiFS Files
• HDF
• CEOS
EOS Files
• ASTER 1A/1B
• MODIS 1B
Radar Files

• RADARSAT • JERS
• ERS • TOPSAR
• AIRSAR

Military Files

• ADRG • CIB
• CADRG • NITF

Thermal Files
• TIMS
• MASTER
USGS and Digital Elevation Files

• DRG • DEM • DMA DTED


• DOQ • SDTS DEM

Miscellaneous Formats

• IRS Fast Files


• ATSR
• DMSP (NOAA

ENVI Supported Input File Formats ENVI User’s Guide


Chapter 1: Introduction to ENVI 61

Image Processing Software Formats

• ArcView Raster • ER Mapper


(.bil)
• ERDAS 7.5 (.lan) • PCI (.pix)
• ERDAS 8.x
(.img)

Generic Formats

• ASCII • PICT
• BMP • SRF
• HDF • TIFF/GeoTIFF
• JPEG • TIFF world files (.tfw)
• MrSID • XWD
• PDS

Note
ENVI supports the following input TIFF compression formats: CCITT Group 3 & 4
algorithms, Macintosh PackBits algorithm, THunderScan 4-bit RLE algorithm,
NeXT 2-bit RLE algorithm, and LogLuv high dynamic range encoding.

Vector Files:

• ARC/INFO Interchange Format • MapInfo Interchange


• ArcView Shape File • Microstation DGN
• DXF • USGS DLG
• ENVI Vector File (.evf) • USGS DLG in SDTS Format

ENVI User’s Guide ENVI Supported Input File Formats


62 Chapter 1: Introduction to ENVI

ENVI Supported Output File Formats


The output file formats supported by ENVI are listed below. More information about
these formats are found in “Display Output Options” on page 398, “Saving Files” on
page 117, and “Working with Vector Layers” on page 296.
ENVI Flat Binary Files:
• BSQ (Band Sequential)
• BIL (Band Interleaved by Line)
• BIP (Band Interleaved by Pixel)
Generic Image Formats

• ASCII • SRF
• BMP • TIFF (GeoTIFF)
• HDF • TIFF world files (.tfw)
• JPEG • XWD
• PICT

Image Processing Formats

• ArcView Raster (.bil) • ER Mapper


• ERDAS 7.5 (.lan) • NITF 02.00/02.10
• PCI (.pix) •

Vector Formats

• ArcView Shape File • DXF


• ENVI Vector File (.evf)

ENVI Supported Output File Formats ENVI User’s Guide


Chapter 2:
File Management

This chapter covers the following topics:

The File Menu . . . . . . . . . . . . . . . . . . . . . . . 64 IDL CPU Parameters . . . . . . . . . . . . . . . . 127


Opening Image Files . . . . . . . . . . . . . . . . . . 65 Tape Utilities . . . . . . . . . . . . . . . . . . . . . . 129
Opening External Files . . . . . . . . . . . . . . . . 68 The Scan Directory List . . . . . . . . . . . . . . 153
Opening Vector Files . . . . . . . . . . . . . . . . . . 89 Changing Output Directories . . . . . . . . . . 157
Opening Previous Files . . . . . . . . . . . . . . . . 98 Saving Sessions to Scripts . . . . . . . . . . . . 157
Editing ENVI Headers . . . . . . . . . . . . . . . . . 99 Executing Startup Scripts . . . . . . . . . . . . . 157
Generating Test Data . . . . . . . . . . . . . . . . . 112 Restoring Display Groups . . . . . . . . . . . . 157
Using the Data Viewer . . . . . . . . . . . . . . . . 115 Using the ENVI Queue Manager . . . . . . . 158
Saving Files . . . . . . . . . . . . . . . . . . . . . . . . 117 Logging Processing Information . . . . . . . 159
Importing IDL Variables . . . . . . . . . . . . . . 124 Closing all Files . . . . . . . . . . . . . . . . . . . . 159
Exporting to IDL Variables . . . . . . . . . . . . 125 Setting ENVI Preferences . . . . . . . . . . . . 160
Compiling IDL Code . . . . . . . . . . . . . . . . . 126

ENVI User’s Guide 63


64 Chapter 2: File Management

The File Menu


Use the File menu on the ENVI main menu to read files into ENVI, set preferences,
and to exit ENVI and other file and program management functions. The individual
File menu items are described in the following sections.

Figure 2-1: The ENVI File menu.

The File Menu ENVI User’s Guide


Chapter 2: File Management 65

Opening Image Files


Use Open Image File to open ENVI image files (flat binary files, described in “ENVI
File Formats” on page 877) or other binary image files of known format. ENVI
automatically identifies and reads files of the following types: TIFF, GeoTIFF, JPEG,
MrSID, BMP, SRF, HDF, PDS, MAS-50, NLAPS, RADARSAT, HDF SeaWiFS,
Landsat 7 HDF, Landsat 7 Fast (.fst), MRLC (.dda), ERDAS 7.x (.lan), ERDAS
8.x (.img), ER Mapper, PCI (.pix), and AVHRR. The data is left in its native format
and the necessary information is read from the data header. ENVI can also read
several other file types (see “Opening External Files” on page 68).
1. Select File > Open Image File.
2. When the Enter Data Filename dialog appears, select the file to open by
clicking on its name and clicking “OK” or “Open.”
After the file is opened, the bands are listed in the Available Bands List (see “The
Available Bands List” on page 176).
Tip
If a Header Info dialog appears when opening a file that is supported in ENVI,
select Open External File > your file type instead of using Open Image File (see
“Opening External Files” on page 68).

Creating Header Files


When ENVI first opens a file, it requires specific information regarding the file
characteristics. If the file is an ENVI format file, the necessary information is
contained in a separate text header file. The text header file has the same name as the
image file, but the file extension is.hdr.
If ENVI cannot find the header file (.hdr file) or other valid header information upon
opening a file, the Header Info dialog box appears. You must enter the required
information into the dialog (Figure 2-2) before an imported image can be displayed in
ENVI. The information needs to be entered only once and is automatically stored into
an ENVI header file in the input directory when the “OK” button at the bottom of the
Header Info window is selected.
Tip
To change the header information for existing header files, use the Edit Header
function (see “Editing ENVI Headers” on page 99).

ENVI User’s Guide Opening Image Files


66 Chapter 2: File Management

Use the Header Info dialog to enter the number of samples or pixels, the number of
lines, the number of bands, the offset in bytes from the start of the file to where the
data begins, the storage order of the data, the byte order of the data, the data type and
the file type. The offset is typically used to define the size of the embedded header,
which, if present, contains external information about the file and is usually found
before the actual image data begins; the storage order of the data is the interleave,
which is in the format BSQ, BIP, or BIL; the byte order of the data is in the format
Host (Intel) (Host Least Significant First) for DEC machines and PCs or Network
(IEEE) (Network Most Significant First) for all other platforms); the data type is in
the format byte, integer, floating point, etc.
All additional information stored in the ENVI Header is optional. To access this
optional information, click the “Edit Attributes” button in the Header Info dialog.
This optional information includes setting the default Z-Plot range, default stretch for
display, entering georeferencing information, associated wavelengths and associated
FWHM (full-width-half-maximum) values, sensor type, band names, and bad bands.
For more information, see “Editing ENVI Headers” on page 99.

Figure 2-2: The Header Information Dialog

Note
If you are opening a file directly from a CD-ROM, the created header file will be
saved to the “Alternate Header Directory” specified in the envi .cfg file because you

Opening Image Files ENVI User’s Guide


Chapter 2: File Management 67

cannot write to the CD-ROM input directory (see “Installing and Customizing
ENVI” on page 859).

ENVI User’s Guide Opening Image Files


68 Chapter 2: File Management

Opening External Files


While Open Image File can be used to open most file types, it is often more
convenient to use internal or external header information for specific known file
types. Use Open External File to read several standard file types including formats
for selected sensors, military formats, digital elevations model formats, image
processing software formats, and generic image formats. ENVI reads the necessary
parameters from internal headers and it is usually not necessary for you to enter any
information in the Header Information dialog (see “Editing ENVI Headers” on
page 99).
Note
For a list of ENVI’s supported input files, see “ENVI Supported Input File
Formats” on page 59.

1. Select File > Open External File > the desired format.
2. When the standard file selection dialog appears (see “Selecting Files in ENVI”
on page 42), select a filename and click “Open.”
• To select a group of files that are listed consecutively, click on the first file
in the group, press and hold the “shift” key, and click the last file in the
group. Or, click and drag with the left mouse button to select the desired
group.
• To select multiple files that are not listed consecutively, press and hold the
“ctrl” key on your keyboard and click on each desired file.
3. If ENVI prompts you to enter Output Filename, enter a name for each file as
requested.
See the following sections for detailed descriptions of how to access specific file
formats.

Opening External Files ENVI User’s Guide


Chapter 2: File Management 69

Opening Landsat Files


Use these selections to open Landsat data in FAST, GeoTIFF, HDF, NLAPS, MRLC,
ACRES CCRS, and ESA CEOS formats.
Opening FAST TM Files
To read FAST format Landsat TM data:
1. Select File > Open External File > Landsat > FAST.
2. When the file selection dialog appears, select one of the following files:
• For Fast TM format data, select the header.dat file.
• For Landsat 7 FAST panchromatic data, select the HPN header file.
• For the 6 VNIR/SWIR Landsat 7 FAST data bands, select the HRF header
file.
• For Landsat 7 FAST thermal bands, select the HTM header file.
The file names follow the naming conventions shown above. ENVI automatically
extracts the header information, including georeferencing information, and enters the
image bands into the Available Bands List. For Landsat 7 FAST files, ENVI also
extracts the data acquisition date, the gains and bias factors, and the sun elevation and
azimuth. ENVI also creates a meta file—a single file containing all of the bands—
and lists it in the Available Bands List. ENVI assigns wavelengths to the bands based
on the sensor type. For information about meta files, see “Saving Files as ENVI Meta
Files” on page 119.
Opening Landsat GeoTIFF Files
To read GeoTIFF format Landsat files and extract the georeferencing information:
1. Select File > Open External File > Landsat > GeoTIFF.
2. When the file selection dialog appears, select the desired input file.
ENVI reads the GeoTIFF image, automatically extracts the necessary header
information (including the associated georeferencing information) and places the
image bands in the Available Bands List.
Opening Landsat HDF Files
To read HDF format Landsat data:
1. Select File > Open External File > Landsat > HDF.
2. When the file selection dialog appears, select the .hdf file.

ENVI User’s Guide Opening External Files


70 Chapter 2: File Management

ENVI automatically extracts the header information, including georeferencing


information, and enters the image bands into the Available Bands List. For Landsat 7
HDF files, ENVI also extracts the data acquisition date, the gains and bias factors,
and the sun elevation and azimuth. ENVI also creates a meta file—a single file
containing all of the bands—and lists it in the Available Bands List. (For information
about meta files, see “Saving Files as ENVI Meta Files” on page 119.) If the data is
from Landsat 7, then the panchromatic band will also be opened and placed in its own
file.

Opening NLAPS Landsat Files


To read Landsat TM and MSS BSQ (band sequential) and BIL (band interleaved by
line) NLAPS format data from CD-ROM or from disk:
1. Select File > Open External File > Landsat > NLAPS.
2. When the file selection dialog appears with the header files (.hd) listed by
default, select the .hd file to open.
ENVI automatically extracts the necessary header information (including any UTM
georeferencing information) and lists all the bands in the Available Bands List. ENVI
also creates a meta file—a single file containing all of the bands—and lists it in the
Available Bands List. For information about meta files, see “Saving Files as ENVI
Meta Files” on page 119.

Opening MRLC Landsat Files


ENVI reads Multi-Resolution Land Characteristics (MRLC) format TM and DEM
files and extracts the UTM georeferencing information.
To open the Landsat TM data (all bands):
1. Select File > Open External File > Landsat > MRLC.
2. When the file selection dialog appears, select one of the TM (.dda) image
files.
ENVI automatically extracts the header information (including UTM georeferencing
information) and places the image bands in the Available Bands List. ENVI also
creates a meta file—a single file containing all of the bands—and lists it in the
Available Bands List. For information about meta files, see “Saving Files as ENVI
Meta Files” on page 119.

Opening External Files ENVI User’s Guide


Chapter 2: File Management 71

Opening ACRES CCRS Files


To read the Australian Centre for Remote Sensing (ACRES) CCRS format Landsat
files:
Note
For Landsat 7 ACRES files, you need to run “re_name.bat” (PC) or “re_name.s”
(UNIX) from the ACRES CD to rename the files to their proper names before the
data can be read into ENVI.

1. Select File > Open External File > Landsat > ACRES CCRS.
2. When the file selection dialog appears, select the Imag_xx.dat file.
ENVI automatically extracts the header information, including UTM georeferencing
information, and enters the image bands into the Available Bands List.
Opening ESA CEOS Landsat TM Files
To read European Space Agency Landsat TM format data:
1. Select File > Open External File > Landsat > ESA CEOS.
2. When the file selection dialog appears, select the input data file.
The files must follow the naming convention of dat_xx.xxx and lea_xx.xxx.
ENVI automatically extracts the necessary header information, including any UTM
georeferencing information, and lists all of the bands in the Available Bands List.
ENVI also creates a meta file—a single file containing all of the bands of a BSQ
formatted file—and lists it in the Available Bands List. ENVI assigns wavelengths to
the bands based on the sensor type. For information about meta files, see “Saving
Files as ENVI Meta Files” on page 119.

Opening SPOT Files


Use the following procedures to open old Spot files, GeoSPOT files, ACRES SPOT,
and SPOT vegetation files.

Opening SPOT Files


To read 1A, 2A, and 1B SPOT data directly from a CD-ROM or disk:
1. Select File > Open External File > Spot > SPOT.
2. When the file selection dialog appears, select the image file to be read.

ENVI User’s Guide Opening External Files


72 Chapter 2: File Management

ENVI automatically extracts the header information and enters the image bands into
the Available Bands List.

Opening GeoSPOT - ArcView Raster (.bil) Files


SPOT provides most of their data in the GeoSPOT format. 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. These images have the .bil file extension and an
associated header file with the extension .hdr.
1. Select File > Open External File > Spot > GeoSPOT.
2. When the file selection dialog appears, select the file to be read.
ENVI automatically extracts the header information, including UTM and State Plane
projection georeferencing information, and enters the image bands into the Available
Bands List.
Opening ACRES SPOT Files
To read the Australian Centre for Remote Sensing (ACRES) CCRS and SPIM format
Spot files:
1. Select File > Open External File > Spot > ACRES SPOT.
2. When the file selection dialog appears, select the Imag_xx.dat file.
ENVI automatically extracts the header information, including any UTM
georeferencing information, and enters the image bands into the Available
Bands List.
Opening SPOT Vegetation Files
To read SPOT Vegetation files:
1. 1. Select File > Open External File > Spot > Vegetation.
2. When the file selection dialog appear, select any .hdf file to be read.
ENVI automatically extracts the necessary header information, including
georeferencing information, and lists all the bands in the Available Bands List. ENVI
also creates a meta file—a single file containing all of the bands—and lists it in the
Available Bands List. For information about meta files, see “Saving Files as ENVI
Meta Files” on page 119.

Opening External Files ENVI User’s Guide


Chapter 2: File Management 73

Opening IKONOS Files


Use the following procedures to open IKONOS files in GeoTIFF or NITF formats.

Opening GeoTIFF IKONOS Files


To read GeoTIFF format IKONOS files (or those labeled “11-bit TIFF”) and extract
the georeferencing information:
1. Select File > Open External File > IKONOS > GeoTIFF.
2. When the file selection dialog appears, select the desired input file.
ENVI reads the GeoTIFF image, automatically extracts the necessary header
information (including the associated georeferencing information) and places the
image in the Available Bands List.
Opening NITF IKONOS Files
To read NITF format IKONOS files:
1. Select File > Open External File > IKONOS > NITF.
2. When the file selection dialog appears, select the input file.
ENVI automatically extracts the header information, including georeferencing
information, and places the image band in the Available Bands List.

Opening IRS Files


To read IRS-1 data in FAST format:
1. Select File > Open External File > IRS > FAST.
2. When the file selection dialog appears, select the header.dat file to be
read.
The file names must follow the naming convention header.dat and bandx.dat,
where x = band number or x = p for panchromatic. ENVI automatically extracts the
header information (including UTM georeferencing information) and enters the
image bands into the Available Bands List. ENVI also creates a meta file—a single
file containing all of the bands—and lists it in the Available Bands List. ENVI
assigns wavelengths to the bands based on the sensor type. For information about
meta files, see “Saving Files as ENVI Meta Files” on page 119.

ENVI User’s Guide Opening External Files


74 Chapter 2: File Management

Opening AVHRR Files


Use the following procedures to read KLM/Level 1b and SHARP format AVHRR
data.
Opening KLM/Level 1B AVHRR Files
To read KLM/Level 1b AVHRR data:
1. Select File > Open External File > AVHRR > KLM/Level 1b.
2. When the file selection dialog appears (see “Selecting Files in ENVI” on
page 42), select the input file.
ENVI reads 10-bit packed format as integer data, uncompressed formats as integer
data, and 8-bit format as byte data. The necessary header information is automatically
extracted and the bands are placed in the Available Bands List.
Tip
To use the imbedded information to georeference the data see “Georeference
AVHRR Data” on page 755.

Opening ESA SHARP Files


European Space Agency SHARP data contains 5 AVHRR bands plus supplementary
information. ENVI reads the five AVHRR data bands and the supplementary
information is read as three additional bands. The additional bands are 0-1 raster
(mask) images of the latitude/longitude grid, coastlines, and state boundaries.
To read European Space Agency format AVHRR data:
1. Select File > Open External File > AVHRR > SHARP.
2. When the file selection dialog appears, select the input data file.
The input file must follow the naming convention of dat_xx.xxx and
lea_xx.xxx.
The AVHRR bands and three supplementary bands appear in the Available Bands
List.

Opening External Files ENVI User’s Guide


Chapter 2: File Management 75

Opening SeaWiFS Files


ENVI reads the following types of SeaWiFS data from CD-ROM or disk: OrbImage-
distributed CEOS LAC 1B, LAC 2A, LAC 2B, and SeaWiFS HDF Level 1A and 1B,
and NASA/Goddard-distributed SeaWiFS HDF format data.
1. Select File > Open External File > SeaWiFS > HDF or CEOS.
2. When the file selection dialog appears, select the image file to be read.
ENVI automatically extracts the header information and enters the image bands into
the Available Bands List. To use the imbedded information to georeference the data
or to create geometry information, see “Georeferencing SeaWiFS Data” on page 752.

Opening EOS Files


To read EOS ASTER 1A/1B and EOS MODIS 1B files:
1. Select File > Open External File > EOS > ASTER 1A/1B or MODIS 1B.
2. When the file selection dialog appears, select the input file.
ENVI automatically extracts the header information, including any georeferencing
information, and enters the image bands into the Available Bands List.

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.
To open ATSR-1 and ATSR-2 files:
1. Select File > Open External File > ATSR.
2. When the file selection dialog appears, select the input file.
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 DMSP (NOAA) Files


To read NOAA DMSP (OLS format only) data directly into ENVI:
1. Select File > Open External File > DMSP (NOAA).

ENVI User’s Guide Opening External Files


76 Chapter 2: File Management

2. When the file selection dialog appears, select a file to be read.


ENVI automatically extracts the header information and enters the image bands into
the Available Bands List.

Opening Thermal Files


Use the following procedures to open TIMS and MASTER data.

Opening TIMS Files


To read data from the NASA Thermal Infrared Multispectral Scanner (TIMS) from
CD-ROM or disk:
1. Select File > Open External File > Thermal > TIMS.
2. Select the TIMS filename and click “OK.”
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 can be edited if needed.
Opening ASTER Files
To read ASTER 1A/1B files:
1. Select File > Open External File > Thermal > ASTER 1A/1B.
2. When the file selection dialog appears, select the input file.
ENVI automatically extracts the header information, including any
georeferencing information, and enters the image bands into the Available Bands
List.
Opening MASTER Files
To read MODIS/ASTER airborne simulator (MASTER) files:
1. Select File > Open External File > Thermal > MASTER.
2. When the file selection dialog appears, select the input file.
ENVI automatically extracts the necessary header information (including
wavelengths) and places the bands in the Available Bands List. ENVI 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 (see “Opening HDF Files” on page 88).

Opening External Files ENVI User’s Guide


Chapter 2: File Management 77

Opening Radar Files


Use the following procedures to open radar files, including RADARSAT, ERS,
JERS, and TOPSAR files, from CD or disk.
Note
To open SIR-C or AIRSAR files see “Using Polarimetric Tools” on page 832.

Opening RADARSAT Files


To read RADARSAT data files into ENVI:
1. Select File > Open External File > Radar > RADARSAT or
Radar > Open/Prepare Radar File > RADARSAT.
2. When the file selection dialog appears, select the input data file.
3. Click “OK” to start the data reading.
ENVI automatically extracts the needed header information (including UTM
georeferencing information) from the data file, leader file, and/or trailer file.
The image band is entered into the Available Bands List.
The image band is entered into the Available Bands List.
Opening Integer Format RADARSAT Data
• When the RADARSAT File Import dialog appears, select Import Data Type >
Unsigned Integer.
The image band is entered into 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.
The image band is entered into the Available Bands List.

ENVI User’s Guide Opening External Files


78 Chapter 2: File Management

Note
Complex RADARSAT 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 ERS Files


To read ERS-1 and ERS-2 format data:
1. Select File > Open External File > Radar > ERS or Radar > Open/Prepare
Radar File > ERS.
2. When the file selection dialog appears, select the image file to be read.
ENVI automatically extracts the header information and places the image band in the
Available Bands List.

Opening JERS Files


To read JERS format data:
1. Select File > Open External File > Radar > JERS or
Radar > Open/Prepare Radar File > JERS.
2. When the file selection dialog appears, select the image file to be read.
ENVI automatically extracts the header information and places the image band in the
Available Bands List.

Opening TOPSAR Files


To read the raw TOPSAR (AIRSAR Integrated Processor Data) format data files
(Cvv, Incidence Angle, Correlation Image, or the DEM):
1. Select File > Open External File > Radar > TOPSAR or
Radar > Open/Prepare Radar File > TOPSAR.
2. When the file selection dialog appears, select the file to be read.
ENVI automatically extracts the needed header information and places the image
band into the Available Bands List.
Note
To read all of the TOPSAR files and automatically convert them to physical units,
see “Converting TOPSAR Data” on page 857. To synthesize AIRSAR images, see
“Synthesizing JPL AIRSAR Data” on page 832.

Opening External Files ENVI User’s Guide


Chapter 2: File Management 79

Opening Military Files


Use Military selections to open common military format files, including ADRG,
CADRG, CIB and NITF.
Opening ADRG Files
To open files in the ARC Digitized Raster Graphics format from the Defense
Mapping Agency:
1. Select File > Open External File > Military > ADRG.
2. When the file selection dialog appears, 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. Also, the scroll window is generated from the ADRG overview
image for speed considerations.
Opening CADRG and CIB Files
To open Defense Mapping Agency Compressed ARC Digitized Raster Graphics or
Controlled Image Base (CIB) files:
1. Select File > Open External File > Military > CADRG or
> CIB.
2. When the file selection dialog appears, select the A.toc file.
A list of the frame files is displayed.
• To open individual frame files, select File > Open External File >
Military > NITF.
The NITF TOC File dialog appears.
3. Select the frame file.
4. Select whether or not to mosaic all the files into a virtual mosaic by selecting
“Yes” or “No” next to “Mosaic Files.”
5. Click “OK.”
All the files within the selected frame and the virtual mosaic, if selected, appear in the
Available Bands List.

ENVI User’s Guide Opening External Files


80 Chapter 2: File Management

Note
Each frame file may be made up of hundreds of individual files that appear in the
Available Bands List.

Opening NITF Files


ENVI reads uncompressed and vector quantization (VQ) compressed NITF 2.0 and
2.1 image data and automatically creates a virtual mosaic of the base image and the
image inserts. NITF symbols and labels, except for CGM symbols, are read into
separate ENVI annotation files (see “Annotating Images” on page 222). NITF text
data is displayed in an ENVI report dialog without any additional formatting.
To read National Imagery Transmission Format data:
1. Select File > Open External File > Military > NITF.
2. When the file selection dialog appears, select the input file.
If symbols or labels are present, an NITF File Parameters dialog appears.
3. Enter symbol and/or label output annotation filenames and click “OK.”
ENVI automatically extracts the header information and creates a virtual mosaic of
all uncompressed and VQ compressed images in the file (see “Image Mosaicking” on
page 731). The virtual mosaic bands are entered into the Available Bands List. The
symbol and/or label annotation files can be overlaid on the virtual mosaic image (see
“Creating Virtual Mosaics” on page 735). Any symbol bitmaps are shown as
annotation “RGB Image” inserts.

Opening Digital Elevation Files


United States Geological Survey Digital Elevation Model (USGS DEM) data,
Defense Mapping Agency Digital Terrain Elevation Data (DMA DTED), and Spatial
Data Transfer Standard (SDTS DEM) formats can be read directly in ENVI.
Elevations are retained at full precision in the converted files. 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 710).
Note
You can also use the Open Topographic File menu to read USGS DEM, DMA
DTED, and SDTS DEM data into ENVI (see “Opening Topographic Files” on
page 789).

Opening External Files ENVI User’s Guide


Chapter 2: File Management 81

Opening DMA DTED Files


To convert DMA DTED files from CD ROM or disk to mosaicked ENVI image files:
1. Select File > Open External File > Digital Elevation > DTED.
2. When the file section dialog appears, select the desired input filename.
The DMA DTED Reader Input Parameters dialog appears. This dialog has the same
parameters as the USGS DEM dialog (see the following section).
Opening USGS DEM Files
To convert USGS DEM files from disk to mosaicked ENVI image files (DEMs can
also be read directly from tape, see “Reading Known Tape Formats” on page 130):
1. Select File > Open External File > Digital Elevation > USGS DEM or File >
Open External File > USGS > DEM.
2. When the file selection dialog appears, select an input file.
3. Click “OK.”
• To convert more than one DEM file, click “Input Additional File” and
select the new file in the file selection dialog.
• To automatically mosaic the DEM files into one image based on their
geographic coordinates, click “Yes” next to “Mosaic Files?” label.
4. Select output to “File” or “Memory.”
A new file and standard ENVI header file are created from the information in
the embedded header.
Tip
If mosaicking is not selected and output is to a 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 (e.g., “_1” for
the first file, “_2” for the second file, etc.).

5. Click “OK” to start the conversion.


A status window appears indicating the processing status. When completed, the
band(s) from the converted file appear in the Available Bands List (see “The
Available Bands List” on page 176), where they are available for standard display
and analysis using ENVI functions.

ENVI User’s Guide Opening External Files


82 Chapter 2: File Management

Opening USGS SDTS DEM Files


ENVI reads USGS Digital Elevation Models (DEMs) in Spatial Data Transfer
Standard (SDTS) format. The projection information is read automatically.
1. Select File > Open External File > Digital Elevation > USGS SDTS DEM or
File > Open External File > USGS > SDTS DEM.
2. When the file selection dialog appears, select the catalog directory (typically
the xxxxCATD.DDF file).
3. When the USGS SDTS DEM Input Parameters dialog appears, select from the
options below:
• To convert more than one DEM file, click “Input Additional File” and
select the new file using the file selection dialog.
• To automatically mosaic the DEM files into one image based on their
geographic coordinates, click “Yes” next to “Mosaic Files?” label.
4. Select output to “File” or “Memory.”
• If you select output to “File,” a new file and standard ENVI header file is
created from the information in the embedded header.
Tip
If mosaicking is not selected and output is to a file, each DEM is converted to its
own image. In this case, you should enter a filename without an extension. The
output file for each separate image is automatically assigned a numerical extension
(e.g., “_1” for the first file, “_2” for the second file, etc.).

5. Click “OK” to start the conversion.


A status window appears, indicating the processing status. When completed, the
band(s) from the converted file appear in the Available Bands List.

Opening External Files ENVI User’s Guide


Chapter 2: File Management 83

Opening USGS Files


Use the USGS selections to read DRG, DOQ, DEM, and SDTS DEM format files.

Opening DRG (USGS) Files


To open USGS Digital Raster Graphic files:
1. Select File > Open External File > USGS DRG.
2. When the file selection dialog appears, select the file to be read.
ENVI automatically extracts the header information (including UTM georeferencing
information) and enters the image bands into the Available Bands List.
Opening DOQ (USGS) Files
To read USGS Digital Orthophoto Quadrangle data:
1. Select File > Open External File > USGS > DOQ.
2. When the file selection dialog appears, select a file to be read.
ENVI automatically extracts the header information (including UTM georeferencing
information) and enters the image bands (gray scale or RGB) into the Available
Bands List.
Opening DEM or SDTS DEM
For detailed instructions, see “Opening Digital Elevation Files” on page 80.

Opening Image Processing Files


ENVI reads files stored in ArcView, ERDAS, ER Mapper, and PCI image processing
formats. ENVI automatically reads the needed header information and enters the
bands into the Available Bands List.

Opening ArcView Raster (.bil) Files


ENVI reads ArcView raster format files that have the.bil file extension and an
associated header file with the extension .hdr.
1. Select File > Open External File > IP Software > ArcView Raster (.bil).
2. When the file selection dialog appears, select the file to be read.
ENVI automatically extracts the header information, including the UTM and State
Plane projection georeferencing information, and enters the image bands into the
Available Bands List.

ENVI User’s Guide Opening External Files


84 Chapter 2: File Management

Opening ERDAS 7.5 (.lan) Files


To open files stored in the ERDAS 7.5 file format:
1. Select File > Open External File > IP Software > ERDAS 7.5 (.lan).
2. When the file selection dialog appears, select an input file to be read.
ENVI automatically extracts the header information and enters the image bands into
the Available Bands List. ENVI will read the UTM georeferencing information from
the associated ERDAS 7.5 .pro file.
Opening ERDAS 8.x (.img) Files
To open files stored in ERDAS 8.x Imagine file format:
1. Select File > Open External File > IP Software > ERDAS 8.x (.img).
2. When the file selection dialog appears, select an input file to be read.
ENVI automatically extracts the required header information, including any
georeferencing and datum information, and enters the image bands into the Available
Bands List.
Note
Because ERDAS’ tiling scheme is not optimized for ENVI, loading of large
ERDAS files is extremely slow. We recommend converting to a standard flat file in
ERDAS prior to use with ENVI.

Opening ER Mapper Files


To open files stored in the raster ER Mapper file format:
1. Select File > Open External File > IP Software > ER Mapper.
2. When the file selection dialog appears, select the data header file (.ers) to be
read.
ENVI automatically extracts the required header information, including UTM
georeferencing information (unrotated), and places the image bands in the Available
Bands List.
Note
ENVI reads ER Mapper unsigned integer data, but does not read signed 8-bit or
ER Mapper algorithm files.

Opening External Files ENVI User’s Guide


Chapter 2: File Management 85

Opening PCI (.pix) Files


To open files stored in the PCI database file format:
1. Select File > Open External File > IP Software > PCI (.pix).
2. When the file selection dialog appears, select a file to be read.
ENVI automatically extracts the header information, including any georeferencing
information, and places the image bands in the Available Bands List.
Note
You cannot use this option to directly read PCI files that contain multiple data types
or that are in file interleave format.

Opening Generic Image Format Files


ENVI reads generic image format data including ASCII, BMP, HDF, JPEG, MrSID,
PDS, PICT, 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 TIFF Files” on page 87 and “Opening ASCII
Files as Image Files” on page 86 for detailed instructions.
If the envi.cfg option “Open applicable formats automatically to memory” is set,
generic image format files will be automatically placed in memory.
Note
If the envi.cfg option “Open applicable formats automatically to memory” is set,
generic image format files will be 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


To open files stored in standard image file formats, including BMP, HDF, JPEG,
PICT, SRF, and XWD:
1. Select File > Open External File > Generic Formats > the file type to be read.
2. When the standard ENVI file selection dialog appears, select a file to be
converted to RGB format.
Files can be converted and read into memory or output to an RGB disk file.

ENVI User’s Guide Opening External Files


86 Chapter 2: File Management

If the “open applicable formats automatically to memory” parameter in the


envi.cfg file is set to “no” (the default is “yes”), the External File
Conversion dialog appears. For information about the envi.cfg file, see “The
ENVI Configuration File” on page 867.
• If the External File Conversion dialog appears, select output to “File” or
“Memory” and click “OK.”
If you select output to “File,” a new file and standard ENVI header file are
created from the information in the embedded header.
Note
If you open a JPEG file that was created from a georeferenced image, the file may
have a .jgw file associated with it. If a .jgw file is present, ENVI reads the map
information from it.

The band(s) from the converted file are listed in the Available Bands List.

Opening MrSID Files


The MrSID (Multi-Resolution Seamless Image Database) format is a wavelet
compressed, multi-resolution raster image format. MrSID images may be viewed
without ever being fully decompressed. The memory requirements and time delays
associated with opening a full image into memory are thus avoided, and an image,
regardless of size, may be viewed quickly. To open MrSID compressed format
single-band or three-band files:
Note
Opening MrSID files is only available on Windows platforms.

1. From the ENVI main menu, select File > Open External File > Generic
Formats > MrSID, or select File > Open Image File.
2. When the standard ENVI file selections dialog appears, select the MrSID
compressed file to be read.
ENVI automatically extracts the needed header information, including any
georeferencing information, and places the image bands in the Available Bands List.
Opening ASCII Files as Image Files
Use Generic Formats to open an ASCII file as an image. Each ASCII value is read as
a pixel DN value. The ASCII values must be separated by white spaces or commas.
Lines at the 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

Opening External Files ENVI User’s Guide


Chapter 2: File Management 87

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. Select File > Open External File > Generic Formats > ASCII.
2. When the standard file selection dialog appears, select an ASCII file to input.
The number of samples and lines (columns and rows) are automatically
determined.
3. When the Input ASCII File dialog appears, select BSQ, BIL, or BIP from the
“Interleave” button menu.
4. From the “Data Type” button menu, select the correct data type.
5. Enter or select the number of input bands by using the arrow buttons next to
the “Number of Bands” label or by typing a number into the box.
6. Click “OK.”
The bands are read into memory and entered into 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. Select File > Open External File > Generic Formats > TIFF/GeoTIFF.
2. When the standard file selection dialog appears, 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, if needed (see
“Selecting Map Projection Types” on page 757).
B. Click “OK.”
Note
If you have a GeoTIFF file and a TIFF world file, all projection information will be
read directly from the GeoTIFF file.

The bands are placed in the Available Bands List.

ENVI User’s Guide Opening External Files


88 Chapter 2: File Management

Opening HDF Files


Supported HDF files include raster format, images stored in 3-D scientific data
format and plots stored in 1-D scientific data format. The HDF plot files are read
directly into an ENVI plot window.
To read HDF format data:
1. Select File > Open External File > Generic > HDF.
2. When the file selection dialog appears, select the input file.
3. When the HDF Dataset Selection dialog appears, select file(s) to read by
clicking in the text box(es) next to their name(s) and clicking “OK.”
• If a 3-D 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).
All the 1-D HDF files selected are read directly into an ENVI plot window.
The 2-D and 3-D files are read and placed in the Available Bands List.
Opening PDS Image Files
ENVI reads uncompressed PDS format only and does not support VAX floating
point (complex, double, or real) data. To read uncompressed Planetary Data System
format files with attached and detached PDS data product labels:
1. Select File > Open External File > Generic > PDS.
2. When the file selection dialog appears, select the desired .img input file.
ENVI automatically extracts the needed header information and enters the image
bands into the Available Bands List.

Opening External Files ENVI User’s Guide


Chapter 2: File Management 89

Opening Vector Files


Use Open Vector File to open ARCView Shape files, ARC/INFO 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.
Note
You may load as many vector layers as desired, but note that each file should
contain one vector layer only.

1. Select one of the following options:


• Select File > Open Vector File > the desired format.
• Select Vector > Open Vector File > the desired format.
2. When the standard file selection dialog appears (see “Selecting Files in ENVI”
on page 42), select a filename and click “Open.”
3. See the following sections for detailed descriptions of how to access specific
file formats.

Opening ArcView Shape Files


ENVI reads ArcView Shape files and converts them to ENVI vector files. Any .dbf
file containing ArcView Shape file attributes present with the ArcView file will also
be read.
1. Select File > Open Vector File > ArcView Shape File.
2. When the standard file selection dialog appears, select the input file (*.shp).
3. When the Import ArcView Shape File Parameters dialog appears, select from
the following options:
• To select another file to load:
A. Click “Input Additional File.”
B. Select a filename from the file selection dialog.
• To change a layer name, enter a new name in the “Layer Name” text box.
• To remove a file from the list, highlight the filename in the “Selected
Files” list and click “Delete.”
4. For each file within the list, highlight the file name and select either “File” or
“Memory” output.

ENVI User’s Guide Opening Vector Files


90 Chapter 2: File Management

If you select “File” output, ENVI saves the file in ENVI vector file format.
Tip
You may mix “File” and “Memory” outputs when working with different layers.

5. Assign the input projection type for each layer by highlighting the filename
and selecting the projection of the data from the “Output Projection” list.
6. Click “OK” to start the conversion.
A status window appears. When ENVI has completed the conversion process, each
converted file appears as a layer in the Available Vectors List (“The Available
Vectors List” on page 196).

Opening ARC/INFO Interchange Format Files


To open ARC/INFO Interchange files (non-compressed only) and convert them to
ENVI vector format files or memory items.
1. Select File > Open Vector File > ARC/INFO Interchange Format.
2. When the file selection dialog appears, select a filename.
3. When the ARC/INFO Interchange Input Parameters appears, select from the
following options:
• To load more than one file:
A. Click “Input Additional File.”
B. Select a filename from the new standard file selection dialog.
• To change a layer name, enter a new name in the “Layer Name” text box.
• To remove a file from the list, highlight the filename in the “Selected
Files” list and click “Delete.”
Files to be converted are listed in the “Selected Files” portion of the Input
Parameters dialog.

Opening Vector Files ENVI User’s Guide


Chapter 2: File Management 91

Figure 2-3: The ArcView File Parameters Dialog

4. For each file within the list, highlight the file name and select either “File” or
“Memory” output.
If you select “File” output, ENVI saves the file in ENVI vector file format.
Tip
You may mix “File” and “Memory” outputs when working with different layers.

5. Assign the input projection type for each layer by highlighting the filename
and selecting the projection of the data from the “Output Projection” list.
6. Click “OK” to start the conversion.
When ENVI has completed the conversion process, each converted file appears as a
layer in the Available Vectors List (see “The Available Vectors List” on page 196).

ENVI User’s Guide Opening Vector Files


92 Chapter 2: File Management

Opening DXF Format Files


Use DXF to bring Multilayer DXF XY data into ENVI using separate DXF files.
ENVI does not read text annotations in DXF files.
Note
Note that each DXF input file should contain only one layer.

1. Select File > Open Vector File > DXF.


2. When the file selection dialog appears, select a filename.
3. When the DXF File Parameters dialog appear, select from the following
options:
• To load more than one DXF file:
A. Click “Input Additional File.”
B. When the new standard file selection dialog appears, select a filename.
• To change a layer name, enter a new name in the “Layer Name” text box.
• To remove a file from the list, highlight the filename in the “Selected
Files” list and click “Delete.”
Files to be converted to ENVI Vector File format appear in the “Selected
Files:” portion of the DXF File Parameters dialog.
4. For each file within the list, highlight the file name and select either “File” or
“Memory” output.
If you select “File,” ENVI saves the file in ENVI vector file format.
Tip
You may mix “File” and “Memory” outputs when working with different layers.

5. Assign the input projection type for each layer by highlighting the filename
and selecting the projection of the data in the “Output Projection” list.
6. Click “OK” to start the conversion.
A status window appears indicating the processing status. When the conversion
process is complete, each converted file appears as a layer in the Available Vectors
List (see “The Available Vectors List” on page 196).

Opening Vector Files ENVI User’s Guide


Chapter 2: File Management 93

Tip
The files are also accessible from the Main Window of the display (see “Overlaying
Vectors” on page 295).

Opening MapInfo Files


ENVI reads MapInfo Interchange (.mif) format vector files and any associated .mid
files containing attribute information for the .mif file. ENVI automatically reads the
projection information. If the MapInfo file is in a projection that is not supported by
ENVI, ENVI uses an Arbitrary projection. Regardless of projection type, text and
style information are not extracted from the vector file.
The files will be converted to ENVI vector files (.evf).
1. Select File > Open Vector File > MapInfo.
2. When the file selection dialog appears, select the file.
3. When the Import MapInfo File Parameters dialog appears, select from the
following options:
• To select another file to load:
A. Click “Input Additional File.”
B. Select a file from the file selection dialog.
• To change a layer name, enter a new name in the “Layer Name” text box.
• To remove a file from the list, highlight the filename in the “Selected
Files” list and click “Delete.”
4. For each file within the list, highlight the file name and select either “File” or
“Memory” output.
If you select “File” output, ENVI saves the file in ENVI vector file format.
Tip
You may mix “File” and “Memory” outputs when working with different layers.

5. Click “OK” to start the conversion.


A status window appears. When ENVI has completed the conversion process, each
converted file appears as a single ENVI vector layer in the Available Vectors List
(see “The Available Vectors List” on page 196).

ENVI User’s Guide Opening Vector Files


94 Chapter 2: File Management

Opening Microstation or Intergraph DGN Files


ENVI reads Microstation and Intergraph DGN (.dgn) format files and converts them
to ENVI vector files (.evf). In the process, line, string, shape, curve, ellipse, and arc
element types are decoded.
1. Select File > Open Vector File > Microstation DGN.
2. When the file selection dialog appears, select the file to be read.
3. When the Import Microstation DGN File Parameters dialog appears, select
from the following options:
• To select another file to load:
A. Click “Input Additional File.”
B. Select a filename from the new standard file selection dialog.
• To change a layer name, enter a new name in the “Layer Name” text box.
• To remove a file from the list, highlight the filename in the “Selected
Files” list and click “Delete.”
4. For each file within the list, highlight the file name and select either “File” or
“Memory” output.
If you select “File” output, ENVI saves the file in ENVI vector file format.
Tip
You may mix “File” and “Memory” outputs when working with different layers.

5. Assign the input projection type for each layer by highlighting the filename
and selecting the projection of the data in the “Output Projection” list.
6. Enter the correct DGN scale factor for your file to convert the vectors to the
proper projection scale.
Use degrees for Geographic projection and meters or feet for all other types.
7. Click “OK” to start the conversion.
A status window appears. When ENVI has completed the conversion process, each
converted file appears as a single ENVI vector layer in the Available Vectors List
(see “The Available Vectors List” on page 196).

Opening Vector Files ENVI User’s Guide


Chapter 2: File Management 95

Opening USGS DLG Files


ENVI reads USGS DLG files and converts them to ENVI Vector Format (EVF).
ENVI reads UTM and Albers Equal Area projection information from the header to
use as the vector projection. If your files exist on tape, see “Reading Known Tape
Formats” on page 130. ENVI does not currently read the attribute data.
Note
Each DLG file should contain only one layer.

1. Select File > Open Vector File > USGS DLG.


2. When the file selection dialog appears, select an input file.
3. When the DLG Reader Input Parameters appears, choose from the following
options.
• To load more than one DLG file:
A. Click “Input Additional File.”
B. Select a file from the second file selection dialog.
• To change a layer name, enter a new name in the “Layer Name” text box.
• To remove a file from the list, highlight the filename in the “Selected
Files” list and click “Delete.”
Files to be converted are listed in the “Selected Files:” portion of the DLG
Reader Input Parameters dialog.
4. For each file within the list, highlight the file name and select either “File” or
“Memory” output.
• If you select “File” output, ENVI saves the file in ENVI vector file format.
Tip
You may mix “File” and “Memory” outputs when working with different layers.

5. Click “OK” to start the conversion.


A status window appears. When the conversion is complete, each converted file
appears as a layer in the Available Vectors List (see “The Available Vectors List” on
page 196). The files can also be selected from the “Vector Layers” option in the
Display menu (see “Overlaying Vectors” on page 295).

ENVI User’s Guide Opening Vector Files


96 Chapter 2: File Management

Opening USGS SDTS DLG Files


ENVI reads USGS DLG files in Spatial Data Transfer Standard format and converts
them to ENVI vector format. Only the lines and area point spatial objects are
extracted. The projection information is read automatically. ENVI does not currently
read the attribute data.
1. Select File > Open Vector File > USGS SDTS.
2. When the file selection dialog appears, select the catalog directory file
(typically the xxxxCATD.DDF file).
3. When the Import USGS SDTS DLG-3 File Parameters appears, choose from
the following options:
• To load more than one file:
A. Click “Input Additional File.”
B. Select another catalog directory file from the second file selection dialog.
• To change a layer name, enter a new name in the “Layer Name” text box.
• To remove a file from the list, highlight the filename in the “Selected
Files” list and click “Delete.”
Files to be converted are listed in the “Selected Files:” portion of the
Parameters dialog.
4. For each file within the list, highlight the file name and select either “File” or
“Memory” output.
If you select “File” output, ENVI saves the file in ENVI vector file format.
Tip
You may mix “File” and “Memory” outputs when working with different layers.

5. Click “OK” to start the conversion.


A status window appears. When the conversion is complete, each converted file
appears as a layer in the Available Vectors List (see “The Available Vectors List” on
page 196). The files can also be selected from the “Vector Layers” option in the
Display menu (see “Overlaying Vectors” on page 295).

Opening ENVI Vector Files (.evf)


Use ENVI Vector File to open ENVI internal format vector files. You can create an
internal ENVI Vector File (.evf) from any other supported vector format file.

Opening Vector Files ENVI User’s Guide


Chapter 2: File Management 97

Note
Whenever you read in DLG or DXF files and select output to file, .evf files are
automatically created.

1. Select File > Open Vector File > ENVI Vector File (.evf).
2. When the standard file selection dialog appears, select a file to be read.
The individual layer for the selected file is automatically loaded into the Available
Vectors List (see “The Available Vectors List” on page 196).

ENVI User’s Guide Opening Vector Files


98 Chapter 2: File Management

Opening Previous Files


Use Open Previous File to view and select from a list of the last 20 files that were
opened in ENVI. Selecting a file opens it. When a new file is opened, it is added to
the top of the list. When more than 20 files have been opened, the file at the bottom of
the list is removed.
Tip
If a file is “sticky,” it will remain at the top of the previous files list (see “Setting
ENVI Preferences” on page 160 for instructions on making a file “sticky”).

The file names under the Open Previous File menu item are stored in a user-selected
ASCII file (see “Setting ENVI Preferences” on page 160). The format of this file is
described in “ENVI Previous Files List” on page 891.
• To open a file from the previous files list, select File > Open Previous File >
desired file name.
The filename is listed in the Available Bands List.

Opening Previous Files ENVI User’s Guide


Chapter 2: File Management 99

Editing ENVI Headers


ENVI stores information about files in a separate text header file with the same name
as the image file, but with the file extension .hdr. Use the Edit ENVI Header
function to change the header information. Each time a data file is opened, ENVI
searches for the header file and uses the information to open the file.
1. Select File > Edit ENVI Header.
The standard ENVI Input File dialog appears.
2. Click on the desired filename.
In the text box labeled “File Information,” ENVI displays details about the file.
3. Click “OK.”
The Header Info dialog appears. Use the Header Info dialog to edit general
image parameters, band names, wavelengths, and map information. Refer to
the procedures in the next three sections for specific editing instructions.
4. After editing the header, click “OK.”
Note
If you edit the header of a file that is currently open, ENVI closes that file and re-
opens it when you click “OK.” Because the displays using that file close when the
file closes, you must restart those displays from the Available Bands List.

Modifying General Image Parameters


Use the Header Info dialog to edit general image parameters. Each field is explained
in this section.
Note
Use caution when editing the general image parameters for files not in the ENVI
file format. For example, changing the data type of an image in an HDF file will
not effect the data type of the displayed or returned data. The HDF format will
override any setting by the user. To change the data type of an HDF image, first
save the data to an ENVI file and then change the data type. This is also true for
many external file formatted files opened in ENVI.

To save an image file as and ENVI format file, see “Saving Files as Standard ENVI
Files” on page 117.

ENVI User’s Guide Editing ENVI Headers


100 Chapter 2: File Management

• The “Samples” field displays the number of samples in the file.


• The “Lines” field displays the number of lines in the file.
• The “Bands” field displays the number of bands stored in the file.
• The “Offset” field displays the offset in bytes from the start of the file to where
the actual data begins. (The “Offset” is sometimes known as the “embedded
header.”)

Figure 2-4: The Header Information Dialog.

• The “xstart” and “ystart” fields define the image coordinates for the upper
left hand pixel in the image. Images that are spatial subsets of larger images
will often use an image coordinate system that references the parent
(or larger) image so that the two can be linked and dynamically overlaid.
The default values are (1,1) so that the upper left hand pixel has an image
coordinate of (1,1).
Note
Changing the value of “xstart” or “ystart” does not affect the way ENVI
reads the image data from the file.

Editing ENVI Headers ENVI User’s Guide


Chapter 2: File Management 101

• Use the “Data Type” pulldown menu to select the appropriate data type (byte,
integer, unsigned integer, long integer, unsigned long integer, floating point,
double precision, 64-bit integer and unsigned 64-bit integer, complex, or
double complex).
• Use the “Byte Order” pulldown menu to select the byte order of the data. This
parameter varies by platform:
• For DEC machines and PC’s, select “Host (Intel)”: Host Least Significant
First.
• For all other platforms, select “Network (IEEE)”: Network Most
Significant First.
• Use the “Interleave” menu to select the data storage order from these choices:
• “BSQ” (Band Sequential).
• “BIL” (Band Interleaved by Line).
• “BIP” (Band Interleaved by Pixel).
• Use the white field at the bottom of the Header Info dialog to insert string text
that describes the data file.
Selecting File Types
ENVI uses the “File Type” header field to automatically identify certain types of data
files. In the Header Info dialog, use the “File Type” field to identify the native file
type of the file that the ENVI header belongs to. The file will have an ENVI Header,
but will still exist in its native format. The ENVI header file can be used to add
ancillary information (i.e., wavelengths) that is used in ENVI.
• From the “File Type” button menu, select a file type.
Tip
For a complete list of all file types recognized by ENVI, see the filetype.txt
file that comes in the menu directory of each ENVI release. You may edit this file
and add new user-defined file types (see Chapter 7, “Custom File Input” in the
ENVI Programmer’s Guide).

The file types include ENVI-specific file types such as meta files, classification files,
virtual mosaics, spectral libraries, and FFT results. The file types also encompass
data-specific formats such as NLAPS, RadarSat, Spot, etc. TIFF, BMP, ERDAS 8.x
and PCI files are also recognized.

ENVI User’s Guide Editing ENVI Headers


102 Chapter 2: File Management

Inputting Header Information from Other Files


In the Header Info dialog, use the Input Header Info From pulldown menu to
incorporate the header information of another open file into the header of the current
file.
1. Select Input Header Info From > Other File.
2. Select the file containing the header information and click “OK.”

Editing Ancillary 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, use the Edit Attributes pulldown menu to edit ancillary
header information such as band names and wavelengths, to edit map, classification,
Z-plot and stretching information, and to determine what images to display for
complex data types.
Selecting Bad Bands
Use Bad Bands List to select bands to be excluded from plotting or optionally omitted
during processing. The Bad Bands list is often used to omit the water vapor bands in
hyperspectral data sets.
1. In the Header Info dialog, select Edit Attributes > Bad Bands List.
2. In the Edit Bad Bands List values dialog, designate the bad bands by clicking
on them so that they are not highlighted.
• To designate a range of bands, enter the beginning and ending band
numbers in the text boxes next to the “Add Range” button. Click “Add
Range.”
3. Click “OK.”

Editing ENVI Headers ENVI User’s Guide


Chapter 2: File Management 103

Figure 2-5: The Edit Bad Bands List values and Edit Band Name values Dialogs.

Editing Additional Attributes


1. Select Edit Attributes > Band Names, Spectral Library Names, Wavelengths,
or FWHM (Full-Width-Half-Maximum) to activate the corresponding dialog.
If you have previously added or edited values for one of the attributes listed in
Step 1, those values appear listed under the “Current Parameter Values” text
label, where “Parameter” refers to one of the attributes listed in Step 1.
Otherwise, default values are listed.
2. From within the displayed list, click on the value to be edited.
The value appears in the text box under the “Edit Selected Item” label.
3. In the text box, type the new value and press <Enter> or <Return>.
4. Click “OK.”
Importing Header Data from ASCII Files
1. In any Edit Values dialog, click “Import ASCII.”
2. When the standard ENVI File Selection dialog appears, open the ASCII file.
Note
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,
while the file used to import band names can only contain strings.

ENVI User’s Guide Editing ENVI Headers


104 Chapter 2: File Management

The Input ASCII File dialog appears with first few values from the ASCII file
listed.
3. In the “Wavelength Column” text box, 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” text box.
For example, multiply the imported wavelength values by 100, enter
“100.”
4. In the “FWHM Column” text box, 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. Enter the number of the ASCII column that contains the Bad Bands List.
6. Click “OK.”
7. Click “OK” in the Header Info dialog to write all of the changes to the
header file.

Figure 2-6: The Input ASCII File Dialog.

Editing ENVI Headers ENVI User’s Guide


Chapter 2: File Management 105

Setting Default Bands to Load


Use Default Bands to Load to identify bands that will be automatically loaded into
the a new display group when the file is opened. Either a gray scale image or a color
image can be selected.
1. From the Header Info dialog, select Edit Attributes > Default Bands to Load.
The Default Bands to Load dialog appears with a list of all the bands in the file.
2. Click on the bands names to load in the red (R), green (G), and blue (B) guns.
• If only one band is selected, it will be loaded as a gray scale image.
• Click “Reset” to clear the bands.
3. Click “OK” to return to the Header Info window.
When the file is opened, the band(s) will automatically be loaded into a new
display group.
Entering Map Information for Georeferenced Files
Map information is associated with georeferenced files. In ENVI, the term
“georeferenced” refers to images that have been geometrically corrected (i.e.,
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.
Note
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
(e.g., x=1.5, y=1.5 would make the map coordinates refer to the center of the pixel).

1. From the Header Info dialog, select Edit Attributes > Map Info.
2. In the Map Information dialog, enter the reference pixel coordinates in the
“Image Coord X” and “Y” text boxes and the pixel size in the “Pixel Size X”
and “Y” text boxes. Be sure to enter the pixel size in the units appropriate for
your selected projection.

ENVI User’s Guide Editing ENVI Headers


106 Chapter 2: File Management

• If north is not “up” in the image, enter a rotation angle in degrees in the
“Map Rotation” text box. Measure the angle in a clockwise direction
where zero degrees is straight up (see “Overlaying Grid Lines” on
page 258).
3. Select the map projection by clicking on “Change Projection” and selecting the
appropriate projection from the list of projections (see “Selecting Map
Projection Types” on page 757).

Figure 2-7: The Map Information Dialog.

4. Enter the coordinates of the reference pixel in the appropriate text boxes.
The corresponding latitude and longitude will be automatically calculated and
can be viewed by clicking on the arrow toggle button to “Geographic
Coordinates.”
5. Click “OK” to return to the Header Info window.
Entering Geographic Information for Non-Georeferenced Files
If your file is not georeferenced but does include geographic information, 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 155). The other points
remain in the header for your information only (image georeferencing is defined
using the “MapInfo” field).
1. From the Header Info dialog, select Edit Attributes > Geographic Corners.

Editing ENVI Headers ENVI User’s Guide


Chapter 2: File Management 107

2. Enter between one and four pixel locations and their corresponding latitudes
and longitudes.
Note
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
(e.g., x=1.5, y=1.5 would make the map coordinates refer to the center of the pixel).

Figure 2-8: The Class Color Map Editing Dialog.

Entering Pixel Sizes for Non-Georeferenced Files


1. In the Header Info dialog, select Edit Attributes > Pixel Sizes.
2. Enter the X and Y pixel sizes into the appropriate text boxes and select the
desired units from the “Units” pulldown menu.

ENVI User’s Guide Editing ENVI Headers


108 Chapter 2: File Management

Editing Classification Info


1. From the Header Info dialog, select Edit Attributes > Classification Info.
Note
The “File Type” must be set to “Classification” for this selection to be available.

2. Enter the number of classes in the Classification Info dialog and click “OK.”
3. When the Class Color Map Editing dialog appears, click on the class name of
the region to be changed from the list “Selected Classes.”
• To change a selected class name, edit it in the “Class Name” text field.
• To change the class color in the RGB color space (0-255 for the three
colors), move the three sliders labeled “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:
A. From the “System” pulldown menu in the Class Color Map Editing dialog,
select the appropriate system.
B. Move the “Hue, Saturation, Value” or “Hue, Lightness, Saturation” sliders
to the desired values.
4. To make the changes permanent, click “OK.”
Note
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 on the
“Apply Changes” button, 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 file name.
1. From the Header Info dialog, select Edit Attributes > Z Plot Information.
The Edit Z Plot Information dialog appears.
2. Select from the following options:
• To set the Z plot Range, enter the minimum and maximum values in the
left and right text boxes (respectively) next to the “Z Plot Range” label.

Editing ENVI Headers ENVI User’s Guide


Chapter 2: File Management 109

• To set the axes titles, enter the desired axes titles into the “X Axis Title”
and “Y Axis Title” text boxes.
• 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.
• To specify an additional file name from which to extract Z profiles:
A. Click on “Default Additional Z Profiles.”
B. When the Default Additional Z Profiles dialog appears, click on “Add
New File.”
C. Select the desired file name and click “OK.” The file name will appear in
the list.
• To remove a file name from the list, click on the file name and click on
“Remove Selected File.”

Entering Sensor Types


1. From the Header Info dialog, select Edit Attributes > Sensor Type.
2. From the list, select a sensor type.
Setting the Default Stretch
Use Default Stretch to set the default stretch that will be used when displaying a band
from the file.
1. In the Header Info dialog, select Edit Attributes > 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 (i.e.
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 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.

ENVI User’s Guide Editing ENVI Headers


110 Chapter 2: File Management

Note
If the Default Stretch is set to “None,” use the Default Stretch set in the ENVI
Configuration File (envi.cfg).

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, select Edit Attributes > Complex Lookup Function.
2. When the Complex Data Lookup Function dialog appears, select the desired
lookup function from the pulldown menu: “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).
The default image is “Power.”
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 1-dimensional,
and a major frame is 2-dimensional.
See Table 2-1 for definitions of major and minor frames for the various file formats.
1. In the Header Info dialog, select Edit Attributes > Major/Minor Frame Offsets.
2. In the Major/Minor Frame Offsets dialog, enter or select 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 text boxes.
3. Click “OK.”

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

Table 2-1: Major and Minor Frame Definitions

Editing ENVI Headers ENVI User’s Guide


Chapter 2: File Management 111

File Format Minor Frame Major Frame


BIP # of bands (spectrum) # of bands by # of sam-
ples

Table 2-1: Major and Minor Frame Definitions (Continued)

ENVI User’s Guide Editing ENVI Headers


112 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. Select File > Generate Test Data.
2. Select the output image type by clicking the appropriate button (see
descriptions in the following sections).
3. When the Generate Image Parameters dialog appears, select the number of
output samples, lines, and bands and the output data type.
4. Select output to “File” or “Memory.”
5. Click “OK” to start the function.
A status box appears while the image is being processed. The new image will be
listed in the Available Bands List when processing is complete.

Figure 2-9: The Generate Test Image Parameters Dialog.

Generating Test Data ENVI User’s Guide


Chapter 2: File Management 113

Generating Constant Value Images


To generate an image with a constant value for every pixel:
1. In the Generate Image Parameters dialog, select the “Constant” exclusive
button.
2. Enter the desired DN value in the “Value” text box.

Generating Horizontal or Vertical Ramps


To generate an image with a either a horizontal or vertical linear ramp:
1. In the Generate Image Parameters dialog, select either the “Horiz Ramp” or
“Vert Ramp” exclusive button, respectively.
2. Enter the desired minimum value of the ramp in the text box labeled “Min
Value” and the desired maximum value in the text box labeled “Max Value.”

Generating Random Number Images


To generate an image with randomly distributed values:
1. In the Generate Image Parameters dialog, select either the “Random
(uniform)” or “Random (normal)” exclusive button.
Selecting the “Random (normal)” option returns an image with normally-
distributed random numbers. Selecting the “Random (uniform)” option returns
an image with uniformly-distributed random numbers.
2. Enter the desired minimum value to occur in the image in the text box
labeled “Min Value” and the desired maximum value in the text box labeled
“Max Value.”
3. Enter a “Seed” value in the “Seed” text box for initialization of the random
number generator.
If no seed value is entered, the system clock will be used for initialization.

ENVI User’s Guide Generating Test Data


114 Chapter 2: File Management

Generating Gaussian Images


To generate an 2D Gaussian Point Spread Function image:
1. In the Generate Image Parameters dialog select the “Gaussian PSF” exclusive
button.
2. Enter the desired minimum value to occur in the image in the text box labeled
“Min Value” and the desired maximum value in the text box labeled “Max
Value.”
3. Enter the standard deviation to be used for the function in the text box labeled
“Sigma.”

Generating Test Data ENVI User’s Guide


Chapter 2: File Management 115

Using the Data Viewer


Use Data Viewer to examine data files at the byte level, which allows you to view file
structure, to identify unknown file types, and to determine the “offset” to data when
an embedded image header is present in the data.
1. Select File > Data Viewer.
2. When the Data Viewer Input File dialog appears, select a file.
3. Click “OK.”
The Data Viewer dialog appears with the file name and number of total bytes
in the window banner and the actual data values (in hexadecimal format, by
default) in the window displayed. 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, and the final column lists the ASCII
equivalent of the values.
If the data does not have any embedded ASCII characters, the ASCII
equivalents will be totally random. If there is embedded ASCII data, the data
will be readable as text.
4. Select from the following options:
• To select the starting byte to view from the file, enter the byte number in
the “Byte Offset” text box.
• To move the data view forward or backward one page respectively, use the
“Next Page” and “Prev Page” buttons.
• If you suspect that the data may be in something other than byte format,
select a data format (Hexadecimal, Byte, Unsigned Integer, Integer,
Long Integer, Unsigned Long Integer, or Floating Point) from the
View_Format menu.
The number of columns of data values and the representation of the listed
data change accordingly.
• To open and view a different file, select File > Open New File.
• To exit the function, select File > Cancel.

ENVI User’s Guide Using the Data Viewer


116 Chapter 2: File Management

• To evaluate 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 from the Byte_Swap menu: None (no swapping), Short Word
(swapping two bytes for an integer), or Long Word (swapping byte pairs
for long integer and floating point data).

Figure 2-10: The Data Viewer.

Using the Data Viewer ENVI User’s Guide


Chapter 2: File Management 117

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. You can output your data to image processing formats
such as ArcView Raster (.bil), PCI (.pix), ER Mapper, and ERDAS (.lan) and
TIFF files (including GeoTIFF and TIFF world files [.tfw]). In addition, you can
output your image to an ASCII (.txt) file.
Note
New files can only be created from bands that have the same spatial dimensions.
Use ENVI’s integral subsetting capabilities to choose individual bands and to
perform on-the-fly subsetting of files to the correct dimensions. For instructions,
see “Selecting a Spatial Subset” on page 45 and “Selecting a Spectral Subset” on
page 50.

Saving Files as Standard ENVI Files


Use Standard to create disk files from a combination of ENVI files, external (foreign)
files, or memory items.
1. Select File > Save File As > Standard.
2. When the New File Builder dialog appears, click “Import File.”
The Create New File Input File dialog appears.
3. Select files by clicking on the file name(s).
• If the file to be included is not listed, click “Open File” and select the
input file.
4. Spatially or spectrally subset the file as desired (see “Selecting a Spatial
Subset” on page 45 or “Selecting a Spectral Subset” on page 50).
Tip
You can spatially or spectrally subset a group of files if they are the same size. The
subset will be applied to each file.

ENVI User’s Guide Saving Files


118 Chapter 2: File Management

5. Repeat the file selection using the “Import ENVI File” button for each input
file to be included in the new file.
Input files are listed in the “Selected ENVI Files for New File” list.
• To delete a file from the list in the New File Builder dialog, click on the
filename and click “Delete.”
• To change the order in which the files and/or bands are imported, see
“Reordering Files”.
6. Select output to “File” or “Memory.”
7. Click “OK” to build the new file.
The file will be output as a band sequential (BSQ) format.
Reordering Files
1. In the New File Builder dialog, click the “Reorder Files” button.
The Reorder Files dialog appears.
2. Click on a filename or bandname and drag it to the desired position in the list.
3. Repeat for as many filenames or bandnames as needed.
4. Click “OK.”
Removing Superfluous Files
When you create a standard file, use this procedure to remove the bands used to
create it.
• To remove the component files, use the arrow toggle button to select “Yes”
(remove files), or “No,” next to the text label “Remove Superfluous Files?”
Warning
This function physically removes the files from the Available Bands List and the
disk:

If memory items are to be transferred to the new file and “Remove Superfluous
Files” is selected, they are deleted from memory when the new file is created.

If all of the bands from a disk file are to be transferred to the new file and “Remove
Superfluous Files” is selected, the original disk file is physically deleted from the
disk when the new file (either memory or disk file) is created.

Saving Files ENVI User’s Guide


Chapter 2: File Management 119

Figure 2-11: The New File Builder Dialog.

Saving Files as ENVI Meta Files


A meta file is a virtual file structure, in which no new disk file is actually created.
Instead, selected files or image bands are associated through the use of a small text
file containing the names of the files that are to be treated as a virtual file. When this
file is later selected for input or processing, ENVI gets the image data from the
individual disk files and treats them as if they were actually in the same input file for
processing. ENVI meta files can contain images with different data types (byte,
integer, floating point, etc.), which allows you to combine processing of diverse data
sets. No file conversions are required, and no intermediate processing files are
created.
Note
Files to be included in Meta Files must reside on disk as ENVI format files. Convert
foreign files imported to ENVI (e.g., TIFF files) or files/bands created as memory
items within ENVI to ENVI disk files prior to creating the meta file.

1. Select File > Save File As > Meta File.

ENVI User’s Guide Saving Files


120 Chapter 2: File Management

2. When the New File Builder dialog appears, click “Import File.”
The Create New File Input File dialog appears.
3. Select files by clicking on the file name(s).
• If the file to be included is not listed, click “Open File” and select the
desired input file.
Tip
You can spatially or spectrally subset a group of files if they are the same size. The
subset will be applied to each file.

4. Spatially or spectrally subset the file as desired (see “Selecting a Spatial


Subset” on page 45 or “Selecting a Spectral Subset” on page 50).
5. Repeat the file selection using the “Import ENVI File” button for each input
file to be included in the new file.
• To delete a file from the list in the New File Builder dialog, click on the
filename and click “Delete.”
• To change the order in which the files and/or bands are imported, see
“Reordering Files” on page 118.
6. In the “Enter Output Filename” text box, enter a filename or click “Choose”
and select an output filename.
7. Click “OK” to build the new file.
The bands in the meta file appear in the Available Bands List. The actual meta file,
on disk, is a text file that only contains the names of the imported files.

Saving Files as ASCII Files


ASCII (.txt) output files will contain the DN values for every pixel. You may select
the output format of the DN values (field size, including decimal point and white
spaces, and number of decimal places). If you output multiple bands, the file
interleave (BSQ, BIL, BIP) will be the same as the input file. The format of the
ASCII file is that of a two-dimensional array.
Note
If your output file contains “***”s, then your ASCII output format is incorrect for
the data type of your DN values.

Saving Files ENVI User’s Guide


Chapter 2: File Management 121

1. Select File > Save File As > ASCII.


2. When the Output File to ASCII Input Filename dialog appears, select a file and
perform any subsetting.
3. Click “OK.”
4. When the Output to ASCII Parameters dialog appears, select from the
following options.
• To set the field size, click on the arrow buttons next to the “Total Field
Size” label to select a number, or type a number into the box.
• To set the number of digits that will follow the decimal point in the output
data, click on the arrow buttons next to the “Decimal Precision” label to
select a number, or type a number into the box.
5. Enter an output filename, or click the “Choose” button to select a filename.
6. Click “OK.”
The output ASCII file is created and can be viewed using any text editor.

Saving Files as ArcView Raster Files


To output data to an ArcView raster (.bil) format file (including .hdr and .stx
files):
1. Select File > Save File As > ArcView Raster (.bil).
2. When the Output ArcView Input Filename dialog appears, select the desired
file and perform any subsetting (see “Selecting a Spatial Subset” on page 45 or
“Selecting a Spectral Subset” on page 50).
3. When the Output File to ArcView dialog appears, enter the desired output
filename and click “OK.”
ENVI creates the.bil, .hdr, and .stx ArcView raster output files.

Saving Files as ER Mapper Files


To output data to an ER Mapper format file:
1. Select File > Save File As > ER Mapper File.
2. When the Output ER Mapper Input Filename dialog appears, select the input
file and perform any subsetting.
3. When the Output File to ER Mapper dialog appears, enter an output filename
and click “OK.”

ENVI User’s Guide Saving Files


122 Chapter 2: File Management

ENVI creates an ER Mapper output file.

Saving Files as ERDAS Files


To output data to an ERDAS (.lan) format file:
1. Select File > Save File As > ERDAS (.lan) File.
2. When the Output ERDAS Input Filename dialog appears, select the input file
and perform any subsetting.
3. When the Output File to ERDAS dialog appears, enter an output filename and
click “OK.”
ENVI creates an ERDAS .lan output file.

Saving Files as NITF Files


To output data, including any geographic or UTM georeferencing information, to a
National Imagery Transmission Format (NITF) version 02.00 (MIL-STD-2500A) or
02.10 (MIL-STD-2500B) format file:
Note
Currently ENVI’s NITF output uses a default Compliance Level of 99 and is not
certified.

1. Select File > Save File As > NITF.


2. When the NITF Output File dialog appears, select the output file and perform
any subsetting.
3. When the NITF Output Parameters dialog appears, select the NITF output
version from the button menu.
• To enter additional parameters such as originator information or header
details, click the “Additional Settings” button and enter the additional
information in the NITF Additional Parameters dialog.
4. In the NITF Output Parameters dialog, enter an output filename and click
“OK.”

Saving Files as PCI Files


To output data to a PCI(.pix) format file:
1. Select File > Save File As > PCI File.

Saving Files ENVI User’s Guide


Chapter 2: File Management 123

2. When the Output PCI Input Filename dialog appears, select the input file and
perform any subsetting.
3. When the Output File to PCI dialog appears, enter an output filename and click
“OK.”
ENVI creates a .pix PCI output file.

Saving Files as TIFF Files


To output to a TIFF file:
1. Select File > Save File As > TIFF.
2. When the file selection dialog appears, select an input filename and perform
any subsetting.
3. When the Output File to TIFF dialog appears, enter or choose an output
filename and click “OK” to start the output processing.
ENVI creates a TIFF output file.
Note
If you selected a georeferenced file as the input file, the output file will be a
GeoTIFF file with an associated TIFF world file (.tfw).

ENVI User’s Guide Saving Files


124 Chapter 2: File Management

Importing IDL Variables


Use Import IDL Variables to import IDL variables into ENVI. The variables must be
defined on the ENVI command line. See the ENVI Programmer’s Guide for details.
The Import IDL Variables function is not available in ENVI RT (run-time version).
1. Select File > Import IDL Variables.
The Import IDL Variables dialog appears with a list of all defined variables.
2. Select the desired variable names to import by clicking in the check box next
to the name.
• To add a range of variable names, enter the starting and ending variable
numbers and click the “Add Range” button.
• To select all the variable names, click on the “Select All” button.
• To clear the selected variable names, click on the “Clear” button.
3. To save a copy of the data in IDL, use the arrow toggle button to select “Yes.”
Note
If you select “No,” the data will be imported into ENVI and deleted from IDL.

4. Click “OK” to import the selected variables.


1-dimensional variables are placed in a plot window. 2- and 3-dimensional variables
appear in the Available Band List as memory items.

Importing IDL Variables ENVI User’s Guide


Chapter 2: File Management 125

Exporting to IDL Variables


Use Export to an IDL Variable to export and/or subset an ENVI band or file to an
IDL variable on the ENVI command line.
Tip
If the ENVI command line is not visible in the IDL window, select Window >
Command Input in the IDL window (Export to an IDL Variable is not available in
ENVI RT [run-time version]).

1. Select File > Export to an IDL Variable.


2. When the file selection dialog appears (see “Selecting Files in ENVI” on
page 42), select the band or file and perform any subsetting.
3. In the Export Variable Name dialog, select one of the following options:
• If the variable has been previously defined, click on the name of the
variable in the displayed list.
• In the “New Variable Name” text box, enter the name of an undefined IDL
variable.
4. Press the ENTER key on your keyboard.

Figure 2-12: In the new Export Variable Name dialog, enter an undefined IDL
variable name or select a previously defined variable.

The exported data will be available to use at the ENVI command line.

ENVI User’s Guide Exporting to IDL Variables


126 Chapter 2: File Management

Compiling IDL Code


Use Compile IDL Module if you have written your own IDL code to use in ENVI.
Every time you change the code you will need to compile it unless the code is in the
save-add directory and ENVI has been restarted (see Compiling in the ENVI
Programmer’s Guide).
1. Select File > Compile IDL Module.
2. When the Enter Module Filename file selection dialog appears, select your
module filename and click “OK.”
Any compile errors are shown in the main IDL window.

Compiling IDL Code ENVI User’s Guide


Chapter 2: File Management 127

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 will exhibit improved
performance.
Note
Only ENVI operations that utilize multi-threaded IDL routines are affected. For
more information, see the IDL documentation.

You can change the settings for how ENVI will use IDL’s thread pool during an
ENVI session by selecting File > IDL CPU Parameters. The “IDL CPU Parameters”
dialog displays.

Figure 2-13: IDL CPU Parameters Dialog

• Thread Pool number of Processors — The number of threads that IDL will
use in thread pool computations. The default value is equal to the value of the
number of CPUs on your system, so that each thread will have the potential to
run in parallel with the others. Note that 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.
• Thread Pool Minimum Elements — The number of data elements (each
element being a single data value of a particular data type) in a computation

ENVI User’s Guide IDL CPU Parameters


128 Chapter 2: File Management

that are necessary before IDL will use the thread pool. If the number of
elements is less than the number you specify, ENVI will perform 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 will be processed using the thread pool. Computations with
more than this number of elements will 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.
Set the Thread Pool Number of Processors, Thread Pool Minimum Elements, and
Thread Pool Maximum Elements and click “OK”.
Note
Changing the multi-threading options using the IDL CPU Parameters dialog will
only change the options for the current session. The settings will not be saved in the
envi.cfg file. For more information on how to change the settings in the
envi.cfg file, see “The ENVI Configuration File” on page 867.

IDL CPU Parameters ENVI User’s Guide


Chapter 2: File Management 129

Tape Utilities
Use Tape Utilities (Figure 2-14) to read MSS, TM, SPOT, AVHRR, AVIRIS,
NLAPS, and CEOS format radar data (including SIR-C/X-SAR, RADARSAT 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). 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 inputting 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.
Note
Tape functions are supported on UNIX, Microsoft Windows 95, Windows 98,
Windows 2000, and Windows NT platforms.

Figure 2-14: ENVI Tape Utilities Menu.

ENVI User’s Guide Tape Utilities


130 Chapter 2: File Management

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.”

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 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
EROS 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. The data can be subset directly from
tape.
1. Select File > Tape Utilities > Read Known Tape Formats > Landsat MSS.
The Landsat MSS - Load Tape dialog appears.

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 131

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” text
box(es).
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 text boxes labeled “Samples... To” and/or
“Lines...To” respectively.
4. Select bands to be read by clicking on the toggle buttons next to the desired
band names.
• To designate a range of bands, enter the beginning and ending band
numbers in the text boxes next to the “Add Range” button. Click “Add
Range.”
5. Select output to “File” or to “Memory.”
Tip
File output is recommended.

6. Click “OK” to start the tape processing.


A status window informs you of the tape format and processing progress.

ENVI User’s Guide Tape Utilities


132 Chapter 2: File Management

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 138). The data can be subset
directly from tape.
1. 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” text
box(es).
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 TM format data are identified, the TM Tape Output Parameters dialog
appears.
• To subset the image being read from tape, enter the starting and ending
lines and/or samples in the text boxes labeled “Samples... To” and/or
“Lines...To” respectively.
4. Select bands to be read by clicking on the toggle buttons next to the desired
band names.
• To designate a range of bands, enter the beginning and ending band
numbers in the text boxes next to the “Add Range” button. Click “Add
Range.”

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 133

5. Select output to “File” or to “Memory.”


Tip
File output is recommended.

6. Click “OK” to start the tape processing.


A status window informs you of the tape format and processing progress.

Reading AVHRR Tapes


ENVI reads both AVHRR LAC (HRPT) and GAC (in Level 1b format) data as
provided by NOAA. The data can be subset directly from tape.
1. 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.
• To change the tape record size, enter the values into the “MaxRecsize” text
box(es).
Tip
If you designate a different tape device, allow your operating system enough time to
register the new device before proceeding.

3. In the “File” text box, 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.
• To subset the image being read from tape, enter the starting and ending
lines and/or samples in the text boxes labeled “Samples... To” and/or
“Lines...To” respectively.
5. Select bands to be read by clicking on the toggle buttons next to the desired
band names.
• To designate a range of bands, enter the beginning and ending band
numbers in the text boxes next to the “Add Range” button. Click “Add
Range.”
6. Select output to “File” or to “Memory.”

ENVI User’s Guide Tape Utilities


134 Chapter 2: File Management

Tip
File output is recommended.

7. Click “OK” to start the tape processing.


A status window informs you of the tape format and processing progress.
Reading SPOT Tapes
ENVI automatically reads two types of SPOT data tapes: SPOT panchromatic data
(PAN) and SPOT multispectral data (XS). The data can be subset directly from tape.
1. 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.
• To change the tape record size, enter the values into the “MaxRecsize” text
box(es).
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 the data are identified as one of the supported SPOT data formats, the SPOT
Tape Output Parameters dialog will appear.
• To subset the image being read from tape, enter the starting and ending
lines and/or samples in the text boxes labeled “Samples... To” and/or
“Lines...To” respectively.
4. Select the bands to be 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 text boxes next to the “Add Range” button. Click “Add
Range.”
5. Select output to “File” or to “Memory.”

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 135

Note
File output is recommended.

6. 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. The data can be subset 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.

For help reading AVIRIS data tapes, see http://www.envi-sw.com/envitech.htm

1. 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.
• To change the tape record size, enter the values into the “MaxRecsize” text
box(es).
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 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.
• To subset the image being read from tape, enter the starting and ending
lines and/or samples in the text boxes labeled “Samples... To” and/or
“Lines...To” respectively.

ENVI User’s Guide Tape Utilities


136 Chapter 2: File Management

4. Choose the bands (and their corresponding wavelengths) to be 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 text boxes next to the “Add Range” button. Click “Add
Range.”
5. Select output to “File” or to “Memory.”
Tip
File output is recommended.

6. Click “OK” to start the tape processing.


A status window informs you of the tape format and processing progress.
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 prior to 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. Multiple DEMs can be automatically mosaicked together
from tape.
1. Select File > Tape Utilities > Read Known Tape Formats > USGS DEM.
2. When the DEM Tape Reader Input Parameters Dialog appears, enter the file
number of each DEM to be read into the “Tape File:” text box and press the
<Return> key.
The file numbers to be read appear in a list under the box.
3. Enter a root file name to be used 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 will be named
“test_2.”
• To have ENVI automatically mosaic files together, check the “Yes”
button.
• To have the numbered “temp” files that are created during the mosaic
process automatically deleted after mosaicking, check “Yes” next to the
“Delete temp files when done?”

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 137

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.
• To change the tape record size, enter the values into the “MaxRecsize” text
box(es).
Tip
If you designate a different tape device, allow your operating system enough time to
register the new device before proceeding.

6. Click “OK” to read the DEM data.


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.”
Tip
File output is recommended.

8. Click “OK” to start the tape processing.


A status window informs you of the tape format and processing progress.
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 prior to 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. Select File > Tape Utilities > Read Known Tape Formats > USGS DEM.
2. When the DEM Tape Reader Input Parameters Dialog appears, enter the file
number of each DLG to be read into the “Tape File:” text box and press the
return key.
The file numbers to be read appear in a list under the box.
3. Enter a root filename to be used for DLG output.

ENVI User’s Guide Tape Utilities


138 Chapter 2: File Management

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 will
be named test_2.
4. Click “OK” to continue.
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.
• To change the tape record size, enter the values into the “MaxRecsize” text
box(es).
Tip
If you designate a different tape device, allow your operating system enough time to
register the new device before proceeding.

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 places it in the Available Vectors List
(see “The Available Vectors List” on page 196).

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. These optional DEM files
can be read by using the ENVI dump tape utility (see “Dumping Tape Data” on
page 151). ENVI currently only reads UTM projection information from the header
file on tape. The data can be subset directly from tape.
1. 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.
• To change the tape record size, enter the values into the “MaxRecsize” text
box(es).

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 139

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 NLAPS format data are identified, the Landsat NLAPS Tape Output
Parameters dialog appears.
• To subset the image being read from tape, enter the starting and ending
lines and/or samples in the text boxes labeled “Samples... To” and/or
“Lines...To” respectively.
4. Select bands to be read by clicking on the toggle buttons next to the desired
band names.
• To designate a range of bands, enter the beginning and ending band
numbers in the text boxes next to the “Add Range” button. Click “Add
Range.”
5. Select output to “File” or “Memory.”
Tip
File output is recommended.

6. Click “OK” to start the tape processing.


A status window informs you of the tape format and processing progress.
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). You can subset all data types directly from tape to
conserve disk space. In addition, SLC data sets can be multilooked from tape with
integer or non-integer number of looks.
Note
Depending on the data type, the size of the SIR-C data scene, and the number of
data sets selected, the tape reading and processing could take from less than one
hour to several hours to complete.

1. Select File > Tape Utilities > Read Known Tape Formats > SIR-C CEOS.

ENVI User’s Guide Tape Utilities


140 Chapter 2: File Management

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.
• To change the tape record size, enter the values into the “MaxRecsize” text
box(es).
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 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.

Figure 2-15: The SIR-C Tape File Selection dialog.

4. Click on the box next to the desired data set(s) to choose the data to be read
from the tape.
• To designate a range of data, enter the beginning and ending numbers in
the text boxes next to the “Add Range” button. Click “Add Range.”
5. Click “OK.”

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 141

The SIR-C Tape Parameters dialog appears.


The SIR-C data sets 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 file names, and choose multilooking from tape if desired. Each data set will be
independently named and processed.
Subsetting SIR-C Data
1. In the SIR-C Tape Parameters dialog, click on a data set.
2. Click the “Spatial Subset” button.
3. Use standard ENVI spatial subsetting to subset the data. For instructions,
see “Selecting a Spatial Subset” on page 45.
Note
“Image” subsetting is not available because an image has not been synthesized at
this stage.

Multilooking SIR-C Data from Tape


Multilooking from tape can take a long time because of the start-stop tape movement
caused by processing data between tape reads.
Note
Only select this option if insufficient disk space is available to read the entire data
set. Multilooking on disk is much more efficient and is the preferred processing
option (see “Multilooking SIR-C Compressed Data” on page 852).

1. In the SIRC Tape Parameters dialog, click on a data set.


2. Click the “Multi-Look” button.

ENVI User’s Guide Tape Utilities


142 Chapter 2: File Management

Figure 2-16: The SIR-C Multilook Parameters dialog.

The SIR-C Multilook Parameters dialog appears.


3. Enter the multilooking parameters by selecting one of the following options:
• In the “Looks” text boxes, enter the desired number of looks in the range
(samples) and azimuth (lines) directions.
Both integer and floating point number of looks are supported.
• In the “Pixels” text boxes, enter the output number of pixels.
• In the “Pixel Size” text boxes, enter the output pixel size in meters.
When one of the parameters is entered, the others are automatically calculated
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
text boxes. 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 data set listed in the dialog.
Entering Output Filenames
1. In the SIR-C Tape Parameters dialog, click on a data set name in “Selected
SIR-C Tape Files” list.
2. In the “Enter Output Filename [.cdp]” text box, enter an output filename.
By convention, filenames should take the form filename_c.cdp and
filename_l.cdp.

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 143

3. Repeat steps 1 and 2 for each data set.


One compressed scattering matrix output file is created for each data set
selected.
4. Click “OK” to begin reading the tape and processing the data.
Reading RADARSAT CEOS Tapes
Use Read RADARSAT CEOS Tape to read RADARSAT CEOS data tapes onto disk
if you are running ENVI on UNIX and Windows platforms.
1. 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.
• To change the tape record size, enter the values into the “MaxRecsize” text
box(es).
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 for standard format RADARSAT data.
When the tape scan is completed, the RADARSAT Tape File Selection dialog
appears. A list of the RADARSAT data files on the tape appear in the “Select
Output Files” list.
4. Click on the box next to the data set(s) to be read from the tape.
• To designate a range of files, enter the beginning and ending numbers in
the text boxes next to the “Add Range” button. Click “Add Range.”
5. Click “OK.”
The RADARSAT Tape Parameters dialog appears. The RADARSAT data sets
that were selected in the RADARSAT Tape File Selection dialog are listed in
the “Selected RADARSAT Tape Files” list.

ENVI User’s Guide Tape Utilities


144 Chapter 2: File Management

RADARSAT Tape Options


Use the RADARSAT Tape Parameters dialog to select spatial subsetting from tape
and to assign output file names. Each data set will be independently named and
processed.
Subsetting RADARSAT Data
1. In the RADARSAT Tape Parameters dialog, click on a data set.
2. Click the “Spatial Subset” button.
3. Use standard ENVI spatial subsetting to subset the data. For instructions,
see “Selecting a Spatial Subset” on page 45.
4. Click “OK” to return to the RADARSAT Tape Parameters dialog.
5. Repeat steps 1 through 3 each data set listed in the dialog.
Entering RADARSAT Output Filenames
1. In the RADARSAT Tape Parameters dialog, click on a data set in the
“Selected RADARSAT Tape Files” list.
2. In the “Enter Output Filename” text box, enter a filename.
3. Repeat steps 1 and 2 for each data set listed in the dialog.
One image output file is created for each data set selected.
4. Click “OK” to begin reading the tape and processing the data.
The processed images appear in the Available Bands List and can be displayed and
processed using standard ENVI procedures.
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 (e.g., SLC,
MLC, etc.). Instead, use the specific SIR-C or RADARSAT tape tool or dump
the tape using ENVI’s Scanning Tapes and Customizing Dumps utility. Once
the complex files are on disk, they can be opened using the Open External File
menu or synthesized into images using ENVI’s radar tools. For more

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 145

information, see “Scanning Tapes and Customizing Dumps” on page 150, Chapter
13, “Radar Tools”.

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

1. Select File > Tape Utilities > Read Known Tape Formats > Read Generic
CEOS.
The CEOS Format - 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” text
box(es).
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 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. Click on the box next to the desired data set(s) to be read from the tape.
• To designate a range files, enter the beginning and ending numbers in the
text boxes next to the “Add Range” button. Click “Add Range.”
5. Click “OK.”
The CEOS Tape Parameters dialog appears.The CEOS data sets 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 file names. Each data set will be independently named and processed.
Subsetting CEOS Data
1. In the CEOS Tape Parameters dialog, click on a data set name.
2. Click the “Spatial Subset” button.

ENVI User’s Guide Tape Utilities


146 Chapter 2: File Management

3. Use standard ENVI spatial subsetting to subset the data. For instructions,
see “Selecting a Spatial Subset” on page 45.
4. Repeat steps 1 through 3 for each data set listed in the dialog.
5. Click “OK” to return to the CEOS Tape Parameters dialog.
Entering CEOS Output Filenames
1. In the CEOS Tape Parameters dialog, click on a data set name in the “Selected
CEOS Tape Files” list.
2. In the text box labeled “Enter Output Filename,” enter a filename.
3. Repeat steps 1 and 2 for each data set listed in the dialog.
One image output file is created for each data set selected.
4. Click “OK” to begin reading the tape and processing the data.
The processed images appear in the Available Bands List and can be displayed and
processed using standard ENVI procedures.

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 Table 2-2 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.

Table 2-2: ENVI Format Tape Structure

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 147

Data
File ID Rec ID Information
Type

2 ASCII 1024 bytes, Key word 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 thru 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)
5 BINARY Image2 (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-2: 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. Select File > Tape Utilities > Read/Write ENVI Tapes > Read ENVI Tape.
The ENVI Format - Load Tape dialog appears.

ENVI User’s Guide Tape Utilities


148 Chapter 2: File Management

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” text
box(es).
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 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 be read by selecting the toggle buttons next to the desired file
names.
• To select ranges of files, enter the beginning and ending files in the text
boxes 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 be read.
6. In the ENVI Tape to Output File dialog, select either “File” or “Memory”
output.
7. Click “OK” to start the tape processing.
A status window informs you of tape processing progress for each image file. The
bands in each file are added to the Available Bands List as the files are read.
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 (see “Opening Image Files” on page 65).
1. Select File > Tape Utilities > Read/Write ENVI Tapes > Write ENVI File to
Tape.
The Output ENVI Files to Tape dialog appears.

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 149

2. Click “Import ENVI File.”


3. When the standard input file selection dialog appears, select a file and perform
any spatial and/or spectral subsetting.
4. Click “OK.”
• To select additional files, repeat steps 2 and 3.
The selected files appear in the “Select ENVI Files to Output to Tape” list in
the Output ENVI Files to Tape window.
5. Select from the following options:
• To designate a different tape device, enter the device name in the “Tape
Device” text box.
Tip
If you designate a different tape device, allow your operating system enough time to
register the new device before proceeding.

6. Click “Accept.”
The ENVI Format - Load Tape window appears.
7. 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” text
box(es).
Tip
If you designate a different tape device, allow your operating system enough time to
register the new device before proceeding.

8. Click “OK” to have ENVI sequentially output the selected files to tape in
standard ENVI tape format.
A status window lists the progress as each file is written. The tape is rewound at the
end of the processing.

ENVI User’s Guide Tape Utilities


150 Chapter 2: File Management

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. 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” text box at the top of the window.
• To designate a different tape device, enter the device name in the “Tape
Device” text box.
Tip
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, click on an item in the list. Change the values as they
appear in the corresponding text boxes and press the <Return> key.
This allows combining files/records and selecting subsets of bytes to be
read.
• To add new items to the dump list, enter new values in the text boxes and
click the “Add Entry” button.

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 151

• To delete an entry from the list, click on 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 desired filename.
The default file extension is .fmt. (See “Tape Script Format (.fmt)” on
page 893).
• To recall previously saved Tape Scripts, select File > Restore Format and
select the desired 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 arrow toggle button to select either “Dump tape records to a single
output file” or “Dump each item to a separate output file.”
6. Enter an output filename and click “OK.”
If separate output files is selected, the output filename entered will be 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 will be output as “test_2” and “test_3.”
As the tape is dumped, the status is displayed 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. Select File > Tape Utilities > Dump Tape.
2. When the Dump Tape dialog appears, select from the following options.
The default tape device is automatically listed in the “Tape Device” text box at
the top of the window. The starting and ending file numbers to dump from the
tape are listed in the text boxes next to the “Dump Files” text label.
• To change the active tape device, enter the device name in the “Tape
Device” text box.

ENVI User’s Guide Tape Utilities


152 Chapter 2: File Management

Tip
If you designate a different tape device, allow your operating system enough time to
register the new device before proceeding.

3. Select output to a single output file or to separate files by clicking the


appropriate toggle button.
4. Enter an output filename and 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 is displayed in the ENVI Dump Tape to
Output File window.
• To interrupt the tape dump, click “Interrupt Tape Dump.”

Tape Utilities ENVI User’s Guide


Chapter 2: File Management 153

The Scan Directory List


Use Scan Directory List to scan directories to locate and open files. ENVI provides
recursive directory scanning, and allows you to select multiple files for opening. The
geo-browser option allows map browsing of the locations of georeferenced images
and opening of files based on their geographic location (see “Opening Files with the
Geo-Browser” on page 155).

Figure 2-17: Directory Scan dialog.

Entering Directories into the Scan Directory List


1. Select File > Scan Directory List.
2. When the Directory Scan Dialog appears, enter a directory name or use the
“Choose” button to select a directory.
• To add the selected directory to the Selected Directories List, click “Add.”
• To add the directory and all its sub-directories to the Selected Directories
List, click “Add Recursively.” (A “+” appears before the name of all
directories that will be scanned recursively.)
• To remove a directory from the Selected Directories List, highlight a
directory name in the list and click “Delete.”
• To clear the directory list, click “Clear.”

ENVI User’s Guide The Scan Directory List


154 Chapter 2: File Management

3. After ENVI lists all the directories to be scanned, click “OK.”


The Scanned ENVI Files dialog appears, containing a list of all the ENVI files
found with the listed directories. You may open multiple files using the
Scanned ENVI Files dialog.

Figure 2-18: The Scanned ENVI files list.

Note
If a header does not match its ENVI file, ENVI displays a warning message. The
Header Info dialog appears so that you may enter the correct information.

• To ignore the file with the warning, click “Cancel.”

Managing Files in the Scanned ENVI Files List


In the Scanned ENVI Files dialog, use the File and Options menus to manage the
Scanned ENVI Files List.
Opening Files
To open the file and place the image bands in the Available Bands List:
1. Click on a file name.
2. Select File > Open File.

The Scan Directory List ENVI User’s Guide


Chapter 2: File Management 155

Removing Files
• To remove a single file from the list:
1. Click on a file name.
2. Select File > Remove File.
• To remove all files from the list:
1. Click on a file name.
2. Select File > Remove All Files.
Adding New Directories
• To add a new directory and allow yourself to select files from within that
directory, select Options > Scan New Directory List.
The Directory Scan dialog appears.
Opening Files with the Geo-Browser
Use Geo Browser to scan files and open them based on their geographic location.
ENVI’s Geo-Browser allows map browsing of the locations of georeferenced images.
1. From within the Scanned ENVI Files dialog, select Options > Geo-Browser.
ENVI plots a world map with continent and country outlines. Within the
United States, state outlines also appear.
The locations of georeferenced images (the location of the reference pixel
designated in the ENVI header) are plotted 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.
Note
The mouse cursor’s latitude and longitude appear in the upper left corner of the
map.

2. Select from the following options:


• To change the size of the window, grab and drag one of the window
corners.
• To center the map on a point, click the left mouse button.
• To zoom in on the map area, hold and drag the middle mouse button.
• To zoom back out, click the middle mouse button.

ENVI User’s Guide The Scan Directory List


156 Chapter 2: File Management

Figure 2-19: ENVI’s Geo-Browser zoomed on the United States.

• To identify the file corresponding to a flag, click the right mouse button
near a flag.
ENVI highlights the corresponding file in the Located Files List.
For sites with multiple files, click the right mouse button multiple times to
highlight each corresponding file.
3. After you have selected a file by highlighting it, select File > Open File to
open it.

The Scan Directory List ENVI User’s Guide


Chapter 2: File Management 157

Changing Output Directories


To change the output default directory:
1. Select File > Change Output Directory.
2. When the “Change Output Directory” dialog appears, enter the full path of the
directory to which you want ENVI to send its output.
3. Click “OK” to change the current output directory to the new path.

Saving Sessions to Scripts


Use Save Session to Script to save currently open image files, image displays, and
their bands to an ENVI startup script. To execute this startup file see “Executing
Startup Scripts” on page 157.
1. Select File > Save Session to Script.
2. When the Output ENVI Script Filename dialog appears, enter the startup
filename (typically with the extension .ini).

Executing Startup Scripts


Use Execute Startup Script to open image files, load bands into displays, open vector
files, and open ROI files when starting ENVI. This script is automatically executed
when ENVI is started if a filename is set in the envi.cfg file. It can also be
executed at any time using the following procedure. A description of the ENVI
startup script commands is given in “ENVI Startup Script” on page 875.
1. Select File > Execute Startup Script.
2. Select the startup script filename and click “OK.”

Restoring Display Groups


Use Restore Display Group to restore display groups that have been saved to a text
file. For detailed instructions, see “Restoring Saved Display Groups” on page 216.

ENVI User’s Guide Changing Output Directories


158 Chapter 2: File Management

Using the ENVI Queue Manager


Use the ENVI Queue Manager to execute functions that have been “queued”
(see “Placing Un-executed Functions in Queue” on page 54).
Note
Results from one queued function cannot be used as input into another.

1. Ensure that all of the files needed to run the queued function(s) are opened and
are listed in the Available Bands List.
2. From the ENVI main menu, select File > ENVI Queue Manager.
The ENVI Queue Manager dialog displays a list of all queued functions.

Figure 2-20: The ENVI Queue Manager.

• To view the input filename of a queued function, click on the


function name.
Information about the spatial (Dims) dimensions, spectral (Pos)
dimensions, and subsets used is displayed in the “Procedure Input
Information” field.
• To delete a queued function, click on the name and click the
“Remove Selected” button.
3. In the “Queued Procedures List,” click on the function name(s).
4. Click the “Execute Selected” button.
The executed function name(s) is removed from the list. The resulting filename(s)
appears in the Available Bands List.

Using the ENVI Queue Manager ENVI User’s Guide


Chapter 2: File Management 159

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 file names used and can be
selectively turned 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
processing.
1. 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 or use the “Choose” button to select a filename.
If the same name as a previous file name is used, the log will be appended to
the bottom of the file.
4. Click “OK” to start the logging.

Closing all Files


1. When you have finished working with your files in ENVI, close them by
selecting File > Close All Files.
A warning message appears asking for confirmation.
Note
ENVI closes all disk files and removes all items from memory. Be sure to save all
your important memory items to disk before using this procedure.

2. Click “Yes.”

ENVI User’s Guide Logging Processing Information


160 Chapter 2: File Management

Setting ENVI Preferences


Use Preferences to view information about the current configuration of ENVI or to
change the current configuration. The Edit System Preferences dialog lists all of the
values contained in the envi.cfg file. Most entries are self-explanatory. For a
complete description of each parameter, see “The ENVI Configuration File” on
page 867.
1. Select File > Preferences.
The Edit System Preferences dialog appears with a list of System Preference
Categories.
2. Click on the button of the preference category that you want to change.
A different dialog appears depending on the which preference category you
select.

Figure 2-21: The Edit Configuration Values dialog.

Setting ENVI Preferences ENVI User’s Guide


Chapter 2: File Management 161

Figure 2-22: Two of the Edit Configuration Items Dialogs.

• Use “Default Directories” to set the data, temporary, output, spectral


library, alternative header, and save_add default directories.
• Use “User Defined Files” to set the graphics colors file, menu files, map
projection file, tape device name, previous files filename, the startup script
filename, user-defined motion routine, and user-defined move routine.
• Use “Display Defaults” to set the retain value, the default stretch, the
display window sizes, the zoom factor increment, the window position,
and the menu and edge border sizes.
• Use “8-bit Color Division” category to set the number of RGB and
grayscale colors used in the displays.
• Use “Postscript Output” to set the default output page size and offset in
units of inches or cm.
• Use “Plot Defaults” to set the colors, fonts, character size, window size,
margin sizes, axis thickness, and the number and size of tick marks used in
ENVI plot windows.
• Use “Memory Usage” to set the cache size and image tile size.

ENVI User’s Guide Setting ENVI Preferences


162 Chapter 2: File Management

• Use “Previous Files List” to mark files as “sticky” by clicking on the


filename and clicking the “‘Stick’ On” or “‘Stick’ Off” buttons.
“Sticky” files remain at the top of the Previous Files List and do not fall off
the end of the list as other files are opened.
• Use “System Graphic Colors” to edit the current colors that ENVI uses for
graphics (see instructions in the following section).
• Use “System Color Tables” to define new color tables, save them to
ENVI’s current list of color tables, and delete color tables from the current
list (see “Editing System Color Tables” on page 163).
• Use “Misc. System Preferences” to set the configuration name, the main
menu orientation, turn on and off IDL command line blocking, set whether
or not to exit IDL upon exit of ENVI, set whether to automatically append
default extensions to filenames, set whether to show a status window for
input, set the “auto apply” option for interactive stretching, set the error
catch mechanism for ENVI code, and set the maximum number of
multilist items, histogram bins, pulldown menu items, and vertices in
memory.
See “The ENVI Configuration File” on page 867 for a complete description of
each parameter.
3. In the preference dialog, edit the parameters to suit your needs.
4. Click “OK” to save the changes for the current ENVI session.

Editing System Graphic Colors


Use “System Graphics Colors” to edit the current colors that ENVI uses for graphics.
The colors are stored in the menu directory in the ASCII text file colors.txt.
ENVI uses this file unless a default graphic colors file is entered in the envi.cfg
file.
Tip
To add new colors to the graphic colors file, use a text editor to append the colors to
the end of the file (see “ENVI Graphic Colors File” on page 883).

1. In the Edit System Preferences window, click “System Graphics Colors.”


The Edit Graphic Colors dialog appears.
2. In the “Graphic Colors” list, click on the color to be edited.
• To change the color name, enter the name in the “Color Name” text box.

Setting ENVI Preferences ENVI User’s Guide


Chapter 2: File Management 163

• To change the color, select a color system from the button menu and use
the slider bars to adjust the variables.
Warning
It is not advised to change any of the first 5 colors (black, white, red, green, blue)
because they are used in the ENVI system. Changing graphic colors may affect
previously saved graphic overlays.

• To reset all the color to the original values, click “Reset.”


• To exit the function without applying the changes, click “Cancel.”
3. Click “OK” to apply the changes.
4. When the prompt appears, select one of the following options.
• To permanently apply the color changes, select “Yes.”
• To change the colors for the current ENVI session only, select “No.”

Editing System Color Tables


Use “System Color Tables” 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. In addition, 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 will function in 8-bit color mode, but the colors will not
appear as exact).

1. To ensure that all colors will be available, close all display and plot windows.
2. In the Edit System Preferences window, click the “System Color Tables”
button.

ENVI User’s Guide Setting ENVI Preferences


164 Chapter 2: File Management

The ENVI Color Table Editor dialog appears. The current color table is
displayed as a narrow gradiated color table on the left side of the dialog. A
white “positioning arrow” appears at the far left and right corners of the color
table. The current system colors are displayed in the “Color Palette Selection”
widget (see Figure 2-23).
3. Select a color system from the button menu next to the “System” label.
The color palette reflects the system change.
4. Select from the following options when defining the color table.
• To keep one color or element constant (i.e., 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, click on a point on the line with
the left mouse button and drag to the new position.
• To add points to the interpolation path through the colors, click on a
position in the color palette with the middle mouse button.
• To remove points from the interpolation line, click the right mouse button
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” arrow toggle button.
• To see the values of a specific color, click on the color with the left mouse
button.
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.

Setting ENVI Preferences ENVI User’s Guide


Chapter 2: File Management 165

Figure 2-23: The ENVI Color Table Editor dialog.

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” text box.
2. Select the color to be the lower value by clicking with the left mouse button 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” text box.
5. Select the color to be the upper value by clicking with the left mouse button on
the color in the color palette.
You may select the same color as the upper and lower value.

ENVI User’s Guide Setting ENVI Preferences


166 Chapter 2: File Management

6. Click the “Interp” button 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.”
2. When the Add Color Table dialog appears, enter a name into the text box and
click “OK.”
Note
If you do not have permission to write to the colors1.tbl file, you will be
prompted to enter a new color table filename.

Setting a New Color Table File


To use the new color table file in ENVI:
1. Select System > Edit Current Configuration.
2. Click the “User Defined Files” button.
3. In the Preferences: User Defined Files dialog, 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.
2. Click on the color table names that you want to remove.
• To select multiple color tables from the list, see “Selecting Multiple Items
in Lists” on page 52).
3. Click “OK.”
Note
If you do not have permission to write to the colors1.tbl file, you will be
prompted to enter a new color table filename.

Setting ENVI Preferences ENVI User’s Guide


Chapter 2: File Management 167

Importing Color Tables from ASCII Files


1. In the ENVI Color Table Editor, click “Import Color Table from ASCII.”
2. Select an input filename.
Note
The input file must be an ASCII file containing 256 lines, each containing 3
columns of red, green, and blue values.

Saving Preference Configurations


To make the changes permanent by saving them to the envi.cfg file:
1. In the Edit System Preferences dialog, select File > Save Configuration.
2. Select one of the following options:
• To save the new file without overwriting the old envi.cfg file,
enter an “envi.cfg” as the filename, but select a different directory
(see “Customizing ENVI” on page 865).
• To overwrite the current envi.cfg file, click “OK.”
Closing the Dialog
• To close the Edit System Preferences dialog, select File > Cancel.
Note
If you made changes to the system preferences without saving them, you will be
prompted to save them. To save the changes to a new or existing envi.cfg file,
either change the output directory or click “OK” as described “Saving Preference
Configurations”.

ENVI User’s Guide Setting ENVI Preferences


168 Chapter 2: File Management

Setting ENVI Preferences ENVI User’s Guide


Chapter 3:
Display Management

This chapter covers the following topics:

The Window Menu . . . . . . . . . . . . . . . . . . 170 ENVI Vector Windows . . . . . . . . . . . . . . . 204


Using the Window Finder . . . . . . . . . . . . . 171 Displaying Mouse Button Descriptions . . 208
Starting New Displays . . . . . . . . . . . . . . . . 172 Showing Display Information . . . . . . . . . 209
Starting New Vector Windows . . . . . . . . . 172 Displaying Cursor Location/Value . . . . . . 209
Starting New Plot Windows . . . . . . . . . . . 172 Collecting Points . . . . . . . . . . . . . . . . . . . 210
The Available Files List . . . . . . . . . . . . . . . 173 Maximizing Open Displays . . . . . . . . . . . 210
The Available Bands List . . . . . . . . . . . . . 176 Linking Displays . . . . . . . . . . . . . . . . . . . 210
ENVI Image Display Windows . . . . . . . . . 185 Closing all Display Windows . . . . . . . . . . 210
The Available Vectors List . . . . . . . . . . . . 196 Closing all Plot Windows . . . . . . . . . . . . . 210

ENVI User’s Guide 169


170 Chapter 3: Display Management

The Window Menu


Use the Window menu to control ENVI display and plot windows, including starting
new windows, maximizing window sizes, linking display windows, and closing
windows. Use it to access the Available Bands List and the Available Vectors List to
display bands and vector layers. Also use the Window menu to view display
information, to view cursor locations and pixel values for displayed images, to collect
points from display windows, and to open the Window Finder.

Figure 3-1: The Window menu.

The Window Menu ENVI User’s Guide


Chapter 3: Display Management 171

Using the Window Finder


Use the Window Finder to manage active ENVI windows and dialogs and to bring
windows that have been iconized or buried under other windows to the foreground.
The list contains the names of major active windows in the order that they were
opened. The list includes display window groups (Main, Scroll, Zoom), plot
windows, scatter plots, ROI definition windows, etc.

Figure 3-2: The Window Finder.

1. Select Window > Window Finder.


The ENVI Window Finder appears with the names of opened windows
displayed in a list.
2. To call a window to the foreground of your desktop, click on the name of a
window.
• Clicking on the name of a specific display number brings the Main Image
window and its associated Scroll and Zoom windows to the front.
• Clicking on any other window name brings that window to the front.
• If you click on the name of an “overlay” dialog (Annotation, ROI, Density
Slice, etc.) that was “hidden” using Overlay > Hide Layer, double-clicking
the dialog name hides the dialog again. For details about hiding dialogs,
(see “Showing and Hiding Overlay Dialogs and Layers” on page 220).
Note
The ENVI Window Finder always pops to the front of the display if bringing
an ENVI window forward causes it to be covered.

If the ENVI Window Finder is lost behind another window, select Window >
Window Finder to bring it to the front again.

ENVI User’s Guide Using the Window Finder


172 Chapter 3: Display Management

3. Close the ENVI Window Finder by selecting File > Cancel.

Starting New Displays


• To start a new, independent image display window, select Window > Start
New Display Window from the Display menu or from the ENVI main menu.
Each window started is numbered sequentially starting with Display #1. Display
windows may also be started using the “New Display” option in the Available Bands
List (see “Selecting the Active Display” on page 177).

Starting New Vector Windows


• To start a new, independent, Vector window, select Window > Start New
Vector Window.
Each window is numbered sequentially starting with Vector Window #1. New Vector
windows may also be started using the Options menu in the Available Vectors List
(see “Opening New Vector Windows” on page 198).

Starting New Plot Windows


• To start a new, independent, plot window select Window > Start New Plot
Window.
New plots may also be started using the Options menu in any plot window (see
“Creating New Plot Windows” on page 350).

Starting New Displays ENVI User’s Guide


Chapter 3: Display Management 173

The Available Files List


Use the Available Files List to get information about the files that are currently open
in ENVI and stored in memory. Also, use the Available Files List to open new files,
close files, save memory items to disk, and edit ENVI headers.
Tip
Use the Available Files List on a regular basis to remove memory-only calculations
from system memory.

• To display a list of all the currently open image files, select Window >
Available Files List.

Figure 3-3: The Available Files List.

Obtaining File Information


Use this procedure to view important information about each file.
• In the Available Files List, click on a filename.
ENVI displays information and parameters from the ENVI header file, including the
full path and image name; the number of lines, samples, and bands (Dims); the file
size; the interleave (BSQ, BIL, BIP); the data type (byte, integer, etc.); the file type;
the byte order of the data (Host or Network); and whether or not the data is
georeferenced and if any wavelengths are associated with the bands.

ENVI User’s Guide The Available Files List


174 Chapter 3: Display Management

Options in the Available Files List


Use the Options menu to edit file headers (see “Editing ENVI Headers” on page 99
for details).
1. From within the Available Files List, click on the filename.
2. Select Options > Edit Header.
3. When the Header Info: dialog appears, change parameters and click “OK” to
save the changes.

Managing Files from the Available Files List


Use the File menu options to open new files, close files, delete memory items, delete
files from disk, and save memory items to disk.

Opening New Files


1. From within the Available Files List, select File > Open New File.
2. When the file selection dialog appears, select the file and click “OK.”
• To select a group of files that are listed consecutively, click on the first file
in the group, press and hold the “shift” key, and click the last file in the
group. Or, click and drag with the left mouse button to select the desired
group.
• To select multiple files that are not listed consecutively, press and hold the
“ctrl” key on your keyboard and click on each desired file.
ENVI opens the file and adds it to the Available Files List. The file
information appears in the right side of the dialog.
Closing all Files
• To close all files (including memory items, which are automatically deleted),
select File > Close All Files from within the Available Files List.

Deleting Memory Items


• To remove files that exist only in memory without closing open disk files,
select File > Delete All Memory Items from within the Available Files List.
Warning
Memory items removed in this fashion are not recoverable.

The Available Files List ENVI User’s Guide


Chapter 3: Display Management 175

Saving Memory Files to Disk


1. In the Available Files List, click on the item to be saved.
2. In the Available Files List, select File > Save Selected File to Disk.
3. When the Memory to File Storage dialog box appears, enter an output filename
and click “OK.”
Deleting Files from Disk
1. In the Available Files List, click on the item to be deleted.
2. Select File > Delete Selected File from Disk.
Because this is a permanent action, a warning message appears to verify that
you want to permanently delete the file.
3. Click “Yes” to delete the file.
Closing Selected Files
1. In the Available Files List, click on the item to be closed.
2. Select File > Close Selected File.
Note
If a warning box appears, it means that one or more bands from the file are currently
displayed in one of the active display windows. Select “Yes” to close the file and to
remove the associated bands from the display.

If the file is a memory item, it is removed from memory and any associated displays
are closed.

Closing the Available Files List


• To close the Available Files List, select File > Cancel.

ENVI User’s Guide The Available Files List


176 Chapter 3: Display Management

The Available Bands List


Use Available Bands List to open the Available Bands List. Use the Available Bands
List to access the files and the individual bands of each image file that has been
opened during the current session. From the Available Bands List, display grayscale
and color images, start new display windows, open new files, close files, view meta
file components, and view displayed band information.
When you open a file for the first time during a session, ENVI automatically places
the filename, with all of its bands listed beneath it, into the Available Bands List
(Figure 3-4). If multiple files are opened, all of the files with all of the bands appear
in the Available Bands List sequentially, with the most recently opened file at the top
of the list. The bands of the files can be “folded” back into the filename to shorten the
list.
• To make the Available Bands List active, select Window > Available Bands
List.

Figure 3-4: The Available Bands List: The dialog on the left shows a Gray Scale
band ready to load into a display. The dialog on the right shows RGB bands
ready to load.

The Available Bands List ENVI User’s Guide


Chapter 3: Display Management 177

Selecting the Active Display


ENVI allows you to have multiple display windows open, with any combination of
grayscale and color images displayed. When you load images, you can select an
existing display or a new display to use for displaying your new images. The selected
display is called the “active display.”
When no display window is open, the button at the bottom of the Available Bands
List reads “No Display.” The first image loaded automatically appears in a new
window.
1. In the Available Bands List, click on the “Display #X” button menu (where
“X” is the number corresponding to the number in a display window’s title bar)
and select the display from the list.
• To start a new display, select “New Display” from the button menu.
2. Click “Load Band” or “Load RGB” to load the selected band(s) into the
active display.

Available Bands List Shortcut Menu


The Available Bands List has a shortcut menu for easy access to common
Available Bands List functions. The menu command that you select, with the
exception of Fold All Files, will be executed on the file to which the highlighted band
belongs. For descriptions of the individual functions, see the following sections.
1. To use the new shortcut menu, right-click on any band of the file.
2. From the shortcut menu that appears, select a menu command (see Figure 3-5).

ENVI User’s Guide The Available Bands List


178 Chapter 3: Display Management

Figure 3-5: The Available Bands List shortcut menu, accessed by right-clicking
in the file list.

Displaying Gray Scale Images


Note
If “default bands to load” have been set in the image header (.hdr) file, you do not
need to use the Available Bands List—the grayscale image will be automatically
loaded into a display group as soon as the file is opened. For details, see “Setting
Default Bands to Load” on page 105.

1. In the Available Bands List, select the “Gray Scale” toggle button.
2. Click on the input band name.
The band name appears in a small text box labeled “Selected Band.”
• If necessary, change the active display (see “Selecting the Active Display”
on page 177).
3. Click “Load Band” to load the band into the active display.

The Available Bands List ENVI User’s Guide


Chapter 3: Display Management 179

Tip
You can also load the grayscale image by double-clicking the bandname.

A status window displays the progress of the operation.


• To cancel loading the band into a display, click the “Cancel” button in the
status window.
The display window will be blank.
After the band is successfully loaded, a Main Image window, Zoom window, and
Scroll window (for large images) appears. ENVI displays all images with a default
2% linear stretch. You may change the default stretch in the envi.cfg file, or by
setting a default stretch in the image header file (see “Editing ENVI Headers” on
page 99).

Displaying Color Composite Images


Note
If “default bands to load” have been set in the image header (.hdr) file, you do not
need to use the Available Bands List—the color image will be automatically loaded
into a display group as soon as the file is opened. For details, see “Setting Default
Bands to Load” on page 105.

1. In the Available Bands List, select the “RGB Color” toggle button.
2. Click in sequence on the red, green, and blue bands to be displayed (or on
individual R, G, or B bands using the toggle buttons).
• If necessary, change the active display (see “Selecting the Active Display”
on page 177).
3. Once the band names have been loaded into the text boxes labeled “R,” “G,”
and “B,” click the “Load RGB” button to load the bands into the current active
image display (see “Selecting the Active Display” on page 177).
Tip
You can also load the image by double-clicking the blue bandname in the list of
available bands, or by using the shortcut menu (see “Available Bands List Shortcut
Menu” on page 177).

A status window displays the progress of the) operation.

ENVI User’s Guide The Available Bands List


180 Chapter 3: Display Management

• To cancel loading the bands into a display, click the “Cancel” button in the
status window.
The display window will be blank.
After the bands are successfully loaded, a Main Image window, Zoom window, and
Scroll window (for large images) appears. ENVI displays all images with a
default 2% linear stretch. You may change the default stretch in the envi.cfg
file (see “The ENVI Configuration File” on page 867), or by setting a default stretch
in the image header file.
Displaying True Color or Color Infrared Images
If a file has wavelengths in micrometers (µm) and it has bands in the needed
wavelength ranges, you can automatically display a true color image or a color
infrared image directly from the Available Bands List without having to designate the
individual bands for red, green, and blue.
Note
If your data does not have bands of the needed wavelengths, the bands nearest to the
wavelengths will be used. This may produce a gray scale image if red, green, and
blue are set to the same band.

The true color image is made by displaying the band in the red wavelength region
(0.6-0.7 µm) in red, the band in the green region (0.5-0.6 µm) in green, and the band
in the blue region (0.4-0.5 µm) in blue. The color infrared (CIR) image is made by
displaying the band in the near infrared wavelength region (0.76-0.9 µm) in red, the
band in the red region in green, and the band in the green region in blue.
• To automatically display a true color or color infrared image in the current
display window, select a band in the Available Bands List and right-click.
Select Load True Color to <current> or Load CIR to <current> from the
shortcut menu.
• To automatically display a true color or color infrared image in a new display
window, select a band in the Available Bands List and right-click. Select Load
True Color to <new> or Load CIR to <new> from the shortcut menu.

Options in the Available Bands List


Use the Options menu in the Available Bands List to select a band by wavelength,
to display shortened band names, to display information about displayed bands,
and to “fold,” all bands of each data set into single layers in the Available Bands List.

The Available Bands List ENVI User’s Guide


Chapter 3: Display Management 181

Locating Bands by Wavelength


For files with associated wavelength values in the file header, use the Wavelength
Locator to locate the band that contains a desired wavelength.
1. From the Available Bands List, select Options > Wavelength Locator.
2. When the Wavelength Locator dialog appears, enter the wavelength you want
to locate and click “Apply.”
The band containing that wavelength is highlighted in the Available Bands List.
• To close the Wavelength Locator dialog, click the “Cancel” button.
Showing Displayed Band Information
To display the names and wavelengths of the bands being used in an image display:
1. In the Available Bands List, select the display from the “Display #n” button
menu.
2. Select Options > Show Current Displayed Bands.
The band information appears in the “R,” “G,” and “B,” or “Selected Band” (for gray
scale) text boxes.
Folding Bands
In the Available Bands List and other band selection dialogs, there may be many
bands listed, especially when using hyperspectral data. You can “fold” or “hide” all
of the bands of a data set so that they appear on only one line. This keeps the lists
shorter and easier to work with.
Note
If a band is currently displayed in either a grayscale or RGB image, an “*” appears
next to the filename when it is folded.

Folding a Single Data Set


Data sets are loaded into the Available Bands List and other band selection dialogs in
an “unfolded” state by default. The names of unfolded data sets appear in this format:
-<filename>
Band
Band
• To fold a data set, click on the filename of the data set.

ENVI User’s Guide The Available Bands List


182 Chapter 3: Display Management

All of the bands of the data set are compressed and the data set appears in the
list in this format:
+<filename>[number of bands] (See Figure 3-6.)
• To “unfold” a data set and make it available for display, simply click the
folded filename.
Folding all Data Sets
• In the Available Bands List, select Options > Fold All Files, or right-click and
use the shortcut menu.
All of the bands of all of the data sets are compressed and each data set appears
in the list in this format: +<filename>[number of bands].
• To unfold a data set, click on the folded filename.
• To unfold all data sets, right click in the list of files and select Unfold All
Files from the shortcut menu.

Figure 3-6: The Available Bands List with the 6 bands of the bhtmref.img data
“folded” into one line.

The Available Bands List ENVI User’s Guide


Chapter 3: Display Management 183

Displaying Band Names


• To display a list of shortened band names in the Available Bands List, select
Options > Display Short Band Names.
• To list the full band names, select Options > Display Full Band Names.

Managing Image Files from the Available Bands List


Use the File menu in the Available Bands List to open new image files, list open
files, and close files.
Opening Files
• To select a new file to open:
1. In the Available Bands List, select File > Open Image File.
2. When the Enter Data Filename dialog opens, select your new file.
• To display a list of all open files:
In the Available Bands List, select File > Available Files List (see “The
Available Files List” on page 173).
Closing Files
Use Close Selected File or Close All Files to remove memory files or to close disk
files from the Available Bands List.
Closing Selected Files
• To close the file associated with the band(s) currently displayed in the
“Selected Band” text box or in the “R,” “G,” and “B” text boxes, select
File > Close Selected File from the Available Bands List menu, or right-click
in the displayed file list and select Close Selected File.
Tip
If you “close” one band from a disk file, ENVI closes the entire file and all of the
bands in the file disappear from the Available Bands List. However, the file still
exists on disk, and you can reopen it using File > Open Image File.

Closing All Files


To close all files in the Available Bands List and delete any items in memory:
1. Select File > Close All Files.

ENVI User’s Guide The Available Bands List


184 Chapter 3: Display Management

A warning dialog appears.


Warning
Once a memory file is deleted, there is no way to recover the image.

2. In the warning dialog, click “Yes.”


Hiding the Available Bands List
• To remove the Available Bands List from view while keeping the files it
contains open and the bands available, select File > Cancel.
• To recall the Available Bands List at any time, select Window > Available
Bands List from the ENVI main menu.

The Available Bands List ENVI User’s Guide


Chapter 3: Display Management 185

ENVI Image Display Windows


When you display an image file, it is placed in an ENVI image display group, which
consists of a Main Image window, a Zoom window, and a Scroll window (Scroll
windows for larger images only). Multiple image display groups can be on the screen
at once, but only one display group is active (see “Selecting the Active Display” on
page 177).
Note
Mouse functions change within each type of window. Mouse button function
descriptions for each window type are included in the following sections.

The Main Image Window


The Main Image window displays a portion of an image at full resolution. The
window is automatically created the first time you open an image. To open a new
display group, select from the following options:
• In a Main Image window or from the ENVI main menu, select Window > Start
New Display.
• In the Available Bands List, click “New Display” (see “Selecting the Active
Display” on page 177).
Resizing the Main Image Window
Select one of the following options to change the size of the Main Image window:
• Dynamically resize the Main Image window up to available screen size by
grabbing one of the corners and dragging to the desired image size.
• In the Main Image window, select File > Preferences and enter the size in the
Display Parameters dialog (see “Resizing Windows” on page 218).
• Change the default window size parameters set in the envi.cfg configuration
file (see Appendix A, “Installing and Customizing ENVI”).

Displaying Image Window Scroll Bars


Use the scroll bars in the border of the Main Image window to move around the
image. When you move the scroll bars, the graphic box in the Scroll window moves
to show you what part of the whole image you are in. There are three ways to display
the Image window scroll bars:

ENVI User’s Guide ENVI Image Display Windows


186 Chapter 3: Display Management

Figure 3-7: This Main Image window belongs to display number 1. The Zoom
Window Indicator (white box outline) is in the upper right corner.
Scroll bars are not displayed.

Displaying Scroll Bars at all Times


1. Select File > Preferences.
2. In the Edit System Preferences window, click “Display Defaults.”
The Preferences: Display Defaults dialog box appears.
3. Click the “Image Window Scroll Bars” arrow toggle button to select “Yes.”
4. Click “OK.”
5. In the Edit System Preferences window, select File > Save Configuration.
• To exit without saving, select File > Cancel.
6. Enter an output filename and click “OK.”

ENVI Image Display Windows ENVI User’s Guide


Chapter 3: Display Management 187

Turning Display Scroll Bars On/Off


• Right-click in the Zoom window and select Toggle > Display Scroll Bars Off
or On.
Or:
1. In the Main Image window, select File > Preferences.
The Display Parameters dialog appears.
2. Click the “Scroll Bars” arrow toggle button to select “Yes” or “No.”
3. Click “OK.”
Controlling the Zoom Window from the Main Image Window
In the Main Image window, the Zoom Window Indicator box outlines the area that is
displayed in the associated Zoom window.
• To change the region defined by the zoom box, move the box (the “Zoom
Window Indicator”) around the Main Image window.
Note
Some interactive processes change the mouse functions listed in Table 3-1. These
processes include defining Regions-Of-Interest, Annotation, and Dynamic Overlay.
These functions may be turned “off” to restore the mouse buttons to their normal
operation. To see which function has control of the mouse, see “Displaying Mouse
Button Descriptions” on page 208.

The Display Menu


Use the Display menu bar in the Main Image window to select common interactive
display functions. When a function is selected from one of the Display menus, the
function applies only to the active display (see “The Display Menu” on page 212).
Tip
You can access many Display menu interactive functions from the Main Image and
Zoom window shortcut menu. For details, see “Main Image and Zoom Window
Shortcut Menu” on page 213.

ENVI User’s Guide ENVI Image Display Windows


188 Chapter 3: Display Management

Mouse Button Functions in the Main Image Window

Mouse Button Function

Left Button • Click inside the Zoom window indicator and drag it to a
new location. The Zoom window updates when the button
is released.
• Click to center the Zoom window indicator over the current
pixel position. Continue to hold the button and drag to
continuously update the Zoom window.
• Double-click in the Main Image window to display the
Cursor Location/Value dialog.
Middle Button No function.
Right Button Click to display the shortcut menu.

Table 3-1: Functions of the Mouse Buttons in the Main Image window.

The Zoom Window


The Zoom window is a small image display window that displays a portion of the
Main Image window at a user-defined zoom factor. The Zoom window provides you
with unlimited zoom capabilities such as zooming in or out and panning.
Tip
You can access many Zoom window and Main Image Display menu functions from
the Zoom window shortcut menu. For details, see “Main Image and Zoom Window
Shortcut Menu” on page 213.

Resizing the Zoom Window


To resize the Zoom window, select from the following options:
• Dynamically resize the Zoom window by grabbing one of the corners and
dragging it to the desired image size. The corresponding Zoom window
indicator box in the Main Image window automatically changes its size and
shape to match the displayed Zoom window.
• In the Main Image window, select File > Preferences and enter the size in the
Display Parameters dialog (see “Resizing Windows” on page 218).

ENVI Image Display Windows ENVI User’s Guide


Chapter 3: Display Management 189

Zoom In
Zoom Out Turn Cross Hairs On/Off

Figure 3-8: The ENVI Zoom window with Symbol boxes on. Note the current
zoom factor of 10 is displayed in the window title bar.

• Change the default Zoom window size parameters set in the envi.cfg
configuration file (see Appendix A, “Installing and Customizing ENVI”).

Controlling the Zoom Factor of the Zoom Window


The current zoom factor is displayed as a number in parentheses in the Zoom window
title bar. The default zoom factor is 4.
Use the different mouse buttons and the Symbol boxes in the Zoom window to
change the zoom factor and to turn the display cross hairs on and off in both the
Zoom and Main Image windows. Table 3-2 describes the Zoom window’s symbol
functions and associated mouse button descriptions.

ENVI User’s Guide ENVI Image Display Windows


190 Chapter 3: Display Management

Mouse Button Functions in the Zoom Window


In addition to the mouse button functions associated with the Zoom window symbol
boxes and controlling the zoom factor, the left and right mouse buttons perform
differently when clicked anywhere else inside the Zoom window (not on the symbol
boxes). Table 3-3 describes those functions.

Zoom Window Symbol Function

Plus Click on with left mouse button to increase zoom


factor by 1.
Click on with middle mouse button to double the
zoom factor with each click (i.e., 2, 4, 8, 16...).
Click on with right button to return to the default
zoom factor of 4.
Minus Click on with left mouse button to decrease zoom
factor by 1.
Click on with middle mouse button to decrease
zoom factor by half.
Click on with right mouse button to return to the
default zoom factor of 4.
Cross Hair Box Click on with left mouse button to toggle cross
hairs on and off in Zoom window.
Click on with middle mouse button to toggle cross
hairs on and off in the Main Image window.
Click on with right mouse button to toggle the
zoom box and cross hairs in the Main Image
window on and off.
Double-Click with right mouse button to turn the
Main Image window scroll bars on or off.

Table 3-2: The Zoom Window Symbol functions with Mouse Button
Descriptions

ENVI Image Display Windows ENVI User’s Guide


Chapter 3: Display Management 191

Mouse Button Function

Left Button Click on desired pixel to center the Zoom window


on that pixel.
Or:
Click and hold to pan from the center of the
window in the direction of the cursor location. (The
speed of the pan varies with the cursor’s distance
from the center of the Zoom window —the closer
the cursor is to the center, the slower the pan.)
Middle Button No function.
Right Button Click to display the shortcut menu.

Table 3-3: Functions of mouse buttons inside the Zoom window.


Controlling Zoom Window Interpolation
You can set your preference for what kind of interpolation is used in the Zoom
window. The default setting is pixel replication, also known as nearest neighbor. Set
the interpolation by clicking the right mouse button in the Zoom window and making
a selection from the Zoom Interpolation menu or set it through the System
Preferences dialog as follows:
1. In the Main Image window, select File > Preferences.
2. From the “Zoom Interp” button menu, select the interpolation method:
“Nearest Neighbor,” “Bilinear,” “Bicubic,” or “Optimized Bicubic.”
Nearest neighbor uses pixel replication, bilinear does a linear interpolation
using 4 pixels, bicubic uses 16 pixels for the interpolation, optimized bicubic
provides the best interpolation.
Note
When you use the Cursor Location/Value window to view values in the Zoom
window, the values you see reported are from the original data, not the interpolated
data.

ENVI User’s Guide ENVI Image Display Windows


192 Chapter 3: Display Management

The Scroll Window


The Scroll window is a small image display window that appears only when the main
image is larger than can be displayed in the Main Image window at full resolution.
The image in the Scroll window is displayed at subsampled resolution. The
resampling factor appears in parenthesis in the title bar. The Main Window Indicator
appears as a box within the scroll window and outlines the area that is displayed in
full resolution in the Main Image window.

Resizing the Scroll Window


To resize the Scroll window, select one of the following options:
• Dynamically resize the Scroll window by grabbing a corner and dragging to
the desired image size.
The resampling factor changes to reflect the new size of the scroll window.
• In the Main Image window, select File > Preferences and enter the size in the
Display Parameters dialog (see “Resizing Windows” on page 218).
• Change the default Scroll window size using the parameters set in the
envi.cfg configuration file (see Appendix A, “Installing and Customizing
ENVI”).

Controlling the Main Image Window from the Scroll Window


The size of the Main Window Indicator box in the Scroll window is directly linked to
the size of the Main Image window. If you change the size of the Main Image
window, the Main Window indicator will also change sizes. If you resize the Main
Image window so that the entire image appears at full resolution, the Scroll window
will disappear because it is no longer needed. If you subsequently resize the Main
Image window so that the full image cannot be shown at full resolution, the Scroll
window automatically reappears.

ENVI Image Display Windows ENVI User’s Guide


Chapter 3: Display Management 193

Figure 3-9: The Scroll window. Note the Main Image window indicator box
(box outline) in the center of the image.

• To control the location of the Main Window Indicator, follow the directions
given in Table 3-4.

Scroll Window Meta Zoom


When very large images are displayed, the Scroll window image may be subsampled
so much that it is difficult to see image features. The Scroll window Meta Zoom
capability allows you to zoom into an area and reduce the subsampling factor in the
Scroll window. The zoomed area replaces the full image in the Scroll window and is
used as the full data set. The original Scroll window image can be re-displayed with a
mouse click (see Table 3-4 for mouse button functions).
Note
The Scroll window meta zoom will not zoom if the area selected is smaller than the
current Main Image window size.

• To zoom in the Scroll window, click and drag using the middle mouse button
to draw the meta zoom indicator box around the desired area. This area
replaces the image in the Scroll window.
• To display the original full image in the Scroll window, click the right mouse
button in the Scroll window.

ENVI User’s Guide ENVI Image Display Windows


194 Chapter 3: Display Management

Mouse Button Functions in the Scroll Window


Table 3-4 outlines the mouse button functions in the Scroll window.

Mouse Button Function

Left Button Click anywhere outside the Main Image window indicator box
in the Scroll window and drag. The Zoom and Main Image
windows update continuously.
Click, drag, and release the Main Window indicator box to
reposition the Main Image. The Zoom and Main Image
windows update when you release the mouse button.
Or:
Click to center the Main Image indicator box and Main Image
display over the selected pixel.
Middle Button Click and drag meta zoom box.
Right Button Click to display the shortcut menu.

Table 3-4: Functions of mouse buttons inside the Scroll window

Scroll Window Shortcut Menu


Use the Scroll window shortcut menu to quickly access Scroll window options.
1. To use the shortcut menu, right-click anywhere in the Scroll window:
2. Select from the following options:
• Select Reset Scroll Range to reset the range of the Scroll window to the
full image when the Meta Zoom feature is applied.
• Use Hide Zoom Window and Hide Scroll Window to minimize the Zoom
and/or Scroll window, respectively.
• Use <Find Display> to locate the Main Image window associated with the
current Scroll window and to display it in front of the other open windows.

Positioning the Zoom and Scroll Windows


• To position the Zoom and Scroll windows with respect to the Main Image
window, select Window > Scroll/Zoom Location > location from the Display
menu in the Main Image window.

ENVI Image Display Windows ENVI User’s Guide


Chapter 3: Display Management 195

• To position the Zoom or Scroll window, click the title bar and drag the window
while holding the left mouse button.

Locking Window Placement


• To ensure that windows remain where they are placed, select Window >
Scroll/Zoom Location > Auto Placement Off.
The windows will remain in place until you move them again.

Hiding Scroll/Zoom Windows


• To “hide” the Zoom and/or Scroll windows on Microsoft Windows platforms,
click the button in the right corner of the window.

Unhiding
• To show the hidden Zoom and/or Scroll windows, select Window > Show
Zoom Window or Show Scroll Window.
• Right-click in the Image, Zoom or Scroll window and click <Find Display> to
bring up the associated hidden Zoom and/or Scroll window(s).
Note
The Show... menu selections are only available if the corresponding window is
hidden.

ENVI User’s Guide ENVI Image Display Windows


196 Chapter 3: Display Management

The Available Vectors List


Use the Available Vectors List to load vectors into a vector window or to overlay
them on a displayed image. You can simultaneously overlay vector layers of different
projection types or overlay vector layers that have projection types different than the
image. The image or the first vector layer displayed sets the projection type and all
other layers are automatically converted to that projection type.
When you load a vector file into memory for the first time during an ENVI session,
ENVI places the vector layers into the Available Vectors List automatically (Figure
3-10). Data files that will appear in the Available Vectors List include ENVI Vector
Files, DLG, SDTS, DXF, or ARC/INFO Interchange and ArcView Shape files. If
multiple vector files are opened, all of the layers for all of the files appear in the
Available Vectors List sequentially, with the layers of the most recently opened file
at the top of the list.
From the Available Vectors List, select vector files to display as an overlay on an
image or in a separate vector window.
• To stretch and resize the Available Vectors List, click on any corner of the
dialog with the left mouse button and drag to the desired size and/or shape.

Loading Vectors for Display


Follow these steps to display vector files in ENVI:
1. From the ENVI main menu, select Window > Available Vectors List.
All open vector layers appear in the Available Vectors List.
2. Click on the layer name.
• To select all of the layers, click on “Select All Layers.”
• To clear all of the layers, click on “Deselect All Layers.”
• To remove a layer from the list, click on the name and click
“Remove Selected.”
3. Click on “Load Selected” in the Available Vectors List to load the vectors to a
vector or display window.
4. When the Load Vector Layers dialog appears, select a vector destination
display window by clicking on a window name.

The Available Vectors List ENVI User’s Guide


Chapter 3: Display Management 197

Figure 3-10: The Available Vectors List.

• If any image display windows are open, the display names (i.e. Display
#1) appear in the list. Click on the desired display window name to plot the
vectors over the displayed image.
• If any vector windows are open, the vector window names (i.e. Vector
Window #1) appear in the list. Click on the desired vector window name to
plot the vectors in that window.
• To plot the vectors in a new vector window, select “New Vector Window.”
5. Click “OK.”
The Vector Parameters dialog appears with the selected vectors listed (see “The
Vector Parameters Dialog” on page 206).

ENVI User’s Guide The Available Vectors List


198 Chapter 3: Display Management

Options in the Available Vectors List


Use the Options menu in the Available Vectors List to start a new vector window,
remove all the vector layers from memory, edit the layer names, change projection
types, convert layers from one projection type to another, create various world
boundaries vectors, and create new empty vector layers.

Opening New Vector Windows


• To start a new empty vector window and an associated parameters dialog,
select Options > Start New Vector Window.
Deleting Layers from Memory
• To delete all the vector layers from memory, select Options > Remove All
Layers.
Note
Once vectors are deleted from memory, the only way to recover the layers is to read
them from disk again.

Editing Layer Names


1. Select Options > Edit Layer Names.
2. When the Edit Layer Names dialog appears, click on the name of the layer that
you want to change.
The name appears in the “Edit Selected Item” text box.
3. Edit the name in the text box.
• To return the layer to its unedited name, click “Reset.”
4. Click “OK.”
Changing Projection Types
1. Select Options > Edit Layer Projection.
2. When the Edit Layer Projection dialog appears, select a new projection type by
clicking on it (see “Selecting Map Projection Types” on page 757).
3. Click “OK.”

The Available Vectors List ENVI User’s Guide


Chapter 3: Display Management 199

Note
Changing the projection type does not affect any data points; it only changes the
projection name.

To convert between projections, see the following section. For more map projection
information, see Chapter 10, “Map Tools”.

Converting Layer Projections


Use Convert Layer Projection to convert layers from one projection type to another.
1. Click on the layer name in the Available Vectors List.
2. Select Options > Convert Layer Projection.
3. When the Convert Layer Projection dialog appears, select a projection type
from the list (see “Selecting Map Projection Types” on page 757).
4. Enter a new layer name, if desired.
5. Select output to “File” or “Memory.”
6. Click “OK.”
For more information on converting projections, see “Converting Map Projections”
on page 762.
Creating 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 layer(s), in
units of pixels. If your vectors are overlaid on a display window, the displayed image
is used to create the output buffer zone image. If the vectors are displayed 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.
1. In the Available Vectors List, click on the name(s) of the vector(s) to use in the
buffer zone image.
If you select more than one layer, the distance will be from the pixel to any of
the selected layers.
2. Select Options > Calculate Buffer Zone.
3. When the Select Associated Data File dialog appears, select the file associated
with your vectors.
The Buffer Zone Image Parameters dialog appears.

ENVI User’s Guide The Available Vectors List


200 Chapter 3: Display Management

4. Click the “Maximum Distance” arrow increment buttons to set the maximum
distance to measure, or type the value (in pixels) into the corresponding text
box.
Any pixels with a distance larger than this value will be set to the maximum
distance value +1.
5. From the Distance Kernel button menu, select “Floating Point” or “Integer”
output.
6. Select output to “File” or “Memory.”
7. Click “OK.”
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 a high resolution
or a low resolution database.
1. Select Options > Create World Boundaries.
Tip
You can also create world boundaries by selecting Vector > Create World
Boundaries from the ENVI main menu.

The Create Boundaries dialog appears.


2. Select the layers by clicking the check box next to their names.
• 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 text boxes.
• To create world boundary layers for the entire world, do not enter latitude
and longitude coordinates.
4. Select output to “File” or “Memory.”
One output .evf file is created for every selected layer and named with a
layer abbreviation appended to the root filename. The high resolution layers
are named with a “_hp”, “_hc”, or “_hr” for the political boundaries, the

The Available Vectors List ENVI User’s Guide


Chapter 3: Display Management 201

coastlines, or the rivers, respectively. The low resolution layers are named
similarly but with an “_lp”, etc. The USA States layer have “_usa” appended
to the root name.
Warning
Building layers from the high resolution database creates very large output files
(~20 MB each).

5. Click “OK” to build the vector layers.


The selected layers appear in the Available Vectors List.
Creating New Layers
Use Create New Vector Layer to create a new empty vector layer so you can enter
your own vector layers of polygons, lines, or points and attributes. These vector
layers can have the same projection and geographic boundaries (size) as existing
vector layers, georeferenced raster images, or can be based on user-defined input. An
empty vector layer can also be created from non-georeferenced raster images for
drawing vectors over those images.
Tip
You can also create vector layers by selecting Vector > Create New Vector Layer
from the ENVI main menu (see “Creating Vector Layers” on page 777).

From Existing Layers


1. Select Options > Create New Vector Layer > Using Existing Vector Layer.
2. When the New Vector Layer Parameters dialog appears, click on the name of
the vector layer to use to set the projection and size boundaries.
3. When the New Vector Layer Parameters dialog appears, enter a layer name,
and select “File” or “Memory” output.
From Projection and Boundaries of a Raster Image
1. Select Options > Create New Vector Layer > Using Raster Image File.
2. When the Select Image File for New Vector Layer dialog appears, select the
image file and click “OK.”
3. When the New Vector Layer Parameters dialog appears, enter a layer name,
and select “File” or “Memory” output.

ENVI User’s Guide The Available Vectors List


202 Chapter 3: Display Management

From User-Defined Parameters


1. Select Options > Create New Vector Layer > Using User Defined Parameters.
2. When the New Vector Layer Parameters dialog appears, select the desired
projection type and enter a Zone number if needed (see “Selecting Map
Projection Types” on page 757).
3. Enter the bounding box coordinates in the selected projection units in the
“X/Ymin” and “X/Ymax” text boxes.
4. Enter a layer name and select “File” or “Memory” output.
The new layer is listed in the Available Vectors List. From the Available Vectors
List, you can load the layer into a vector window and draw vectors and add attributes
to it (“Working with Vector Layers” on page 296).

Managing Vector Files from the Available Vectors List


Use the File pulldown menu in the Available Vectors List to open new vector files,
export vector layers to a region of interest (ROI) or ArcView file, and to save layers
from memory to a file.
Tip
ENVI vector files can be converted to DXF using Vector > Convert EVF to DXF
(see “Converting EVFs to DXF Files” on page 786).

Opening Files
1. In the Available Vectors List, select File > Open Vector File > vector file type.
2. When the standard file selection dialog appears, select the file (see “Opening
Vector Files” on page 89 for details).
Exporting Vector Layers to a Region of Interest (ROI)
1. In the Available Vectors List, select the vectors to export by clicking on their
names.
2. Select File > Export Layers to ROI.
3. When the Select Data File to Associate with new ROIs dialog appears, select
the data file.
The ROI names are listed in the Region of Interest Controls dialog.

The Available Vectors List ENVI User’s Guide


Chapter 3: Display Management 203

Warning
This can create very large ROIs!

Exporting Vector Layers to an ArcView Compatible Fileset


Use this procedure to export vector layers to an ArcView-compatible fileset, which
includes a shape file (.shp), an index file (.shx), and a data base file (.dbf).
1. In the Available Vectors List, select the vectors to export by clicking on their
names.
• To export all of the layers, click “Select All Layers.”
• To select multiple layers, but not all layers, click on each layer that you
want to export while holding down the “ctrl” key on your keyboard.
2. Select File > Export Layers to ArcView.
• If you decide to not load any vectors from the Available Vectors List,
select File > Cancel to exit it without removing the loaded vectors from
memory.
3. When the Output Layer to ArcView Shape File dialog appears, enter the
desired output filename and click “OK.”
This dialog appears for each layer selected.
Each ArcView vector file can contain only one type of vector (polygon, point, etc.),
so ENVI uses a base name and appends extensions to the base name for each vector
type. The extensions used are .pg for the polygons, .pl for the polylines, and .pt for
the points.
Warning
The vector layers that are exported to ArcView must be topologically correct or the
results in ArcView will be unpredictable.

Saving Vector Layers


Vector layers listed in the Available Vectors List are currently in memory. Use this
procedure to save them to a file.
1. In the Available Vectors List, select the layer by clicking on the name.
2. Select File > Save Memory Layers to File.
3. Enter an output filename.

ENVI User’s Guide The Available Vectors List


204 Chapter 3: Display Management

ENVI Vector Windows


ENVI provides a stand-alone GIS plot window for displaying vector data and
composing simple vector-only maps. ENVI also provides vector overlays on standard
ENVI displays that include true vectorization of overlays in all windows, including
the Zoom window. Full precision of vector data is maintained and “pixellation” is
avoided. Vectors can be read from a variety of input files and new vector layers can
be created and drawn in a vector window or over images. Latitude/longitude and map
coordinate information can be displayed while interactively tracking vectors. A
Vector Information window allows display of attribute information in real-time as the
cursor tracks each vector. You can query vector GIS attribute information directly to
generate new layers of selected information with attributes. You can create ArcView
Shape Files and associated .dbf attribute files and indexes, or DXF files from
internal ENVI .evf format. New vector layers generated using ENVI’s robust image
processing capabilities, and changes made to vector layers in ENVI are easily
exported to industry standard GIS formats.
ENVI Vector Windows provide you with a way 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 ArcView Shape files. You can
view, edit, and query attributes associated with ArcView Shape files and can also
create your own vector files and attributes. ENVI Vector Windows consist of a vector
display window or image window and a #N Vector Parameters dialog that controls
the appearance of the vectors and interaction with the vector attributes.

Cursor Functions in Vector Windows


Cursor and mouse functions in vector windows work differently than they do in
ENVI display windows. Cursor functions in the vector windows change
depending on the mode selected in the Vector Display Parameters dialog. Table 3-5
lists the functions of the mouse buttons when you place the cursor in a vector window
and the “Cursor Query” mode is active. See “Controlling Cursor Modes” on page 301
for cursor functions in the other modes. More detail on these functions can be found
in the following sections.

ENVI Vector Windows ENVI User’s Guide


Chapter 3: Display Management 205

Mouse Button Function

Left Button when Snap to the nearest vector and track map coordinates and
layer is “on” Latitude/Longitude in the Vector Window. (The coordinates
(indicated by an appear listed in the Vector Parameters dialog.)
asterisk [*] next to
the layer name).
Left Button when No snap applied. Independently track map coordinates and
layer is “off” (no Latitude/Longitude in the Vector Window. (The coordinates
asterisk [*] next to appear listed in the Vector Parameters dialog.)
the layer name).
Middle Button. Increase zoom factor by dragging to form a zoom box inside
the window. Decrease zoom factor with single click inside
the window.
Pan the display by clicking at the edge of the window to
center window display around the point.
Right Button Click to display the shortcut menu. For details, see “Vector
Window Shortcut Menu” on page 304.

Table 3-5: Function of Mouse Buttons in the Vector Window.

Zooming in Vector Windows


Use this procedure to zoom in on a section of the vector window.
1. Press and hold the middle mouse button at one corner of a box defining the
“magnify” region and drag the corner to make the region the desired size.
2. Release the middle mouse button.
ENVI redraws the enlarged zoom region in the vector window.
3. To zoom out, click the middle mouse button inside the zoomed region.
The vector display steps backward through the previous zoom levels.
Panning in Vector Windows
• To pan to another region in the vector window, click the middle mouse button
near the edge of the vector window.
The vector window display is centered on that point.

ENVI User’s Guide ENVI Vector Windows


206 Chapter 3: Display Management

Cursor Tracking in Vector Windows


If you are attempting image-to-map registration (see “Registration” on page 701),
you need to find the location of your cursor. If vectors are displayed in a Vector
Window and not on an image, ENVI reports the position of the cursor in a vector
window by displaying it in the “Location” text box of that window’s associated
Vector Parameters dialog (see Figure 3-11).
1. Select a layer by clicking on the layer name in the “Available Vector Layers”
list of the Vector Parameters dialog.
2. Double-click on the layer name to turn the layer on or off.
An asterisk (*) next to the layer name indicates that a layer is “on.” When on,
the vector cursor snaps to the nearest vector in the selected layer. When off, no
snap is applied and the cursor freely tracks position anywhere in the window.
In either case, clicking and dragging using the left mouse button in the Vector
Window causes the map coordinates of the cursor’s location to be listed in
Easting, Northing order next to the “Location” text label. Latitude and
longitude are listed directly under the map coordinates.
• To continue image-to-map registration, follow the steps listed in “Exporting
Vector Coordinates” on page 298.

The Vector Parameters Dialog


Vector data often consist of multiple layers of vector data. For example, Figure 3-11
shows that the available vector layers include “Cities,” “Counties,” “Roads,” and
“States.” Use the Vector Parameters dialog, which appears with a vector
window(Figure 3-11), to control the appearance of vector layers, to add new vectors,
export vector layer coordinates for use in image-to-map registration, and to view,
edit, and query vector attributes (see “Working with Vector Layers” on page 296 for
details).

ENVI Vector Windows ENVI User’s Guide


Chapter 3: Display Management 207

Figure 3-11: A Vector Window (left) and its associated Vector Parameters
Dialog.

Vector Attributes
Vector layers may have attributes associated with them. ENVI can read ArcView
Shape file attributes and interact with them. You can use the cursor to select vectors
in the vector window and highlight the associated attributes or select an attribute and
highlight the associated vector. You can do a vector attribute query to create new
vector layers with attributes selected using simple mathematical and logical
operators. ENVI also allows you to edit the existing attributes or to add new attributes
to vectors. Point attribute names can be plotted in the vector window and point
symbol sizes associated with attribute values (see “Vector Attributes” on page 309
for instructions).
Note
Currently ENVI only reads ArcView Shape file attributes or attributes added
using ENVI functions.

ENVI User’s Guide ENVI Vector Windows


208 Chapter 3: Display Management

Displaying Mouse Button Descriptions


Use Mouse Button Descriptions to view the functionality of the mouse buttons for the
window in which the cursor is located. As the cursor is moved from window to
window, the mouse button descriptions are updated. The displayed information
includes the window type (e.g., display, plot), the function that has the cursor control
(e.g., ROIs, Dynamic Overlay), and the actions for each mouse button (MB1: left
mouse button, MB2: middle mouse button; MB3: right mouse button).
Note
If the mouse buttons are not responding as you expect, display the mouse button
descriptions to check which function is in control of the cursor.

To display the mouse button description dialog, select one of the following options:
• From the ENVI main menu, select Window > Mouse Button Descriptions or
Help > Mouse Button Descriptions.
• From the Display menu, select Window > Mouse Button Descriptions.

Figure 3-12: The Mouse Button Descriptions dialog.

Displaying Mouse Button Descriptions ENVI User’s Guide


Chapter 3: Display Management 209

Showing Display Information


Use Display Information to view information about the display window in which the
cursor is currently located. The information is updated as you move the cursor
between the open display windows. The displayed information includes the display
number, number of colors used, bands displayed, the type of stretch currently applied
to each band, and the sizes and pixel ranges of the image, zoom, and scroll windows.
• From the ENVI main menu or the Display menu, select Window > Display
Information.
The Display Information window appears.

Figure 3-13: The Display Information window.

Displaying Cursor Location/Value


Use Cursor Location/Value in any image window 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.
Select one of the following options to open the Cursor Location/Value window:
• In the Main Image window, double-click with the left mouse button.
• From the Display menu, select Tools > Cursor Location/Value.
• From the Display menu or from the ENVI main menu, select Window >
Cursor Location/Value. For detailed information, see “Viewing Cursor
Location and Value” on page 393.

ENVI User’s Guide Showing Display Information


210 Chapter 3: Display Management

Collecting Points
Use Point Collection to collects points (both pixel locations and map locations) from
display windows. The points are displayed in a table in the ENVI Point Collection
window.
• Select Window > Point Collection.
For detailed information and instructions, see “Collecting Points” on page 368.

Maximizing Open Displays


• To resize all display windows to fit the available screen space, select Window
> Maximize Open Displays from the Display menu or from the ENVI main
menu.
For example, if four displays are open, each display will be resized to fill one-fourth
of the available screen.

Linking Displays
Use display linking to link multiple displays so that all actions in one display are
mirrored in the others. Dynamic overlays are active when displays are linked
(“Working with Multiple Dynamic Overlays” on page 334).
• To link displays, select Window > Link Displays.
Displays may also be linked using the Tools menu in any display or by using the
Zoom window and Main Image window shortcut menus (see “Linking Images” on
page 333 and “Main Image and Zoom Window Shortcut Menu” on page 213).

Closing all Display Windows


• To close all open image displays, select Window > Close All Display Windows
from the Display menu or from the ENVI main menu.

Closing all Plot Windows


• To close all open plot windows, select Window > Close All Plot Windows.

Collecting Points ENVI User’s Guide


Chapter 4:
Interactive Display
Functions
This chapter covers the following topics:

Creating Vector Layers . . . . . . . . . . . . . . . 215 Using the Line of Sight Calculator . . . . . . 372
Saving Display Groups . . . . . . . . . . . . . . . 216 Using the Spatial Pixel Editor . . . . . . . . . 374
Setting Display Preferences . . . . . . . . . . . . 217 Using the Spectral Pixel Editor . . . . . . . . 377
Overlays . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 Creating Animations . . . . . . . . . . . . . . . . 378
Contrast Stretching and Quick Filtering . . 316 Using 2-D Scatter Plots . . . . . . . . . . . . . . 382
Using Interactive Stretching . . . . . . . . . . . 321 3-D Surface Views . . . . . . . . . . . . . . . . . . 391
Display Linking and Dynamic Overlays . . 333 Starting a New Display Group . . . . . . . . . 392
Interactive Profiles and Spectral Plots . . . . 337 Closing Display Groups . . . . . . . . . . . . . . 393
Extracting Polarization Signatures . . . . . . 356 Closing All Displays . . . . . . . . . . . . . . . . 393
Color Mapping . . . . . . . . . . . . . . . . . . . . . . 358 Maximizing Open Displays . . . . . . . . . . . 393
Using the Pixel Locator . . . . . . . . . . . . . . . 366 Positioning Zoom and Scroll Windows . . 397
Collecting Points . . . . . . . . . . . . . . . . . . . . 368 Display Output Options . . . . . . . . . . . . . . 398

ENVI User’s Guide 211


212 Chapter 4: Interactive Display Functions

The Display Menu


Five menus appear in the Main Image window: File, Overlay, Enhance, Tools and
Window. These menus are collectively titled the “Display” menu. Use the Display
menu to access common display operations and interactive functions.
Operations and functions include linking image windows; producing X, Y, Z
(spectral), and arbitrary profiles; contrast stretching; color mapping; ROI selection,
cursor position and values, 2-D scatter plots, surface plotting (perspectives and
draping), and polarization signatures; various overlays including annotation, pixel-
based and georeferenced grid lines, image contouring, and vector layers; image
animation, changing display window characteristics; printing and outputting images
(PostScript, Image [RGB], BMP, HDF, JPEG, PICT, SRF, TIFF, or XWD formats).

Figure 4-1: The Display Menu.

The Display Menu ENVI User’s Guide


Chapter 4: Interactive Display Functions 213

Main Image and Zoom Window Shortcut Menu


You can access many Display menu interactive functions from the Main Image and
Zoom window shortcut menu. Descriptions of the available functions are provided
“ENVI Image Display Windows” on page 185 and in this chapter.
1. To use the new shortcut menu, right-click anywhere in a Main Image or Zoom
window.
• From the menu that appears, select an option.
Note
The shortcut menu displays different options depending on whether interactive
linking is on or off (see Figure 4-2).

Figure 4-2: The Zoom and Main Image window shortcut menu. On the left, with
interactive linking off; on the right, with interactive linking on.

ENVI User’s Guide The Display Menu


214 Chapter 4: Interactive Display Functions

Display Functions
Use the File menu on the Display menu to create vector layers for the displayed
image, save display groups to a file, open saved display groups, output images to
various formats, print display images, and set preferences for your image displays.

Figure 4-3: Link displays, set display preferences, and save, restore, or print
displays from the Display File menu.

Display Functions ENVI User’s Guide


Chapter 4: Interactive Display Functions 215

Creating Vector Layers


Use Create New Vector Layer to create a new vector layer that is associated with the
displayed image.
Note
You can also create vector layers from within the Available Vectors List or from the
Vector menu on the ENVI main menu. For detailed instructions, see “Creating New
Layers” on page 201 and “Creating Vector Layers” on page 777.

1. Select File > Create New Vector Layer from the Display menu.
2. Enter a layer name and select output to “File” or “Memory.”
The Vector Parameters window appears.
• To draw new vectors, select Mode > Add New [Type].
For detailed information, see “Working with Vector Layers” on page 296.

ENVI User’s Guide Creating Vector Layers


216 Chapter 4: Interactive Display Functions

Saving Display Groups


Use Save as Display Group to save a given display group, in its present state, to a file.
When a display group is saved, the displayed bands, the window sizes and positions,
the stretch, the displayed overlays, any open profiles, and any 2-D scatter plots
associated with the display are all saved in a text file.
1. From the Display menu, select File > Save As Display Group.
2. Enter or choose an output filename.
3. Click “OK.”
The default extension .grp is automatically appended to the filename.

Restoring Saved Display Groups


Use Restore Display Group to restore a saved display group.
Note
Files that were not saved to disk (e.g., only in memory) and files that cannot be
opened directly using ENVI’s Open Image File function will not be restored.

1. Select one of the following options:


• From the ENVI main menu, select File > Restore Display Group.
• From the Display menu, select File > Restore Display Group.
Note
If you restore a saved display group from the ENVI main menu, it will be placed in
a new display group. If you restore a saved display group from the Display menu, it
will replace the current display.

2. In the file selection dialog, select the .grp file.


The display group and its associated windows are displayed.

Saving Display Groups ENVI User’s Guide


Chapter 4: Interactive Display Functions 217

Setting Display Preferences


Use Preferences to add virtual borders to an image, to edit the characteristics of the
border, to change the size of the Main Image, Zoom, or Scroll windows, and to
change the color of the Zoom/Scroll window indicator boxes. For a complete
overview of ENVI Image Display windows, see “ENVI Image Display Windows” on
page 185.

Setting Virtual Border Characteristics


To append a virtual border to the image display:
1. From the Display menu, select File > Preferences.
2. When the Display Parameters dialog appears, select from the following
options:
• To set the default so that each time an image is loaded a virtual border is
used, enter the size of the border in pixels in the appropriately positioned
text box.
The left box controls the left border, the right the right border, the top the
top border, and the bottom the bottom border.
• To change the default border color, select the desired color from the
“Border Color” button menu.
3. Click “OK.”

Turning Image Window Scroll Bars On/Off


Use the scroll bars in the border of the Main Image window to move around the
image.
• Double-click the Zoom window cross-hair box with the right mouse button.
Or:
1. In the open display, select File > Preferences.
The Display Parameters dialog appears.
2. Click the “Scroll Bars” arrow toggle button to select “Yes” or “No.”
3. Click “OK.”

ENVI User’s Guide Setting Display Preferences


218 Chapter 4: Interactive Display Functions

Resizing Windows
1. In the open display, select File > Preferences.
The Display Parameters dialog appears.
2. Select from the following options:
• To set the size of the Image, Scroll, and/or Zoom windows, enter the size
(in pixels) in the corresponding text boxes.
• To enter a resize factor for the Scroll window, enter it into the “Resize
Factor” text box.
• To set the zoom factor for the Zoom window, enter it into the “Zoom
Factor” text box.
3. Click “OK.”
For additional resizing techniques, see “Resizing the Main Image Window” on
page 185, “Resizing the Zoom Window” on page 188, and “Resizing the Scroll
Window” on page 192.

Changing Zoom Window Properties


To change the x or y size (in pixels) of the Zoom window, the zoom factor of the
Zoom window, or the interpolation method used:
1. In the open display, select File > Preferences.
The Display Parameters dialog appears.
2. Select from the following options:
• To change the size of the Zoom window, enter the corresponding x and y
dimensions (in pixels) in the “xsize” and “ysize” text boxes.
• To change the zoom factor, use the arrow increment buttons.
• To change the interpolation method used in the Zoom window, select
“Nearest Neighbor,” “Bilinear,” “Bicubic,” or “Optimized Bicubic” from
the “Zoom Interp” button menu.
3. Click “OK.”

Changing Indicator Box Colors


To change the displayed color of the Zoom Window Indicator box, the Main Image
Window Indicator box, and the Zoom window cross-hairs:

Setting Display Preferences ENVI User’s Guide


Chapter 4: Interactive Display Functions 219

1. In the open display, select File > Preferences.


The Display Parameters dialog appears.
2. Select a color by using one of the following options:
• From the “Zoom/Scroll Color” button menu, select a color.
• Click on the colored box with the left mouse button to cycle through the
color choices.
Tip
To cycle backwards, click on the colored box with the middle mouse button.

3. Click “OK.”

ENVI User’s Guide Setting Display Preferences


220 Chapter 4: Interactive Display Functions

Overlays
Use Overlay to place annotation (text, polygons, symbols, etc.), classifications,
density slices, pixel and map grids, contour lines, regions of interest (ROIs) or
vector layers over an image or plot.
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 289.

Figure 4-4: Access a variety of image overlay options from the Overlay menu.

Showing and Hiding Overlay Dialogs and Layers


When working with overlays (annotation, regions of interest, contours, grid lines,
density slices, and vector layers), you can hide the control dialog (e.g., the ROI Tool
dialog, the Density Slice dialog, etc.) without erasing the corresponding overlays
from your image. When the dialog is hidden, you can hide the associated layers
without erasing them.

Overlays ENVI User’s Guide


Chapter 4: Interactive Display Functions 221

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 overlay control 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 (see “Using the Window Finder” on page 171), click on
the window name.
• From the Display menu, select Overlay > [overlay type].
Hiding 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.

ENVI User’s Guide Overlays


222 Chapter 4: Interactive Display Functions

Annotating Images
Use Annotation to add text, symbols, polygons, lines, polylines, shapes, map
information, and gray-scale or color bars to images and plots. For classification
images, add class keys. Annotation options are similar for images, plots or surface
views. Annotations can be saved to files and included in output options.
Annotation can be placed in the Main Image window, the Scroll window, the Zoom
window, or the “virtual borders” of an image.
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 289.

Figure 4-5: Example Annotation in an ENVI display group.

Annotating Images ENVI User’s Guide


Chapter 4: Interactive Display Functions 223

Note
To use virtual borders, append the border to the image prior to annotating the image
(see “Setting Virtual Display Borders” on page 225).

1. Select one of the following options:


• From the Display menu select Overlay > Annotation.
• In any plot, including surface plots and X, Y, or Z profiles, select
Options > Annotation.
2. When the #n Annotation dialog appears (where “n” is the display being
annotated), select Object > the desired annotation type.
Note
Text annotation is the default mode.

The functionality of each annotation type is described in the following sections.

Positioning Annotations
1. In the Annotation dialog, select the “Main,” “Scroll,” or “Zoom” window
toggle button.
Normal mouse operations in the selected window are disabled. However,
normal mouse operations still apply in the other windows.
• To temporarily suspended annotation, select the “Off” toggle button.
All normal mouse operations are again possible in all windows.
2. Position annotation objects by clicking the left mouse button at the desired site
on the image. Refer to Table 4-1 for specific mouse button and positioning
functions.
3. Use the colored diamond-shaped “handle” to place the annotation at the
desired location. (The handle appears on all annotation types.)
4. After the annotation is positioned, click the right mouse button to “fix” the
object at that location on the image.
The diamond-shaped handle disappears after the annotation is “fixed.”

ENVI User’s Guide Annotating Images


224 Chapter 4: Interactive Display Functions

Tip
The text box at the top of the Annotation dialog describes the mouse button
functions for the current annotation mode. MB1 is the left mouse button, MB2 is the
middle mouse button, and MB3 is the right mouse button.

Mouse
Action Interaction Where
Button

Position current Left Click and At desired location


annotation Release
Move current annotation Left Click, hold Throughout image
and Drag
Handle
Delete current annotation Middle Click and Anywhere in image
Release
“Fix” current annotation Right Click and Anywhere in image
and proceed to the next Release
annotation operation
Prepare to reselect Left Click and pull Object >
fixed annotation down menu Selection/Edit

Reselect annotation Left Click and drag Around annotation


to draw box object corners
Suspend annotation (all Left Click “Off” toggle button
normal functions are
returned)
Resume annotation Left Click “Image,” “Scroll,” or
(normal functions “Zoom” toggle button
suspended)

Table 4-1: Mouse button assignments for Annotation.

Annotating Images ENVI User’s Guide


Chapter 4: Interactive Display Functions 225

Setting Virtual Display Borders


Use Set Display Borders to appended a virtual border to an image. You can place any
type of annotation object(s) in the border.
1. Select Options > Display Borders.
2. When the Display Borders dialog appears, enter the desired border width (in
pixels) for the left, top, right, and bottom image border in the text boxes with
the same relative position.
The image is re-displayed with the designated virtual border.
Note
You can also add Virtual Borders using the Available Bands List (see “Options in
the Available Bands List” on page 180).

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) causes
annotation to be placed exactly at the location selected.
1. In the Annotation dialog, select Options > Set Snap Value.
2. In the Set Snap Value dialog, use the increment arrows to select a value or enter
the value in the “Snap” text box.
3. Click “OK.”

Burning Annotation into Images


To burn the annotation into an image once it has been placed:
1. In the Annotation dialog, select the “Off” toggle button.
2. From the Display menu, select File > Save Image As > Postscript File (see
“Display Output Options” on page 398).

Selecting Annotation Object Types


In the Annotation dialog, use the Object pulldown menu to select from the various
annotation object types. Text, symbols, shapes, map information, and color ramps are
available as annotation objects. Each object has its own annotation options and are
described in more detail below.

ENVI User’s Guide Annotating Images


226 Chapter 4: Interactive Display Functions

Working with Text Annotation


1. In the Annotation dialog, select Object > Text.
2. Enter text by typing it in the text box at the bottom of the window.
More than one line of text may be entered at once.
3. Select from the following specific options to change the text characteristics.
Note
The text characteristics will not change in the dialog. To see the changes, click in
the image window, but do not “fix” the annotation in place until you are satisfied
with the appearance of the text.

• To change text color, click on the “Color” button menu and select the
desired color.
• To place the text on a solid colored background, use the “Back” button
menu to select a color; to place the text directly on the image without a
background (this is the default), select “Off.”
• To adjust the thickness of the text, enter a new thickness value in the
“Thick” textbox or use the increment arrows to change the value in the
“Thick” parameter box.
• To change the text font, click the “Font” button menu and select a font.
• To change the size of the text (in pixels), change the value or use the arrow
increment buttons in the “Size” parameter box.
• To change the orientation of the text on the screen (the angle at which it is
written), enter the value of the angle in degrees (counterclockwise, with
respect to the horizontal [0 degrees]) in the “Orien” parameter box or
toggle the arrow increment buttons.
• To center the text or justify it left or right, choose the appropriate option
under the “Align” button menu.
4. Position and fix the annotation as described in “Positioning Annotations” on
page 223.
A Note About Fonts
Several font types are available from the “Fonts” button menu in the Text Annotation
window, including special ENVI fonts. Use the “ENVI Symbols” font type to place
mining and cartographic symbols, and ENVI and IDL logos.

Annotating Images ENVI User’s Guide


Chapter 4: Interactive Display Functions 227

Working with Symbol Annotation


1. In the Annotation dialog, select Object > Symbol.
The available symbols are displayed in the selected font in the window at the
bottom of the dialog. Individual characters in text fonts can also be selected
using the Symbol option.
2. Select the desired font or symbol set from the “Font” menu.
The fonts labeled “Misc,” “Special,” and “Math” show some of the standard
symbols available in IDL.
3. Click the left mouse button on the desired symbol.
When selected, the symbol is highlighted in red.
4. Select from the options described in “Working with Text Annotation” to
change the color, line thickness, etc.
5. Position and fix the annotation as described in “Positioning Annotations” on
page 223.
Working with Polygon Annotation
1. In the Annotation dialog, select Object > Polygon.
2. Choose from the methods below to draw the polygon.
• Use the left mouse button (see Table 4-2) to set the vertices of the polygon.
Line segments (polygon sides) are drawn between the selected points. Or,
draw the polygon by holding down the left mouse button while drawing.
• To delete the last segment drawn, press the middle mouse button.
• To close the polygon, press the right mouse button.
A “handle” (a small diamond) appears.
3. Select from the following options to change or adjust the polygon attributes.
• To change the polygon color, select from the “Color” menu.
• To change the thickness of the polygon border (and fill if line-fill is
chosen), enter a value in the “Thick” parameter box.
• To change the outline line style (solid, dashed, dotted, etc.), click the “Line
Style” menu and select the desired style.

ENVI User’s Guide Annotating Images


228 Chapter 4: Interactive Display Functions

• To change the orientation of the polygon on the screen, enter the angle in
degrees (counterclockwise) at which to display the polygon with respect to
horizontal (0 degrees) in the “Rotation” parameter box.
The “Rotation” value is always reset to 0 after it has been changed.
4. Position and fix the annotation as described in “Positioning Annotations” on
page 223.
Setting Polygon “Fill” Attributes
Use the “Fill” button menu to set the fill attributes.
• To leave the polygon unfilled, select “None.”
• To fill the polygon with the polygon color, select “Solid.”
• To fill the polygon with equally spaced lines, select “line,” “dashed,” “dotted,”
etc.
• To 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” parameter box.
• To change the spacing of the lines, enter a value in the “Spc” parameter box.

Mouse
Action Interaction Where
Button

Choose Polygon Left Click and At desired


vertices Release location
Delete Polygon Middle Click and Anywhere in
vertices (while Release image
drawing)
Close Polygon Right Click and Anywhere in
Release image
Position Left Click and drag On the handle
completed
polygon
Move polygon Left Click and drag Near or on
vertices vertex

Table 4-2: Polygon Annotation

Annotating Images ENVI User’s Guide


Chapter 4: Interactive Display Functions 229

Mouse
Action Interaction Where
Button

Delete polygon Middle Click and Anywhere in


Release image
“Fix” current Right Click and Anywhere in
annotation Release image

Table 4-2: Polygon Annotation (Continued)


Working with Polyline Annotation
1. In the Annotation dialog, select Object > Polyline.
2. Use the methods described in “Working with Polygon Annotation” on
page 227 to draw polylines.
Note
The right mouse button is used complete a line, but does not close line segments
into a polygon.

3. Select from the options described in “Working with Polygon Annotation” on


page 227 to change polyline attributes.
The options color, line style, thickness, and rotation are available.
4. Position and fix the annotation as described in “Positioning Annotations” on
page 223.
Working with Shape Annotation
Use Rectangle or Ellipse to annotate with geometric shapes.
1. From within the Annotation dialog, select Object > Rectangle or Ellipse.
2. Click and drag with the left mouse button to draw the shape.
• To draw a circle, hold down the control key while drawing an ellipse, or
draw the circle using the middle mouse button.
• To draw a square, hold down the control key on the keyboard while
drawing a rectangle, or draw the square using the middle mouse button.
• To set or change the size of the shape, grab a corner, an edge, or an axis
end point (ellipse) and press and hold down the left mouse button while
dragging to the desired size.

ENVI User’s Guide Annotating Images


230 Chapter 4: Interactive Display Functions

The size can also be explicitly changed by entering the desired X and Y
sizes (in pixels) in the text boxes labeled “xsize:” and “ysize:”.
• To delete the shape, press the middle button.
• To fix the object, press the right button as described in Table 4-2.
3. Select from the options described in “Working with Polygon Annotation” on
page 227 to change shape attributes.

Working with Arrow Annotation


1. In the Annotation dialog, select Object > Arrow.
2. Select from the following steps to draw the arrow.
• To draw an arrow, click and drag with the left mouse button.
• To change the size and orientation, grab an end and press and hold down
the left mouse button while dragging to the desired size.
The size of the arrow head can also be changed by entering a new value
into the “Head Size” parameter box.
• To delete the arrow, press the middle mouse button.
• To control the angle of the lines (in degrees) defining the arrow head, enter
a value in the “Head Angle” parameter box.
Tip
Entering smaller angles makes a narrower arrow head and larger angles makes a
wider head.

3. Select from the options described in “Working with Polygon Annotation” on


page 227 to change arrow attributes.
4. Press the right button to fix the location and characteristics of the arrow once it
has been formatted.

Working with Scale Bar Annotation


1. From within the Annotation dialog, select Object > Scale Bar.
• If the data is not georeferenced, enter a value when the Image Pixel Size
dialog prompts you for the image pixel size in meters.
2. Select from the following steps and options to position and change the scale
bar.
• To position the scale bar(s) in the image, press the left mouse button.

Annotating Images ENVI User’s Guide


Chapter 4: Interactive Display Functions 231

• To delete the scale bar(s), press the middle mouse button.


• To select which units of the scale bar will be drawn, set the arrow toggle
button to “On” when the desired units are shown in the “Scale” pulldown
text box.
Scale bar(s) can be drawn in any combination kilometers, miles, meters,
and feet.
• To change the spelling of the scale bar titles, click the “Change Scale Bar
Titles” button and edit the spelling of the titles.
Tip
You can permanently change the spelling of the titles used for scale bar annotation
by editing the envi.cfg file (see “The ENVI Configuration File” on page 867).

Note
When more than one of the unit types is set to “On,” multiple scale bars will be
drawn.

• To set the height of the scale bar(s), in pixels, enter the desired value in the
“Height” parameter box.
• To change the scale bar length, enter the desired length, in scale bar units,
in the “Length” parameter box.
• To change the number of increments shown on the scale bar, enter the
number in the “Inc” parameter box and the number of sub-increments
within the first main increment in the “Sub Inc” parameter box.

Figure 4-6: A Scale Bar Annotation.

The length, increment, and sub-increment parameters are formatted for each
type of scale bar individually.
3. Set the scale bar text attributes by selecting from the options described in
“Working with Text Annotation” on page 226.

ENVI User’s Guide Annotating Images


232 Chapter 4: Interactive Display Functions

4. Press the right mouse button to fix the scale bar position and characteristics.

Working with Color Ramp and Grayscale Ramp Annotation


Use Color Ramp to place a “wedge” or “color table” on the image. The color table or
wedge represents the currently applied ENVI color table. For a gray-scale image the
color ramp is a grayscale wedge from the minimum grayscale value to the maximum
grayscale value. For a color image, the color ramp shows the distribution of the
selected color palette.
1. In the Annotation dialog, select Object > Color Ramp.
2. Select from the following steps and options to position the ramp.
• To position the color ramp, click the left mouse button at the desired
location.
• To delete the ramp, press the middle mouse button.
• To orient the ramp either horizontally or vertically, select from one of the
following by clicking on the pulldown menu initially labeled “Hor ->”.
• For horizontal orientation, select “Hor ->” (horizontal from low values to
high values left to right) or “Hor <-” (horizontal from high to low left to
right).
• For vertical options select “Ver <-” (vertical from high to low bottom to
top) or “Ver ->” (vertical from low to high bottom to top).

Figure 4-7: A Gray-scale Ramp Annotation.

3. Select from the following options to change the color ramp characteristics.
• To define the ramp width and length, enter the desired value in the
parameter boxes labeled “Width” and “Len.”
• To place labels on the ramp, enter the minimum and maximum values in
the “Min” and “Max” parameter boxes.
• To define the increment (number) of labels to place on the ramp, enter the
value in the “Inc” parameter box.

Annotating Images ENVI User’s Guide


Chapter 4: Interactive Display Functions 233

• To set the label precision (the number of significant figures), enter the
number in the “Precision” parameter box. For example, .25 is a precision
of 2, and .3 is a precision of 1.
Labels are placed at the bottom of horizontal ramps and placed to the right
of vertical ramps. Set Label attributes by selecting from the options
described in “Working with Text Annotation” on page 226.
4. Press the right mouse button to fix the color ramp once it has been positioned
and formatted.
Working with Map Key, Class Key, and Vector Key Annotation
A map key consists of colored squares and corresponding labels for each map item or
class in a classification image. Map keys can be defined interactively and are
automatically created 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.
1. In the Annotation dialog, select Object > Map Key.
2. Click the left mouse button at the desired location to position the map key.
• To delete the map key, press the middle mouse button.
3. Click “Edit Map Key Items” to define or change items in the map key.
4. When the Map Key Object Definition dialog appears, select from the list of
Key items.
• To add additional items to the list, click “Add Item.”
• To delete an item, highlight it in the list and click “Delete Item.”
• To change the name of the item, enter the new name in the “Object Name”
text box.
• To define the color of the box, select the desired color using the “Color”
menu.
• To add additional colors, enter the DN values in the “R,” “G,” and “B,” text
boxes for red, green, and blue respectively.
The newly defined color appears as black in the image but will be correct
upon output.

ENVI User’s Guide Annotating Images


234 Chapter 4: Interactive Display Functions

Figure 4-8: The Edit Map Key dialog.

• To change the fill type in the box, use the “Fill” menu.
• To control the fill type, use the “Orien” and “Spc” parameter boxes.
• For vector keys, an “Object Type” button menu is included and has
polygon, polyline, and point selections.
• For a vector polygon item, use the “Fill” button menu and “Orien” and
“Space” parameter boxes to select the polygon fill type.
• For a vector polyline item, use the “Line Style” button menu to select
different line styles.
• For a vector point item, use the “Symbol” menu to select the symbol type
to be shown in the key.
5. Follow these steps to change other parameters within the Annotation dialog.
• To set a background color select the desired color from the “Back”
pulldown menu in the Annotation dialog.

Annotating Images ENVI User’s Guide


Chapter 4: Interactive Display Functions 235

• To change the text font for the key, the size, and the thickness of the letters,
select from the options described in “Working with Text Annotation” on
page 226.
• To change class colors, see “Mapping Class Colors” on page 364 for
detailed instructions.

Figure 4-9: The Vector Key Annotation.

Saving Map Key Annotation


1. In the Map Key Object Definition dialog, click the “Save” button.
2. At the prompt, enter an output file name.
ENVI writes the key to a file. Map key files should be saved with the file
extension .key for consistency, but may be saved using other extensions at
your discretion.
Restoring Saved Map Key Files
1. In the Map Key Object Definition dialog, click the “Restore” button.
2. Select the desired input file.

Working with Declination Diagram Annotation


Use the Declination option to place a declination diagram on the image. The
declination diagram includes any combination of arrows pointing to true north
(shown with a star), grid north (GN), and magnetic north (MN).
1. In the Annotation dialog, select Object > Declination.
2. Click the left mouse button at the desired location to position the declination
diagram.
• To delete the declination diagram, press the middle mouse button.
3. Select from the following steps to change the attributes of the declination
diagram.

ENVI User’s Guide Annotating Images


236 Chapter 4: Interactive Display Functions

• To set the angle of the north arrows, enter the values in degrees in the
“True North,” “Grid North,” and “Magnetic North” text boxes.
The angles are not drawn to scale so that the arrows appear separated.
• To set the arrow length in pixels, use the “Length” parameter box.
• To change the color of the declination diagram, select from the “Color”
button menu.
• To set the background color, select from the “Back” menu.
• To change the text font for the key, the size, and the thickness of the letters,
select from the options described in “Working with Text Annotation” on
page 226.
• To change the line and text thickness, enter a value in the “Thick”
parameter box.
4. Press the right mouse button to fix the position and characteristics of the
declination diagram once it has been formatted.

Figure 4-10: A Declination Diagram Annotation.

Working with Image Annotation


Use Image to place other images, such as imported logos or subsampled images,
inside the current image. Do not confuse this option with mosaicking (see “Image
Mosaicking” on page 731).
Tip
Annotation needs to keep a copy of the image in memory so it is not advised to use
large images.

1. In the Annotation dialog, select Object > Image.


2. Click “Select New Image.”

Annotating Images ENVI User’s Guide


Chapter 4: Interactive Display Functions 237

3. When the Annotation Image Input Bands dialog appears, select an RGB or
grayscale file from the Available Bands List within the dialog.
The “R,” “G,” and “B” text boxes are filled.
• To select a grayscale image, click on the same file name for all three
bands.
• To select a spatial subset, click “Spatial Subset.”
• To perform spatial resampling of the data, enter a resize factor into the
“Resize Factor” text box.
• To clear the file names in the “R,” “G,” and “B” text boxes, click “Reset.”
4. Click “OK” to return to the Annotation dialog and position the image inset.
5. Click the left mouse button at the desired location to position the image.
• To delete the image, click the middle mouse button.
6. Click the right mouse button to fix the image at that location.
Note
The image appears, in the annotation, as a solid red box of the correct size with a
“Gray Image” or “RGB Image” label (see Figure 4-11), but will appear correct
upon output.

Working with Plot Annotation


Use Plot to overlay an ENVI plot on your image.
1. Select Object > Plot.
2. Click “Select New Plot.”
If only one plot window is open, that plot is automatically selected.
3. When the Select Plot window appears, select the name of a plot by clicking on
it.
If you have multiple plot windows opened with the same name, they appear
listed in the order in which they were opened.
• Enter or select the xsize and ysize in the Select Plot window, if desired.
4. Click “OK.”
5. Place the plot on the image by clicking with the left mouse button, dragging to
the desired location, and clicking the right mouse button to “fix” the annotation
in place.

ENVI User’s Guide Annotating Images


238 Chapter 4: Interactive Display Functions

The annotation appears in the image as a red box of the correct size entitled
“Plot,” but will appear correct in the output file.
The plots remain as vectors when “burned in” to the image if you output it to
postscript or a printer.

Figure 4-11: The appearance of an image Annotation.

Note
Plot objects will not appear in the image if output to an image file.

Annotating Multiple Plots


Use a “test image” to annotate and output multiple plots on a single page.
1. From the ENVI main menu, select File > Generate Test Data and create a
blank white image (see “Generating Test Data” on page 112 for further
details).
2. Place the plot annotation on the blank image using standard annotation
procedures.
The plot colors are automatically reversed to black on white for output.

Working in Selection Mode


Use Selection to move and change the attributes of annotation objects that have been
fixed in the image.
1. Select Object > Selection/Edit.
2. Select Options > Show Object Corners.
3. Click and drag with the left mouse button to draw a box around the “corner” of
the object in order to reselect it.
4. Click the left mouse button 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.

Annotating Images ENVI User’s Guide


Chapter 4: Interactive Display Functions 239

• To select multiple objects at once, press and drag a box around the objects with
the left mouse button.
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),
click the left mouse button on a vertex and drag it to the desired location.
• To deselect an object, click the middle mouse button on the handle of
the object.
• To deselect multiple objects, press and drag with the middle mouse button to
draw a box around the objects.
• To deselect all of the annotation objects within an image, click the right mouse
button within the image.
• To select only those objects and deselect any previously active objects, press
and drag with the right mouse button to draw a box around object(s).
Additional options are available for selected annotation objects under the Selected
menu (see “Annotation Options” on page 239).

Annotation Options
In the Annotation dialog, use the Selected or the Options menu 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.

Selecting All Annotation Objects


• To select all annotation objects, select Selected > Select All.

ENVI User’s Guide Annotating Images


240 Chapter 4: Interactive Display Functions

Figure 4-12: The Annotation dialog.

Joining Polygons
Use the Join option to join the overlapping parts of two polygons.
1. Select two polygons to be joined.
2. In the Annotation dialog, select Selected > Join.
The underlying polygon’s vertices are changed to match those of the overlying
polygon.
Tip
Better results are obtained for polygons that have many vertices (for example, those
drawn while holding down the left mouse button). Use the Swap option (see the
next section) to bring a polygon to the top.

Swapping Annotation Objects


Use Swap to bring an underlying object to the top.
1. Select the objects to be swapped.
2. Select Selected > Swap.

Annotating Images ENVI User’s Guide


Chapter 4: Interactive Display Functions 241

Duplicating Annotation Objects


Use Duplicate to duplicate existing Annotation objects instead of re-creating them.
1. Select the object(s) to be duplicated.
2. Select Selected > Duplicate.
3. Position the duplicate object(s) by dragging the handle to the desired location
with the left mouse button.
Deleting Annotation Objects
• To delete selected objects, select Selected > Delete.
• To delete all of the annotation objects within the image, select Selected >
Delete All.

Undoing Annotation Changes


• To undo the changes made to a selected object(s), select Selected > Undo.
The “undo” applies only to the last change made. After a new change is applied,
selecting Undo applies to the latest change, etc.
Mirroring Annotation
Use mirroring with rectangles, ellipses, polygons, and polylines only. It is primarily
designed for you to build custom filters for FFT filtering (see “Defining FFT Filters”
on page 612).
• To “mirror” shapes and polygons around the center of the image, select
Options > Turn Mirror On.
• To turn off the mirroring, select Options > Turn Mirror Off.
Showing Object Corners
Use object corners to make it easier to include corners in the selection box while in
Selection mode. Object corners can be shown around all annotation objects except the
vectors (rectangle, ellipse, polygon, polyline, and arrow). The corners are plotted as
small asterisks around the annotation object.
• To show object corners, select Options > Show Object Corners.
• To hide object corners, select Options > Hide Object Corners.

ENVI User’s Guide Annotating Images


242 Chapter 4: Interactive Display Functions

Managing Annotation Files


Use the File menu in the Annotation dialog to save and restore annotation files.

Saving Annotations to Files


1. In the Annotation dialog, select File > Save Annotation.
2. When the new dialog appears, enter the output file name in the text box, or
click “Choose” and enter or select a filename.
3. Select “OK” to save the annotation to an output file.
Annotation files should be saved with the file extension .ann for consistency,
but may be saved using other extensions at your discretion.

Restoring Saved Annotation Files


1. Select File > Restore Annotation.
2. When the file selection window appears with all .ann files listed by default,
select the appropriate annotation file.
ENVI loads and displays the selected file.

Hiding the Annotation Dialog


To hide or show the Annotation dialog without erasing your annotations, see
“Showing and Hiding Overlay Dialogs and Layers” on page 220.

Closing the Annotation Dialog


• To close the annotation dialog and remove all the annotation objects from the
display, select File > Cancel.
If the annotations in the display have not been saved, an ENVI question dialog
appears asking you if you want to save the file.

Annotating Images ENVI User’s Guide


Chapter 4: Interactive Display Functions 243

Overlaying Classes
Use Classification to overlay classes on a gray scale or color image in a display
window, control which classes are displayed, collect statistics, edit the class colors
and names, merge classes, and edit classes by adding, deleting, or moving pixels
between classes.
Note
A classification image must be generated prior to using this function (see Chapter 6,
“Classification”).

1. In the display window of the image you want to overlay the classification
results on, select Overlay > Classification.
The Interactive Class Tool dialog appears. It lists all the classes and shows
their colors and names. The active class is displayed at the top of the dialog.
The active class is the class to which any operations (i.e., statistics, editing) are
applied.
2. Select from the following options to edit and apply classes to your image.
• To resize the dialog, click on a corner and drag.
• To change the active class, click on the colored box next to the class name.
• To display a class on the image click in the “On” check box next to the
class name.
Any number of classes can be displayed at once.
• To turn on and display a single class while turning all others off,
double-click with the left mouse button on the colored box next to
class to be displayed.
• To turn it off and display all the other classes, double-click with the left
mouse button on that class again.
• To turn all classes off, click the right mouse button on a colored box.
• To turn all the classes on, click again with the right mouse button on any
colored box.

ENVI User’s Guide Overlaying Classes


244 Chapter 4: Interactive Display Functions

Figure 4-13: The Interactive Class Tool dialog.

Editing Classes
Use the Edit menu 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 so if you make a mistake you
don’t have to recreate everything!

Selecting the Active Class


In the Interactive Class Tool dialog, make sure the active class is the class you want to
edit.
• To change the active class, click on the colored box next to the desired class
name.
• If you are editing a class, choose which window to draw in by clicking on the
“Image,” “Scroll,” or “Zoom” toggle button (see Figure 4-13).
Setting Mouse Functions to Normal
• To set the mouse button functions to normal display mode, select Edit > Mode:
No Editing.

Overlaying Classes ENVI User’s Guide


Chapter 4: Interactive Display Functions 245

Drawing Polygons to Add Pixels


To draw polygons in the selected image and add pixels from the polygon to the
selected class:
1. Select Edit > Mode: Polygon Add to Class.
2. Select the desired class to add pixels to.
3. Draw a polygon on the image using the left mouse button.
• To close the polygon, click the right mouse button.
• To accept the polygon, click the right mouse button again.
The new pixels change to the active class color.
Note
When moving pixels into another class, you will 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. Select Edit > Mode: Polygon Delete from Class.
2. Select Edit > Set delete class value.
3. In the dialog, select a class to which the deleted pixels will be assigned.
4. Draw polygons on the image to remove those pixels from the active class.
Setting Polygon Colors
To set the drawing color of a polygon:
Note
The drawing color is the color used to outline your polygon while drawing. It is not
the color the polygon is filled with once it is set. The fill color is the color defined
for the class.

1. Select Edit > Set polygon draw color.


2. From the Polygon Color menu button, select a color.
3. Click “OK.”

ENVI User’s Guide Overlaying Classes


246 Chapter 4: Interactive Display Functions

Selecting Polygon Types


• To select what type of polygon you draw, select Edit > Polygon Type: the
desired type.

Saving Changes
• To save changes, select File > Save.

Undoing Class Changes


To undo all unsaved changes:
1. Select Edit > Undo Changes.
2. In the question dialog, click “Yes.”

Class Options
Use the 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 distributions.
The report is processed and displayed in the Classification Distribution
window. The report is automatically updated 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.
The Class Color Map Editing dialog appears. See “Mapping Class Colors” on
page 364 for detailed instructions.
Merging Classes
To merge one or more classes into a selected base class:
1. In the Interactive Class Tool dialog, select Options > Merge classes.
The Interactive Merge Classes dialog box appears.
2. Select the base class by clicking on the desired class name.

Overlaying Classes ENVI User’s Guide


Chapter 4: Interactive Display Functions 247

3. Select the classes to merge into the base class by clicking on the desired class
names.
4. Click “OK.”
The next time you open the Class Distributions dialog, it will be updated.
Plotting Mean Spectra
• To plot a mean spectrum for the active class, select Options > Mean for active
class.
If the Input File Associated with Classification Image dialog appears, select
the input file to calculate the statistics from and click “OK.” The dialog
appears only if an input file hasn’t been set previously.
• To plot the mean spectrum for all classes, select Options > Mean for all
classes.
ENVI computes the statistics and displays the mean spectra in a Class Means
plot window.
Plotting Statistics
• To plot the statistics for the active class, select Options > Stats for active class.
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 hasn’t been set previously.
• To plot the statistics for all classes, select Options > Stats for all classes.
ENVI computes the statistics and displays a plot 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.

ENVI User’s Guide Overlaying Classes


248 Chapter 4: Interactive Display Functions

Changing the Statistics File


To change the statistics data file associated with the statistics:
1. Select Options > Associated stats data file.
2. In the Input File Associated with Classification Image dialog, select the
filename. Click “OK.”

Saving Classification Images


1. In the Interactive Class Tool dialog, select File > Save Changes to File.
Warning
Selecting “Yes” in the next step will write over the existing classification file.

2. In the question dialog, click “Yes.”


The current filename is written over by the changed file.

Outputting Classification Displays


• To output the image with the classes overlaid, select File > Save Image As >
the desired output.
• To print the image with the classes overlaid, select File > Print.
Note
Only the classes that are turned on appear in the output.

The classification overlay will be listed 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 406.

Hiding the Interactive Class Tool


To hide or show the Interactive Class Tool dialog without erasing your classes, see
“Showing and Hiding Overlay Dialogs and Layers” on page 220.

Closing the Interactive Class Tool


• To close the Interactive Class Tool and quit the function, select File > Cancel.

Overlaying Classes ENVI User’s Guide


Chapter 4: Interactive Display Functions 249

Plotting Contour Lines


Use 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 displayed image.

Figure 4-14: An Example of DEM contours overlain on a Landsat TM image.

1. From the Display menu, select Overlay > Contour Lines.


2. When the Input Contour Band dialog appears, click on the band from which
the contours will be generated.
Note
Only bands that are the same size as the displayed image are available.

Once the contour source image has been defined, the #n Contour Plot dialog
appears (where “n” is the originating display number). Eight default contour
levels are listed under “Defined Contour Levels.” These levels are defined
using a minimum and maximum data value calculated using the Scroll window
and shown in the “Min” and “Max” text boxes.
3. Enter the desired minimum and maximum values in the appropriate text boxes.

ENVI User’s Guide Plotting Contour Lines


250 Chapter 4: Interactive Display Functions

• To reset the range to the initial values, click “Reset.”


4. Next to the “Window” label, select the “Image” and/or “Scroll” check boxes to
designate the window where the contours will be plotted.
5. Click “Apply” to plot the contours.

Editing Contour Levels


To edit individual contour levels
1. In the Contour Plot dialog, click on a specific contour in the “Defined
Contours Levels” list.
2. Click “Edit Level.”
3. Change the value to be contoured by entering the desired value in the “Level”
text box.
4. Assign a label to be plotted with the contour by entering the desired text in the
“Label” text box.
5. Specify the color for the selected contour, the line style, and the thickness by
choosing the desired 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.
Tip
To add new levels or set default levels see “Contour Level Options” on page 251.

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

Plotting Contour Lines ENVI User’s Guide


Chapter 4: Interactive Display Functions 251

Clearing Levels
• To clear all the levels from the “Defined Contours List,” click “Clear Levels.”

Figure 4-15: The Display Contour Plot dialog.

Contour Level Options


Use the Options pulldown menu to add new levels, set default levels, and change the
contour band.
Adding Contour Levels
1. In the Contour Plot dialog, select Options > Add New Levels.
2. When the Add Contour Levels dialog appears, enter an individual contour or
ranges of contours by specifying a value in the “Start Level” text box.
3. Enter a value in the “Level Inc” parameter box to specify the increment
between contours.
4. Enter a value in the “#” parameter box to specify the number of contours.

ENVI User’s Guide Plotting Contour Lines


252 Chapter 4: Interactive Display Functions

5. Select from the following steps to set the attributes of the contour.
• To change the thickness, select from the “Thick” menu.
• To change the line style, select from the “Style” menu.
• To change the color, select from the “Color” menu.
• Click on the arrow toggle button to change the contour colors from “Use
same color for each level,” which plots all the contours in the same color,
to “Increment colors for each level,” which plots each contour level in a
different color. The different colors of contour levels will follow the list of
graphic colors.
6. Click “OK” to enter the new contours into the “Defined Contour Levels” list.
7. Click “Apply” to plot the contours.

Figure 4-16: Add Contour Levels dialog.

Selecting New Contour Sources


To select a new image to generate levels from:
1. Select Options > New Contour Band.
2. When the standard ENVI file selection dialog appears, select the desired file or
band name from which to generate the new levels.

Plotting Contour Lines ENVI User’s Guide


Chapter 4: Interactive Display Functions 253

Setting the Number of Default Levels


1. Select Options > Set Number of Default Levels.
2. Enter the desired number of default contour levels.

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. 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 multiple
colors:
1. 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, restore previously saved levels,
export the contours to ENVI Vector Files (.evf), and to close the dialog.

Saving Contour Levels to Files


1. In the Contour Plot dialog, select File > Save Levels.
2. Enter an output filename with the default filename extension of .lev for
consistency.
Restoring Saved Contour Levels
1. Select File > Restore Levels.
2. When the standard ENVI file selection dialog appears with all files with the
.lev extension listed by default, select the desired file name.

ENVI User’s Guide Plotting Contour Lines


254 Chapter 4: Interactive Display Functions

Outputting Contours to ENVI Vector Files (.evf)


1. Select File > Output Contours to EVFs.
The Output Contours to EVF Parameters dialog appears.
2. Click the “Yes” or “No” toggle button next to the “Separate Layer for each
Level” label to designate whether you want a separate layer for each contour
level.
3. Select “File” or “Memory” output.
4. Click “OK.”
The output EVFs appear in the Available Vectors List.
Note
If your file is larger than the tile size, then it is subsampled to fit within a single tile
(see “Image Tile Size” on page 876). For example, if your image is 2048 x 2048
pixels and the tile size is set to 1 Mbyte, that image is subsampled to 1024 x 1024
pixels and the contours are calculated and then output. Therefore the resolution of
the output EVF may not be the same as the contour overlay.

Hiding the Contour Plot Dialog


To hide or show the Contour Plot dialog without erasing your contours, see “Showing
and Hiding Overlay Dialogs and Layers” on page 220.

Closing the Contour Plot Dialog


• To close the Contour Plot dialog and remove the contours from the image,
select File > Cancel.

Plotting Contour Lines ENVI User’s Guide


Chapter 4: Interactive Display Functions 255

Interactive Density Slicing


Use Density Slice to select data ranges and colors for highlighting areas in your
grayscale image. The data ranges used in the density slice coloring can be from the
displayed image or from another image of the same size. For detailed instructions,
see “Using Interactive Density Slicing” on page 359.

ENVI User’s Guide Interactive Density Slicing


256 Chapter 4: Interactive Display Functions

Grid Lines
Use Grid Lines to overlay one or more grids on an image. Grids can be pixel-based or
map-coordinate and/or latitude/longitude based (for georeferenced images). Each
image display can have its own set of grids, which are displayed in the Main 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 289.

Figure 4-17: An Example of a Pixel-based Image Grid.

Grid Lines ENVI User’s Guide


Chapter 4: Interactive Display Functions 257

Figure 4-18: An Example of multiple grids (pixel, map, geographic) coordinates


on a Georeferenced Image.

Grid Types
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 (Figure 4-17).

ENVI User’s Guide Grid Lines


258 Chapter 4: Interactive Display Functions

Georeferenced Image Grids


Georeferenced images have grids that are based on map coordinates or geographic
coordinates (latitude/longitude). The image is assumed to already be in the
appropriate map projection prior to 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
(Figure 4-18).

Overlaying Grid Lines


1. 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 box(es) next to the “Window” label 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 be displayed, click the “On/Off” arrow 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 will
not be available.
If your image is georeferenced, both the Map and Geographic grids are turned on
initially.
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 into the text boxes labeled
“Grid Spacing.”

Setting Geographic Grid Spacing


1. In the Grid Line Parameters dialog, click on the “DMS< - >DD” button to
change between degrees-minutes-seconds and decimal-degrees for the
geographic grids.
2. In the “Spacing” text boxes, enter the desired spacing in degrees-minutes-
seconds or decimal-degrees.
3. Click “Apply” to plot the grids on the image.

Grid Lines ENVI User’s Guide


Chapter 4: Interactive Display Functions 259

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. Select Options > Set Display Borders.
2. Enter the desired border size for the left, top, right and bottom in pixels.
3. Select the desired color from the “Border Color” menu.
Editing Grid Characteristics
To change colors, label size and font, and other grid characteristics:
1. Within the Grid Line Parameters dialog, select Options > Edit
Pixel/Map/Geographic Grid Attributes.
2. When the Edit Map Attributes dialog appears, select from the following steps
to change the characteristics of the labels, lines, box, and corners.
• To turn on and off the plotting of the specific grid elements on the
displayed image, toggle the “On/Off” arrow toggle buttons next to each
element name.
• To plot grid labels outside the image in the virtual border, turn
on “Labels.”
Ticks are also placed along the edges of the image adjacent to the labels.
• To change the color, click “Colors” and select a color.
• To change the thickness of the label, enter a value in the “Thick” text box.
• To change the font of the labels, select from the “Font” menu.
• To change the size, enter a value in the “Charsize” text box.
• 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.
• The “X-axis Labels” and “Y-axis Labels” arrow toggle buttons toggle
between horizontal (H) or vertical (V) display of labels for both the X and
Y grid axes independently.

ENVI User’s Guide Grid Lines


260 Chapter 4: Interactive Display Functions

• To plot X and Y grid lines, turn on the “Lines” option.


• To draw a “Neat Line” box around the image, turn on the “Box” option.
• To plot tick marks at each grid intersection, turn on “Corners.”
• To set the line type for the grid and box lines (solid, dotted, dashed, etc.),
select from the “Style” menu.
• To set the thickness of the items, enter the value in the “Thick” parameter
box.
3. Click “OK” when the grid line attributes are set.
4. Click “Apply” to plot the grid lines on the image.

Managing Grid Files


Use the File pulldown menu to save and restore grid setups.

Saving Grid Parameters


To save the grid parameter settings to a file:
1. Select File > Save Setup.
2. When the Output Grid Parameters dialog appears, enter an output filename.
Grid setup files should be saved with the file extension .grd for consistency,
but may be saved using other extensions.
Restoring Saved Grid Setups
1. Select File > Restore Setup.
2. When the file selection window appears with all .grd files listed by default,
select the grid file.
3. Click “OK.”

Outputting Grid Lines


See “Display Output Options” on page 398 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.

Hiding the Grid Line Parameters Dialog


To hide or show the Grid Line Parameters dialog without erasing your classes, see
“Showing and Hiding Overlay Dialogs and Layers” on page 220.

Grid Lines ENVI User’s Guide


Chapter 4: Interactive Display Functions 261

Defining Regions of Interest


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. ENVI allows selection of any combination of polygons, points, or vectors
as a region of interest. Multiple regions of interest can be defined and drawn in any of
the Main Image, Scroll, or Zoom Windows. Regions of Interest can be “grown” to
adjacent pixels that fall within a specified threshold.

Figure 4-19: Polygon, polyline, and rectangle regions of Interest (ROIs) drawn
on the Main Image window (and displayed in the Scroll and Zoom windows).

ENVI User’s Guide Defining Regions of Interest


262 Chapter 4: Interactive Display Functions

Note
ROIs are explicitly related to the spatial size of the image in which they are defined.
If you open, or have open, images of equal spatial size with their associated ROI
Tool dialogs, ROIs drawn in one image will be displayed in all other images of the
same spatial size. You can edit or delete shared ROIs from within any of the ROI
Tools dialogs.

1. Select one of the following options:


• From the Display menu of the image that you want to add ROIs to, select
Overlay > Region of Interest or Tools > Region of Interest > ROI Tool.
• Make the display group of the image you want to add ROIs to active and
select Basic Tools > Region of Interest > ROI Tool from the ENVI main
menu.
The #N ROI Tool dialog appears, where N is equal to the display number.
2. Select whether ROI definition will take place in the Main Image window, the
Scroll window, or the Zoom window of the selected display by selecting the
“Image,” “Scroll,” or “Zoom” toggle button.
3. Draw ROIs as described in “Drawing ROIs” on page 263.
4. Add, edit, and create additional ROIs as described in the sections following.

Turning off ROI Definition


When the ROI Definition function is enabled, actions such as zooming, panning and
other operations are not enabled.
• To enable these interactive mouse operated functions without leaving ROI
Definition, click the “Off” toggle button in the ROI Tool dialog.

Defining Regions of Interest ENVI User’s Guide


Chapter 4: Interactive Display Functions 263

Figure 4-20: The ROI Tool dialog.

Drawing ROIs
There are six ROI types: Polygon, Polyline, Point, Rectangle, Ellipse, and Multi-Part
(“donut”). A single region can contain any combination of the six ROI types. Each
type has a different set of mouse button assignments. The mouse assignments and
drawing options are explained in the following sections and summarized in Table 4-
3.
Note
If you have multiple images of the same size displayed and their associated ROI
Tools dialogs open at the same time, any ROIs drawn in one image display will also
be displayed in the others.

Drawing Polygons
The polygon mode is the default method for ROI definition. Use polygons to outline a
region of interest with connected line segments.
1. In the ROI Tool dialog, select ROI_Type > Polygon.

ENVI User’s Guide Defining Regions of Interest


264 Chapter 4: Interactive Display Functions

2. Click the left mouse button in the active window to establish an initial endpoint
for an outlining segment.
As the mouse is moved to select another endpoint, a line is shown to exactly
indicate the position of the current segment.
3. Click the left mouse button again to define the segment, which is drawn in the
selected color.
• For continuous drawing, hold the left mouse button down and move the
cursor.
4. Choose additional segments in the same manner until the entire region of
interest is outlined.
• To erase the last segment defined at any point during the segment selection
process, click the middle mouse button.
5. Click the right mouse button to draw the last segment and automatically close
the polygon.
6. Move the polygon to the desired location by clicking on the diamond-shaped
handle and dragging with the left mouse button.
7. Click the right mouse button to accept the polygon.
The total number of pixels contained in the ROI are listed along with the ROI
name in the “Available Regions of Interest” list as the polygon is completed.
You may draw multiple polygons for each ROI. Each successive polygon is
drawn as above and its pixels added to the total for the region. When
completed, the polygon is filled with a solid color by default.
• To change the polygon color and fill type, click “Edit” and make the
appropriate changes when the dialog appears.
• To delete entire polygons from the ROI at any time, click the middle mouse
button while the cursor is on the desired polygon.
8. When you are satisfied with the new ROI, select File > Cancel to dismiss the
ROI Tool dialog or click the “New Region” button to define another region of
interest.

Defining Regions of Interest ENVI User’s Guide


Chapter 4: Interactive Display Functions 265

Drawing Polylines
The polyline mode is similar to the polygon mode except that a multi-segment vector
is drawn rather than a closed polygon. The regions enclosed by the defined line
segments are not selected and filled upon completion. Only the pixels comprising the
line segments themselves are selected.
1. In the ROI Tool dialog, select ROI_Type > Polyline.
2. Click the left mouse button to define the endpoints of connected line segments.
• To remove the previous segment, click the middle mouse button.
• For continuous drawing hold down the left mouse button while drawing.
3. Click the right mouse button to end the process of defining a polyline.
4. Use the handle on the polyline to move the line.
• To erase the entire polyline, click the middle mouse button on any pixel of
a previously-defined polyline.
5. Click the right mouse button to accept the polyline.
6. When you are satisfied with the new ROI, select File > Cancel to dismiss the
ROI Tool dialog or click the “New Region” button to define another region of
interest.
Drawing Points
Use the point mode to select or delete individual pixels under the cursor.
Tip
For best results, add Point ROIs in the Zoom Window.

1. In the ROI Tool dialog, select ROI_Type > Point.


2. Click the left mouse button to add the pixel currently under the cursor to the
ROI.
• To delete a previously-selected pixel (currently under the cursor) from the
ROI, click the middle mouse button.
• To delete all pixels in the currently-selected point mode ROI, click the
right mouse button.
3. When you are satisfied with the new ROI, select File > Cancel to dismiss the
ROI Tool dialog or click the “New Region” button to define another region of
interest.

ENVI User’s Guide Defining Regions of Interest


266 Chapter 4: Interactive Display Functions

Drawing Rectangles and Ellipses


Use the rectangle and ellipse modes to draw rectangles and ellipses as ROIs.
1. In the ROI Tool dialog, select ROI_Type > Rectangle or Ellipse.
2. Click the left mouse button and drag the cursor to the desired size of the
rectangle or the ellipse.
• To draw a square or circle, click and drag while holding the middle mouse
button.
3. Grab the diamond-shaped handle in the rectangle or ellipse and move the shape
to the desired location.
• To delete the shape, click the middle mouse button on the rectangle or
ellipse.
4. Click the right mouse button to accept the shape into the ROI.
5. When you are satisfied with the new ROI, select File > Cancel to dismiss the
ROI Tool dialog or click the “New Region” button to define another region of
interest.

Drawing Multi Part ROIs


Use multi part mode to draw ROIs with holes in them, or “donut” ROIs.
1. Select ROI_Type > Polygon, Rectangle, or Ellipse.
Note
You cannot draw Multi Part ROIs using point or polyline ROIs.

2. Select ROI_Type > Multi Part:On.


3. Draw the base ROI using the drawing methods for the specific ROI type as
described in the previous sections.
Note
The ROI does not become filled in when you click the right mouse button a
second time.

4. Draw any number of additional ROIs or “parts” within the first ROI to create
“holes.”
Note
The hole(s) cannot cross the path of any other polygon within its group.

Defining Regions of Interest ENVI User’s Guide


Chapter 4: Interactive Display Functions 267

Again, the ROIs do not become filled in when you click the right mouse button
the second time.
5. After adding parts to the ROI, click the right mouse button a third time to
accept the multi part ROI.
The base ROI becomes filled in, and the “parts” are removed to reveal “holes” in the
base ROI.

Mouse
ROI Mode Action Button Interaction

Polygon, Define endpoints Left Click or Press and drag


Polyline
Polygon, Remove last endpoint Middle Click
Polyline
Polygon, Close polygon; Right Click
Polyline End polyline
Polygon, Accept polygon or Right Click
Polyline polyline
Polygon, Delete entire Middle Click on defined
Polyline polygon/polyline polygon/polyline
Point Select point Left Click on pixel
Point Delete point Middle Click on pixel
Point Delete all points in ROI Right Click
Rectangle, Define shape Left Press and drag
Ellipse
Rectangle, Delete shape Middle Click within shape
Ellipse
Rectangle, Accept shape Right Click
Ellipse
Multi Part Accept multi part ROI Right Click a third time

Table 4-3: ROI Mouse Operations.

ENVI User’s Guide Defining Regions of Interest


268 Chapter 4: Interactive Display Functions

Editing ROI Attributes


You can change the names, colors, and fill type of the ROIs that are currently listed
under “Available Regions” in the ROI Tool dialog.
1. In the ROI Tool dialog, click “Edit.”
2. When the Edit ROI Parameters dialog appears, select an ROI from the list.
Note
If the ROI is displayed in more than one image display (of the same spatial size),
any edits will be reflected in all of those image displays.

3. Select from the following options to edit your ROI.


• To edit the name, enter the new name in the “Name:” text widget.
• To change the ROI color, select from the “Colors” menu.
• To define the line style, select “Line,” “Dotted,” “Dashed,” or one of the
other available line types from the “Fill” menu.
• To set the orientation and spacing of the fill, enter the desired values in the
text boxes labeled “Orien” and “Space” to the right of the “Fill” option.
Enter the orientation in degrees (counterclockwise from horizontal) and
the spacing in inches.
4. Click “OK” to return to the ROI Tool dialog.

Creating New Regions


You can draw multiple regions or interest in any image display window.
Note
If you have multiple images of the same size displayed and their associated ROI
Tools dialogs open at the same time, any ROIs drawn in one image display will also
be displayed in the others.

1. To start a new ROI, click “New Region” in the ROI Tool dialog.
A new name appears in the “Available Regions of Interest” list. 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.

Defining Regions of Interest ENVI User’s Guide


Chapter 4: Interactive Display Functions 269

ROI Options
In the ROI Tool dialog, you have many options to choose from when working with
ROIs: inputting ASCII points into an ROI, creating multiple regions of interest,
reporting ROI statistics, measuring distances and area, reporting the areas of the
ROIs, loading, erasing, deleting, plotting means, merging regions, reconciling ROIs,
and performing band thresholds to ROIs.
Note
If the ROI is displayed in more than one image (of the same spatial size), any edits
will be reflected in all of those images.

Erasing ROIs
Erasing an ROI removes it from the display, but the region of interest is still defined
and remains listed in the ROI Tool dialog.
• To remove a selected ROI overlay from the selected image, click on an ROI
name and click “Erase.” To re-display the ROI image, click on the ROI name.
• To erase all ROI overlays from the current display select Options > Erase All
Regions. To re-display the ROIs, click again on each ROI name or select
Options > Load All Regions.
Deleting ROIs
Use the Tools menu in the Main Image display, the Options menu in the ROI Tool
dialog, or the Basic Tools menu on the ENVI main menu to delete ROIs.
Warning
If the ROI to be deleted is displayed in more than one image (for images of the same
spatial size), deleting it from one deletes it from all. Once the ROIs are deleted, they
cannot be recovered unless they have been saved to a file.

Deleting ROIs from the ROI Tool dialog


• To delete a selected ROI, highlight the ROI name and click “Delete.”
• To delete all ROIs listed in the ROI Tool dialog and remove them from the
system, select Options > Delete All Regions.
Note
The ROIs are deleted from all displays of the same spatial size and from their
associated ROI Tools dialogs.

ENVI User’s Guide Defining Regions of Interest


270 Chapter 4: Interactive Display Functions

The unsaved ROIs are erased from the display(s) and deleted from the system. The
ROIs do not appear in the ROI Tool dialog(s) after being deleted.
Deleting Saved ROIs
To delete regions that are not currently displayed:
1. Select one of the following options:
• From the ENVI main menu, select Basic Tools > Region of Interest >
Delete ROIs.
• From the Display menu, select Tools > Region of Interest > Delete ROIs.
2. When the Delete Regions dialog appears, click on the names of the regions to
be deleted.
3. Click “OK” to permanently delete those ROIs.
Locating Defined ROIs
To center the zoom window over the first pixel defined in an ROI:
1. In the ROI Tool dialog, select an ROI name and click “Goto.”
2. Continue clicking on “Goto” to move the zoom window over each pixel
contained in that ROI.
Displaying Statistics for an ROI
1. In the ROI Tool dialog, click on an ROI name.
2. Click the “Stats” button.
The Average Spectrum and ROI Statistics windows appear.
The Average Spectrum plot window (Figure 4-21) displays the mean spectrum (mean
of every band for the selected ROI) in white for the file associated with the displayed
image. The standard deviation spectrum (standard deviation of every band) is plotted
both above and below the mean spectrum (+/- 1 std. deviation) in green. The
minimum and maximum spectra (minimum and maximum for every band) are
plotted above and below the standard deviation spectra in red. The plot window
containing the statistics is identical to the plot windows used for X, Y, and Z profiles,
and all interactions are the same.

Defining Regions of Interest ENVI User’s Guide


Chapter 4: Interactive Display Functions 271

The ROI Statistics window lists the file name, the region name and number of points,
and the band number, minimum, maximum, mean, and standard deviation for each
band.

Figure 4-21: The Average Spectrum and ROI Statistics Windows. These
windows are displayed by selecting “Stats” from the ROI Tool dialog.

Displaying ROI Statistics for All Regions


• To display the statistics for all defined regions of interest, select Options >
Stats For All Regions.
An ROI Statistics window and a plot window containing the mean, standard
deviation, and minimum and maximum spectra appear for each region.
Saving ROI Statistics to a File
1. In the Statistics Report window, select File > Save.
2. Enter a filename in the “Enter Output Filename” text box and click “OK.”
Displaying Mean Spectra
• To display a plot of the ROI mean values for every band (a mean spectrum),
click on an ROI name and click “Mean.”
• To display the means for all bands for all regions, select Options > Mean For
All Regions.
The means are displayed in a plot window as mean spectra in the defined ROI color.

ENVI User’s Guide Defining Regions of Interest


272 Chapter 4: Interactive Display Functions

Growing ROIs
You can “grown” regions of interest 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 regions of interest are output as points, regardless of the starting ROI
type.

1. In the Available Regions of Interest list, click on the name of the ROI
to be grown.
Within the current image window, neighboring pixels that fall within the
standard deviation threshold will be included in the grown region. Adjacent
pixels outside the current image window, regardless of pixel value, will not be
included in the ROI.
2. Click the “Grow” button.
The new grown ROI is shown in the display 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 “No” is selected, the Region Growing dialog appears.
• In the Region Growing dialog, change the values of the standard deviation
multiplier and the number of neighbors, if desired, and click “OK” to grow
the ROI with the new parameters.
• Click on “Cancel” in the Region Growing dialog to exit the growing option
without changing the original ROI.
Inputting 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 if needed.
Tip
To input the ASCII data points into a new region, click “New Region” before
completing the following procedure.

Defining Regions of Interest ENVI User’s Guide


Chapter 4: Interactive Display Functions 273

1. In the ROI Tool dialog, select ROI_Type > Input Points from ASCII.
2. When the Enter ASCII Points Filename dialog appears, select an input ASCII
filename.
3. When the Input ASCII File dialog appears, enter the column numbers for the X
and Y point coordinates.
4. Select the type of ROI that the points define by clicking on the button menu
next to the “These points comprise” label.
For polygon and polyline ROIs, the ASCII points define the vertices of
the ROI.
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 on the “Zone...” and
“Datum...” buttons.
6. Click “OK.”
Loading all Regions
• To load all regions currently defined for all images with the same spatial
dimensions as the currently selected display as shown in the “Display #” field,
select Options > Load All Regions.

Merging Regions
To merge multiple defined regions of interest into one:
1. Select Options > Merge Regions.
The Merge ROIs dialog appears with two lists of all defined regions.
2. Under “Choose Base ROI to Merge,” click on 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 arrow toggle button next to “Delete Merged ROIs?” label to select
whether or not you want the individual regions being merged to be deleted
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 “Available Regions of Interest” list.
5. Click “OK.”

ENVI User’s Guide Defining Regions of Interest


274 Chapter 4: Interactive Display Functions

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.
1. In the ROI Tool dialog, select Options > Intersect Regions.
Note
Selected regions must intersect.

2. In the ROI Intersection dialog, click on the names of the intersecting ROIs to
be included in the new ROI, then click “OK.”
The new ROI appears in the Available Regions of Interest list. It is a point type
ROI and is displayed under any overlying polygon ROIs.
Tip
If you can’t see the new point ROI in the image display, erase all other ROIs and re-
display the new ROI.

Note
You can calculate ROI intersections on-the-fly and use them when building a mask.
For more information, see “Including ROI Intersections” on page 462.

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:
• In the ROI Tool dialog, select Options > Report Area of ROIs > desired units.
If the pixel size of the image is not stored in the header, a dialog will appear:
• Enter the X and Y pixel size in meters.
The ROI Area Info dialog appears, listing each ROI name and corresponding area.
Saving ROI Area Information to an ASCII File
1. In the ROI Area Info dialog, select File > Save Text to ASCII.
2. Enter a filename.

Defining Regions of Interest ENVI User’s Guide


Chapter 4: Interactive Display Functions 275

Reporting ROI Measurements


Use 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.
Note
To take measurements of an image without using the ROI functions, see “Using the
Measurement Tool” on page 437.

1. In the ROI Tool dialog, select Options > Measurement Report.


The ROI Measurement Report dialog appears with the measurements reported.
The measurements differ depending on the active ROI type.
2. Draw the ROIs as described in “Drawing ROIs” on page 263 for specific ROI
types.
• For Polygon mode, the distance between the vertices are listed and the
perimeter and total area are reported when the polygon is closed.
• For Polylines, the distance between the vertices are listed and the total
distance is given when the polyline is completed.
• No distance measures are given when in Point mode.
• In Rectangle mode, the lengths of the sides, the perimeter, and total area
are reported.
• In Ellipse mode, the circumference and total area are reported.

Figure 4-22: The ROI Measurement Report dialog.

ENVI User’s Guide Defining Regions of Interest


276 Chapter 4: Interactive Display Functions

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.
• Select Units > the desired unit.
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
box appears.
A. In the “X Pixel Size” and “Y Pixel Size” text boxes, type the size of the
pixels in your image.
B. From the “Units” button menu, select the unit type. 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 (e.g., meters2).
• Select Area > Acres or Hectares.
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 will be 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.
• To save the measurement report:
1. In the ROI Measurement Report dialog, select File > Save Points to ASCII.

Defining Regions of Interest ENVI User’s Guide


Chapter 4: Interactive Display Functions 277

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.
Note
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:


• In the ROI Tool dialog, select Options > Reconcile ROIs.
• From the Display menu, select Tools > Region of Interest > Reconcile
ROIs.
• From the ENVI main menu, select Basic Tools > Region of Interest >
Reconcile ROIs.

Figure 4-23: The Reconcile ROIs Parameters dialog.

ENVI User’s Guide Defining Regions of Interest


278 Chapter 4: Interactive Display Functions

2. When the Reconcile ROIs Parameters dialog appears, choose the ROIs to be
reconciled by selecting from the following options:
• 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” text boxes.
B. Enter the number of samples and lines in the new image into the
appropriate text boxes.
• To have ENVI calculate the x and y offsets and the number of samples and
lines automatically:
A. Click the “Set Values from Source/Destination Files.
B. When the file selection dialog appears, choose the file where the ROI was
originally drawn and click “OK.”
C. When the next file selection dialog appears, select a destination file for the
ROI(s) and click “OK.”
3. In the Reconcile ROIs Parameters dialog, 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:
• In the ROI Tool dialog, select Options > Reconcile ROIs via Map.
• From the Display menu, select Tools > Region of Interest > Reconcile
ROIs via Map.
• From the ENVI main menu, select Basic Tools > Region of Interest >
Reconcile ROIs via Map.
2. When the Reconcile ROIs via Map Parameters dialog appears, select the
desired ROIs by clicking on the names.
3. Click “OK.”
4. Select the georeferenced file that you want the ROIs reconciled to and click
“OK.”

Defining Regions of Interest ENVI User’s Guide


Chapter 4: Interactive Display Functions 279

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
Regions of Interest.
1. Select one of the following options:
• In the ROI Tool dialog, select Options > Band Threshold to ROI.
• From the Display menu, select Tools > Region of Interest > Band
Threshold to ROI.
• From the ENVI main menu, select Basic Tools > Region of Interest >
Band Threshold to ROI.
2. When the Band Threshold to ROI Input Band dialog appears, select a band to
be thresholded.
3. When the Band Threshold to ROI Parameters dialog appears, select from the
following options.
• To make an ROI using those pixels greater than or equal to the entered
minimum value, enter only the “Min Thresh Value.”
• To select those pixels less than or equal to the entered maximum value,
enter only the “Max Thresh Value.”
• To select pixels that fall within a specified range of values, enter both a
minimum and a maximum threshold value.
• To assign an ROI name, edit the “ROI Name” text entry.
• To change the color of the ROI, select the desired color from “ROI Color”
menu.
4. Click “OK” to extract the thresholded pixels.
A warning dialog appears and list the number of pixels that satisfy the
threshold criteria.
5. Click “OK” to accept and load the ROI.
The region is listed in the ROI Tool dialog as a “Thresh Bandname,” where
Bandname is the name of the band used to extract the ROI. The number of pixels in
the region are also listed.

ENVI User’s Guide Defining Regions of Interest


280 Chapter 4: Interactive Display Functions

Calculating Buffer Zone Images for ROIs


Use Calculate Buffer Zone to calculate a buffer zone image in which 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.
1. In the ROI Tool dialog, select Options > Calculate Buffer Zone.
• If the image has more than one ROI associated with it, the Input Buffer
Zone ROIs dialog appears. Click on the names of the ROIs to be included
in the buffer zone image calculation and click “OK.”
Note
If you select more than one ROI, the distance calculated will be from the pixel to the
nearest selected ROI.

The Buffer Zone Image Parameters dialog appears.


2. Click the “Maximum Distance” arrow increment buttons to set the maximum
distance to measure, or type the value (in pixels) into the corresponding text
box.
Any pixels with a distance larger than this value will be set to the maximum
distance value +1.
3. From the “Distance Kernel” button menu, select either “Floating Point” or
“Integer” output.
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 will be the same as the ROI colors.
1. Select one of the following options:
• From the Display menu, select Tools > Regions of Interest > Create Class
Image from ROIs.
• In the ROI Tools dialog, select Options > Create Class Image from ROIs.
• From the ENVI main menu, select Classification > Create Class Image
from ROIs.

Defining Regions of Interest ENVI User’s Guide


Chapter 4: Interactive Display Functions 281

• From the ENVI main menu, 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 ROI(s) to use by clicking on the ROI name(s).
3. Click “OK.”
The Classification Image from ROIs Parameters dialog appears.
• To change the output classification image DN value of an ROI, click on the
ROI and use the arrow toggle buttons to enter a new DN value.
4. Enter an output filename and click “OK.”
The resulting classification image filename appears in the Available Bands List.
Computing ROI Separability
Use Compute ROI Separability to compute 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. For more information,
see the following reference:
J.A. Richards, 1999, Remote Sensing Digital Image Analysis, Springer-Verlag,
Berlin, p. 240.
1. Select one of the following options:
• In the ROI Tools dialog, select Options > Compute ROI Separability.
• From the Display menu, select Tools > Regions of Interest > Compute ROI
Separability.
• From the ENVI main menu, select Basic Tools > Region of Interest >
Compute ROI Separability.
2. When the file selection dialog appears, select the input file and perform any
spectral subsetting.
The ROI Separability Calculation dialog appears.
3. In the dialog, select ROIs for the separability calculation.
4. Click “OK.”

ENVI User’s Guide Defining Regions of Interest


282 Chapter 4: Interactive Display Functions

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.
• 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 regions of interest currently in memory to a file:
1. Select one of the following options:
• In the ROI Tool dialog, select File > Save ROIs.
• From the Display menu, select Tools > Region of Interest > Save ROIs to
File.
• From the ENVI main menu, select Basic Tools > Region of Interest > Save
ROIs to File.
2. When the Save ROIs to File dialog appears, click on the desired ROI name (s)
in the scrollable list with the left mouse button.
Note
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 or choose an output filename (with the extension .roi for consistency).
4. Click “OK” to save the ROI file.

Restoring Saved ROIs


1. Select one of the following options:
• In the ROI Tool dialog, select File > Restore ROIs.
• From the Display menu, select Tools > Region of Interest > Restore Saved
ROI File.

Defining Regions of Interest ENVI User’s Guide


Chapter 4: Interactive Display Functions 283

• From the ENVI main menu, select Basic Tools > Region of Interest >
Restore Saved ROI File.
2. When the file selection dialog appears, select the ROI file.
The ROI is loaded into the display group and 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 (i.e., the area encompassing) an
ROI or group of ROIs currently drawn on an image, follow these steps:
1. In the ROI Tool dialog, select File > Subset Data via ROIs.
2. When the Input File selection dialog appears, select the file to be subset.
• To apply spectral subsetting to the input file, click “Spectral Subset” and
use standard ENVI methods.
The Spatial Subset via ROI Parameters dialog appears.

Figure 4-24: In the Spatial Subset via ROI dialog, select the ROI(s) to use as the
area of a spatial subset.

3. Select the input ROI(s) by clicking on the ROI name(s).

ENVI User’s Guide Defining Regions of Interest


284 Chapter 4: Interactive Display Functions

4. Use the arrow 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.
5. Select output to “File” or “Memory.”
6. Click “OK.”
The resulting subsetted file is listed in 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 will be in the same projection.
1. Select one of the following options:
• In the ROI Tool dialog, select File > Export ROIs to EVF.
• From the Display menu, select Tools > Region of Interest > Export ROIs to
EVF.
• From the ENVI main menu, select Basic Tools > Region of Interest >
Export ROIs to EVF.
2. When the Export Regions to EVF dialog appears, select the desired ROIs to
export by clicking on the ROI names.
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 desired layer name in the “Layer Name” text box.
5. Select output to “File” or “Memory.”
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:
• In the ROI Tools dialog, select File > Export ROIs to n-D Visualizer.
• From the ENVI main menu, select Basic Tools > Regions of Interest >
Export ROIs to n-D Visualizer.

Defining Regions of Interest ENVI User’s Guide


Chapter 4: Interactive Display Functions 285

2. When the Select Input Data File dialog appears, select the input file that the
ROIs are associated with and click “OK.”
The n-D Visualizer Input ROIs dialog appears.
3. Select a ROI to export by clicking on the ROI name.
• To select all of the ROIs, click “Select All Items.”
4. Click “OK.”
An n-D Visualizer window and n-D Controls dialog appear.
5. Click on the band numbers to select those bands for rotation.
6. 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.
7. Select Options > Export Class or Export All to export the colored pixels back
to the ROI Tool dialog so they can be imported into classifications.
For more information and detailed instructions for the n-D Visualizer, see “The n-
Dimensional Visualizer” on page 636.

Outputting 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.
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 287.
1. Select one of the following options:
• In the ROI Tool dialog, select File > Output ROIs to ASCII.
• From the Display menu, select Tools > Region of Interest > Output ROIs to
ASCII.

ENVI User’s Guide Defining Regions of Interest


286 Chapter 4: Interactive Display Functions

• From the ENVI main menu, select Basic Tools > Region of Interest >
Output ROIs to ASCII.
2. When the file selection dialog appears, select the input file and perform any
spectral subsetting.
3. Click “OK.”
4. Select the ROIs to output.
• To select which parameters to output, see the following section.
5. Enter or choose an output filename and click “OK.”
Editing ASCII Output Format
You can specify which parameters are included in the ASCII output.
1. In the Output ROIs to ASCII Parameters dialog, click the “Edit Output ASCII
Form” button.
The Output ROI Values to ASCII dialog appears. By default, all parameters are
selected for output.
2. Set parameters by selecting/deselecting the corresponding check box:
• To include a label with the output, leave the “Point #” check box selected.
• To include the ROI location information in the output, leave the “ROI
Location” check box selected. Use the ROI Location arrow toggle button
to select whether the ROI location is output by one-dimensional 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 one-dimensional addresses to the pixel
locations in the file where a 1-D address = line number x number of
samples + sample number.
• To include geographic location information for georeferenced data, leave
the “Map Location” check box selected. Use the Map Location arrow
toggle button to designate output of the geographic locations in normal or
scientific notation. Use the arrow increment buttons to set the number of
significant digits.
• To include geographic (lat/lon) location information for georeferenced
data, leave the “Geo Location” check box selected. Use the Geo Location
arrow toggle button to designate output of the geographic locations in
normal or scientific notation. Use the arrow increment buttons to set the
number of significant digits.

Defining Regions of Interest ENVI User’s Guide


Chapter 4: Interactive Display Functions 287

“Map” and “Geo” are not available for non-georeferenced data.


• To include the band DN values for all input bands, leave the “Bands”
check box selected.
Each band value will fall in its own column in the output ASCII file.
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
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 Regions of Interest


288 Chapter 4: Interactive Display Functions

Hiding the ROI Tool Dialog


To hide or show the ROI Tool dialog without erasing your ROIs, see “Showing and
Hiding Overlay Dialogs and Layers” on page 220.

Closing the ROI Tool Dialog


• To close the ROI Tool dialog and quit the function, select File > Cancel.
Note that newly-created regions of interest are retained in memory even after the ROI
Tool dialog is dismissed (unless regions were specifically deleted using the “Delete”
button).

Defining Regions of Interest ENVI User’s Guide


Chapter 4: Interactive Display Functions 289

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. Once you have set all of your
parameters, 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 Main Image interactive overlay capabilities (e.g, annotation) and you can output
the map to Postscript or to a standard printer.

Figure 4-25: An QuickMap image.

ENVI User’s Guide Creating QuickMaps


290 Chapter 4: Interactive Display Functions

Note
To use the QuickMap feature, you must have a georeferenced image displayed.

If you use extremely small images for your QuickMap, the resulting QuickMap
image may not be large enough to accommodate multiple annotation objects.

1. Display a georeferenced image.


2. From the Display menu, select File > QuickMap > New QuickMap.
3. When the QuickMap Default Layout dialog appears, enter the page size, select
“Portrait” or “Landscape” page orientation, and enter your desired output map
scale.
• To change the map scale, enter a new value in the “Scale” text box, or use
the arrow increment buttons.
4. Click “OK.”
The QuickMap Image Selection window appears.
5. Select from the following options to select the image subset to be used 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” text boxes, or use the
arrow increment buttons to select dimensions.
• Click the “Spatial Subset” button and use standard ENVI spatial subset
methods.
Note
You cannot enlarge the red box to a size that causes the output image size to be
larger than what will fit on the selected page size at the selected map scale.

6. Click “OK.”
The #N QuickMap Parameters dialog appears, where “N” is the number of the
associated display group.

Setting QuickMap Parameters


Note
If you use extremely small images for your QuickMap, the resulting QuickMap
image may not be large enough to accommodate multiple annotation objects.

Creating QuickMaps ENVI User’s Guide


Chapter 4: Interactive Display Functions 291

Figure 4-26: In the QuickMap Parameters dialog, add and edit the elements of
your map and save or restore QuickMap templates.

1. When the QuickMap Parameters dialog appears, select from the following
options:
• To add a title to the top of the map, type the text in the “Main Title” text
box.
• To add text to the lower left or lower right corners of the map, type the text
into the corresponding text boxes.
• To automatically load the map projection information from the ENVI
header into either the “Lower Left” or “Lower Right” text boxes, right-
click in the text box and select “Load Projection Info.”
• To change the font used for any title, select a new font from the
corresponding button menu and enter or select the point size.

ENVI User’s Guide Creating QuickMaps


292 Chapter 4: Interactive Display Functions

• To set the justification for any title, select from the corresponding button
menu.
“Center” is the default.
• 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 the “Edit Logo Files and
Placements” button. 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” button menu.
• To add a declination diagram, click the “Declination Values” button. 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 the “Change Mapping Parameters” button.
2. In the QuickMap Parameters dialog, click “Apply.”
ENVI automatically adds a virtual border to your QuickMap image, places
your selected titles and annotation onto your image, and produces a map,
which is displayed as a new standard ENVI Display Group. The QuickMap
Parameters dialog remains open.
Note
If you added a logo, it will appear as a red box with an “RGB” label on the map, but
will appear correctly when printed.

3. Use the QuickMap Parameters dialog to edit the map. Click “Apply” to view
the changes.
• To edit the borders, add more annotation or overlay elements, or edit the
existing map elements, use standard ENVI interactive display functions as
described in this chapter.

Printing QuickMaps
To print the QuickMap:
1. In the QuickMap Main Image window, select File > Print.
2. Select the “Output QuickMap to Printer” or “Standard Printing” check boxes.

Creating QuickMaps ENVI User’s Guide


Chapter 4: Interactive Display Functions 293

The Output QuickMap printing will scale 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.
Tip
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.

3. Click “OK.”
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 Main Image window as described later in
this chapter.

QuickMap Templates
After creating a QuickMap, you can save the parameters in a template file to be used
on other georeferenced images of the same dimension and pixel size.
1. In the QuickMap Parameters dialog, click “Save Template.”
2. Enter a filename (ENVI will add a .qm extension). Click “OK.”
Restoring QuickMap Templates
To open and apply an existing map template, follow these steps:
Note
Use QuickMap templates only on images of the same dimension and pixel size of
the image from which the template was created.

1. Select one of the following options.


• From the Display window of a georeferenced image, select File >
QuickMap > from Previous Template.
• In the QuickMap Parameters dialog, click the “Restore Template” button.
The template parameters are displayed in the QuickMap Parameters dialog.
2. Click “Apply” to apply the QuickMap to the image.

ENVI User’s Guide Creating QuickMaps


294 Chapter 4: Interactive Display Functions

• To edit template parameters, see “Setting QuickMap Parameters” on


page 290.

Creating QuickMaps ENVI User’s Guide


Chapter 4: Interactive Display Functions 295

Overlaying Vectors
Use ENVI Vector Windows 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 ArcView Shape files. ENVI Vector Windows
consist of a vector display window or image window and a Vector Parameters #N
dialog where N is the vector or image display number.
Use Vector Layers to overlay vector layers on an image, to control the appearance of
the vectors, and to interact with the vector attributes. Also use ENVI’s interactive
vector functions to edit and query attributes associated with ArcView Shape files and
to create your own vector files and attributes.
Note
You can also access vector functions from the Vector menu on the ENVI main
menu. For more information, see Chapter 11, “Vector Tools”.

Opening Vector Layers


Each image display can have its own vectors, which are displayed in the Main Image,
Scroll, and Zoom windows.
Note
The mouse button and cursor function differently in ENVI Vector Windows. For
information, see “Cursor Functions in Vector Windows” on page 204.

• To read vector data from disk files, see “Opening Vector Files” on page 89.
• To read USGS DLG files from tape, see “Reading USGS DLG Tapes” on
page 137.
• To open vector layers from the Available Vectors List, see “The Available
Vectors List” on page 196.

ENVI User’s Guide Overlaying Vectors


296 Chapter 4: Interactive Display Functions

Working with Vector Layers


Use the Vector Window Parameters dialog, which appears with any vector window,
(Figure 4-27) to control the appearance of vector layers, to add new vectors, export
vector layer coordinates for use in image-to-map registration, and view, edit, and
query vector attributes. When vectors are overlaid on an image display they can be
plotted in the Image window and/or Scroll and Zoom windows.
Vector data often consist of multiple layers of vector data. For example, Figure 4-27
shows that the available vector layers include “Cities,” “Counties,” “Roads,” and
“States.”
1. From the Display menu, select Overlay > Vector Layers.
The Vector Parameters dialog appears.
2. Use the Vector Parameters dialog to manage and edit vector layers (see the
following sections for details).

Figure 4-27: A Vector Window (left) and its associated Vector Window
Parameters dialog.

Overlaying Vectors ENVI User’s Guide


Chapter 4: Interactive Display Functions 297

Selecting Vector Display Windows


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 or add new vectors in any of
the three display windows.
• To select the image display windows to plot the vectors in, click in the desired
check boxes next to the “Window” parameter at the bottom of the Vector
Parameters dialog.
• To select which window is used for editing or adding vectors, click on the
button next to the desired display window type at the top of the dialog.

The Vector Layers List


The Available Vector Layers List in the Vector Parameters dialog or in the Available
Vectors List (see “The Available Vectors List” on page 196) shows the vector layers
currently available for display. Use the Available Vector Layers List to interact with
all of your individual vector layers.
Turning Layers On/Off
In the Vector Parameters dialog, an asterisk next to a layer name indicates that the
layer is “On,” which means it will be plotted when the “Apply” button is clicked. If
there is not an asterisk next to a layer name, then the layer is “Off,” which means it
will not be plotted when the “Apply” button is clicked. The default for each layer is
“On.”
• To turn layers on and off, double-click with the left mouse button on the layer
name in the Vector Parameters dialog.
Or:
1. In the Vector Parameters dialog, click “Edit Layers.”
The Edit Vector Layers dialog appears.
2. In the list of layer names, click on a layer name to highlight it.
3. Click the arrow toggle button next to the layer names to set each layer’s display
“On” or “Off.”

ENVI User’s Guide Overlaying Vectors


298 Chapter 4: Interactive Display Functions

Setting the Current Layer Color


The color shown next to “Current Layer” in the Vector Window Parameters dialog is
the color of the currently selected layer.
• To cycle forward through the available colors, click on the colored box with
the right mouse button.
• To cycle backwards through the color selections, click on the colored box with
the left mouse button.
• To reset the color to the original color, click on the colored box with the middle
mouse button.
• To apply the selected color to the selected vector, click “Apply.”
• To change the color, see “Editing Vector Layers” on page 299.
Setting the Current Highlight Color
The color shown in “Current Highlight” box is the color that will be used to highlight
a vector when it is clicked on in a vector attributes table (see “Vector Attributes” on
page 309) or to highlight an existing vector when it is edited (see “Controlling Cursor
Modes” on page 301).
• To cycle forward through the available colors, click on the colored box with
the right mouse button.
• To cycle backwards through the color selections, click on the colored box with
the left mouse button.
• To reset the color to the original color, click on the colored box with the middle
mouse button.

Exporting Vector Coordinates


When ENVI’s image-to-map registration function is active, use the “Export” button
in the Vector Window Parameters dialog to export vector coordinates to the image-to
-map registration function (see “Entering Map GCPs from Vector Windows” on
page 714).
• To export the current vector cursor coordinates to the image-to-map
registration function, click the “Export” button.
Note
If registration session is not active, clicking the “Export” button does nothing.

Overlaying Vectors ENVI User’s Guide


Chapter 4: Interactive Display Functions 299

Removing Vector Layers


To remove a vector layer from the Available Vectors Layers list in the Vector Window
Parameters dialog:
1. Click on the layer name.
2. Click on the “Remove Layer” button.
Clearing Layers
• To clear the Available Vector Layers list from the Vector Parameters dialog,
click “Clear Layers.”

Editing Vector Layers


Use the options in the Edit Vector Layers dialog to change the appearance of vector
layers.
1. In the Vector Window Parameters dialog, click “Edit Layers.”
2. When the Edit Vector Layers dialog appears, select the vector to edit by
clicking on its name in the list.
• To edit a the layer color, linestyle, and line thickness, click on the
appropriate button menu and select from the different options.
• To change the polygon fill type and style, click on the “Fill” button menu
select from the options described in “Setting Polygon “Fill” Attributes” on
page 228.
• To select the symbol used to plot points, click on the “Symbol” button
menu and select a symbol.
• To designate the size of the symbol, enter a size into the “Size” text box.
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 point layer name and click on the
“Advanced” button.
The Point Attribute Relationships dialog appears.
2. Click in the “Associate attribute name with symbol” check box.
3. Use the “Attribute” button menu to select the desired column name to plot
from the attribute table.

ENVI User’s Guide Overlaying Vectors


300 Chapter 4: Interactive Display Functions

4. Select left, middle, or right alignment, font type, text size and orientation using
the appropriate parameters.
5. Click “OK” to return to the Edit Vector Layers dialog.
Note
For more information about attributes, see “Vector Attributes” on page 309.

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 on the
“Advanced” button.
The Point Attribute Relationships dialog appears.
2. Click in the “Associate attribute value with symbol size” check box.
3. From the “Attribute” button menu, select the name of the attribute table
column that contains the data to be used to scale the symbol size.
Note
The column must contain numeric values.

4. Select the minimum and maximum symbol size to use.


5. Click “OK” to return to the Edit Vector Layers dialog.
Applying Vector Layer Edits
After selecting from the options in the Edit Vector Layers dialog, apply the changes
to the vectors:
1. In the Edit Vector Layers dialog click “OK” to exit.
2. In the Vector Parameters dialog, click the “Apply” button to apply the changes
to the vector display.

Overlaying Vectors ENVI User’s Guide


Chapter 4: Interactive Display Functions 301

Figure 4-28: The Edit Vector Layers dialog.

Controlling Cursor Modes


Use the Mode menu to control the cursor mode in vector windows. Use the cursor
mode to select vectors and to highlight their corresponding attributes in the attribute
table, to edit existing vectors, to add new vectors, to input vector points from an
ASCII file, or to delete vectors.
Tip
To undo changes or cancel the addition of a new vector layer, see “Undoing Vector
Changes” on page 307.

ENVI User’s Guide Overlaying Vectors


302 Chapter 4: Interactive Display Functions

Selecting Vectors
To use the cursor to select a vector and to see the corresponding vector attribute
information:
1. In the Available Vector Layers list, click on the vector layer.
2. Select Options > Vector Information or Options > View/Edit Attributes.
3. Select Mode > Cursor Query.
4. Click with the left mouse button on the desired vectors in the Vector Window
or image display.
The associated attributes are displayed in the Vector Information dialog or
highlighted in the vector attributes table.
Editing Existing Vectors
1. In the Available Vector Layers list, click on the vector layer to be edited.
2. Select Mode > Edit Existing Vectors.
3. Click on a vector with the left mouse button.
It is highlighted (see “Setting the Current Highlight Color” on page 298).
4. Click and drag the diamond shaped handles using the left mouse button to edit
the vectors.
• To undo all changes, click with the middle mouse button.
• To snap the selected vector handle to the nearest point of in that layer,
double-click with the left mouse button.
5. Click the right mouse button to end the editing and to make the changes fixed.

Adding New Vectors


To add a new vector polygon, polyline, rectangle, ellipse, or point vector:
1. In the Available Vector Layers list, click on the vector layer that the vectors
will be added to.
2. Select Mode > Add New Polygon, Add New Polyline, Add New Rectangle, Add
New Ellipse, or Add New Point.
3. Click with the left mouse button to define points, polygon or polyline vertices.
Click and drag to draw rectangles or ellipses.
• To undo the last point, click with the middle mouse button.

Overlaying Vectors ENVI User’s Guide


Chapter 4: Interactive Display Functions 303

4. Click the right mouse button to get a diamond shaped handle which can be
used to move the vector position.
• Click with the middle mouse button to delete the vector.
• Double click with the left mouse button to snap the selected vector handle
to the nearest point in that layer.
5. Click the right mouse button to “fix” the new vector.

Adding ASCII Points to Vector Layers


To read points from an ASCII file (e.g., GPS points) and add them to a vector layer:
1. In the Available Vector Layers list, click on the vector layer that the points will
be added to.
2. Select Mode > Input Points from ASCII.
3. Select the input ASCII file.
4. When the Input ASCII file dialog appears, select the x and y column numbers.
5. Use the pulldown menu to select the type of vector the points define, a
polygon, polyline, group of points (as one vector), or individual points.
6. Click “OK” to add the points to the vector layer.
Deleting Vectors from Layers
1. In the Available Vector Layers list, click on the vector layer that the vector will
be deleted from.
2. Click on the vector to delete with the left mouse button.
3. Select Mode > Delete Vector.

Vector Layer Options


Use the Options menu in the Vector Parameters dialog to import additional vector
layers, arrange the overlay order of the layers, place annotation in the vector window,
change the plot parameters, get vector information, interact with vector attributes (see
“Vector Attributes” on page 309), and to undo and save changes to vectors.

ENVI User’s Guide Overlaying Vectors


304 Chapter 4: Interactive Display Functions

Vector Window Shortcut Menu


Many options in vector windows can also be accessed by right-clicking in the vector
window and selecting from the shortcut menu that appears (see Figure 4-29).

Figure 4-29: Right-click in a vector window to access the shortcut menu.

Descriptions of individual menus can be found in this chapter.


Bringing a Vector Parameters Window to the Front
If you have many display windows open and the Vector Parameters dialog associated
with the current vector window is hidden behind other windows, you can use the
vector window shortcut menu to find it and bring it to the front.
• Right-click anywhere in the vector window and select <Find Parameters
Window> from the shortcut menu.
Loading Additional Vectors
Use this procedure to load additional vectors from files that are already open in the
Available Vectors List.
1. In the Vector Parameters dialog, select Options > Import Layers.

Overlaying Vectors ENVI User’s Guide


Chapter 4: Interactive Display Functions 305

2. When the Import Vector Layers dialog appears, select the vector files to be
imported by clicking in the boxes next to filename(s).
• To cancel the selection process, click “Cancel.”
3. Click the “OK” button to return to the Vector Parameters dialog.
The selected files appear in the Available Vector Layers list of the Vector Parameters
dialog and are available for display.

Creating Empty Vector Layers


Use Create New Layer to create a new and empty layer when overlaying vectors on a
display.
1. Select Options > Create New Layer.
2. When the New Vector Layer Parameters dialog appears, enter a layer name and
select output to “File” or “Memory.”
3. Click “OK.”
The layer name appears in the Available Vector Layers list.
Changing Plot Orders
All vectors are plotted in the order that they are listed in the Available Vector Layers
list. Use this procedure to change that order.
1. Select Options > Arrange Layer Order.
2. When the Vector Layer Ordering dialog appears, click on a layer name and
drag it to the desired plot order precedence.
3. Click “OK.”
4. Click “Apply” in the Vector Parameters dialog.
The vector layers are replotted based on the new order.
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 layer(s), in
units of pixels. If your vectors are overlaid on a display window, the displayed image
is used to create the output buffer zone image. If the vectors are displayed 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.

ENVI User’s Guide Overlaying Vectors


306 Chapter 4: Interactive Display Functions

1. In the Vector Parameters dialog, select Options > Calculate Buffer Zone.
• If your vector layer(s) is/are not overlaid on a displayed image, the Select
Associated Data File dialog appears. Select the input image file and click
“OK.”
• If you have more than one vector layer open, the Buffer Zone Input Layers
dialog appears. Click on the names of the layers to be included in the
buffer zone image and click “OK.”
Note
If you select more than one layer, the distance will be calculated from the pixel to
the nearest selected layer.

The Buffer Zone Image Parameters dialog appears.


2. Click the “Maximum Distance” arrow increment buttons to set the maximum
distance to measure, or type the value (in pixels) into the corresponding text
box.
Any pixels with a distance larger than this value will be set to the maximum
distance value +1.
3. From the Distance Kernel button menu, select “Floating Point” or “Integer”
output.
4. Select output to “File” or “Memory.”
5. Click “OK.”
Adding Annotation to Vector Displays
• To add annotation to vector displays or to add a vector key, select Options >
Annotate Plot. For further instructions, see “Annotating Images” on page 222.
• To add annotation when vectors are overlaid on an image display, select
Overlay > Annotation in the display window.
Resizing Vector Windows
To change the size of the vector window (in projection coordinates):
1. In the Vector Parameters dialog, select Options > Plot Parameters.
2. Enter the desired values in the “X/Ymin” and “X/Ymax” text boxes in the data
projection coordinates.
• To reset the data ranges to the size of the bounding box, click “Reset
Ranges.”

Overlaying Vectors ENVI User’s Guide


Chapter 4: Interactive Display Functions 307

3. Click “Apply” to apply the new data range to the vector window.

Adding Borders and Tick Marks


To add a border, tick marks, and tick labels to the vector window:
1. Select Options > Plot Parameters.
2. Enter the desired values (in pixels) in the four “Plot Border Values” text boxes,
for the top, right, bottom, and left sides of the window.
3. Select the background color from the “Background” button menu.
4. Enter the number of X and Y tick intervals in the appropriate text boxes.
Tick marks are plotted in all the borders and labels (in the vector’s projection
units) are displayed 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, select
Options > Reset Plot Range.

Undoing Vector Changes


Use the Undo options to undo changes that have not been saved.
• To undo the last edit, addition, or deletion, select Options > Undo Last
Change.
• To undo all edits, additions, or deletions, select Options > Undo All Changes.
Saving Changes
• To save changes made to vectors, select Options > Save Changes to File.
Note
You cannot “undo” saved changes.

Managing Vector Layer Files


Use the File menu in the Vector Window Parameters dialog to open new vector files,
save and restore vector template files, export vector layers to ROIs or to an ArcView
Shape file, and output the vector display window.
Note
ENVI vector files can be converted to DXF by selecting Vector > Convert EVF to
DXF (see “Converting EVFs to DXF Files” on page 786).

ENVI User’s Guide Overlaying Vectors


308 Chapter 4: Interactive Display Functions

Opening Additional Vector Files


1. In the Vector Parameters dialog, select File > Open Vector File > vector
file type.
2. When the standard file selection dialog appears, select the vector file (see
“Opening Vector Files” on page 89 for details).
Saving Vectors to Template Files
You can save the current vector setup to a template file for repeated use.
1. In the Vector Parameters dialog, select File > Save Layers to Template.
2. Enter an output template filename with the extension .vec for consistency.
ENVI will save your current vector setup, including the loaded vectors, colors,
linestyle and thicknesses, to a file with the extension .vec.
Restoring Layers from Saved Templates
1. Select File > Restore Layers from Template.
2. Select a .vec file.
The associated vector files are automatically opened, if needed.
Note
Vectors that are in memory only cannot be saved and restored.

Exporting Vector Locations to GCPs


If you have a vector file for the area of an image to be map-registered, you can extract
the map coordinates directly from the vector data and load them into the Ground
Control Points Selection dialog by right-clicking on an location in the vector window
and selecting Export Location from the shortcut menu.
For details, see “Entering Map GCPs from Vector Windows” on page 714.
Exporting Vector Layers to ROIs
1. In the Vector Parameters dialog, select the layer to export from the Available
Vector Layers list.
2. Select File > Export Layer to ROI.
3. When the Select Data File to Associate with new ROIs dialog appears, select
the desired data file.

Overlaying Vectors ENVI User’s Guide


Chapter 4: Interactive Display Functions 309

The ROI name appears in the ROI Tool dialog.


Warning
Exporting layers to ROIs can create very large ROIs.

Exporting Vector Layers to ArcView-Compatible File Sets


Use Export Layer to ArcView to export vector layers to an ArcView-compatible file
set, which includes a shape file (.shp), an index file (.shx), and a data base file
(.dbf):
1. In the Vector Parameters dialog, select the vector layer to be exported by
clicking on its name in the Available Vector Layers list.
2. Select File > Export Layer to ArcView.
3. When the Output Layer to ArcView Shape File dialog appears, enter the
desired output filename and click “OK.”
Each ArcView vector file can contain only one type of vector (polygon, point,
etc.) so ENVI uses a base name and appends extensions to the base name for
each vector type. The extensions used are a .pg for the polygons, a .pl for
the polylines, and a .pt for the points.
Warning
The vector layers that are exported to ArcView must be topologically correct or the
results in ArcView will be unpredictable.

Outputting Vector Displays


• To output the vector display window, select File > Save Plot As > Postscript or
Image File in the Vector Parameters dialog.
• To print the vector display, select File > Print.
For detailed instructions, see “Display Output Options” on page 398.

Vector Attributes
Vector layers may have attributes associated with them. ENVI reads ArcView Shape
file and MapInfo Interchange file attributes. The attributes are stored in a dBASE II
table (.dbf) for ArcView and in a .mid file for MapInfo.
Use the ENVI 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

ENVI User’s Guide Overlaying Vectors


310 Chapter 4: Interactive Display Functions

associate point symbol sizes with attribute values (see “Editing Vector Layers” on
page 299).

Viewing Vector Attributes


1. In the Vector Parameters dialog, click on a vector layer in the Available Vectors
list.
2. Ensure that Mode > Cursor Query is selected.
3. Select Options > Vector Information.
The Vector Information dialog appears.
4. Click with the left mouse button on the desired vectors in the Vector Window.
The associated attributes are displayed in the Vector Information dialog.
Creating New Vector Layers
To make a new vector layer using a simple mathematical and logical attribute query
expression:
1. In the Available Vector Layers list, click on a vector layer.
2. Select Options > Query Attributes.
The Layer Attribute Query dialog appears.
3. Click on the “Start” button.
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 pulldown menu.
5. Select one of the following mathematical expressions from the pulldown
menu:
“>” greater than
“>=” greater than or equal
“<” less than
“<=” less than or equal
“==” equals
“!=” not equals
6. Enter a query value in the text box.

Overlaying Vectors ENVI User’s Guide


Chapter 4: Interactive Display Functions 311

The value can be a string (case sensitive) or numeric value depending on the
attribute type.
7. Click “OK.”
The query expression is added to the list in the Layer Attribute Query dialog.
8. To make a more complicated query expression using logical operators, choose
from the following options:
• Click “AND” and follow steps 4-7 to do a query that must satisfy both
entered mathematical expressions.
• Click “OR” and follow steps 4-7 to do a query that must satisfy one of the
entered mathematical expressions.
• Click “Clear” to clear the query expression.
9. Enter a query layer name in the appropriate text box.
10. Select output to “File” or “Memory.”
11. Click “OK.”
The new layer appears in the Available Vector Layers list.
Adding Attributes to Vectors
To add attributes to a vector layer that does not have any:
1. In the Available Vector Layers list, click on a vector layer.
2. Select Options > Add Attributes.
The Attribute Initialization dialog appears with one field defined.
3. Select from the following options to edit, add, or delete field parameters.
• Change the field name using the “Name” text box.
• Select the field type from the “Type” pulldown menu.
Available types include character, numeric, logical, and date. The logical
field contains a single character, either a Y or N, T or F, or ?.
• Enter the width of the field in the table in the “Width” box.
• Enter the number of digits to the right of the decimal in the “Decimal
Count” box for a numeric field.
• Click on “Add Field” to add a new field to the Defined Attribute Fields list.

ENVI User’s Guide Overlaying Vectors


312 Chapter 4: Interactive Display Functions

• Select a field name from the Defined Attribute Fields list and click “Delete
Field” to remove the field from the list.
4. Click “OK.”
An attribute table is started (see “The Attributes Table” on page 312).
The Attributes Table
Use the ENVI attributes table to view, edit, sort, and save vector attribute data. The
attributes table shows the attribute names at the top of each column and the attribute
record number at the left of each row. The attributes table has two pulldown menus,
File and Options.
Highlighting Attribute Data
To select attribute data in the attributes table:
1. In the Available Vector Layers list, click on a vector layer.
2. Select Options > View/Edit Attributes.
The ENVI Attributes table appears.
3. Click with the left mouse button on the desired vectors in the Vector Window.
The associated attributes are highlighted in the ENVI Attributes table.
Highlighting Vectors
• To highlight the vector that corresponds to a selected attribute record, click on
the attribute record number.
The Vector Window centers on the corresponding vector and the vector is
highlighted in the “Current Highlight” color.
Editing Single Attribute Values
• To edit a single attribute value, double click in the desired attribute field and
enter the new value.

Overlaying Vectors ENVI User’s Guide


Chapter 4: Interactive Display Functions 313

Figure 4-30: A Vector Attribute Table.

Adding New Attribute Columns


To add new columns to the Attribute Table:
1. In the Attribute Table, select Options > Add Record Columns.
The Attribute Initialization dialog appears.
2. Enter the new attribute information.
Deleting Attribute Columns
To delete an attribute column from the table:
1. Click on the column name to highlight the column.
2. Select Options > Delete Record Column.
Sorting Table Information
Sort the attribute table using the values or strings in a column (in a forward, reverse,
or original order).
1. Click on the column name to use as a basis for the sorting.

ENVI User’s Guide Overlaying Vectors


314 Chapter 4: Interactive Display Functions

2. Select Options > Sort by selected column forward, Sort by selected column
reverse, or Sort by original order.
Replacing Attributes with a Single Value
To replace cells in the same column with a single value:
1. Select one of the following options:
• To replace the entire column, click on the column name.
• To replace selected cells, click and drag with the cursor to highlight the
cells.
2. Select Options > Replace selected cells with value.
3. When the Replace Table Cells with Value dialog appears, enter the desired
string or numeric value and click “OK.”
Replacing Attributes with ASCII Data
To replace cells in the same column with values from an ASCII file:
1. Select one of the following options:
• To replace the entire column, click on the column name.
• To replace selected cells, click and drag with the cursor to highlight the
cells.
2. Select Options > Replace selected cells with ASCII values.
3. Select the desired input ASCII filename.
4. When the Input ASCII File dialog appears, select the desired column number
(strings can only have one column), and starting and ending row numbers.
5. Click “OK” to enter the data into the attribute table.
Saving Changes
• To save changes made to the attribute table, select File > Save Changes.
Warning
This writes over the existing attribute file.

Saving Attribute Tables to ASCII Files


1. In the Attribute Table, select File > Save Records to ASCII.
2. When the Output Records to ASCII dialog appears, enter an output filename.

Overlaying Vectors ENVI User’s Guide


Chapter 4: Interactive Display Functions 315

Closing Attribute Tables


• To close the attribute table, select File > Cancel.
If any changes are unsaved, ENVI asks if you want to save them.

Hiding the Vector Parameters Dialog


To hide or show the Vector Parameters dialog without erasing your vector layers, see
“Showing and Hiding Overlay Dialogs and Layers” on page 220.

Closing the Vector Parameters Dialog


To close the Vector Parameters dialog and to erase vectors from an image display:
• In the Vector Parameters dialog, select File > Cancel.

ENVI User’s Guide Overlaying Vectors


316 Chapter 4: Interactive Display Functions

Contrast Stretching and Quick Filtering


Use Enhance to perform quick contrast stretches, to perform interactive contrast
stretching using histograms and to apply quick filter enhancements to the displayed
data only. The enhancements are not applied to the data files. Use contrast stretching
to adjust the color or grayscale range of a selected image so it fills the computer
display's dynamic range and improves the contrast in the image. Different stretching
options allow you to do this using both linear and non-linear methods.
When an image is displayed initially, its default stretch is determined in one of three
ways: An ENVI look-up-table (LUT) is automatically applied to the data if a LUT
was saved previously (see “Saving Stretch LUTs” on page 331); if a LUT does not
exist for the displayed band(s), the default stretch defined in the .hdr file is used
(see “ENVI Header Format” on page 879); if there is no default stretch defined in the
.hdr file, the default stretch defined in the envi.cfg file is applied (see
“Configuration File Details” on page 867). ENVI provides both default quick
stretching and interactive stretching.

Figure 4-31: Access interactive stretching and filtering options from the
Enhance Menu.

Contrast Stretching and Quick Filtering ENVI User’s Guide


Chapter 4: Interactive Display Functions 317

Display Filtering
Use Filter to choose sharpening, smoothing, and median filters. These filters are
applied to the displayed data only and used to quickly enhance the displayed data.
The enhanced displayed image can be output to a file or printer (see “Display Output
Options” on page 398).

Sharpening Filters
The sharpening filters perform a high pass convolution on the data in the image
displays windows (image, scroll, and zoom). Three types of sharpening filters are
available, each one with a differing amount of data add back. The number in brackets
next to the word “Sharpen” is the kernel center value. Therefore, the sharpening
filters with higher numbers in the brackets have a larger amount of the original data
added back to the filtered image.
Note
When using the Sharpen filters with unsigned integer data, the result may not be
properly displayed due to the underflow of negative numbers. To avoid this, use File
> Convolutions from the ENVI main menu instead.

Smoothing Filters
Two smoothing filters are available. The “Smooth [3x3]” filter uses a 3x3 kernel size
and the “Smooth [5x5]” filter uses a 5x5 kernel size. The larger kernel size results in
more smoothing.

Median Filters
Two median filters are available, with kernel sizes of 3x3 and 5x5. The median filters
replace the center pixel value with the median value in the kernel. These filters can
help reduce salt and pepper type noise or speckle.

Applying Filters
• To apply a filter to your displayed data, select Enhance > Filter > filter type.
For more filtering functions and information, see Chapter 8, “Filters”.

ENVI User’s Guide Display Filtering


318 Chapter 4: Interactive Display Functions

Applying Default (Quick) Stretches


Select from several default stretching options that use the data from the Main Image
window, the subsampled Scroll window, or the Zoom window.
• From the Display menu, select Enhance > Linear, Linear 0-255, Linear 2%,
Gaussian, Equalization, or Square Root to stretch the displayed image using
statistics from the Main Image window “[Image],” the Scroll window
subsampled data “[Scroll],” or the Zoom window data “[Zoom]” without your
interaction.
Note
You can also apply quick stretches from within the Interactive Contrast Stretching
dialog (see “Applying Default Stretches” on page 323.)

Quick Linear
The Quick Linear stretch 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.

Quick Linear 0-255


The Quick Linear 0-255 stretch does not actually stretch the data—it displays the
actual DN values of the pixels as computer screen display values that range from 0 to
255, where 0=no brightness and 255=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.

Quick 2%
The Quick 2% option applies a linear stretch with a 2% clip on both ends of the
displayed data.

Quick Guassian
The Quick Gaussian applies a Gaussian stretch with a mean of DN 127 and the data
values at ± 3 standard deviations set to 0 and 255.

Applying Default (Quick) Stretches ENVI User’s Guide


Chapter 4: Interactive Display Functions 319

Quick Equalization
The Quick Equalization stretch applies a histogram equalization stretch of the
displayed data.

Quick Square Root


The Quick Square Root stretch takes the square root of the input histogram and then
applies a linear stretch.

ENVI User’s Guide Applying Default (Quick) Stretches


320 Chapter 4: Interactive Display Functions

Matching Histograms
Use Histogram Matching to automatically match the histogram of one displayed
image to another to make the brightness distribution of the two images as close as
possible. With this function, the output histogram of the window where the function
was started is changed to match the current output histogram of the selected image
display window. You can use this feature on both grayscale and color images and can
select the histogram source for the input histogram.
Note
To perform Histogram Matching you must have at least two images displayed.

1. From the image display 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.”
5. The display stretch changes to match the selected histogram.
• 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.

Matching Histograms ENVI User’s Guide


Chapter 4: Interactive Display Functions 321

Using Interactive Stretching


Use Interactive Stretching to stretch your image data by interacting with histograms.
1. From the Display menu, select Enhance > 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 color of the histogram matches the color of the
selected band (the red band is displayed by default). At the bottom of the
histogram window, the stretch type and the histogram source are listed.
• To view the histogram for the green or blue bands of a color image, click
the “G” or “B” toggle button.
2. Select an “apply” option.
• To have stretching or histogram changes applied to your images
automatically, select Options > Auto Apply: On.
• To have changes applied to your image only when you click the “Apply”
button, select Options > Auto Apply: Off.
3. Set the stretch parameters as described in “Setting Stretch Parameters” on
page 321.

Viewing Data Details


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

Setting Stretch Parameters


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

Changing Min/Max Stretch Values


• To change the minimum and maximum stretch values, click with the left
mouse button on either of the dotted stretch bars and drag them to a new
location. Or, enter the values in the text boxes at the top of the dialog.

ENVI User’s Guide Using Interactive Stretching


322 Chapter 4: Interactive Display Functions

Tip
When specifying the minimum and maximum parameters in the text boxes, enter
either the actual values desired (e.g., 37 for the minimum and 68 for the maximum)
or a percentage of the data (e.g., “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 4-32: The Interactive Contrast Stretching dialog.

Locking Stretch Bars


• To lock the distance between the minimum and maximum stretch bars, select
Options > Stretch Bars:Locked.
The distance between the stretch bars is locked and you can move the two bars
as one.
• To unlock the bars, select Options > Stretch Bars:Unlocked.

Using Interactive Stretching ENVI User’s Guide


Chapter 4: Interactive Display Functions 323

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, including the quick default
stretches that are also accessible from the Display Enhance menu.

Applying Default Stretches


The “quick” stretches available from the Display Enhance menu are also accessible
from the Interactive Contrast Stretching dialog:
• Select Stretch_Type > Defaults > stretch type.
The histogram is automatically updated to reflect the selected quick stretch.
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 set to intermediate output values linearly.
1. From within the Interactive Contrast Stretching dialog, select Stretch_Type >
Linear Contrast Stretch.
2. To determine the minimum and maximum input value move the minimum and
maximum vertical bars (dotted white lines) on the input histogram to the
desired location using the left mouse button or enter the minimum and
maximum input values by entering the desired DN values or a percentage of
the data (e.g., 5% for minimum and 95% for maximum) in the “Stretch” text
boxes.
For information about interacting with the histogram window, see “Plotting
Histograms in an ENVI Plot Window” on page 330.
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 330.
Applying Piecewise Linear Contrast Stretches
A piecewise linear contrast stretch can be interactively defined by using the mouse to
position points in the input histogram. Linear segments connect the points to provide
linear stretching between them.

ENVI User’s Guide Using Interactive Stretching


324 Chapter 4: Interactive Display Functions

1. Select Stretch_Type >Piecewise Linear.


A transfer function is plotted on the input histogram.
2. Click the middle mouse button 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, click the left mouse button on the symbol
and drag it to a new position.
• To delete points, click on the symbol with the right mouse button.
• To enter input and output values manually, select Options > Edit Piecewise
Linear.
The resulting histogram is plotted in the output display. The output histogram
shows the distribution of data with the new stretch applied.
3. Click “Apply” to apply the stretch to the displayed data.
For information about interacting with the histogram window, see “Plotting
Histograms in an ENVI Plot Window” on page 330).
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. Select Stretch_Type > Gaussian.
2. Enter minimum and maximum values for the stretch.
• To enter the desired number of standard deviations manually, select
Options > Set Gaussian Stdv.
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.
3. Click “Apply” to apply the stretch to the displayed data.

Using Interactive Stretching ENVI User’s Guide


Chapter 4: Interactive Display Functions 325

Applying Histogram Equalization Contrast Stretches


To automatically scale the data to equalize the number of DNs in each histogram bin:
1. 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.
For information about interacting with the histogram window, see “Plotting
Histograms in an ENVI Plot Window” on page 330).

Applying Square Root Contrast Stretches


To take a square root of the input histogram and then apply a linear stretch:
1. 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 “arbitrarily” draw any shape histogram on top of the output
histogram or match a histogram from another image.
1. Select Stretch_Type > Arbitrary.
The input histogram shows the unmodified data distribution.
2. Draw the output histogram in the Output Histogram window by clicking the
left mouse button to draw segments of the output histogram, or by drawing
with the left mouse button depressed.
The arbitrary histogram appears in green.
• To erase the histogram, click the middle mouse button.
3. Click the right mouse button 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.

ENVI User’s Guide Using Interactive Stretching


326 Chapter 4: Interactive Display Functions

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 clicking on the
“Input Histogram” or “Output Histogram” text label at the top of the plot using
the left mouse button.
2. Drag the name into the other arbitrary output histogram and release the button.
The imported histogram will be plotted in red and the output histogram will be
stretched to match the imported histogram.
3. Click “Apply” to apply the stretch to the displayed data.
Defining Look-Up-Tables
A user defined look-up-table stretches each input DN to an output value. It can be
restored (see “Restoring Stretch LUTs” on page 331) or defined interactively.
1. Select Stretch_Type > User Defined LUT.
2. Select Options > Edit User Defined LUT (see Figure 4-33).
When the edit dialog appears, a list of the input DN values and their
corresponding output stretch values is shown under the “Edit User Defined
LUT” label. These values reflect the current stretch.
3. Click on the value to be edited.

Using Interactive Stretching ENVI User’s Guide


Chapter 4: Interactive Display Functions 327

Figure 4-33: The Edit User Defined LUT dialog.

4. When it appears in the “Edit Selected Item:” text box, enter the desired value
and press the “Return” key.
• To reset the look-up-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


Input histogram information can be extracted from the Main 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).
• Select Histogram_Source > select the desired input data source.
The output histogram, and thus the resulting stretch, changes based upon the source
of the input histogram.

ENVI User’s Guide Using Interactive Stretching


328 Chapter 4: Interactive Display Functions

Using Zoom Window Data


When the Zoom window is selected as the data input source choose from the
following additional options:
• View histograms for different portions of the image by moving the zoom box
in the Main Image window.
• View Histograms for the Zoom window in real-time by clicking and holding
the middle mouse button inside the zoom box in the Main Image window and
dragging the box 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, click the middle mouse button
at the desired maximum Y value anywhere within the plot to be scaled.
• To reset the vertical scale to the original Y value, click the middle mouse
button below the X axis of the plot to be reset.

Changing Histogram Min/Max


The input histogram minimum and maximum values can be changed. Values can be
selected 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. In the histogram window, select Options > Histogram Parameters.
The #n Histogram Parameters dialog appears (where “n” designates the
number of the source display).
2. Enter minimum and maximum values for the histogram.
3. Press the “Return” key.
• To restore the original range, click the “Reset Histogram” button.

Using Interactive Stretching ENVI User’s Guide


Chapter 4: Interactive Display Functions 329

Setting the Number of Bins


1. In the histogram window, select Options > Histogram Parameters.
The #n Histogram Parameters dialog appears (where “n” is the number of the
source display).
2. In the “Maximum Bins” text box, 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.
Or:
1. In the histogram window, select Options > Histogram Parameters.
The #n Histogram Parameters dialog appears (where “n” is the number of the
source display).
2. Click the “Auto Reset Histogram” arrow 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 how many significant digits are displayed:
1. In the Histogram window, select Options > Set Floating Point Precision.
2. In the dialog, use the arrow buttons to change the number of digits of precision
or enter a number into the text box.
3. Click “OK.”

Resetting Stretches
• To reset the stretch to what it was initially, select Options > Reset Stretch.

ENVI User’s Guide Using Interactive Stretching


330 Chapter 4: Interactive Display Functions

Applying Stretches
• If you selected Options > Auto Apply:Off, click “Apply” to apply the stretch
parameters.
Note
You can also set the auto apply option in the ENVI main preferences file. For
information, see the description of “Misc” preferences under “Setting ENVI
Preferences” on page 160.

Managing Interactive Stretches


Use the File menu in the histogram window to output histograms, save and restore
LUT’s, convert stretched data, and to plot histograms in an ENVI plot window.

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, etc.) and to save the
displayed data (with the current stretch applied) as an output file.
1. In the Interactive Contrast Stretching dialog, select File > Export Stretch.
2. When the Output Stretch Parameters dialog appears, select a spatial subset if
desired.
3. Select the desired output data type from the “Output Data Type” button menu.
4. Enter the output data range (minimum and maximum) in the appropriate text
boxes.
5. Click “File” or “Memory” to select either output to file or memory.
6. Click “OK.”
A status box indicates the processing progress.
Plotting Histograms in an ENVI Plot Window
Use this procedure to plot a histogram in a new ENVI plot window. When the
histogram is plotted in a new window, you can apply ENVI’s interactive plot
functions, such as outputting and annotation (see “Using Interactive Plot Functions”
on page 343 for instructions).
1. From the ENVI main menu, select Window > Start New Plot Window (see
“Starting New Displays” on page 172).

Using Interactive Stretching ENVI User’s Guide


Chapter 4: Interactive Display Functions 331

2. Grab the “Input Histogram” or “Output Histogram” text label at the top of the
plot with the left mouse button and drag the name into the new plot window.

Outputting Histograms
Standard ENVI output options include Image, PostScript, BMP, HDF, JPEG, PICT,
SRF, TIFF, and XWD formats.
• Select File > Save Plot As > Postscript or Image File.
• To print the histogram window, select File > Print.
The interaction is similar to that for outputting plots, but no annotation is allowed.
For instructions, see “Display Output Options” on page 398.
Saving Stretch LUTs
Stretch Look-up-Tables (LUTs) can be saved to either an ASCII format file or an
ENVI format file.
• To save a LUT, select File > Save Stretch to LUT > ASCII LUT or ENVI
Default LUT in the Interactive Contrast Stretching dialog.
Choosing ASCII LUT saves the look-up-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.
Choosing ENVI Default LUT saves the LUT to an ENVI binary format file.
This file is automatically named with the input filename and a .lut extension
and saved in the same directory as the input file (or in the alternate header
directory). When the data band is displayed in ENVI, this LUT will be
automatically used as the default stretch.

Restoring Stretch LUTs


1. To restore a previously saved LUT, select File > Restore LUT Stretch in the
Interactive Contrast Stretching dialog.
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 look-up-table
data when the standard ENVI input file selection dialog appears.
If no “Binsize” or “Data Min” parameters are contained in the file, it is assumed that
the binsize equals one and the data min is zero.

ENVI User’s Guide Using Interactive Stretching


332 Chapter 4: Interactive Display Functions

Interactive Analysis Tools


Use Tools to access ENVI’s interactive analysis tools. ENVI interactive analysis tools
are generally related to a specific display or require significant interaction by you.
Use the tools to link image displays, extract Z profiles and spectral plots, apply color
maps and density slices, draw Regions of Interest, edit pixels interactively, extract
measurement, calculate “line of sight,” create 2-D scatter plots, create animations,
extract polarization signatures, and view 3-D surface plots.

Figure 4-34: Access interactive analysis tools from the Tools menu.

Interactive Analysis Tools ENVI User’s Guide


Chapter 4: Interactive Display Functions 333

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 Images
Use Link to link and unlink images. When images are linked, actions such as moving
the zoom box, the scroll box, changing the zoom factor, or resizing one image
window are mirrored in all other linked image windows. Ideally, link images only
when they are the same size or when one image is a subset of the other image.
However, ENVI allows you to specify the link pixel regardless of the relationship
between images.
1. From the Display menu, select Tools > Link > Link Displays.
Note
To use the link function, you must have at least two image windows open. The Link
option is not available when only one image is displayed.

2. When a Link Displays dialog appears, select from the list of available displays
by using the arrow 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” menu.
5. Click “OK” to execute the link.
All other images are sized and positioned 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 arrow toggle
button.
• To remove a single display window from the link, select
Tools > Link > Unlink Display in that image window.
The other windows remain linked.

ENVI User’s Guide Display Linking and Dynamic Overlays


334 Chapter 4: Interactive Display Functions

Working with Multiple Dynamic Overlays


Use Dynamic Overlays for real-time overlay and toggling (“flickering”) of multiple
grayscale or color images. By default, dynamic overlays are activated automatically
when two or more windows are first linked. Multiple overlays are active in all linked
image windows simultaneously and in each Zoom window.
Note
Dynamic Overlay does not work with Geographic Link.

1. From the Display menu, select Tools > Link > Dynamic Overlay.
The Link Displays dialog appears.
2. Select from the following options and see Table 4-4 for a summary of mouse
button functions when dynamic overlays are on and Table 4-5 for a summary
of mouse button functions when two images are linked but dynamic overlays
are turned off.
Note
If you do not have a three button mouse, you must have some way of emulating the
multiple mouse clicks. See “Emulating a Three-Button Mouse” on page 33 for
instructions.

• To show a small portion of a second linked image (the overlay) in the first
image (the base), click the left mouse button 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, hold down the left mouse
button and simultaneously click the middle mouse button.
• To move the overlays around inside a specific image and compare the two
images, click and hold the left mouse button and move the cursor in the
image (Table 4-4).
• To change the size of the overlay, press the middle mouse button and drag
the corner of the overlay and release the button.
• After resizing, use the left mouse button to reposition the overlay.
• To do a quick comparison of the images, repeatedly click and release the
left mouse button to activate the overlay effect.
• For multiple images, cycle through the overlays using the left and middle
buttons together as described above.

Display Linking and Dynamic Overlays ENVI User’s Guide


Chapter 4: Interactive Display Functions 335

• Select Tools > Link > Dynamic Overlay Off to turn off the “flickering”
feature (see Table 4-4).

Figure 4-35: An Example of Dynamic Overlays.

• When displays are linked, the zoom window can still be repositioned by
clicking and dragging using the left mouse button when the cursor is
within the zoom box outline in the Main Image window (see Table 4-5).

Mouse Button Action

Left Click and drag the overlay (exception - the zoom box
functions as shown in Table 4-5 below).
Middle Resize the overlay.
Right Click to display the shortcut menu.
Left + Middle Cycle multiple overlays.

Table 4-4: Mouse Button Functions for Linked Images When Dynamic
Overlays Option is On.

ENVI User’s Guide Display Linking and Dynamic Overlays


336 Chapter 4: Interactive Display Functions

Mouse Button Action

Left Clicking and dragging inside the zoom window 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 shortcut menu.

Table 4-5: Mouse Button Functions For Linked Images when Dynamic
Overlays Option is Off.

Linking Multi-Resolution Georeferenced Images


Use Geographic Link to link display windows and vector windows containing
georeferenced data. When linked, all displayed georeferenced images and vector
windows will 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 data set.
Note
This function does not provide any on-the-fly re-projection, resampling, or dynamic
overlay. To re-project and resample data sets to the same projection and resolution,
see “Layer Stacking” on page 421.

1. Select Tools > Link > Geographic Link from the Main Image Display menu.
2. In the Geographic Link dialog, select the displays to link together by clicking
the arrow buttons to select “On” next to the display name(s).
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 the geographic link off, select Tools > Link > Geographic Link and
click the arrow buttons to select “Off” next to the display name(s).

Display Linking and Dynamic Overlays ENVI User’s Guide


Chapter 4: Interactive Display Functions 337

Interactive Profiles and Spectral Plots


ENVI allows extraction of horizontal (X), vertical (Y), spectral (Z for individual
pixels), and arbitrary profiles.
The profiles are displayed in separate plot windows and the X, Y, and Z profiles can
be active simultaneously. The mouse is used to move a cross hair and select the
profiles interactively. The profiles are standard ENVI plots and have associated
controls and options described in detail in “Using Interactive Plot Functions” on
page 343.
ENVI’s “Z” profile capabilities provide integral spectrum analysis. Spectra can be
extracted from any multispectral data set including MSS, TM, GEOSCAN (24
bands), GERIS (63 bands), and AVIRIS (224 bands).
Tip
It is useful to turn the Auto Scale Y-Axis on when plotting profiles so the entire data
range appears (select Options > Auto Scale Y-Axis On).

See the following sections for detailed instructions.

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 is displayed, X and Y profiles are plotted for all three
images in their corresponding colors (RGB). If only one band is displayed then the
profile of that band will be plotted in white. A vertical line is used to mark the current
line or sample location of the cross hair in the X or Y profile respectively.
1. From the Display menu, select Tools > Profiles > X Profile or Y Profile.
A cross hair appears in the Main and Zoom windows at the current pixel and a
plot window appears with a profile for the current horizontal or vertical cross
hair.
2. Click the left mouse button on another pixel to extract a new profile.
• To activate continuous real-time browsing, press and hold the middle
mouse button in the Main Image window and drag the zoom box to the
desired location.
The horizontal, vertical, and spectral profiles are updated continuously as
the current pixel location is moved.

ENVI User’s Guide Interactive Profiles and Spectral Plots


338 Chapter 4: Interactive Display Functions

Figure 4-36: X and Y Profiles.

3. Once the X or Y profile has been extracted, press and hold the left mouse
button in the profile plot and move the cursor to mark the current position on
the profile with cross-hair cursor in the image.
The zoom box cross hair 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. Spectra can be extracted from any multispectral data set 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 display window. The band(s) shown in the display window
can be interactively changed by moving the plot bars to new band positions.
For data sets with fewer than approximately 50 spectral bands, the extraction and
plotting of spectra are fast enough that a BSQ data file can be used. For higher
spectral dimension data sets such as hyperspectral data, use of a BIL or BIP file
allows real-time extraction of spectra (see “Converting Data (BSQ, BIL, BIP)” on
page 423).

Interactive Profiles and Spectral Plots ENVI User’s Guide


Chapter 4: Interactive Display Functions 339

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

1. From the Display menu, select Tools > Profiles > Z Profile (Spectrum).
2. Select a pixel in either the Main 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 is displayed, three
colored lines appear, one for each displayed band in the band’s respective
color (RGB).

Figure 4-37: Z (spectral) Profile Plots, Left, Landsat Thematic Mapper,


Right, AVIRIS.

Changing the Displayed Band(s)


Use this procedure to change the currently displayed band(s) in the image display
window.
1. Change the plot bar(s) to the desired band(s) by clicking and dragging the plot
bar(s) with the left mouse button.
2. Double click the left mouse button within the Z Profile plot window to load the
new bands into the display window.

ENVI User’s Guide Interactive Profiles and Spectral Plots


340 Chapter 4: Interactive Display Functions

Browsing Spectra
• To perform spectral browsing, click on the zoom box using the middle mouse
button, hold it, 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. Select Options > Set Z Profile Avg window.
2. Enter the desired box size, in pixels, in the “Window Size” text boxes.
The average box size can also be set in the ENVI file header (see “Editing
ENVI Headers” on page 99).

Plotting Multiple Spectra


• To plot multiple Z profiles (spectra) over each other in the Spectral Profile plot
window, select Options > Collect Spectra.
• To clear all spectra and plot only the current Z profile plot, select Options >
Replace Spectrum.
See “Using Interactive Plot Functions” on page 343 for a description of the other plot
options.

Extracting Additional Z Profiles


A Z profile for the pixel under the cursor in the display window can be extracted from
an additional file and plotted 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 display
window just like the data Z profile. See “Extracting Z Profiles” on page 338 for
details about Z profile interactions.
1. From the Display menu, select Tools > Profiles > Additional Z Profile.
2. Select the desired input file name for the additional Z profile.
3. Select a pixel in either the Main Image window or the Zoom window to plot
the spectrum for the additional file in a new plot window.
Note
An additional Z profile filename can be set in the data header file so that every time
the Z profile function is started, both the data Z profile and additional Z profile will

Interactive Profiles and Spectral Plots ENVI User’s Guide


Chapter 4: Interactive Display Functions 341

be plotted. The two plot windows will appear with one on top of the other so you
will have to move one window.

Specifying Arbitrary Profiles (Transects)


Use this procedure to specify transects along which arbitrary profiles will be drawn
on the Main Image Display, Scroll, or Zoom windows. Multiple, simultaneous
arbitrary profiles are supported. The arbitrary profiles will be numbered and color
coded on the display.
1. From the Display menu, select Tools > Profiles > Arbitrary Profile (Transect).
2. When the #N Spatial Profiler dialog appears, click on the “Image,” “Scroll,” or
“Zoom” toggle button to designate which window to extract the profile from.
3. Click the left mouse button in the image to start the transect in the selected
window.
4. Click the left mouse button again at each new vertex of the profile.
• To start over, click the middle mouse button to delete the entire transect
prior to completion.
5. Click the right mouse button to select the final vertex and complete the
transect.
A handle (color diamond shape) is placed on the drawn transect.
• To move the transect, click and drag the handle with the left mouse button.
• To delete the transect, click the middle mouse button.
6. To extract and display the profile in a plot window, click the right mouse
button.
If the transect is extracted from a three band color composite image, then three
profiles will be displayed in the plot window. The red band profile will be a
solid line, the green band profile will be a dotted line, and the blue band profile
will be a dash-dot line.
7. Click the left mouse button in the profile plot window and move the cursor to
mark the current position on the profile with a cross-hair cursor in the image.
The zoom box concurrently tracks the location in the profile on the Scroll,
Main and Zoom windows and the Main and Zoom images will be updated to
match the position of the cursor along the profile.

ENVI User’s Guide Interactive Profiles and Spectral Plots


342 Chapter 4: Interactive Display Functions

• To define another arbitrary profile, click the left mouse button in the image
again to define the new vertices.
The new profile will be 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. In the Spatial Profiler dialog, select File > Save Annotation.
2. When the file selection dialog appears, enter a filename.
Activating the Measurement Tool
1. In the Spatial Profiler dialog, 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 under the four pulldown menus to save the measurement
information to a file, change the units used to report the distances, and select
whether to report the segment distances or the point coordinates. See
“Reporting ROI Measurements” on page 275 for more details.

Interactive Profiles and Spectral Plots ENVI User’s Guide


Chapter 4: Interactive Display Functions 343

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 summary of interactive mouse functions in plot
windows, see Table 4-6 for a summary.)

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 are
displayed. The X and Y values of the point will be listed in the lower left
corner of the plot in the color corresponding to the selected data set.
• To continuously display the line-cursor, data marker, and data values, move the
cursor with the left mouse button depressed.

Displaying Plot Data Labels


• To toggle data labels on and off, click the right mouse button within the plot.
• To edit the plot data label see “Editing Y Plot Data Values” on page 350.
• To delete a plot from the plot window, click the right mouse button on that data
label.
Note
You cannot delete the plot for the active cursor; e.g., 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, click and hold the left mouse button on the plot label and drag it into a
different plot window and release the mouse button.

ENVI User’s Guide Using Interactive Plot Functions


344 Chapter 4: Interactive Display Functions

Rescaling Plots (Magnify)


To Rescale the X, Y plot ranges within the plot:
1. Select the new region to display within the plot window by pressing and
holding the middle mouse button at one corner of a box to define the
“magnify” region.
2. Drag the corner to define the box (see Figure 4-38).

Figure 4-38: Horizontal Profile showing the magnify box.

3. Release the mouse button to redraw the enlarged profile subset.


Resetting Profiles
• To reset the profile to each of the previous regions click the middle button
within the plot, thus back-stepping through the previous scalings.

Encompassing Data Ranges


• To set the Y plot range to encompass the full range of all plotted data, click the
middle mouse button to the left of the plot frame.

Using Interactive Plot Functions ENVI User’s Guide


Chapter 4: Interactive Display Functions 345

Inputting Plot Data


Use the File menu in a plot window to input into the window. Data input formats
include ASCII and ENVI spectral library.
Inputting ASCII Spectra Data
Use this procedure to load ASCII data or other X, Y data to be plotted 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. Within the plot window, select File > Input Data > ASCII.
2. When the ASCII Plot Filename dialog appears, select a filename.
3. When the Input ASCII File dialog appears, select from the following
options(Figure 4-39):
• To select the X values to be read into the plot window, enter the number of
the column containing the X values into the text box labeled “X Axis
Column” (usually column 1).
• To apply a scale factor to each X or Y value, enter the desired
multiplicative factor into the text boxes labeled “X Mult” and/or “Y Mult.”
4. Click “OK” to load the spectrum (or other X,Y plot) into the plot window.
Once loaded, all of the other plot options are available.

Inputting Spectral Library Data


1. Select File > Input Data > Spectral Library.
2. When the standard ENVI input selection dialog appears, highlight the name of
a currently-open spectral library file or a new file.
3. Click “OK.”
4. When the Input Spectral Library dialog (Figure 4-39) appears, select spectra
by clicking on the spectrum name(s).
5. Click “OK” to load the spectra into the plot window.

ENVI User’s Guide Using Interactive Plot Functions


346 Chapter 4: Interactive Display Functions

Figure 4-39: The Input ASCII File and Input Spectral Library dialogs.

Editing in Plot Windows


Use the Edit pulldown 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.
2. When the Data Parameters dialog appears, click on 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”
text box and press the “Return” key.

Using Interactive Plot Functions ENVI User’s Guide


Chapter 4: Interactive Display Functions 347

Figure 4-40: The Data and Plot Parameters dialogs.

• To change the color of the plotted line, select from the “Colors” menu.
• To select the style of the line (e.g., dotted, dashed, solid), choose from
“Line Style” menu.
• To set the thickness of the line, use the “Thick” parameter box to adjust the
value or enter a new value.
• To set the number of points to average in the X direction (smoothing) when
plotting the data, enter the value in the text box labeled “Nsum” and press
the “Return” key.
• To select the symbol type, select from the “Symbol” menu.
• To control the size of the displayed symbols, use the “SymSize”
text box.

ENVI User’s Guide Using Interactive Plot Functions


348 Chapter 4: Interactive Display Functions

• To display the line along with the selected symbols or display only the
symbols, use the arrow toggle buttons “Symbol & Line” or “Symbol
Only.”

Editing Plot Parameters


1. Select Edit > Plot Parameters.
The Plot Parameters dialog (Figure 4-40) appears.
2. Select from the following options:
• To change the plot title, edit it in the “Plot Title” text box.
• To change the foreground and background colors select a color from the
“Foregrd” and “Backgrd” button menus.
• To change the font used for plot labels, select from the “Font” button
menu.
• To change the character size used for plot labels, click the “Charsize”
arrow increment buttons.
• 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”
text boxes at the bottom of the dialog.
Data values less than the entered minimum value and greater than the
entered maximum value are not plotted.
Tip
Parameters controlled separately for each axis include the axis thickness and titles,
the data range and the tick mark distribution and configurations.

3. Click the “X-Axis” and “Y-Axis” toggle buttons to select the axis being acted
upon.
4. Enter the title in the “Axis Title” text box and press the “Return” key.
5. Change the axis parameters by selecting from the following steps:
• To change the thickness, enter a new value (“1” is normal thickness) in the
“Thick” text box.
• To position the minimum and maximum values of the full data range
exactly at the ends of the axis, click the Style “Exact” check box.
• To offset the values slightly offset from the ends of the axis, click the Style
“Extend” checkbox.

Using Interactive Plot Functions ENVI User’s Guide


Chapter 4: Interactive Display Functions 349

• To turn off the selected axis entirely, click the Style “Off” checkbox.
• To turn off the top X axis or the right Y axis, depending on which axis is
selected, click the Style “No Box” checkbox.
• To change the axis data range to be displayed, type in the respective
minimum and maximum into the text boxes labeled “Range” and “To” and
press the “Return” key. (For spectral plots, the plot range for the Y axis can
also be set in the .hdr file by entering the values for the “Z Plot Range”
parameter. See “ENVI Header Format” on page 879).
• To plot the tick marks on the inside or outside of the axis, click the “Tick
Style” “In” or “Out” toggle button.
• To plot a continuous line across the entire plot at the location of each major
tick mark click the “Tick Style” “Grid” toggle button.
• To turn off the tick marks entirely, click Tick Style “Off.”
• To change the length of the major tick marks when they are present, enter a
value between 0 and 0.5 in the parameter box labeled “Len,” and the
number of minor tick marks in the “Minor” textbox.
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).
• To control the size of the margins around the plot axes, enter the margin
size (in characters) in the two parameter boxes next to the “Margin” label.
For the X axis, the first box is the left margin, the second box the right
margin. For the Y axis, the first box is the bottom margin, the second box
the top margin.
• 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.
6. Click “Apply” and “Cancel” to close the plot window when all parameters
have been set to the desired values.

ENVI User’s Guide Using Interactive Plot Functions


350 Chapter 4: Interactive Display Functions

Editing Y Plot Data Values


1. In the plot window, select Edit > Data Values.
2. When the Select Which Plot to Edit dialog appears, select the name of the plot
data to edit.
3. When the Edit Plot dialog appears, containing a list of all x and y values as
“Xloc (x-value):yvalue,” click on the y-value to edit.
It appears in the “Edit Selected Item:” text boxes.
4. Change the y-value to the desired value and press the “Return” key to change
that value in the list.
• To reset all the data points back to the original values, click “Reset.”
5. Click “OK” to update the plot with the new values.

Plot Window Options


Use the Options menu to create new plot windows, place annotation on plots, plot the
data with the continuum removed, 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 window, select Options > New Window: Blank.
• To create a copy of the current plot window including the data within it, select
Options > New Window: with Plots.
Note
New plot windows can be set up as data “collectors” to hold useful plots from
profiles and other plot windows.

Moving Plots Between Windows


1. Turn on the plot labels by clicking the right mouse button within the plot.
2. Grab a plot label using the left mouse button and drag the name (and thus the
plot) from one window to the next (see “Moving Plots to Another Plot
Window” on page 343).

Using Interactive Plot Functions ENVI User’s Guide


Chapter 4: Interactive Display Functions 351

Annotating Plots
Use Annotate Plot to annotate the X, Y, and Z profiles and other plots. The annotation
function is the same as that for images but without the image-specific annotation
objects, and is described in detail elsewhere (“Annotating Images” on page 222).
Tip
Resize both plot and image windows to their final desired size prior to annotation.
If the plot window is resized after starting annotation, then the annotated objects
will be offset from their correct positions.

Stacking Plot Data


• To offset all plots within the window so there are no overlapping data plots,
select Options > Stack Data.
Setting Stack Offset
To set the amount of offset between each stacked plot:
1. Select Options > Set Stack Offset.
2. Enter the desired value, in percent of data range, in the “Plot Stack Offset” text
box.
Unstacking Plot Data
• To replot the data without stacking, select Options > Unstack Data.
Note
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 is displayed in the Main Image window, select Options > Profile:
Full Band.
• To show the X or Y profile only for the part of the band that is displayed in the
Main 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.

ENVI User’s Guide Using Interactive Plot Functions


352 Chapter 4: Interactive Display Functions

Note
If auto scaling is off and a plot is added outside the y-axis range set, then that plot
will not be 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.
• To clear all of the displayed plots within one of these windows, select
Options > Clear Plot.
Note
Profiles can not 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 Plot Range or click the middle mouse
button to the left of the y-axis.
Note
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
plot windows. Use it to plot an average spectrum calculated using a box around the
cursor:
1. Select Options > Set Z Profile Avg Window.
2. Enter the desired box size, in pixels, in the “Window Size” text boxes.
The average box size can also be set in the ENVI file header (see “Editing ENVI
Headers” on page 99).

Collecting and Replacing Spectra


• To plot multiple Z profile spectra, select Options > Collect Spectra.
• To replace the current Z profile with the new profile spectrum, select Options
> Replace Spectrum.

Using Interactive Plot Functions ENVI User’s Guide


Chapter 4: Interactive Display Functions 353

Additional Functions in Plot Windows


Select from the following additional plot functions. These functions are accessed
through the plot window Plot_Function menu.
• To toggle the x-axis of the plot between wavelength (or other unit) and band
number, select Plot_Function > X Axis:Index Number.
• To turn the x-axis toggle function off, select Plot_Function > X Axis:Normal.
• 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 660 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 513 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
Function in the ENVI Programmer’s Guide) and adding a .pro or .sav file
containing the function code to the ENVI save_add subdirectory.

Outputting Plot Data


Use the File menu in plot windows to output plot data. You can print plot images or
output data to ASCII files, spectral libraries, IDL variables, PostScript files, and
image files.
Outputting Plot Data to ASCII Files
1. Select File > Save Plot As > ASCII.
2. When the Output Plots to ASCII File dialog appears, select the data to save by
clicking on the plot name(s) in the “Select Plots to Output” list.

ENVI User’s Guide Using Interactive Plot Functions


354 Chapter 4: Interactive Display Functions

3. Click the arrow increment buttons to set the numeric precision for the X and Y
output ASCII variables.
4. Click the arrow toggle button to select whether to output floating point data
in “Scientific” or “Normal” format.
5. Enter the output name in the text box labeled “Enter Output Filename” or click
the “Choose” button to select a filename.
6. Click “OK” to save the selected spectra to the ASCII file.
Outputting Plot Data to Spectral Libraries
Use this procedure to build a standard ENVI spectral library file (spectral library
image) from profiles and spectral plots.
1. Select File > Save Plot As > Spectral Library.
2. When the Output Plots to Spectral Library dialog appears, choose the desired
spectra by clicking on the spectrum name.
3. Select “File” or “Memory” output.
4. Click “OK” to save the selected spectra to the Spectral Library.
Exporting Plot Data to the IDL Command Line
Note
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 select File > Save Plot As > IDL Variable.
The Export Plots to IDL Variable dialog appears.
2. Select the Plots to Export by clicking on the plot names.
3. Select one of the following options:
• If previous variables have been defined, click on the name of the variable
in the displayed list.
• In the “New Variable Name” dialog, enter the name of an undefined IDL
variable.
4. Press the ENTER key on your keyboard.
The exported data will be available to use at the ENVI command line. If data
from more than one plot were exported to a single variable the data will be
exported into a two-dimensional array that contains the x and y values for each

Using Interactive Plot Functions ENVI User’s Guide


Chapter 4: Interactive Display Functions 355

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, etc.

Outputting 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.
• Select File > Print to print the plot.
For detailed instructions, see “Display Output Options” on page 398.

ENVI User’s Guide Using Interactive Plot Functions


356 Chapter 4: Interactive Display Functions

Extracting Polarization Signatures


Mouse
Action Interaction Where
Button

Display line-cursor, data Left Click and Inside plot window


point location and X, Y hold, drag over data plot
values
Resize plot window Left Click and drag Corner of plot
window
Move plots to new window Left Click and drag On plot label
to new
window
Rescale X, Y plot ranges Middle Click and drag From any point
inside the plot frame
diagonally to form
box containing
desired subset
Reset to previous X, Y plot Middle Click Inside plot window
ranges
Set Y Axis to Data Range Middle Click Left of plot frame
Toggle plot name labels Right Click Inside plot window
Delete specific data plot Right Click On plot label

Table 4-6: Mouse Button Functions in ENVI Plot Windows.

To extract and display polarization signatures from the current pixel for quad-
polarized radar data (AIRSAR and SIR-C):
1. From the Display menu, select Tools > Polarization Signatures > AIRSAR or
SIR-C.
The radar data does not have to be displayed. Any co-registered image data set
can be used for pixel location.
2. When the Input Stokes Matrix Files dialog or the Input Scattering Matrix Files
dialog appears, click “Open File” to select and open the appropriate radar data
file.

Extracting Polarization Signatures ENVI User’s Guide


Chapter 4: Interactive Display Functions 357

3. Click “OK.”
4. When the Polarization Signature Viewer appears, select Options > Extract
Current Pixel to plot the polarization signature for the current pixel.
For details about the Polarization Signature Viewer, see “Extracting
Polarization Signatures from Single Pixels” on page 842 and “Using the
Polarization Signature Viewer” on page 845.

Figure 4-41: The Current Pixel Polarization Signature.

ENVI User’s Guide Extracting Polarization Signatures


358 Chapter 4: Interactive Display Functions

Color Mapping
Use Color Mapping to apply color tables to images, create interactive density sliced
images, control the RGB image planes and to change classification color mapping.
Note
A color image displayed using one of the methods outlined in this section can be
saved to an RGB color image. For instructions, see “Outputting to Image Files” on
page 402.

Applying ENVI Color Tables and Density Slices


Use ENVI Color Tables to apply linear contrast stretching and standard color tables
(density slices) to grayscale images.
Note
To make your own color tables, see “Editing System Color Tables” on page 163.

1. From the Display menu, 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 (see Figure 4-42). The dialog contains a
grayscale wedge (or color wedge if a color table is applied) and two sliders to
control the contrast stretch. It also has two pulldown menus, File and Options.
2. Select one of the following options:
• 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.
Note
The Auto Apply option is automatically set in 8-bit mode.

3. Move the sliders labeled “Stretch Bottom” and “Stretch Top” respectively to
control the minimum and maximum values to be displayed.
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.

Color Mapping ENVI User’s Guide


Chapter 4: Interactive Display Functions 359

The stretch can be “inverted” by setting the stretch bottom to the maximum
value and the stretch top to the minimum value.
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 clicking on
the desired color table name.
ENVI provides a number of pre-saved color tables. The “B-W linear” table
provides a grayscale 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.
• To return you to the main screen and retain the selected color table, select
File > Cancel.
Saving Color Tables to ASCII Files
1. In the ENVI Color Tables dialog, select File > Save Color Table to ASCII.
2. Enter a filename and click “OK.”

Using Interactive Density Slicing


Use Density Slice to select data ranges and colors for highlighting areas in your
grayscale image. The data ranges used in the density slice coloring can be from the
displayed image or from another image of the same size.
1. From the Display menu, select Tools > Color Mapping > Density Slice or
Overlay > 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 window.
2. Select the band to use for the density slice data ranges by clicking on the
bandname.
The #n Density Slice dialog (where “n” is the display number used to start the
function) appears (see Figure 4-42), with eight default ranges listed under
“Defined Density Slice Ranges.” The ranges are defined using a minimum and
maximum data value calculated from the Scroll window and shown in the
“Min” and “Max” text boxes.

ENVI User’s Guide Color Mapping


360 Chapter 4: Interactive Display Functions

3. Enter the desired minimum and maximum values in the appropriate text boxes
to change the density slice range.
• To reset the data range to the initial values, click “Reset.”
4. Select whether the density slice colors are applied 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 default 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.
2. Select one of the following options:
• If you have an 8-bit display, enter the desired minimum and maximum
values and select a color from the “Colors” menu.
• If you have a 24-bit display, select RGB, HLS, or HSV as your color
system from the “System” button menu. Use the slider bars or the arrow
increment buttons to set you 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.

Color Mapping ENVI User’s Guide


Chapter 4: Interactive Display Functions 361

Figure 4-42: ENVI Color Tables and Interactive Density Slicing dialogs.

Density Slice Options


Use the Options menu to add new ranges, set default ranges, and set the number of
default ranges to be used.
Adding Ranges
To add new ranges to the list in the Density Slice dialog:
1. Select Options > Add New Ranges.
2. When the Add Density Slice Ranges dialog appears, enter the range start value,
range end, and number of ranges desired in the appropriate text boxes.
3. Choose the starting color from the “Colors” menu.
The colors of multiple ranges will follow the list of graphics colors.
4. Click “OK” to return to the Density Slice dialog.
The determined ranges are listed in the dialog and can be edited as desired.
5. Click “Apply” to apply the density slicing colors to the image.
Changing Bands
1. In the Density Slice dialog, select Options > Change Density Slice Band.

ENVI User’s Guide Color Mapping


362 Chapter 4: Interactive Display Functions

The Density Slice Band Choice dialog appears.


2. Change the band used for the density slice data ranges by clicking on the
bandname.
The new density slice coloring is automatically applied.
Setting Defaults
• To enter the desired number of default ranges used, select Options > Set
Number of Default Ranges and enter the desired value.
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. Select Options > Apply Default Ranges.
2. Click “Apply” to apply these ranges and colors to the display.
Saving Density Slices
To save the current list of density slice ranges and colors to a file:
1. In the Density Slice dialog, select File > Save Ranges.
2. Enter an output filename with a default extension of .dsr for consistency.
Restoring Saved Density Slices
To restore previously saved density slice ranges and colors:
1. Select File > Restore Ranges.
2. Select the desired input file.
Hiding the Density Slice Dialog
To hide or show the Density Slice dialog without erasing your color tables, see
“Showing and Hiding Overlay Dialogs and Layers” on page 220.

Closing the Density Slice Dialog


To close the Density Slice dialog and reset the original color table, select File >
Cancel.

Color Mapping ENVI User’s Guide


Chapter 4: Interactive Display Functions 363

Controlling RGB Image Planes


Use Control RGB Image Planes to control the individual color planes (or channels) of
an RGB or grayscale image. A standard RGB image uses the red, green, and blue
guns of the display device to form a color additive representation of color. A
grayscale image is a special case, where all three guns are assigned the same value for
each pixel.
1. Select Tools > Color Mapping > Control RGB Image Planes.
The #n RGB Channels dialog appears, where n is the display number used to
start the function. When first started, all three image color channels are turned
on.
2. Select one or more of the left arrow toggle buttons to turn off/on individual
color planes. The button name will change 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 arrow 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.
3. Select File > Cancel to exit the function.
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 when a 24-bit color display is in use to display the color changes.

ENVI User’s Guide Color Mapping


364 Chapter 4: Interactive Display Functions

Figure 4-43: The RGB Channels dialog.

Mapping Class Colors


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

1. Select one of the following options to begin:


• From the Display menu, select Tools > Color Mapping > Class Color
Mapping.
• In the Interactive Class Tool dialog, select Options > Edit class
colors/names (see “Overlaying Classes” on page 243).
2. The Class Color Mapping dialog appears.
3. In the “Selected Classes” list, click on the name of the class to be changed.
4. In the “Class Name” text box, change the name.
5. From the “System” button menu, select a color system: RGB, HSV, HLS (see
“Color Transforms” on page 575 for more information about color spaces).

Color Mapping ENVI User’s Guide


Chapter 4: Interactive Display Functions 365

6. Select one of the following options to set the values of the class colors:
• Select a color from the "V" menu.
• Move the three sliders (0-255 for the three colors in RGB).
• Click the arrow increment buttons to change the values or enter new values
into the text boxes and press “Enter.” See Figure 4-44.
7. 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.
Note
Color changes on 24-bit color displays, are not automatically applied. Instead,
select Options > Apply.

Figure 4-44: The Class Color Mapping dialog.

ENVI User’s Guide Color Mapping


366 Chapter 4: Interactive Display Functions

Using the Pixel Locator


Use Pixel Locator to manually enter a sample and a line location for positioning at
the center of the Zoom window.
1. From the Display menu, select Tools > Pixel Locator.
The Pixel Locator dialog appears, pertaining to a specific display. You may
have a Pixel Locator for each ENVI display group. Cross hairs are drawn in the
zoom window outlining the center pixel.
2. Enter a sample (horizontal) and line (vertical) location into the corresponding
text boxes.
3. Select whether to use an image offset by selecting Options > Use Image
Offset: Yes or No.
4. Click “Apply” and the zoom box jumps to the specified pixel location.
• To move the center of the zoom window one pixel in the arrow’s direction,
click the arrow buttons in the lower right part of the dialog.

Figure 4-45: The Pixel Locator dialog for pixel-based images and for
georeferenced images.

Using the Pixel Locator ENVI User’s Guide


Chapter 4: Interactive Display Functions 367

Using the Locator with Georeferenced Data


When georeferenced data is displayed in the image window, the pixel locator can be
used in either pixel or map coordinates.
1. In the Pixel Locator dialog, select Options > Pixel Coordinates or Map
Coordinates.
2. In the Pixel Locator dialog, click the “Proj” arrow toggle button to toggle
between map coordinates and geographic coordinates (latitude/longitude).
3. Enter the desired easting and northing (or latitude and longitude).
The zoom window is centered on the nearest pixel.
Tip
When ENVI’s image-to-map registration function is active, use the “Export” button
in the Pixel Locator dialog to deliver map coordinates to the function (see “Entering
Map GCPs from Vector Windows” on page 714).

The “Export” button produces no effect if a registration session is not active.

ENVI User’s Guide Using the Pixel Locator


368 Chapter 4: Interactive Display Functions

Collecting Points
Use Point Collection to collects points (both pixel locations and map locations) from
display windows. The points are displayed in a table in the ENVI Point Collection
window. You can save points from various display windows 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 options to begin:
• From the Display menu, select Tools > Point Collection.
• From the ENVI main menu, select Window > Point Collection.
The ENVI Point Collection window appears (see Figure 4-46).
2. Click the middle mouse button in a main image window or zoom window to
collect the point under the cursor.
The pixel locations appear in the table. If the data is georeferenced, map and
geographic locations are also listed.

Click on
a column
heading
to resort
the table.

Figure 4-46: The Point Collection window.

Changing the Table Sort Order


• To sort the points in the table by a particular value, click on the column
heading of the value. To sort the points inversely by the same value, click on
the column name again.
The table is automatically updated.
• To reset the table to the original order, select Options > Reset Listing Order.

Collecting Points ENVI User’s Guide


Chapter 4: Interactive Display Functions 369

Changing Numeric Precision


To change the numeric precision of the data points:
1. Select Options > Set Report Precision.
The Set Report Precision dialog appears.
2. Enter the desired number of significant figures shown after the decimal point
in the text boxes.
• To change the report of latitude and longitude values between degrees,
minutes, seconds (DMS) and decimal degrees (DD), click on the Lat/Lon
Report arrow toggle button.

ENVI Point Collection Options


• To go to the location of a point, click on the point number (gray buttons, far left
column) and click the “Goto” button.
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, click
on the point number (far left column) and click “Export.”
• To delete a point, click on 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 point collection table:
1. Select File > Import Points from ASCII and select the input filename.
2. In the Input ASCII FIle dialog, select which columns of data contain the Image
X and Y pixel locations, the Map X and Y values and the Lat/Long values.
3. Select the projection type if you have map values.
4. From the “Associated Image” button menu, select the display number
associated with the imported points.
• If no display is associated with the points, select “None.”
5. Click “OK.”
The points appear in the point collection dialog.

ENVI User’s Guide Collecting Points


370 Chapter 4: Interactive Display Functions

Saving Points to ASCII Files


To save points to an ASCII file:
1. Select File > Save Points As > ASCII.
2. Enter an output filename.
Note
If points from more than one projection are contained in the point collection table,
multiple ASCII output files will be created with a _1, _2, etc. appended to the
filename.

Saving Points to Vector Files


To save points to an ENVI vector file:
1. Select File > Save Points As > EVF layer.
2. Enter a layer name and an output file name.
3. Click “OK.”
The layer name appears in the Available Vectors List.
Tip
You can load these points on the image display or in a vector window and add
attributes (see “Vector Attributes” on page 207).

Hiding the Point Collection Window


• To hide the window, select Options > Hide Window.
When the ENVI Point Collection window is hidden, you can still collect points
by clicking in an image window with the middle mouse button.
• To display the window again, click on the window name in the Window Finder,
or select Window > Point Collection.

Collecting Points ENVI User’s Guide


Chapter 4: Interactive Display Functions 371

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 detailed instructions, see “Using the Measurement Tool” on page 437.
Note
To measure ROIs while using the ROI function, see “Reporting ROI
Measurements” on page 275.

ENVI User’s Guide Measurement Tool


372 Chapter 4: Interactive Display Functions

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. Select Tools > Line of Sight Calculator.
The Line of Sight calculator dialog appears (Figure 4-47). The current pixel
location is listed in the “Sample” and “Line” text boxes.

Figure 4-47: The Line of Sight Calculator.

2. In Zoom window, click on 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 cross-hairs 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.
• To select pixels for georeferenced images, see “Selecting Pixels for
Georeferenced Images” on page 373).
3. Click the “Apply” button.
The Select Line of Sight Input DEM Band dialog appears.

Using the Line of Sight Calculator ENVI User’s Guide


Chapter 4: Interactive Display Functions 373

Figure 4-48: The Line of Sight Parameters dialog.

4. Select the file that contains the DEM that is associated with the displayed
image and click “OK.”
The Line of Sight Parameters dialog appears (Figure 4-48).
5. 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.
6. Click “OK.”
An ROI is created that shows which pixels can be seen from the designated pixel. The
ROI is labeled LOS in the ROI Tool dialog and is overlaid on your image.

Selecting Pixels for Georeferenced Images


1. In the Line of Sight Calculator, select Options > Map Coordinates.
2. Enter the map coordinates into the “E” and “N” text boxes, respectively.
• To enter the coordinates in latitude and longitude, click the arrow toggle
button next to the map projection name and enter the values into the “Lat”
and “Long” text boxes.
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 on the “DMS< - >DD” button.
• To return to map projection coordinates, click the arrow toggle button.
The corresponding map projection coordinates are calculated
automatically.

ENVI User’s Guide Using the Line of Sight Calculator


374 Chapter 4: Interactive Display Functions

Using the Spatial Pixel Editor


Use Spatial Pixel Editor to display pixel values in a table and to interactively change
the values of problem pixels. Individual pixel values or entire lines or columns can be
replaced if you enter a different value or data mean, or if the averages of surrounding
pixels, lines, or columns are used. The changes can be saved to the disk file.
Note
This function only works on ENVI format files.

• From the Display menu, 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 4-49: The Spatial Pixel Editor dialog.

Selecting Pixels
To select pixels and display their values in the Spatial Pixel Editor table:

Using the Spatial Pixel Editor ENVI User’s Guide


Chapter 4: Interactive Display Functions 375

• In the Main Image window, move the zoom window by clicking and dragging
with the left mouse button or click the middle mouse button on a pixel to place
it in the center of the zoom window.

Changing Pixel Values


Select from the following options to change pixel values:
• To enter a new value for a single pixel, click on the pixel value in the table, use
the backspace key to erase the current value, enter the desired value, and press
return.
• To replace the value of a single pixel with the average of the four or eight
surrounding pixels, click on 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 clicking
on a column or line number.
B. Select Options > Replace selected cells with value. Enter the desired value
and 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 clicking on 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, click on 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
be used in calculating the average:
A. Select Options > Set # of lines for averaging.
B. Enter the desired number of columns or lines to use on each side of the
selected one to calculate the average.
Undoing Changes
• To undo all changes in pixel values, select Options > Undo all changes.

Saving Pixels to Files


• Save the pixel value changes to a file by selecting File > Save changes to file.

ENVI User’s Guide Using the Spatial Pixel Editor


376 Chapter 4: Interactive Display Functions

Closing the Spatial Pixel Editor


• To exit the Spatial Pixel Editor, select File > Cancel.

Using the Spatial Pixel Editor ENVI User’s Guide


Chapter 4: Interactive Display Functions 377

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 menu, select Tools > Spectral Pixel Editor.
An empty plot window appears.
2. In the Spectral Pixel Editor plot window, select from the following options.
• To plot the current spectrum, select Pixel_Edit > Extract Current
Spectrum.
• To plot an average spectrum calculated from the 8 (4 or 2) pixels
surrounding the current pixel, select Pixel_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 Pixel_Edit > Substitute Spectrum.
Warning
This last step physically replaces the current spectrum values in the data file.

ENVI User’s Guide Using the Spectral Pixel Editor


378 Chapter 4: Interactive Display Functions

Creating Animations
Use Animation to create a “movie” out of images from one or more open files.

Selecting Bands for Animation


1. From the Display menu, select Tools > Animation.
2. When the Animation Input Parameters dialog appears, (see Figure 4-51)
choose from the following options.
Note
All of the bands from the currently displayed image are selected for animation by
default.

• To select additional bands from files of the same size, click on the bands
with the left mouse button while holding the CTRL key on your keyboard.
• To clear individual bands from the list if they are already selected, click on
the desired band with the left mouse button while holding the CTRL key
on your keyboard.
• To use standard ENVI subsetting procedures to reduce the size of the
image to be animated, click “Spatial Subset.”
3. Set the desired size of the animation display window by entering values in the
boxes next to the “Window Size” text label.
Note
Note that the selected images are automatically resized to the selected window size.
Reducing either the spatial subset to be animated and/or the size of the animation
window enhances the speed of the animation.

4. Select a resampling method by clicking the “Aggregate” or “Nearest


Neighbor” button.
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.

Creating Animations ENVI User’s Guide


Chapter 4: Interactive Display Functions 379

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 have been loaded, the animation starts automatically.
Each selected band is displayed sequentially.

Figure 4-50: The Animation Input Parameters dialog.

Controlling Animation Characteristics


After the animation is loaded, specify the animation characteristics by selecting from
the following options in the Animation window.
• To set the animation speed, enter a number from 0 to 100 into the “Speed”
text box, or use the arrow buttons to set the speed.
• To turn the real-time frame number slider on and off, select Options >
Update Slider:On/Off from the menu at the top of the Animation window.
• To display the animation from highest frame number to lowest, click on
the “<-” button.
• To play the animation backward or forward, or to pause the animation, use
the buttons as described in Figure 4-51.

ENVI User’s Guide Creating Animations


380 Chapter 4: Interactive Display Functions

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.

Figure 4-51: The Animation window with menu bar and controls.

Saving Animations
You can save an animation as an MPEG (Moving Picture Experts Group) file.
1. Select File > Save Animation as MPEG.

Creating Animations ENVI User’s Guide


Chapter 4: Interactive Display Functions 381

The Output Sequence to MPEG Parameters dialog appears.

Figure 4-52: The Output Sequence to MPEG Parameters.

2. From the “MPEG Frame Rate” button menu, select a frame rate in frames per
second.
3. In the “MPEG Quality” text box, enter a compression quality value between 0
and 100, or use the arrow 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 used to store the MPEG output.
• To duplicate frames in the MPEG output, enter or select a duplication
factor.
A duplication factor helps to make the MPEG output appear smoother.
4. Enter or choose an output filename and click “OK.”

Cancelling Animations
• To cancel the animation at any time, select File > Cancel from the menu in the
Animation window.

ENVI User’s Guide Creating Animations


382 Chapter 4: Interactive Display Functions

Using 2-D Scatter Plots


Use 2-D Scatter Plots to interactively classify two bands of image data. If desired,
multiple scatter plots can be active simultaneously. 2-D Scatter Plots use only the
data in the Main Image window so quick interactive response is provided. Regions of
Interest can be selected in the scatter plots and saved for use in other full band
processing techniques. Dancing PixelsTM show how the distribution of pixels under a
box changes as it is moved interactively in both the scatter plot and image. The
density distribution of the scatter plot can also be shown.
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 menu, select Tools > 2-D Scatter Plots.
2. When the Scatter Plot Band Choice dialog appears, choose the X and Y axes
for the scatter plot by clicking on the desired bands in the columns labeled
“Choose Band X:” and “Choose Band Y.” (See Figure 4-53).
3. Click “OK” to extract the two dimensional scatter plot from the two selected
bands.

Figure 4-53: The Scatter Plot Band Choice dialog.

Using 2-D Scatter Plots ENVI User’s Guide


Chapter 4: Interactive Display Functions 383

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.
Warning
Resizing the window requires more memory and may not be as efficient.

• To reset the window to the default size, select Options > Reset Size.

Viewing Pixel Distribution of Scatter Plots


Use Image Dancing PixelsTM 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. Select Options > Scatter:Dance.
2. Place the cursor anywhere inside the scatter plot and click the middle mouse
button to plot a colored box on the scatter plot (Figure 4-54).
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 Main 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 Main Image window.

Viewing Pixel Distribution of Images


Use Scatter Plot Dancing PixelsTM to interactively view, in the scatter plot, the
distribution of the points that are in highlighted in the image window.
1. Select Options > Image:Dance.
2. Place the cursor anywhere inside the Main Image window and click the left
mouse button while the scatter plot is displayed 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 389).
The box is not plotted on the Main Image display because of speed
considerations.

ENVI User’s Guide Using 2-D Scatter Plots


384 Chapter 4: Interactive Display Functions

3. Press and hold the left mouse button while moving the cursor in the Main
Image window to highlight the pixels in the scatter plot in real time as Dancing
Pixels (Figure 4-54).

Figure 4-54: Selecting Pixels to Highlight in the Image Window (left) and
“Dancing Pixels” as Displayed in the Plot Window (right).

Zooming in Scatter Plots


To zoom in on an area within a scatter plot:
1. Select Options > Scatter:Zoom.
2. In the Scatter Plot window, click with the middle mouse button and drag the
box outline that appears.
• To return to normal viewing, click in the Scatter Plot window with the middle
mouse button.

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.

Using 2-D Scatter Plots ENVI User’s Guide


Chapter 4: Interactive Display Functions 385

Note
If a Z profile is associated with the scatter plot, the density distribution is shown by
clicking the right mouse button outside the plot axes.

Changing the Density Distribution Color Table


To change the color table used to define the density distribution colors:
1. Select Options > Select Density Lookup.
2. In the Select Density Lookup dialog, click on the desired color table name.
The selected color table is applied automatically.
3. Designate the number value of the color that will be used to represent the
lowest values in the scatter plot (color tables have 256 values) by clicking
the “Scaling Floor” arrow increment buttons or by entering the value into the
text box.
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


ROIs can be drawn in the scatter plot to provide an interactive classification method.

Drawing a Single ROI


1. In the Scatter Plot window, click the left mouse button at the vertices of a
polygon enclosing the desired region.
2. Use the right mouse button 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 Main Image
window.

Drawing Multiple ROIs or Classes


1. In the Scatter Plot window, select Class > and select another color from the
list.
2. Draw another ROI as described in the previous procedure.
The corresponding pixels in the image are highlighted in the new color.

ENVI User’s Guide Using 2-D Scatter Plots


386 Chapter 4: Interactive Display Functions

Editing Classes
To remove pixels from an existing class:
1. In the Scatter Plot window, select Class > White.
2. Draw a polygon around the pixels to remove them.
The deleted pixels return to white.
Changing Class Colors
Use the Class menu to change the color of the scatter plot highlighting. Multiple
ROIs or classes can be defined by selecting a new color for each class. The currently
selected class corresponds with the color selected under the Class pulldown menu.

Deleting Classes
• To completely delete the selected class polygon, click the middle mouse button
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 2-D 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.

2-D Scatter Plot Shortcut Menu


Many options in 2-D Scatter plots can also be accessed by right-clicking in the scatter
plot and selecting from the shortcut menu that appears (Figure 4-55).

Using 2-D Scatter Plots ENVI User’s Guide


Chapter 4: Interactive Display Functions 387

Figure 4-55: The scatter plot shortcut menu.

Viewing “Dancing Pixels”


As described in “Viewing Pixel Distribution of Images” on page 383, 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.
• Select Options > Image Dance.
Drawing ROIs in Images
Use the Image ROI option to draw ROIs in the image window using the standard
polygon ROI procedures described in “Drawing ROIs” on page 263. 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.
• Select Options > Image ROI.
Turning Off Scatter Plot Mouse Functions
• To turn off the scatter plot mouse button functions in the image window and
return them to their standard functionality, select Options > Off.

ENVI User’s Guide Using 2-D Scatter Plots


388 Chapter 4: Interactive Display Functions

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.
• 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 a standard ENVI ROI. You can use the
exported ROI in other ENVI functions.
• To export a selected class, select Options > Export Class.
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 will be 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.
Calculating Mean Spectra
To calculate the mean spectrum for the selected class or for all the defined classes:
1. Select Options > Mean Class or Options > Mean All.
2. When the Input File Associated with 2-D Scatter Plot dialog appears, select the
corresponding input file.
The mean spectra are calculated and displayed in a plot window. If a Z Profile
window associated with the scatter plot is open, the same data is automatically used
to calculate the mean spectra.

Using 2-D Scatter Plots ENVI User’s Guide


Chapter 4: Interactive Display Functions 389

Attaching Z Profiles
To associate a Z Profile window (spectral plot) with the scatter plot:
1. Select Options > Z Profile.
2. When the Input File Associated with 2-D Scatter Plot dialog appears, select the
corresponding input file.
3. Click the right mouse button inside the scatter plot to display the spectrum for
the point nearest the cursor.
See “Extracting Z Profiles” on page 338 for details on using Z Profiles.
Setting “Patch Sizes”
The “patch size” is the size of the box used for the “Dancing Pixels” options.
1. Select Options > Set Patch Size.
2. When the Scatter Plot Patch Size dialog appears, enter the number of pixels to
use for the size of the patch (a square box) or use the increment arrows to set
the desired size.
For example, a patch size of “10” refers to a 10 x 10 pixel box in either the image or
the scatter plot.

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 will
be highlighted.
1. Select Options > Change Bands.
2. When the Scatter Plot Band Choice dialog appears, choose new X and Y axes
for the scatter plot by clicking on the desired bands as described in “Selecting
Bands for Scatter Plots” on page 382.

Managing Scatter Plots


Use the File menu on the scatter plot menu bar to activate functions that control the
input and output of 2-D scatter plots. Functions include outputting the scatter plot,
importing saved ROIs, and canceling the scatter plot function.

ENVI User’s Guide Using 2-D Scatter Plots


390 Chapter 4: Interactive Display Functions

Starting New Scatter Plots


To start an additional scatter plot window that uses different bands:
1. Select one of the following options:
• In the Scatter Plot window, select File > New Scatter Plot.
• From the Display menu, select Tools > 2D Scatter Plot.
2. When the Scatter Plot Band Choice dialog appears, select the X and Y bands.
3. Click “OK.”
A new scatter plot window appears in addition to the initial scatter plot.
Outputting Scatter Plots
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 scatter plots, select File > Save Plot As > Postscript or Image File.
For detailed instructions, see “Display Output Options” on page 398.
Importing ROIs to Scatter Plots
To import previously saved Regions of Interest to the scatter plot:
1. Select File > Import ROIs.
2. When the Import ROIs to Scatter Plot dialog appears, 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.

Using 2-D Scatter Plots ENVI User’s Guide


Chapter 4: Interactive Display Functions 391

3-D Surface Views


Use ENVI’s 3-D SurfaceViewTM to “fly-through” your 3-dimensional data sets. For
detailed instructions, see “Using 3-D SurfaceView” on page 802.

ENVI User’s Guide 3-D Surface Views


392 Chapter 4: Interactive Display Functions

Managing Displays
Use the Display Window menu to open, close, resize, and rearrange displays, and to
extract information from the open displays.

Figure 4-56: Access display management options from the Window menu.

Starting a New Display Group


• To open an empty display group, select one of the following options:
• From the Display menu or from the ENVI main menu, select Window > Start
New Display Window.
• In the Available Bands List, select “New Display” from the “Display #N”
button menu (see “Selecting the Active Display” on page 177).

Managing Displays ENVI User’s Guide


Chapter 4: Interactive Display Functions 393

Closing Display Groups


To close a display group select one of the following options:
• From the Display menu, select File > Cancel.
• In Microsoft Windows, click the button in the Main Image window.
The display group and any associated dialogs are closed.
Tip
To save a display group and its associated windows to a file, see “Saving Display
Groups” on page 216.

Closing All Displays


• To close all open image displays, select Window > Close All Display Windows
from the Display window or from the ENVI main menu.

Maximizing Open Displays


• To resize all display windows to fit the available screen space, select Window
> Maximize Open Displays from the Display menu or from the ENVI main
menu.
For example, if four displays are open, each display will be resized to fill one-fourth
of the available screen.

Viewing Cursor Location and Value


Use Cursor Location/Value in any image window to display the sample (horizontal,
X) and line (vertical, Y) coordinates of the cursor along with the data value of the
pixel at the cursor location (Figure 4-57). The position is continuously updated as you
move the cursor around the image.
Note
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
entered image pixel coordinates in the map information in the ENVI header, the
map coordinates would refer to the x,y coordinates entered (e.g., x=1.5, y=1.5
would make the map coordinates refer to the center of the pixel).

The same Cursor Location/Value window is used for all open displays. Both the
“Scrn:” (stretched image) and the “Data:” (raw data) values are listed. If an RGB

ENVI User’s Guide Managing Displays


394 Chapter 4: Interactive Display Functions

image is displayed, then the values for all three bands are listed. If an image is
georeferenced, then the appropriate projection name and the map coordinates and
latitude and longitude are also listed. If a Classification image is displayed, the class
names will be reported along with the cursor location and value. When display
windows are linked, the Cursor Location/Value dialog will display the data values for
the current pixel for all the display windows included in the link.
Select one of the following options to open the Cursor Location/Value window:
• In the Main Image window, double-click with the left mouse button.
• From the Display menu, select Tools > Cursor Location/Value.
• From the Display menu or from the ENVI main menu, select Window >
Cursor Location/Value.

Figure 4-57: Cursor Location/Value dialogs. The dialog on the right shows the
cursor location for a georeferenced image. UTM coordinates are listed in
Easting, Northing. UTM zone is 12.

Options in the Cursor Location/Value Window


Use the Options menu in the Cursor Location/Value window to report the cursor
location in the Zoom window as an integer number or as a floating point number, to
show fractions of a pixel, to change the displayed format of the latitude and longitude
information, and to set the precision of the numbers reported. The upper left of a
pixel is the position of the whole number coordinates and the X and Y values increase
to the right and bottom of the pixel, respectively. The pixel fraction is shown
proportional to the zoom factor. For example, at a zoom of 4x, the pixels are divided
into fourths.
Viewing Floating Point Pixel Locations
• In the Zoom window, select Options > Zoom: Floating Point Location.

Managing Displays ENVI User’s Guide


Chapter 4: Interactive Display Functions 395

Viewing Integer Pixel Locations


• In the Zoom window, select Options > Zoom: Integer Location.
Viewing X and Y Offset Values
• To view pixel locations, including the X and Y offset values read from the
header, select Options > Use Image Offsets: Yes.
Viewing Lat/Lon Information
• To view latitude and longitude information in decimal degrees, select Options
> Lat/Lon: DD (for georeferenced data sets).
• To view latitude and longitude information in degrees, minutes, and seconds,
select Options > Lat/Lon: DMS (for georeferenced data sets).
Bringing the Window to the Front
• To set the default so that the Cursor Location/Value window pops up in front
of all other windows when opened, select Options > Auto Raise:On.
Setting Numeric Precision
The numeric precision is the number of digits displayed after the decimal.
1. Select Options > Set Report Precision.
2. In the Set Report Precision dialog, use the arrow increment buttons to set the
desired precision for the map, latitude and longitude, and data displays.
• To set the precision used to display the map coordinates, enter the desired
numeric precision or use the arrow increment buttons next to the “Map
Precision” label.
• To set the precision of the display when Lat/Lon:DD is the selected option
for georeferenced data sets, click the “Lat/Lon Precision” arrow button.
• To set the precision used to display the floating point data value(s), click
the arrow button next to the “Data Precision” label. Any changes do not
affect the display of byte and integer data.
• To select “Scientific” or “Normal” as the “Floating Report” format, click
the arrow toggle button.
A normal number is the number in decimal format (e.g., 25.88), whereas a
scientific number shows a single digit, followed by a decimal, and “e”
(exponential) power (e.g., 2.588e+001).
3. Click “OK.”

ENVI User’s Guide Managing Displays


396 Chapter 4: Interactive Display Functions

Viewing Display Information


Use Display Information to show information about the display window in which the
cursor is currently located. The information is updated as you move the cursor
between the open display windows. The displayed information includes the display
number, number of colors used, bands displayed, the type of stretch currently applied
to each band, and the sizes and pixel ranges of the image, zoom, and scroll windows.
• In ENVI Main Image window or from the ENVI main menu, select Window >
Display Information.
The Display Information window appears.

Figure 4-58: The Display Information window.

Viewing Mouse Button Descriptions


Use Mouse Button Descriptions to display the functionality of the mouse buttons for
the window in which the cursor is located. As the cursor is moved from window to
window, the mouse button descriptions are updated. The displayed information
includes the window type (e.g., display, plot), the function that has the cursor control
(e.g., ROIs, Dynamic Overlay), and the actions for each mouse button (MB1: left
mouse button, MB2: middle mouse button; MB3: right mouse button).
Note
If the mouse buttons are not responding as you expect, display the mouse button
descriptions to check which function is in control of the cursor.

Select one of the following options to open the Mouse Button Descriptions window:
• From the Display menu or from the ENVI main menu, select Window > Mouse
Button Descriptions.

Managing Displays ENVI User’s Guide


Chapter 4: Interactive Display Functions 397

• From the ENVI main menu select Help > Mouse Button Descriptions.

Figure 4-59: Mouse Button Descriptions.

Positioning Zoom and Scroll Windows


• To position the Zoom and Scroll windows with respect to the Main Image
window, select Window > Scroll/Zoom Location > desired location.

Locking Window Placement


• To lock the Scroll and Zoom windows in place after you position them
anywhere on the screen, select Window > Scroll/Zoom Location > Auto
Placement Off.
The windows will remain in place until you move them again.

Hiding Scroll/Zoom Windows


• To “hide” the Zoom and/or Scroll windows, click the button in the right
corner of the window.
Unhiding
• To show the hidden Zoom and/or Scroll windows, select Window > Show
Zoom Window or Show Scroll Window.
Note
The Show... menu selections are only available if the corresponding window
is hidden.

ENVI User’s Guide Managing Displays


398 Chapter 4: Interactive Display Functions

Display Output Options


ENVI image displays, plots, or vector windows can be output to postscript files,
image files, or directly to printers. All overlays (annotation, grid lines, vectors, etc.)
can be included in (burned into) the output.
• Postscript File
• Image Files:
ENVI file (RGB binary image with an ASCII header file)
BMP, HDF, JPEG, PICT, SRF (Sun Raster File), TIFF (including GeoTIFF
and TIFF World files [.twf]), and XWD (X-Windows Dump) Image Files
ERDAS (.lan), ER Mapper, PCI (.pix), and ArcView (.bil) Files
• Directly to a system printer.

Outputting to Postscript Files


Use ENVI’s postscript output to scale an image, “burn in” graphic overlays, to output
an encapsulated postscript file, and to select from other output options.
• To output a displayed image to a postscript file, select File > Save Image As >
Postscript File from the Display menu.
The Output Display to Postscript File dialog appears, where you may modify
the output of images, plots, and vectors (see Figure 4-60). The output page is
shown schematically as a draw window in the upper right-hand corner of the
dialog. See the following subsections for setting the output display parameters
in the dialog.
• To output a plot or vector window to a postscript file, select File > Save Plot
As > Postscript in the plot or vector window.

Display Output Options ENVI User’s Guide


Chapter 4: Interactive Display Functions 399

Figure 4-60: The Display to PostScript Parameters dialog.

Setting Page Size and Image Scaling


Set output page sizes and image placement in either inches or cm, as specified in the
envi.cfg file. Precision scaling and multiple page output is available when
outputting to postscript. Any ENVI image can be scaled to a specific map scale—the
image size values change automatically based on the image pixel size. If the resulting
image is larger than a single page as defined in the “Page” text box, 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.

ENVI User’s Guide Display Output Options


400 Chapter 4: Interactive Display Functions

1. In the Output Display to Postscript File dialog, set the page size by entering the
desired dimensions in the text boxes labeled “Page.”
2. Set the output image size on the page by entering the desired values into the
“xsize” and “ysize” labeled text boxes.
• To maintain the relative aspect between X and Y when one dimension is
changed, 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 using your mouse, click and hold
the left mouse button inside the image outline in the draw window and
drag the image to a new position.
• To center the image outline on the page using your mouse, click the right
mouse button anywhere on the output page.
4. Click on the arrow toggle button to select “Landscape” or “Portrait” as the
page orientation.
5. Select from the following options.
• To scale an image to a specified map scale, enter the desired scale in the
“Map Scale 1:” text box.
The “xsize” and “ysize” values will 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).
• To toggle color on or off, select or de-select the “Color” check box.
• To select encapsulated postscript output, click the “Encapsulate” check
box.
• To select the number of output bits for the postscript image use the “Bits”
pulldown menu.
Setting Graphics Overlay Options
Graphics options (annotations, grid lines, regions of interest, vectors, etc.) can be
“burned into” (permanently incorporated in) the saved PostScript file. All currently
displayed valid ENVI graphics objects are automatically selected when the Output to
PostScript File dialog is started. A border is automatically placed on the output image
if grid lines are selected. The grid text-labels are placed exterior to the image.

Display Output Options ENVI User’s Guide


Chapter 4: Interactive Display Functions 401

Note
The grid must have been previously displayed and configured on the image by
selecting using the Grid Lines overlay option (see “Grid Lines” on page 256 for
further information).

1. In the Output Display to Postscript File dialog, click on the “Change Graphic
Overlay Selections” button.
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, click on its name in the Currently Selected
Options list.
• To add graphics overlays, select the desired overlay using the “Add
Graphics Option” pulldown menu (with the exception of annotation, these
overlays must be displayed on your 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” pulldown menu and select the desired annotation filename.
3. Click “OK” to return to the Output to Postscript File dialog.
• 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 select a spatial subset of the image to be output, click on the “Spatial
Subset” button (see “Selecting a Spatial Subset” on page 45).
• To resize the image, enter a resize factor (less than 1 for subsampling) in the
“Input Image Resize Factor” text box.
Applying Masks
In the Output Display to Postscript File dialog, you have the option of applying a
predefined mask to your output image. This means that if you want to apply a mask to
the image, you do not need to do it before selecting the output options.
1. In the Output Display to Postscript File dialog, click the “Select Mask” button.
2. Select the input band for the mask.

ENVI User’s Guide Display Output Options


402 Chapter 4: Interactive Display Functions

3. In the “Background” “R,” “G,” and “B” boxes, enter desired color values that
you want to use where the mask is turned off.
4. Click “OK.”
• To clear the selected mask and output a complete image, click the “Clear
Mask” button.
Saving Output Files
1. Enter the output filename or use the “Choose” button to select the output
filename.
2. Click “OK” when all options are correctly set.
If the parameters you have chosen result in multiple page output, the filename is used
as a root filename, and numbers designating the position of the multiple pages in the
composite image are appended to the filename. 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.

Outputting to Image Files


ENVI has many image output options for the Main Image display. They include
output to an ENVI format image file, and output to BMP, HDF, JPEG, PICT, 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. For the Zoom window, you have two output options: to save it as
a 3 band red-green-blue file or as a single-band grayscale file.
• To output a displayed image to an image file, select File > Save Image As >
Image File from the Display menu.
The Output Display to Image File dialog appears with options to 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 subsections below for
details.
• To output a plot or vector window to an image file, select File > Save Plot As
> Image File in the plot or vector window.
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

Display Output Options ENVI User’s Guide


Chapter 4: Interactive Display Functions 403

(resolutions) include 8-bit gray scale, 8-bit with an associated color table, and 24-bit
BSQ (band sequential), BIL (band interleaved by line), and BIP (band interleaved by
pixel) formats.
• To select the desired output file type, use the “Output File Type” button menu.
Note
When you output a georeferenced image to a JPEG file, an associated .jgw file is
also created to contain the TIFF World File information. When you open a JPEG
file (using File > Open External File > Generic File Formats > JPEG) that has a
.jgw file associated with it, ENVI reads the map information from .jgw file.

• Select the desired output format and resolution using the “Resolution” button
menu.

Setting Graphics Overlay Options


Graphics options (annotations, grid lines, regions of interest, vectors, etc.) can be
“burned-into” (permanently incorporated in) the output image file. All currently
displayed valid ENVI graphics objects are automatically selected when the Output to
Image File dialog is started. 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 Display Menu (see “Grid Lines” on page 256).
1. Click on the “Change Graphic Overlay Selections” button.
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, click on its name in the “Currently Selected
Options” list.
• To add graphics overlays, select the desired overlay using the “Add
Graphics Option” pulldown menu (with the exception of annotation, these
overlays must be displayed on your 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” pulldown menu and select the desired annotation filename.
3. Click “OK” to return to the Output Display to Image File dialog.

ENVI User’s Guide Display Output Options


404 Chapter 4: Interactive Display Functions

Changing Border Sizes and Colors


To change the border size or color on the output image:
1. Click on the “Change Image Border Size” button.
2. When the Change Image Border Size dialog appears, enter the desired border
sizes in the top, right, bottom, and left text boxes.
3. Select the desired border color from the pulldown menu.
The corresponding RGB values appear in the text boxes.
4. Click “OK” to return to the Output to Image File dialog.
Subsetting Output Images
• To select a spatial subset of the image to be output, click on the “Spatial
Subset” button to perform typical ENVI subsetting (see “Selecting a Spatial
Subset” on page 45).
• To resize the input image, enter a resize factor (less than 1 for subsampling) in
the “Input Image Resize Factor” text box.
The output size of the image, in pixels, is shown in the “Output Image Size” text box.
Applying Masks
In the Output Display to Image File dialog, you have the option of applying a
predefined mask to your output image. This means that if you want to apply a mask to
the image, you do not need to do it before selecting the output options.
1. Click the “Select Mask” button.
2. Select the input band for the mask.
3. In the “Background” “R,” “G,” and “B” boxes, enter desired color values that
you want to use where the mask is turned off.
4. Click “OK.”
• To clear the selected mask and output a complete image, click the “Clear
Mask” button.
Saving Output Image Files
1. Select output to “File” or “Memory” and enter an output filename if needed.
2. Click “OK” when all options are correctly set.

Display Output Options ENVI User’s Guide


Chapter 4: Interactive Display Functions 405

Outputting Zoom Windows


Use Save Zoom As to output a Zoom window to an image file.
1. From the Display menu, select File > Save Zoom As > Image File.
2. Select either “3 Band RGB” or “1 Band Gray” output to save the zoom
window to a 3 band red, green, blue file or a single grayscale file.
3. Enter an output filename or select output to memory.
4. Click “OK.”

Printing
ENVI allows output of the image display, plot, and vector windows directly to
system printers. You should be able to output to any of your system printers or
plotters through your native system printer dialog.
1. Select one of the following options:
• To output a displayed image to a system printer, select File > Print from
the Display menu.
• To output a plot or vector window to a system printer, select File > Print
in the plot or vector window.
2. When the Print setup dialog appears, set any options specific to your system
and click “OK.”
3. When the Output Display to Printer dialog appears, you will have several
options for setting the output display parameters. See the following
subsections for detailed instructions.
4. After setting the parameters, click “OK” in the Output Display to Printer
dialog to print the image or plot.
Selecting Output Print Sizes
You can set the output X or Y print size or set the desired output map scale if a
georeferenced image is displayed. When a size is set, the other size parameters will
change to preserve the aspect ratio of your image.
1. In the Output Display to Image File dialog, set the output image size on the
page by entering the desired values into the “xsize” and “ysize” labeled text
boxes.
• To maintain the relative aspect between X and Y when one dimension is
changed, select the “Aspect” check box.

ENVI User’s Guide Display Output Options


406 Chapter 4: Interactive Display Functions

2. 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 using your mouse, click and hold
the left mouse button inside the image outline in the draw window and
drag the image to a new position.
• To center the image outline on the page using your mouse, click the right
mouse button anywhere on the output page.
3. Click on the arrow toggle button to select “Landscape” or “Portrait” as the
page orientation.
4. Select from the following options.
• To scale an image to a specified map scale, enter the desired scale in the
“Map Scale 1:” text box.
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).
Subsetting and Resizing Output Images
• To select a spatial subset of the image to be output, click on the “Spatial
Subset” button to perform typical ENVI subsetting (see “Selecting a Spatial
Subset” on page 45).
• To resize the image, enter a resize factor (less than 1 for subsampling) in the
“Input Image Resize Factor” text box.
Setting Graphics Overlay Options
Graphics options (annotations, grid lines, regions of interest, vectors, etc.) can be
“burned-into” (permanently incorporated in) the print. All currently displayed valid
ENVI graphics objects are automatically selected when the Output Display to Printer
dialog is started. 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 Display Menu (see “Grid Lines” on page 256).
1. In the Output Display to Printer dialog, click on the “Change Graphic Overlay
Selections” button.

Display Output Options ENVI User’s Guide


Chapter 4: Interactive Display Functions 407

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, click on its name in the Currently Selected
Options list.
• To add graphics overlays, select the desired overlay using the “Add
Graphics Option” pulldown menu (with the exception of annotation, these
overlays must be displayed on your 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” pulldown menu and select the desired annotation filename.
3. Click “OK” to return to the Output Display to Printer dialog.

Applying Masks
In the Output Display to Printer dialog, you have the option of applying a predefined
mask to your output image. This means that if you want to apply a mask to the image,
you do not need to do it before selecting the output options.
1. Click the “Select Mask” button.
2. Select the input band for the mask.
3. In the “Background” “R,” “G,” and “B” boxes, enter desired color values that
you want to use where the mask is turned off.
4. Click “OK.”
• To clear the selected mask and output a complete image, click the “Clear
Mask” button.

ENVI User’s Guide Display Output Options


408 Chapter 4: Interactive Display Functions

Display Output Options ENVI User’s Guide


Chapter 5:
Basic Tools

This chapter covers the following topics:

The Basic Tools Menu . . . . . . . . . . . . . . . . 410 Band Math . . . . . . . . . . . . . . . . . . . . . . . . 441


Resizing Data (Spatial/Spectral) . . . . . . . . 411 Spectral Math . . . . . . . . . . . . . . . . . . . . . . 449
Subsetting Data via ROIs . . . . . . . . . . . . . 418 Segmenting Images . . . . . . . . . . . . . . . . . 450
Rotating Images . . . . . . . . . . . . . . . . . . . . . 419 Regions of Interest . . . . . . . . . . . . . . . . . . 452
Layer Stacking . . . . . . . . . . . . . . . . . . . . . . 421 Mosaicking Images . . . . . . . . . . . . . . . . . 457
Converting Data (BSQ, BIL, BIP) . . . . . . 423 Masking . . . . . . . . . . . . . . . . . . . . . . . . . . 458
Stretching Data . . . . . . . . . . . . . . . . . . . . . 425 General Purpose Utilities . . . . . . . . . . . . . 464
Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 Data-Specific Utilities . . . . . . . . . . . . . . . 471
Using the Measurement Tool . . . . . . . . . . . 437 Calibration Utilities . . . . . . . . . . . . . . . . . 480

ENVI User’s Guide 409


410 Chapter 5: 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.
Functions such as Regions of Interest can be used 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.

Figure 5-1: The ENVI Basic Tools menu.

The Basic Tools Menu ENVI User’s Guide


Chapter 5: Basic Tools 411

Resizing Data (Spatial/Spectral)


To spatially resize an image and/or perform image spatial or spectral subsetting:
1. Select Basic Tools > Resize Data (Spatial/Spectral).
The File Subset Input File dialog appears.
• To open a new file, click the “Open New File” button.
2. Select an input file by clicking on the file name in the column labeled “Select
Input File.”
3. Select a subset using one of the methods described in the following sections.
Note
The methods described are standard ENVI subsetting techniques (for more
information, see “Selecting a Spatial Subset” on page 45 and “Selecting a Spectral
Subset” on page 50).

File information is listed in the right column of the window.

Figure 5-2: The File Selection Dialog.

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


412 Chapter 5: Basic Tools

Spatially Subsetting
You can select a spatial subset by entering the numbers of samples/lines, by selecting
the subset directly from the image, by using another file’s subset, by selecting
map coordinates (for georeferenced images only), or by using the bounding box
around a Regions of Interest(s).

Selecting by Samples/Lines
1. In the File Subset Input File dialog, click “Spatial Subset.”
The Spatial Subset dialog appears with the file information listed at the top of
the window.
• To use the same spatial subset previously entered for a file with the same
spatial size, click the “Previous” button.
2. Change the number of samples and/or lines for the output image by entering
the starting and ending values into the text boxes labeled “Sample” and/or
“lines” respectively or by entering the desired number of lines or pixels in the
boxes labeled “NS” or “NL” respectively.
The size of the original data set (in bytes) and the size of the subset are shown
below the data entry text boxes.
3. Click “OK.”
4. After selecting and subsetting an input file, click “OK” in the File Subset Input
File dialog.
The File Resize Parameters dialog appears with information about the input file listed
at the top of the dialog. The output file dimensions specified by the subsetting
procedure are also displayed.

Subsetting Interactively from the Image


Use interactive subsetting to select a subset directly from the image.
1. In the File Subset Input File dialog, click “Spatial Subset.”
2. In the Spatial Subset dialog, click the “Subset by Image” button.
The Subset Function window appears with the entire image displayed.
3. Change the size of the subset by clicking and dragging the corner of the red
box to the desired size.

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


Chapter 5: Basic Tools 413

• To move the box around the image, click on the box and drag it to the
desired location. Or, click with the middle mouse button to center the box
on the cursor.
4. Click “OK.”
5. After selecting and subsetting an input file, click “OK” in the File Subset Input
File dialog.
The File Resize Parameters dialog appears.
Subsetting by Map Coordinates
If your image is geo-referenced, you may select the subset by map coordinates or
latitude/longitude coordinates:
1. In the File Subset Input File dialog, click “Spatial Subset.”
2. In the Spatial Subset dialog, click on the “Subset By Map” button.
The Spatial Subset By Map Coordinates dialog appears.
3. Enter the upper left coordinate and lower right coordinate in the appropriate
text boxes.
4. Use the arrow toggle buttons next to the map projection label to select the
subset by map coordinates.
• For the UTM projection, indicate if the selected latitude is north (N) or
south (S) of the equator by selecting the appropriate button (the zone is
calculated automatically).
• For other map projections, enter latitude and longitude. Negative (-)
latitude indicates the Southern Hemisphere and negative (-) longitude
indicates the Western Hemisphere. (Entering the UTM zone assigns the
appropriate sign to the longitude.)
5. Click “OK.”
6. In the Spatial Subset dialog, click “OK.”
7. After selecting and subsetting an input file, click “OK” in the File Subset Input
File dialog.
The File Resize Parameters dialog appears.
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

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


414 Chapter 5: Basic Tools

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 the “Previous” button.
Using the Subset of an Image of the Same or Smaller Size
1. In the Select Spatial Subset dialog, click the “File” button.
2. In the file selection dialog, select the previously subsetted file (which must
have originally been the same size as or smaller than the file you are currently
subsetting).
The input file will be subset based on the subset parameters of the file you
select.
Subsetting Using ROIs
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 the “ROI” button.
Tip
To make previously saved ROIs available for selection in the Subset Image by ROI
Extent dialog, click the “Restore ROIs” button in the Select Spatial Subset dialog
and select the ROI file in the subsequent file selection dialog.

Figure 5-3: In the Subset Image by ROI Extent dialog, select the ROI(s) to use
as the area of a spatial subset.

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


Chapter 5: Basic Tools 415

2. In the Subset Image by ROI Extent dialog, select the ROI(s) and click “OK.”
The file will be subset to the area encompassing the selected ROI(s).

Spectrally Subsetting
1. In the File Subset Input File dialog, click the “Spectral Subset” button.
The standard File Spectral Subset dialog appears with the file information
listed at the top o f the window.
2. Select specific bands to include in the subset by clicking on the band names or
by selecting ranges of bands.
• To select the same spectral subset used in a previous subsetting of a
different file with the same number of spectral bands, click the “Previous”
button.
3. Click “OK.”
4. After selecting and subsetting an input file, click “OK” in the File Subset Input
File dialog.
The File Resize Parameters dialog appears with information about the input file listed
at the top of the dialog. The output file dimensions specified by the subsetting
procedure are also displayed.

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


416 Chapter 5: Basic Tools

Figure 5-4: The File Resize Parameters Dialog.

Resizing File Parameters


In addition to subsetting, use the resize function to create new images of any size or
aspect ratio:
1. In the File Resizing Parameters dialog, either enter the desired number of
samples and lines in the corresponding text boxes, or enter the multiplicative X
and Y enlargement or reduction factors in the “xfac” and “yfac” text boxes and
press the “Return” key.
Tip
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 will be updated.

• If you enter xfac and yfac values greater than or equal to 1, select “Nearest
Neighbor,” “Bilinear,” or “Cubic Convolution,” from the “Resampling”
button menu (see “Warping and Resampling” on page 714).

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


Chapter 5: Basic Tools 417

• If you enter xfac and yfac values less than 1, select from “Nearest
Neighbor” or “Pixel Aggregate” resampling only.
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 (e.g., if you enter .5 for both xfac and yfac, the output pixel values
are calculated by averaging the four input pixel values).
2. Select either “File” or “Memory” output.
3. Click “OK” to start the operation.
The File Resize status window appears with the output filename listed and the
percent completed displayed.

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


418 Chapter 5: Basic Tools

Subsetting Data via ROIs


Use Subset Data via ROIs to subset your data into a rectangle that contains the
selected ROI(s). 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. Select Basic Tools > Subset Data via ROIs.
2. In the file selection dialog, select the input file and perform any spectral
subsetting.
The Spatial Subset via ROI Parameters dialog appears.
3. Select the input ROI(s) by clicking on the ROI name(s).
4. Use the arrow 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.
5. Select output to “File” or “Memory.”
6. Click “OK.”
The resulting subset is listed in the Available Bands List.

Subsetting Data via ROIs ENVI User’s Guide


Chapter 5: Basic Tools 419

Rotating Images
Use Rotate/Flip Images to perform several “standard” image rotations. These include
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
prior to 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. Select Basic Tools > Rotate/Flip Images.


2. When the Rotation Input File dialog appears, select an input file and any
subsetting using the standard ENVI file selection procedures (see “Selecting
Files in ENVI” on page 42).
3. Click “OK.”
The Rotation Parameters dialog appears. This dialog varies slightly depending
on whether a standard IDL rotation or an arbitrary rotation angle is used.
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.
4. Select from the following rotation options.
• To apply a “standard rotation” (0, 90, 180, or 270 degrees), click the
appropriate toggle button.
• To flip the X and Y coordinates of the image, click “Yes” next to the
“Transpose” label.

ENVI User’s Guide Rotating Images


420 Chapter 5: Basic Tools

Figure 5-5: The Rotation Parameters Dialog. Left - Standard IDL rotations and
transposes. Right - Arbitrary angle rotations.

• To specify the exact rotation angle desired:


A. Enter a value in the “Angle” text box.
Angles are measured clockwise from horizontal.
B. Select the resampling algorithm to be used to calculate the output image
(nearest neighbor, bilinear interpolation, or cubic convolution) by clicking
on the appropriate toggle button (see “Warping and Resampling” on
page 714).
5. Select output to “File” or “Memory.”
6. Click “OK” to start rotation processing.
A status window appears with the percent complete displayed.

Rotating Images ENVI User’s Guide


Chapter 5: Basic Tools 421

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, select Basic Tools > Layer Stacking.
• From the ENVI main menu, select Map > Layer Stacking.
The Layer Stacking Parameters dialog appears.

Figure 5-6: The Layer Stacking Parameters dialog.

2. Click on the “Import File” button.


The Layer Stacking Input File dialog appears (see Figure 5-6).

ENVI User’s Guide Layer Stacking


422 Chapter 5: Basic Tools

3. Select input files and perform any spatial or spectral subsetting using standard
ENVI procedures.
4. Repeat the file selection using the “Import File” button for each input file to be
included in the new output file. Input files are listed in the “Selected Files for
Layer Stacking” list.
5. Click the “Inclusive” or “Exclusive” button to select the output file range.
The “Inclusive” range will create an output file with a geographic extent that
encompasses all the input file extents. The “Exclusive” range will create an
output file that contains only the data extent where all the files overlap.
6. Select an output map projection from the list.
7. From the “Resampling” button menu, select a resampling method.
8. Enter the desired x and y pixel sizes in the corresponding text boxes.
Note
The pixel sizes should be entered in the units selected under the map projection
section.

9. Select “File” or “Memory” output.


10. Click “OK.”

Layer Stacking ENVI User’s Guide


Chapter 5: Basic Tools 423

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 example, Band
Sequential (BSQ) format data allow efficient image display, Band Interleaved by
Pixel (BIP) format data provide efficient extraction of individual spectra and spectral
averages, and Band Interleaved by Line (BIL) format provide a compromise between
the previous two formats.
In BSQ (Band Sequential) format, each entire spatial band is followed by the next
entire band for all bands. In BIL (Band Interleaved by Line) format the first line of
the first band is followed by the first line of the second band followed by the first line
of the third band, etc. for all bands. Subsequent lines for each band are interleaved in
similar fashion. In BIP (Band Interleaved by Pixel) the first pixel for each band is
followed by the second pixel, etc. for all bands.
1. Select Basic Tools > Convert Data (BSQ, BIL, BIP).
2. When the File Convert Input File dialog appears, select the input file and
perform any subsetting.
After you have entered the information for the full image or the spatial and/or
spectral subsets, the File Convert Parameters dialog appears. Input file
information is displayed at the top of the window.
3. Select the desired output data type by clicking the corresponding “Output
Interleave” toggle button.
ENVI automatically determines the format of the input file and offers
conversion only to the other two formats.
4. Next to the “Convert in Place” label, select the “Yes” or “No” toggle button.
• To have the new format overwrite the existing file, select “Yes.”
This option saves significant disk space, but the process is slower than
writing to a separate file.
Warning
If the overwrite function fails for any reason (i.e., due to a power outage), your data
will be corrupted and the original file will not be recoverable.

• To have the converted file written to a separate output file, select “No.”
5. Enter the output file name.

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


424 Chapter 5: Basic Tools

6. Click the “OK” button to start conversion.


The File Conversion status window displays the output filename and the percent
completed.

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


Chapter 5: Basic Tools 425

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, etc.). For more information, see “Using Interactive
Stretching” on page 321.
1. Select Basic Tools > Stretch Data.
The Data Stretching Input File dialog appears.
2. In the list labeled “Select Input File,” select a filename.
Details of the file characteristics are shown in the text widget labeled “File
Information.”
3. Select spatial or spectral subsetting by clicking on the “Spatial Subset” or
“Spectral Subset” button, respectively.
4. Click “OK.”
The Data Stretching dialog appears.
• To calculate the statistics based on a spatial subset or the area under an
ROI, click the “Stats Subset” button. For instructions, see “Using Statistics
Subsetting” on page 428.
5. Select the values by percent or by value using the buttons at the top of the
window.
6. Enter the desired minimum and maximum values in the text boxes labeled
“Min” and “Max,” respectively, to control the input data range.
7. Select the stretch types (“Linear,” “Equalize” (histogram equalized),
“Gaussian,” and “Square Root”) by choosing the appropriate toggle button.
8. Set the output data range in the text widgets labeled “Min” and “Max”
under the “Output Data” label.
The values entered here must match the ranges of the data type selected from
the “Data Type” menu. 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.
• From the “Data Type” menu, select the appropriate data type (byte,
integer, unsigned integer, long integer, unsigned long integer, 64-bit

ENVI User’s Guide Stretching Data


426 Chapter 5: Basic Tools

integer and unsigned 64-bit integer, floating point, double precision,


complex, or double complex).

Figure 5-7: The Data Stretching Dialog.

9. Enter or choose an output filename.


10. Click “OK” to start the processing.
If no statistics file exists for the selected input file, the image statistics are calculated
prior to data stretching and a small window labeled “Image Statistics” shows the
percent processing complete as a slider that moves from 0 to 100%. If a statistics file
already exists (or once the image statistics have been calculated) another small
window labeled “Data Stretching” shows the percentage of data stretching
completed.

Stretching Data ENVI User’s Guide


Chapter 5: Basic Tools 427

Statistics
Use Statistics on the Basic Tools menu to generate statistical reports for image files
and output plots of histograms, mean spectra, eigenvalues, and other statistic
information.

Computing Statistics
Basic statistics and/or tabulated histogram information (frequency distributions) can
be calculated 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. Select Basic Tools > Statistics > Compute Statistics.
The Calculate Statistics Input File dialog appears.
2. In the “Select Input File” list, select the input file by clicking on the file name.
Details of the file characteristics are shown under “File Information.”
3. Select spatial or spectral subsetting by clicking on the “Stats Subset” or
“Spectral Subset” button, respectively. (For details about “Stats” subsetting,
see “Using Statistics Subsetting”, next.)
• To apply a mask to the data before calculating the statistics, click
“Mask Band” and select the desired mask image.
4. After the file has been selected, subsetted, and masked as desired, click “OK.”
The Calculate Statistics Parameters dialog appears.
5. Use the dialog to set report parameters as described in the following sections.

ENVI User’s Guide Statistics


428 Chapter 5: Basic Tools

Figure 5-8: The Calculate Statistics Parameters Dialog.

Using Statistics Subsetting


Use the “Stats Subset” button in the input file selection dialog or Data Stretching
dialog 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. You can also use this function when doing file-to-file stretching. For details,
see “Stretching Data” on page 425.
1. In the Input File selection dialog, click the “Stats Subset” button.
2. In the subsequent dialog, select one of the following options:
• To select a standard image spatial subset, click the “Calculate Stats On”
“Image Subset” button and subset using standard ENVI methods.

Statistics ENVI User’s Guide


Chapter 5: Basic Tools 429

• To select a ROI as the subset, click the “Calculate Stats On” “ROI” button
to display a list of ROIs, then click on the ROI name to select it.
Tip
To add a previously saved ROI to the list of ROIs, click the “Restore ROIs” button
in the subset dialog, select the ROI file, then select the ROI.

Figure 5-9: The Select Statistics Subset dialog for “Image Subset” calculation
(left), or “ROI” calculation (right).

Selecting Statistics Types


In the Calculate Statistics Parameters dialog, select the type of statistics to be
reported: basic, histogram, or covariance.
Selecting Basic Statistics
Basic statistics include the minimum, maximum, mean, and standard deviations for
all bands, and eigenvalues if the file has multiple bands. Select any or all of the basic
statistics from the options below.
• To see the basic statistics file on screen or to write the report to an ASCII file,
click the “Text Report” check box if not already checked. If you do not select
this option, the output will be an ENVI .sta binary file.

ENVI User’s Guide Statistics


430 Chapter 5: Basic Tools

• To have the minimum, maximum, mean, and plus-or-minus-one standard


deviation spectra plotted together in a single plot, select the check boxes
next to “Min/Max/Mean Plot.”
This option will only be available for an image containing more than one
band, and the output will be a single plot.
• To plot the standard deviation in each band together in a single plot, click in
the check box next to the “Stdev Plot” label.
This option will only be available for an input image containing more than
one band, and the output will be a single plot.
Tip
To produce an eigenvalue plot, you must first select the “Calculate Covariance
Statistics” check box and then select the check box next to the “Eigenvalue Plot”
label.

Selecting Histogram Statistics


To produce histogram plots of the statistics for you input bands:
1. In the Calculate Statistics Parameters dialog, click the “Calculate Histogram
Statistics” check box.
2. Select whether you want the histograms to be output to plot windows, a text
report, or both, by clicking the corresponding check box.
• If you select “Histogram Plots,” designate the number of output
histograms to plot per plot window, by clicking the arrow buttons next to
the “Histogram plots per window” label. For example, if you have six
input bands and select “5,” then the first five bands will appear in the first
plot window and the last band will appear in a separate window.
A statistics histogram report of the frequency distribution is created, listing the
number of points (“Npts.”) “Total” (cumulative points), “Pct” (percent for each bin),
and “Acc Pct” (cumulative percentage) for each DN in the image histogram if the
number of bins in the histogram is 256 or less. The full frequency distribution is
printed to the output report file, but because of memory considerations, frequency
distributions larger than 256 bins are not shown on the screen report. The number
of histogram bins used in the calculation is set in the ENVI Configuration File
(see “Setting ENVI Preferences” on page 160).

Statistics ENVI User’s Guide


Chapter 5: Basic Tools 431

Figure 5-10: Statistics Histogram Plot.

Selecting Covariance Statistics


You can produce covariance statistics only for input files of more than one band.
Covariance statistics include the covariance and correlation matrices plus eigenvalues
and eigenvectors.
1. In the Calculate Statistics Parameters dialog, select the “Calculate Covariance
Statistics” check box.
2. Select whether you want the covariance, correlation, and eigenvector matrices
output as images, a text report, or both, by checking the “Covariance Image”
and/or the “Text Report” check box.
• If you select “Covariance Image,” the resulting images will appear in the
Available Bands List. The images will be number of bands by number of
bands in size. The eigenvectors are associated with the rows in the output
image.
• If you select “Text Report,” the covariance and correlation matrices will
appear in text format.
• To produce a basic output plot of eigenvalues, select the “EigenValue
Plot” check box under “Basic Statistics.”

ENVI User’s Guide Statistics


432 Chapter 5: Basic Tools

The report shows the covariance and correlation matrices along with the eigenvectors
for each band. If all three options are selected, all of the statistics are shown in one
“File Statistics Report.”

Setting Resize Factors


Use a resize factor during the statistics calculations to improve performance.
• To set the resize factor, enter the desired resize factor in the “Samples/Lines
Resize Factor” text boxes (values less than 1 will skip pixels, i.e, a value of 0.5
tells ENVI to use every other pixel in calculating the statistics).
Changing Data Precision
1. Click the “Set Report Precision” button at the bottom of the dialog to change
the data precision displayed in the report.
The Set Report Precision dialog appears.
2. Use the “Data Precision” arrow increment button to set the number of digits to
be displayed after the decimal point.
3. Select either “Scientific” or “Normal” by clicking the “Floating Report” arrow
toggle button to designate the format for the numbers that appear in the ASCII
report.
A normal number is the number in decimal format (e.g., 25.88), whereas a scientific
number is a single digit followed by the decimal, and “e” (exponential) power (e.g.,
2.588e+001).

Selecting Output Types


There are three types of report output: an ENVI statistic file, directly to a window
displayed on-screen, or a text report saved to a file.
Selecting ENVI Format Output
Save the statistics to an ENVI format statistics file to speed processing for later use
with ENVI functions.
• To save the statistics to an ENVI format statistics file, enter or choose a
filename under the “Enter Output Stats Filename” label. The default file
extension for statistics files is .sta.
Selecting On-Screen Output
You may select either the text file option or both.

Statistics ENVI User’s Guide


Chapter 5: Basic Tools 433

• To display the statistics report on-screen, click the “Screen” check box next to
the “Report” label in the Calculate Statistics Parameters dialog.
The output of all statistics selected appear in an all-text report displayed in a
separate window.
Tip
The report can be lengthy, so it may be better to de-select the “Text Report” check
box under the “Calculate Histogram Statistics” label to reduce the size of the report.

• To save the on-screen report, select File > Save Text to ASCII.
Selecting Text File Output
To output the statistics report to a text file:
1. In the Calculate Statistics Parameters dialog, select “File” output.
2. Enter or choose a filename for the report.
Producing Statistics Reports
After setting the report parameters in the Calculate Statistics Parameters dialog,
calculate the statistics report:
• In the dialog, click “OK” to start the statistics calculations.
A small window appears showing the percent of processing complete as a
slider from 0 to 100%.
Once the statistics have been calculated, the File Statistics Report window
appears.

ENVI User’s Guide Statistics


434 Chapter 5: Basic Tools

Figure 5-11: A File Statistics Report.

Statistics ENVI User’s Guide


Chapter 5: Basic Tools 435

Opening Statistics Files


Use View Statistics File to view previously saved statistics files.
1. Select Basic Tools > Statistics > View Statistics File.
2. When the standard ENVI file input dialog appears, select a valid statistics file.
The View Statistics File dialog appears.Use this dialog to select the type of
reports to be generated.
The options are similar to those described above for the Calculate Statistics
Parameters Dialog.
Note
The options available in the View Statistics File dialog are dependent on the type of
statistics that were computed for the original file (e.g., if covariance statistics were
not calculated for the original file, then covariance options will not be 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 various statistics are calculated as
follows, where xj is the value of a pixel for band j and N=number of bands:
Note
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. Select Basic Tools > Statistics > Sum Data Bands.


2. In the file selection dialog, select an input file and perform any subsetting.
3. In the Sum Data Parameters dialog, click on the output bands to be calculated.
4. From the “Output Data Type” button menu, select the output data type.

ENVI User’s Guide Statistics


436 Chapter 5: Basic Tools

Note
If the output data falls outside the data type range, the output data will be clipped to
the highest or lowest data type value (i.e., 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.”
A status window displays the progress of the operation. The calculated bands are
listed in the Available Bands List.

N N

Sum = åx j Sum =
2
åx j
2

j=1 j=1

N N
1
Mean = x = ----
N å xj
1
Variance = -------------
N–1 å (x – x) j
2

j=1 j=1

N 3 N 4

å å
1 æ xj – x ö 1 æ xj – x ö
Skewness = ---- ç ----------------------------÷ Kurtosis = ---- ç ----------------------------÷ –3
N è Varianceø N è Varianceø
j=1 j=1

N
1
Mean Absolute Deviation = ----
N å x –x j Standard Deviation = Variance
j=1

Statistics ENVI User’s Guide


Chapter 5: Basic Tools 437

Using the 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.
Note
To measure ROIs while using the ROI function, see “Reporting ROI
Measurements” on page 275.

1. Select one of the following options to begin:


• From the ENVI main menu, select Basic Tools > Measurement Tool.
• From the Display menu, select Tools > Measurement Tool.
The Display Measurement Tool dialog appears.
2. In the “Display” text box, type the number of the display that you want to take
measurements from.
3. Select the appropriate image window toggle button (Image, Scroll, Zoom).
• To disable the measurement function at any time, select the “Off” toggle
button.
4. Select Type > the desired shape of the area you want to measure.
5. Select Units > the desired measurement unit.
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
box appears.
A. In the “X Pixel Size” and “Y Pixel Size” text boxes, type the size of the
pixels in your image.
B. From the “Units” button menu, select the unit type. Click “OK.”
6. In the image display, draw the desired shape by clicking with the left mouse
button.
• In Rectangle or Ellipse mode, click with the left mouse button and drag the
shape to the desired size.

ENVI User’s Guide Using the Measurement Tool


438 Chapter 5: Basic Tools

Figure 5-12: The Display Measurement Tool dialog.

• To draw a square or circle, click and drag while holding the middle mouse
button in Rectangle or Ellipse mode.
7. Close the polygon or complete the line by clicking the right mouse button.
• To erase the shape, click again with the right mouse button.
For Polygon mode, the distance between the vertices are listed and the
perimeter and total area are reported when the polygon is closed.
For Polylines, the distance between the vertices are listed and the total distance
is given when the polyline is completed.
In Rectangle mode, the lengths of the side segments, the perimeter, and the
total area are reported.
In Ellipse mode, the circumference and total area are reported.

Selecting Measurement Units


In the Display Measurement Tool dialog, use the Units menu to select the unit the
measurement is reported in. The choices are pixels, meters, kilometers, feet, yards,
miles, and nautical miles.
• Select Units > the desired unit.

Using the Measurement Tool ENVI User’s Guide


Chapter 5: Basic Tools 439

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
box appears.
A. In the “X Pixel Size” and “Y Pixel Size” text boxes, type the size of the
pixels in your image.
B. From the “Units” button menu, select the unit type. Click “OK.”

Measuring Area
In the Display Measurement Tool dialog, use the Area menu to measure the area in
units 2 (e.g., meters2), acres, or hectares.
• Select Area > Acres or Hectares.

Measurement Options
In the Display Measurement Tool 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 point coordinates to a file, select File > Save Points to
ASCII.

Saving Measurement Reports


In the Display Measurement Tool dialog, use the File menu to save the ROI
measurement report to an ASCII file.
1. In the ROI Measurement Report dialog, select File > Save Points to ASCII.
2. In the Output Measurement Directory dialog, enter an output filename.
3. Click “OK.”

ENVI User’s Guide Using the Measurement Tool


440 Chapter 5: Basic Tools

Closing the Measurement Tool Dialog


• To close the Display Measurement Tool dialog, select File > Cancel.

Using the Measurement Tool ENVI User’s Guide


Chapter 5: Basic Tools 441

Band Math
Use Band MathTM to process complex expressions and produce single band output.
Use “File Math” to apply the math expressions to all of the bands in a multiband file.
See Band Math Basics in the ENVI Programmer’s Guide for more information about
using Band Math.

Available Band Math Functions


The Band Math function is a flexible image processing tool with many capabilities
not available in any other image processing system. The power of this function is
directly related to the power of the IDL language. Available functions include, but
are not limited to the math expressions listed in Table 5-1.
Note
When using mathematical expressions in Band Math, the operations will be
performed in the data type (byte, integer, floating point, etc.) of the input data. Use
the data type conversion functions listed in Table 5-1 to explicitly set each input
band to the desired data type.

Series and Scalar Trigonometric


Other Band Math Options
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 operator (<) ArcCosine (acos(x)) IDL procedures that return array
results

Table 5-1: Some of the Available Band Math Functions.

ENVI User’s Guide Band Math


442 Chapter 5: Basic Tools

Series and Scalar Trigonometric


Other Band Math Options
Math Functions

Maximum operator (>) ArcTangent (atan(x)) User IDL functions and


procedures
Absolute Value (abs(x)) Hyperbolic Sine
(sinh(x))
Square Root (sqrt(x)) Hyperbolic Cosine
(cosh(x))
Exponent (^) Hyperbolic Tangent
(tanh(x))
Natural Exponent
(exp(x))
Natural Logarithm
(alog(x))
Base 10 Logarithm
(alog10(x))

Table 5-1: Some of the Available Band Math Functions.


Note
Some valid IDL expressions that require the entire input array to be in memory may
not be compatible with ENVI tiling operations.

Applying Band Math


1. Select Basic Tools > Band Math.
The Band Math dialog appears. It accepts any valid IDL mathematical
expression, function, or procedure provided that the result of the operation is a
two-dimensional array of the same spatial dimensions as the input bands.
Tip
Some common image summing operations are easier to perform using the Basic
Tools > Sum Data Bands selection (see “Summing Data Bands” on page 435.)

Band Math ENVI User’s Guide


Chapter 5: Basic Tools 443

Figure 5-13: The Band Math Dialog.

2. Enter variable names (which will be assigned to an entire image band or


potentially applied to every band in a multiband file) and the desired
mathematical operators in the text box labeled “Enter an expression.”
Variable names must begin with the character “b” or “B” followed by up to 5
numeric characters.
Example:
If you wanted to calculate the average of three bands, the mathematical
equation:
(float(b1)+float(b2)+float(b3))/3.0

could be entered into the text box. Three variables are used in this
expression—“b1” is one variable, “b2” a second variable, and “b3” a third
variable. Note that, in this example, the IDL float function is used to prevent
byte overflow errors during calculation.
3. After a valid expression is entered, click “OK.”
The Variable/Band Name Pairings dialog appears.
Using Previous Expressions
To reuse any previously applied math expressions:

ENVI User’s Guide Band Math


444 Chapter 5: Basic Tools

1. In the Band Math dialog, click on any expression shown in the “Previous
Expression:” list to load that expression into the “Enter an expression:” field.
2. Once loaded, click “OK” to apply the expression to a new set of bands.
The Variable/Band Name Pairings dialog appears. Please see below for
detailed instructions.
Saving Expressions
To save an expression to an output file:
1. In the Band Math dialog, click “Save.”
2. When the Enter Output Filename dialog appears, enter an output filename with
the file extension .exp for consistency.
Restoring Saved Expressions
To restore previously-saved expressions:
1. In the Band Math dialog, click “Restore.”
2. Select the appropriate filename.
The expressions are displayed in the “Previous Expression” list.
Clearing Expressions
• To clear all expressions from the “Previous Band Math Expressions” list, click
the “Clear” button.

Assigning Values to Variables


Use the Variable/Band Name Pairings dialog to assign bands from a list of input
bands to the variables that were entered in the “Enter an expression:” text box.
To assign a value to variable “b1” from our previous example:
1. In the Variable/Band Name Pairings dialog, click on the expression “B1” in
the “Variables used in expression” text box.
2. Click on the desired band in the list labeled “Available Bands List.”

Band Math ENVI User’s Guide


Chapter 5: Basic Tools 445

Data sets appear an “unfolded” state by default. The names of unfolded data
sets appear in this format:
-<filename>
Band
Band
• To fold a data set, click on the name of the data set.
All of the bands of the data set are compressed and the data set appears in
the list in this format:
+<filename>[number of bands]
• To “unfold” a data set and make it available for processing, simply click
the folded filename.
Note
Once the first band is selected, only those bands with the same spatial dimensions
are shown in the band list.

3. Assign a value to “B2,” “B3,” etc. in the same fashion.


Assigning Multiband Images as Variables
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 Variable/Band Name Pairings dialog, click on an expression in the
“Variables used in expression” text box.
2. Click “Map variable to Input file.”
3. Select a file using the standard ENVI file selection procedures.
4. Assign a value to the remaining expressions in the same fashion.
Note
If more than one file is used, they must have the same number of bands.

A multiband output image is produced for file math modified by the math
expression.
Spatially Subsetting Input Images
• To spatially subset the input image, click the “Spatial Subset” button and refer
to “Selecting a Spatial Subset” on page 45 for detailed instructions.

ENVI User’s Guide Band Math


446 Chapter 5: Basic Tools

Outputting Band Math Results


• To output the results to a file or memory, select the “File” or “Memory” toggle
button in the Variable/Band Name Pairings dialog.
The resulting image is listed in the Available Bands List.

Using IDL Procedures and Functions with Band Math


Because ENVI gives you access to IDL capabilities, you can use the power of built-in
IDL features, IDL user functions, or your own routines to perform custom operations.
The only requirement for these functions is that they accept one or more image arrays
as input and that they output a single-band, two-dimensional array result of the same
dimensions as the input bands. These functions need to be saved in a directory that is
within the IDL path list so they will auto-compile. They can also be compiled using
File > Compile Module. The following are some simple examples of user band math
functions. See Band Math Basics in the ENVI Programmer’s Guide and the tutorial
“Introduction to ENVI User Functions” in the ENVI Tutorials to get more
information about using Band Math to implement user defined procedures.

Band Math User Function 1


The following example is a very simple custom band math function that adds two
bands. The following program text can be entered into a text editor and saved with
the filename user_bm1.pro:
Example:
FUNCTION user_bm1, b1, b2
RETURN, b1+b2
END

• Compile this function by selecting File > Compile IDL Module and selecting
the filename.
• To call this function from the Band Math “Enter an expression” box, use the
syntax:
user_bm1(b1,b2)

Band Math User Function 2


The following example is a custom band math function that converts the data type of
a variable to byte and inverts the values. The following program text can be entered
into a text editor and saved with the filename user_bm2.pro:

Band Math ENVI User’s Guide


Chapter 5: Basic Tools 447

Example:
FUNCTION user_bm2, b1
lut = 255 - BINDGEN(256)
b1 = BYTSCL(b1)
b1 = lut(b1)
RETURN, b1
END

• Compile this function by selecting File > Compile IDL Module and selecting
the filename.
• To call this function from the Band Math “Enter an expression” box, use the
syntax:
user_bm2(b1)

Band Math User Function 3


The following example is a custom band math function that replaces variable b1 with
the values of variable b2 at each non-zero location of b1. This function is useful for
taking a classification image and replacing the classified pixels with those of another
image. The following program text can be entered into a text editor and saved with
the filename user_bm3.pro:
Example:
FUNCTION user_bm3, b1, b2
b1 = (b1 NE 0)*b2
RETURN, b1
END

• Compile this function by selecting File > Compile IDL Module and selecting
the filename.
• To call this function from the Band Math “Enter an expression” box, use the
syntax:
user_bm3(b1,b2)

Band Math User Function 4


The following example is a custom band math function that calculates the
Normalized Difference Vegetation Index (NDVI) and scales it into the byte data
range. Note that the “min” and “max” keywords are required in the function to insure
that the same minimum and maximum values are used for scaling all tiles of a tiled
image.

ENVI User’s Guide Band Math


448 Chapter 5: Basic Tools

An infrared image band near 0.8 µm should be used for the b1 variable while a “red”
band near 0.6 µm should be used for the b2 variable. The following program text can
be entered into a text editor and saved with the filename user_bm4.pro
Example:
FUNCTION user_bm4, b1,b2
b1=bytscl ((float(b1) - b2) / (float(b1)+b2), min=-1.0,max=1.0)
RETURN, b1
END

• Compile this function by selecting File > Compile IDL Module and selecting
the filename.
• To call this function from the Band Math “Enter an expression” box, use the
syntax:
user_bm4(b1,b2)

Band Math ENVI User’s Guide


Chapter 5: Basic Tools 449

Spectral Math
Use Spectral Math TM to apply mathematical expressions or IDL procedures to spectra
(and also to selected multiband images). The spectra can be either from a multiband
image (i.e., a Z profile), a spectral library, or an ASCII file. For more information and
detailed instructions, see “Spectral Math” on page 679.

ENVI User’s Guide Spectral Math


450 Chapter 5: Basic Tools

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 5-14: An example of a Segmentation image.

1. Select Basic Tools > Segmentation Image.


2. In the file selection dialog, select an input band and click “OK.”
The Segmentation Image Parameters dialog appears.
3. In the “Min Thresh Value” and “Max Thresh Value” threshold text boxes,
enter a minimum and/or maximum threshold value in DN.
Note
If only one value is entered, the data min or max is used as the other end of the
threshold.

Segmenting Images ENVI User’s Guide


Chapter 5: Basic Tools 451

• To use a single DN value, enter that value in both the “Min Thresh Value”
and “Max Thresh Value” threshold text boxes.
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” text box, enter the minimum number of pixels in
a segment.
5. Use the arrow toggle button to select either 4 or 8 neighbors to be considered
for the connectivity.
6. Select “File” or “Memory” output.
7. Click “OK.”
The resulting segmentation image filename appears in the Available Bands List.

ENVI User’s Guide Segmenting Images


452 Chapter 5: Basic Tools

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.
Note
Each function described in this section can also be accessed from within the ROI
Tool dialog or from the Display Tools menu. For detailed instructions, see
“Defining Regions of Interest” on page 261.

Defining Regions of Interest


To begin ROI definition:
1. Select Basic Tools > Region of Interest > ROI Tool.
2. The ROI Definition dialog appears.
For detailed instructions, see “Defining Regions of Interest” on page 261.

Restoring Saved ROI Files


To restore previously saved ROI files:
1. Select Basic Tools > Region of Interest > Restore Saved ROI File.
2. Select the desired input file.

Saving ROIs to Files


1. To save regions of interest currently in memory to a file, select Basic Tools >
Region of Interest > Save ROIs to File.
2. Enter an output filename with the extension .roi for consistency.

Deleting ROIs
1. Select Basic Tools > Region of Interest > Delete ROIs.
2. When the Delete Regions dialog appears, click on the names of the regions to
be deleted.
3. Click “OK” to permanently delete those ROIs.

Regions of Interest ENVI User’s Guide


Chapter 5: Basic Tools 453

Exporting ROIs to EVFs


Use Export ROIs to EVFs to export ROIs to ENVI vector files.
1. Select Basic Tools > Regions of Interest > Export ROIs to EVFs.
2. In the file selection dialog, select the input file associated with the ROI(s).
The Export Region to EVF dialog appears.
For details, see “Exporting ROIs to ENVI Vector Files” on page 284.

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 Basic Tools > Regions of Interest > Export ROIs to n-D Visualizer.
2. Select a ROI to export by clicking on the ROI name.
• To select all of the ROIs, click “Select All Items.”
3. Click “OK.”
An n-D Visualizer window and n-D Controls dialog appear.
For detailed instructions, see “Exporting ROIs to the n-D Visualizer” on page 284.

Outputting ROIs to ASCII


Use Output ROIs to ASCII to output ROIs to an ASCII text file. You can output ROI
locations in pixel or line values, or as 1-d pointers. You can also output map
information, latitude and longitudes, and band data values for every ROI location.
For detailed instructions, see “Outputting ROIs to ASCII” on page 285.
1. Select Basic Tools > Regions of Interest > Output ROIs to ASCII.
2. When the file selection dialog appears, select the input file and perform any
spectral subsetting.
3. Click “OK.”

ENVI User’s Guide Regions of Interest


454 Chapter 5: Basic Tools

4. Select the ROIs to output.


To edit the ASCII output, see “Editing ASCII Output Format” on page 286.
5. Enter or choose an output filename and click “OK.”

Reconciling ROIs
Use Reconcile ROIs to apply ROIs defined in one image size to images of different
sizes.
1. Select Basic Tools > Region of Interest > Reconcile ROIs.
2. When the Reconcile ROIs Parameters dialog appears, click on the ROIs to
select them.
For detailed instructions, see “Reconciling ROIs” on page 277.

Figure 5-15: The Reconcile ROIs Parameters Dialog.

Regions of Interest ENVI User’s Guide


Chapter 5: Basic Tools 455

Reconciling ROIs via Map


Use Reconcile ROIs via Map to apply ROIs defined in one georeferenced image to
another, overlapping, georeferenced image.
1. Select Basic Tools > Reconcile ROIs via Map.
2. When the Reconcile ROIs via Map Parameters dialog appears, select the
desired ROIs by clicking on the names.
3. Select the source file where the ROIs were drawn.
4. Select the georeferenced file that the ROIs will be reconciled to and click
“OK.”
The ROIs are listed in the ROI Tool dialog.
For detailed instructions, see “Reconciling ROIs via Map” on page 278.

Converting Band Values to ROIs


Use Band Threshold to ROI to convert specific image values and ranges to Regions
of Interest.
1. Select Basic Tools > Region of Interest > Band Threshold to ROI.
2. When the Image Threshold to ROI Input Band dialog appears, select the input
band for the thresholding.
For detailed instructions, see “Converting Band Values to ROIs” on page 279.

Creating Class Images from ROIs


Use Create Class Image from ROIs to convert selected ROIs into an ENVI
classification image. The class colors will be the same as the ROI colors.
1. 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 ROI(s) to use by clicking on the ROI name(s).
3. Click “OK.”
The Classification Image from ROIs Parameters dialog appears.
For detailed instructions, see “Creating Class Images from ROIs” on page 280.

ENVI User’s Guide Regions of Interest


456 Chapter 5: Basic Tools

Hiding the ROI Tool Dialog


To remove the ROI dialog from the screen or “hide” it without erasing ROIs from
your images, select one of the following options:
• In the ROI Tool dialog, select Options > Hide Window.
• In the Window Finder, double-click on the window name.

Unhiding the ROI Tool Dialog


To unhide the ROI Tool dialog, select one of the following options:
• In the Window Finder, click on the window name.
• From the Display menu, select Overlay > Region of Interest.

Regions of Interest ENVI User’s Guide


Chapter 5: Basic Tools 457

Mosaicking Images
Use Mosaicking to mosaic both pixel-based and georeferenced images.
Note
You may also access this function from the Register menu. For details about using
this function, see “Image Mosaicking” on page 731.

1. Select Basic Tools > Mosaicking > Pixel-Based or Georeferenced.


2. When the Image Mosaicking dialog appears, enter the mosaic output
dimensions in the appropriate text boxes.
3. From the “Import” menu, select images for the mosaic.
4. When the standard ENVI file selection dialog appears, select the desired file.
Load as many files as desired for the mosaic.
5. Position each one in the output file by either entering the desired 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 731 for a
more detailed description).
6. Click “OK” to create the mosaic.

ENVI User’s Guide Mosaicking Images


458 Chapter 5: Basic Tools

Masking
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, the areas with values of 1
are processed and the masked 0 values are not included in the calculations.
Masking is available for selected ENVI functions including statistics, classification,
unmixing, matched filtering, continuum removal and spectral feature fitting.

Figure 5-16: An example mask image created using a data range and imported
ROI.

Building Masks
Use Build Mask to build image masks from specific data values, ranges of values,
finite or infinite values, Regions of Interests (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.

Masking ENVI User’s Guide


Chapter 5: Basic Tools 459

Note
Masks can be applied on-the-fly when using specific ENVI functions. These
functions include statistics, classification, unmixing, matched filtering, continuum
removal, and Spectral Feature Fitting.

Setting Mask Sizes


The size of the mask can be set to the same size as a displayed image or to the size
parameters that you entered manually:
1. Select Basic Tools > Masking > Build Mask.
2. Select a display number or select “No Display.”
The #n 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.
Note
If there aren’t any display windows open, or you selected “No Display,” the Mask
Definition dialog appears directly and you must enter the desired number of
samples and lines to define the size of the mask image.

ENVI User’s Guide Masking


460 Chapter 5: Basic Tools

Figure 5-17: The Mask Definition Dialog.

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. In the Mask Definition dialog select Options > Import Band Data Range.
The Import Band Data Range dialog appears. The “Selected Band” is the band
from which the data ranges will be selected.
• If you selected “No Display,” a dialog appears for you to select the input
band to be used for the data ranges.
• To change the input band click the “Select New Input Band” button and
select the new band in the ENVI input file selection dialog.
2. Enter a minimum and/or maximum value in the “Band Min Value” and “Band
Max Value” text boxes.

Masking ENVI User’s Guide


Chapter 5: Basic Tools 461

3. Click “OK” to enter the range into the mask definition list.
If you enter only a minimum or maximum value and click “OK,” the data’s
actual maximum or minimum, respectively, will be used as the other end
value.
Including Annotations
• To include an annotation file in the mask, select Options > Import Annotation
and select the desired input file.
• To include the currently displayed annotation shapes in the mask, select
Options > Import Displayed Annotation.
Note
Only rectangles, ellipses, and polygons are imported into the mask definition.

Masking Finite Values


To build a mask of all finite data values:
1. Select Options > Mask Finite Values.
2. In the band selection dialog, select a band and click “OK.”
The band is listed in the Mask Definition dialog.
Masking Non-Numbers and Infinite Values
To produce a mask of all NaN (Not a Number) and Inf (Infinite) data values:
1. In the Mask Definition dialog, select Options > Mask “NaN”/ “Inf” Values.
2. In the band selection dialog, select a band and click “OK.”
The band is listed in the Mask Definition dialog.
Including Regions of Interest
Use Import ROIs or Import ROI Intersection to include Regions of Interest in a mask
as described in the following sections:
Including Standard ROIs
1. In the Mask Definition dialog, select Options > Import ROIs.
2. When the Mask Definition Import ROI dialog appears, select the desired ROIs
by clicking on the ROI names.
3. Click “OK.”

ENVI User’s Guide Masking


462 Chapter 5: Basic Tools

Note
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. In the Mask Definition dialog, select Options > Import ROI Intersection.
2. In the Mask Input ROI Intersection dialog, click on the names of the
intersecting regions, then click “OK.”
The new ROI is listed in the Mask Definition dialog.
Note
All of the selected regions must intersect.

Including ENVI Vector Files (EVFs)


1. In the Mask Definition dialog, select Options > Import EVFs.
2. When the Mask Definition Input EVFs dialog appears, select the desired
vector file to input by clicking on 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.”
Selected areas are those pixels that satisfy the masking criteria.
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.
• 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].

Masking ENVI User’s Guide


Chapter 5: Basic Tools 463

• To use all the defined areas to make the mask, select Options > Selected
Attributes [Logical OR].

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 the “Clear All Items” button.

Saving Masks
1. In the Mask Definition dialog, select output to “File” or “Memory.”
2. Click “Apply.”
Closing the Masking Dialog
To close the Mask Definition dialog, click “Cancel.”

Applying Masks
Use Apply Mask to permanently apply a mask to an image, giving the pixels that are
“masked out” a value of zero.
1. Select Basic Tools > Masking > Apply Mask.
2. When the Apply Mask Input File dialog appears, select the desired input file
and any spatial or spectral subsets.
3. Click the “Select Mask Band” button.
4. Select the desired mask from the list of available bands.
Only mask images that are the same size as the input band are available.
To clear the selected mask band, select Options > Clear Mask Band.
5. When the desired input is selected, click “OK.”
6. When the “Apply Mask Parameters” dialog appears, enter the desired value in
the “Mask Value” text box.
All areas in the input image(s) where the mask equals zero are set to this
mask value.
7. Enter an output filename or select output to memory.

ENVI User’s Guide Masking


464 Chapter 5: Basic Tools

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 ENVI cursor
position function (see “Viewing Cursor Location and Value” on page 393).
Note
To interactively fix bad lines, see “Using the Spatial Pixel Editor” on page 374.

1. Select Basic Tools > General Purpose Utilities > Replace Bad Lines.
The Bad Lines Input File dialog appears.
2. Select an input file and perform any subsetting.
3. Click “OK.”
The Bad Lines Parameters dialog appears.
4. In the “Enter Bad Line” text box, specify which bad lines to replace and press
the <Return> or <Enter> key.
5. The line appears in the “Selected Lines” list.
• To remove that line from the list, click on 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 be replaced, click “Clear.”
6. In the “Half Width to Average” text box, enter the number of adjacent lines to
be used as an average for calculation of the replacement line.
The value is symmetrical around the line to be replaced. For example, the
value “2” means that two lines on either side of the selected line will be
averaged to calculate the replacement.

General Purpose Utilities ENVI User’s Guide


Chapter 5: Basic Tools 465

Figure 5-18: The Bad Lines Parameters Dialog.

7. Click “OK.”
8. When the Bad Lines Output dialog appears, select output to “File” or
“Memory.”
9. Click “OK.”

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 a user defined region of interest, or a specific value.
1. Select Basic Tools > General Purpose Utilities > Dark Subtract.
2. When the Dark Subtract Input File dialog appears, select an input file and
perform any subsetting.
3. Click “OK.”
The Dark Subtraction Values dialog appears.
4. Select a Subtraction method as described in the following sections.

ENVI User’s Guide General Purpose Utilities


466 Chapter 5: Basic Tools

5. In the Dark Subtraction Values dialog, click “OK.”


6. When the Dark Subtract Parameters dialog appears, select output to “File” or
“Memory.”
7. Click “OK” to start the operation.

Figure 5-19: The 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” toggle
button.
2. Click “OK.”

General Purpose Utilities ENVI User’s Guide


Chapter 5: Basic Tools 467

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 Regions of Interest” on page 261):
1. In the Dark Subtraction Values dialog, select the “Region of Interest” toggle
button.
2. From the list of available regions, select an ROI and 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” toggle button.
A list of the bands and a default value of 0.0000 appear under the “Current
Subtraction Values” label.
2. Click on one of the band names.
3. In the “Edit Selected Item” text box, enter the desired subtraction value. Press
the <Return> or <Enter> key.
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.
This function is intended to show tile processing for the three band types, BSQ, BIL
and BIP. The IDL code for this function “GAINOFF.PRO” is included with the
ENVI distribution and shows how to build a user function. Programming details are
discussed in see Chapter 4, “User Functions” in the ENVI Programmer’s Guide.
1. Select Basic Tools > General Purpose Utilities > Apply Gain and Offset.
2. Select an input file and any spatial and/or spectral subsetting.
The Gain and Offset Values dialog appears.
3. In the “Gain Values” list, click on a band name.
4. In the “Edit Selected Item” text box, edit the gain value of the item.
5. In the “Offset Values” list, click on a band name.

ENVI User’s Guide General Purpose Utilities


468 Chapter 5: Basic Tools

6. In the “Edit Selected Item” text box, edit the offset value of the item.
7. Repeat this selection and assignment of values for each band to be processed.
• To reset all of the bands to their original values, click “Reset.”
• To return to the main menu, click “Cancel.”
8. Select output to “File” or “Memory.”
9. Click “OK.”
A status window displays the status of the operation. The resulting bands are listed in
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. Select Basic Tools > General Purpose Utilities > Destripe.
2. When the Destriping Data Input File appears, select the input file and perform
any subsetting.
3. Click “OK.”
4. When the Destriping Parameters dialog appears, enter the number of detectors
in the box labeled “Number of Detectors.”
The number of detectors is the periodicity of the striping (e.g., for Landsat
MSS, the value would be “6”).
If the file type has been set in the header, the default is set automatically.
5. Select either “File” or “Memory” output.
• To return to the main menu at any time, click “Cancel.”
6. Click “OK” to start the operation.

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.

General Purpose Utilities ENVI User’s Guide


Chapter 5: Basic Tools 469

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. Select Basic Tools > General Purpose Utilities > Cross-Track Illumination
Correction.
2. When the Cross Track Illumination Input File dialog appears, select the input
file and perform any spatial or spectral subsetting or masking.
The Cross Track Illumination Correction Parameters dialog appears.
3. Select the cross track direction by clicking in the check box next to either
“Samples” or “Lines.”
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 desired polynomial order and click “Plot Polynomial.”
A plot of the mean data values are displayed 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.
Tip
You can change the polynomial order and plot it again.

6. Select output to “Memory” or “File.”


7. Click “OK” to start the processing.
Note
The Cross Track Illumination Correction plot pulldown menus will not be 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. Select Basic Tools > General Purpose Utilities > Convert Complex Data.

ENVI User’s Guide General Purpose Utilities


470 Chapter 5: Basic Tools

2. Select an input data file and click “OK.”


3. When the Convert Complex Parameters dialog appears, select the output band
functions by clicking in the check boxes next to the function names.
4. Select “File” or “Memory” output.
5. Click “OK.”
The calculated images appear in 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.
1. Select Basic Tools > General Purpose Utilities > Convert VAX to IEEE.
2. When the VAX Floating Point Input File dialog appears, choose the file to be
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 file name.
7. Click “OK” to convert the file.

General Purpose Utilities ENVI User’s Guide


Chapter 5: Basic Tools 471

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. Select Basic Tools > Data-Specific Utilities > View HDF Global Attributes.
2. When the file selection dialog appears, select the desired 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 or choose an output filename and click “OK.”
• To exit the report without saving the information to a file, select File >
Cancel.

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, and to use information in the data for georeferencing. For
details, see the following 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.
The NOAA Satellite Information System web page at:
http://psbsgi1.nesdis.noaa.gov:8080/EBB/ml/nic00.html
Note
The calibration and sea surface temperatures should be calculated before
georeferencing.

ENVI User’s Guide Data-Specific Utilities


472 Chapter 5: Basic Tools

Displaying AVHRR Header Information


To display the header information from the AVHRR header:
1. Select Basic Tools > Data Specific Utilities > AVHRR Utilities > Display
Header Information.
2. Select the desired input AVHRR data file and click “OK.”
The AVHRR File Information dialog appears. The header information is
displayed.
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, 14, and 15
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. Select Basic Tools > Data Specific Utilities > AVHRR Utilities > Calibrate
Data.
2. Select the desired input AVHRR data file and perform any spatial and spectral
subsetting.
Warning
AVHRR data that has 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 1b header.

3. When the AVHRR Calibrate Parameters dialog appears, select the satellite
number from the “Satellite” button menu.
4. Select either “File” or “Memory” output.
5. Click “OK” to start the calibration.
Bands 1 and 2 are output in % reflectance, and bands 3, 4, and 5 are output in
brightness temperature, in degrees Kelvin.

Data-Specific Utilities ENVI User’s Guide


Chapter 5: Basic Tools 473

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 detailed instructions, see “Building AVHRR Geometry Files” on page 755.
Georeferencing AVHRR Data
The AVHRR data, calibration results, and sea surface temperature image can be
georeferenced using information from the AVHRR data themselves. Each line of data
has 51 latitude and longitude values that can be used in the georeferencing.
For detailed instructions, see “Georeferencing AVHRR Data” on page 755.

Computing Sea Surface Temperature


A sea surface temperature image, in degrees Celsius, is computed using AVHRR
bands 3, 4, and 5. Currently, ENVI does not use a cloud or land mask in the sea
surface temperature calculation. The algorithms used in the sea surface temperature
calculation were obtained from the web page referenced in the AVHRR Utilities
introduction on page 471. Four algorithms are available, one for daytime data and
three for nighttime data: Day MCSST Split; Night MCSST Split; Night MCSST
Dual; and Night MCSST Triple. These algorithms differ in which bands are used to
correct for the atmosphere, Split-window uses bands 5 - 4, Dual-window uses bands
4 -3, and Triple-window uses bands 5 - 3. The coefficients used are based on March
1995 global drifting buoy and tropical Pacific fixed buoy matchups.
1. Select Basic Tools > Data Specific Utilities > AVHRR Utilities > Compute Sea
Surface Temperature.
2. Select the desired input AVHRR data file and perform any spatial subsetting.
The input file must contain AVHRR bands 3, 4, and 5.
The AVHRR Sea Surface Temperature Parameters dialog appears.
3. From the “Satellite” button menu, select the satellite name.
4. From the “SST Algorithm” pulldown menu, select the desired algorithm.
5. Select either “File” or “Memory” output.
6. Click “OK.”
The output sea surface temperature image is in degrees Celsius.

ENVI User’s Guide Data-Specific Utilities


474 Chapter 5: Basic Tools

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. Select Basic Tools > Data Specific Utilities > Landsat MSS > Deskew.
2. When the Deskewing Input File dialog appears, select an input file and
perform any spatial and spectral subsetting.
3. Click “OK.”
4. When the Deskewing Parameters dialog appears, enter the latitude of the MSS
scene center into the text boxes labeled “Latitude Degrees,” “Latitude
Minutes,” and “Latitude Seconds.”
5. Select either “File” or “Memory” output.
• To close the function at any time, click “Cancel.”
6. Click “OK” to start the function.
A status window appears with the output filename listed and the percent completed
displayed.
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. Select Utilities > Data-Specific Utilities > Landsat MSS > Aspect.
2. When the Aspect Correction Input File dialog appears, select the input file and
perform any subsetting.
3. Click “OK.”

Data-Specific Utilities ENVI User’s Guide


Chapter 5: Basic Tools 475

4. When the Aspect Correction Parameters dialog appears, select output to “File”
or “Memory.”
5. Click “OK” to start the function.
No other interaction is required. The status window appears with the output filename
listed and the percent completed displayed.
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 detailed instructions, see “Calibrating Landsat MSS
Data” on page 480.

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 detailed instructions, see “Calibrating Landsat TM
Data” on page 481.

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 detailed instructions see “Building SeaWiFS Geometry Files” on
page 752.

Georeference SeaWiFS Data


Use Georeference Data to georeference your SeaWiFS data. For detailed
instructions, see “Georeferencing SeaWiFS Data” on page 753.

ENVI User’s Guide Data-Specific Utilities


476 Chapter 5: Basic Tools

Calibrating TIMS to Radiance


Use TIMS Radiance 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, two internal reference sources, are stored within the first 60 bytes
of each image line. The reference data can be smoothed. Gain and offset values are
calculated for each TIMS spectral band using Plank’s radiation law and the reference
data and are used to calibrate the raw DN values to radiance. See the following
reference for more information:
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 Basic Tools > Data-Specific Utilities > TIMS > Radiance Calibration
or Basic Tools > Calibration Utilities > TIMS Radiance.
2. Select the desired 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 be smoothed.
4. Enter an output filename and click “OK.”
The resulting bands appear in the Available Bands List and contain radiance values in
W/m2/µm/sr.

Thermal IR Utilities
Use Thermal IR utilities to convert data sets from radiance to emissivity and
temperature. There are three Thermal IR utilities: Reference Channel, Emissivity
Normalization, and Alpha Residuals.
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.
ENVI has three techniques that are used 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.

Data-Specific Utilities ENVI User’s Guide


Chapter 5: Basic Tools 477

See the following references for more information:


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 Basic Tools > Data-Specific Utilities > Thermal IR > Reference
Channel Emissivity or Basic Tools > Calibration Utilities > Calculate
Emissivity > Reference Channel.
2. Select the input radiance data file and perform any subsetting.
The Calculate Emissivity parameters dialog appears.
3. Enter a data scale factor, if needed, 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, if needed, to scale the wavelengths that are
read from the header into units of µm.
5. From the “Emissivity Band” pulldown list, select which band to set to a
constant emissivity value.
6. In the “Assumed Emissivity Value” text box, enter the desired emissivity value
for the constant band.

ENVI User’s Guide Data-Specific Utilities


478 Chapter 5: Basic Tools

7. Click the “Output Temperature Image?” arrow toggle button to designate


whether or not to output a temperature image. Enter an output filename if
needed.
8. Enter an output filename for the emissivity data and click “OK.”
The temperature image (single band) and emissivity data cube (same number of
bands as input radiance data) appear in 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 477 for more information.
1. Select Basic Tools > Data-Specific Utilities > Thermal IR > Emissivity
Normalization or Basic Tools > Calibration Utilities > Calculate Emissivity >
Emissivity Normalization.
2. Select the input radiance data file and perform any subsetting.
The Calculate Emissivity parameters dialog appears.
3. Enter a data scale factor, if needed, 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, if needed, to scale the wavelengths (read from
the header) into units of µm.
5. In the “Assumed Emissivity Value” text box, enter the desired fixed emissivity
value to be used to calculate the temperatures.
6. Click the “Output Temperature Image?” arrow toggle button to designate
whether or not to output a temperature image. Enter an output filename if
needed.
7. Enter an output filename for the emissivity data and click “OK.”
The temperature image (single band) and emissivity data cube (same number of
bands as input radiance data) appear in 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. Wien’s approximation of the

Data-Specific Utilities ENVI User’s Guide


Chapter 5: Basic Tools 479

Planck function is used so the equation can be linearized with logarithms. The
temperature and emissivity terms are separated and means are used 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. Emissivity spectra can be
calculated from alpha residual spectra using empirical data as described in the Kealy,
1993 reference mentioned in the introduction to Thermal IR Utilities on page 477.
1. Select Basic Tools > Data-Specific Utilities > Thermal IR > Alpha Residuals
or Basic Tools > Calibration Utilities > Calculate Emissivity > Alpha
Residuals.
2. Select the input radiance data file and perform any subsetting.
The Calculate Emissivity parameters dialog appears.
3. Enter a data scale factor, if needed, 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, if needed, to scale the wavelengths (read from
the header) into units of µm.
5. Enter an output filename and click “OK.”
The alpha residual data cube (same number of bands as input radiance data) filename
is listed in the Available Bands List.

ENVI User’s Guide Data-Specific Utilities


480 Chapter 5: Basic Tools

Calibration Utilities
Use Calibration Utilities to apply calibration factors to AVHRR, MSS and TM data,
and to use Flat Field, Internal Average Relative Reflectance, and Empirical Line
calibration techniques.

Calibrating AVHRR
Use AVHRR calibration to calibrate AVHRR data from the NOAA 12, 14, and 15
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 detailed
instructions, see “Calibrating AVHRR Data” on page 472.

Calibrating Landsat MSS Data


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 (see Landsat Technical Notes, August 1986):
1. Select Basic Tools > Calibration Utilities > Landsat MSS
2. When the MSS Calibration Input File dialog appears, select the input file and
perform any subsetting using the standard ENVI file selection procedures.
3. Click “OK.”
The MSS Calibration Parameters dialog appears.
4. From the “Satellite” button menu, select the satellite type.
5. Enter the data acquisition month, day, year, and sun angle into the appropriate
text boxes.
6. Select the output type by clicking the “Radiance” or “Reflectance” toggle
buttons.
7. Select either “File” or “Memory” output.
8. Click “OK” to start the function.
The MSS Calibration Status window appears with the output filename listed and the
percent completed displayed.

Calibration Utilities ENVI User’s Guide


Chapter 5: Basic Tools 481

Calibrating Landsat TM Data


Use Landsat TM calibration to convert Landsat TM or ETM digital numbers to
radiance or exoatmospheric reflectance (reflectance above the atmosphere) using
published post-launch gains and offsets (see Landsat Technical Notes, August 1986).

Figure 5-20: The TM Calibration Parameters Dialog.

TM band 6, if present, is converted to temperature. If 7 bands are input, the 6th band
is assumed to be the thermal infrared band. If only 6 bands are input, then it is
assumed that there is no thermal infrared band.
1. Select Basic Tools > Calibration Utilities > Landsat TM.
2. When the TM Calibration Input File dialog appears, select the input file and
perform any subsetting using the standard ENVI file selection procedures.
3. Click “OK.”
The TM Calibration Parameters dialog appears.
To change any of the information, use the corresponding buttons and text
boxes.

ENVI User’s Guide Calibration Utilities


482 Chapter 5: Basic Tools

Note
For Landsat 7 files, the data acquisition date, gains and bias factors, and sun
elevation and azimuth are automatically read from the header. If the data
acquisition date is not found in the file header, you will be prompted to enter it.

The Earth-Sun distance used in the calibration is based on the data acquisition date
and calculated from a table in the Landsat 7 User’s Guide dated 5/1/2001.

4. Select the desired output type using the “Radiance” and “Reflectance” toggle
buttons.
5. Choose either “File” or “Memory” output.
6. Click “OK” to start the function.
The TM Calibration Status window appears with the output filename listed and the
percent completed displayed.

Using ATREM in ENVI


You can operate the popular ATmosphere REMoval (ATREM) program directly
from ENVI. ENVI only provides an interface to the ATREM program. The
executable code is not distributed with ENVI. ATREM was developed and
distributed by the Center for the Study of Earth from Space (CSES), Cooperative
Institute for the Research in Environmental Sciences (CIRES), University of
Colorado, Boulder.
Note
The ATREM executable code is no longer available for distribution.

Use ATREM to calculate scaled surface reflectance values from hyperspectral


radiance data using an approximate atmospheric radiative transfer modeling
technique. Radiative transfer modeling is used to calculate the atmospheric
transmittance of gases and molecular and aerosol scattering. The water vapor amount
is derived on a pixel-by-pixel basis using the 0.94 µm and 1.14 µm water vapor bands
and a three channel ratioing technique. For more detailed information see the
ATmosphere REMoval Program User’s Guide.
If you have the ATREM executable, place it in the ENVI \bin directory and ENVI
will automatically use it. If it is located in another directory, a parameter can be set
that points to the correct location (see “Setting ATREM Output Parameters” on
page 485). When ATREM is executed using ENVI, the input information needed is
generated and the ATREM process is spawned by ENVI automatically. The output

Calibration Utilities ENVI User’s Guide


Chapter 5: Basic Tools 483

from ATREM is automatically opened in ENVI and it appears in the Available Bands
list upon completion.

Selecting Input Files


1. Select Basic Tools > Calibration Utilities > ATREM.
2. When the standard ENVI file selection dialog appears, select a file.
Note
If you want to use a subset, use Basic Tools > Resize Images before running
ATREM.

Supplying Wavelengths
Wavelengths are required to run ATREM. If your input data does not include
wavelengths in the ENVI header, a prompt appears asking you to supply the
wavelengths from an ASCII file:
• Select the column that contains the wavelengths and the column that contains
full width half maximum (FWHM) values, if included.
The wavelengths and FWHM values must be in units of micrometers.

Inputting AVIRIS or HYDICE Data


If your input data is AVIRIS or HYDICE, select the scaled calibrated radiance image.
See the ATREM User’s Guide for details.

Setting ATREM Input Parameters


Use the ATREM Input Parameters dialog to select sensor types (AVIRIS, HYDICE,
or User Defined) and to enter input data parameters.
1. When the ATREM Input Parameters dialog appears select the data sensor type
from the “Sensor” button menu.
• If you select “User Defined,” select the file that contains the scale factors
from the file selection dialog that appears.
The user defined scale factor file must contain one scale factor for each
band that is used to scale the input radiance data to units of
microwatts/(cm2*nm*steradian) following the model of:
scale_factor * DN = 1 microwatt / (cm2 * nm * steradian)
The user defined scale factor file contains two columns of ASCII data,
band number and scale factor for every band in the data file.

ENVI User’s Guide Calibration Utilities


484 Chapter 5: Basic Tools

2. Enter the altitude of the sensor in kilometers.


3. Enter the spectral resolution of the input data in nanometers.
If your ENVI header file contains FWHM values, no value is required, the
header values are used instead, and this dialog box does not appear. The
FWHM values must be in units of micrometers.
4. Select the date and enter the time (in GMT) of the data overflight.
For AVIRIS data, this information is read from the header if possible.
5. Enter the data scene center latitude and longitude.
Tip
Enter negative values to indicate south latitudes and west longitudes.

• To change the latitude and longitude from degrees, minutes, seconds to


decimal degrees, click on the DD<->DMS button.
For AVIRIS data, this information is read from the header if possible.
6. Enter the channel ratio parameters or select from the default parameters used
to derive the column water vapor amounts for every pixel in the data.
7. Enter the starting wavelength value and number of channels to average for the
windows and water vapor absorption bands for both or either of the 0.94 µm
and 1.14 µm water vapor bands.
The channel ratio parameters are used to derive the column water vapor
amounts for every pixel in the data scene. The amount of water vapor is
determined by using a “three-channel ratio.” Several bands in the water
absorption feature are averaged and ratioed against two sets of averaged
window channels adjacent to the water absorption feature.
One or both of the water vapor absorption bands can be used to derive the
amount of column water vapor. If both the 0.94 µm and the 1.14 µm water
vapor absorption bands are used, the amount of column water vapor used is the
average of the derived amount for each absorption band.
In some cases only one of the water vapor absorption bands should be used.
For example, if your site contains a large amount of iron-rich soils and
minerals, only the 1.14 µm water vapor band should be used.
• To use only one water vapor band, enter the same parameters into both the
0.94 and 1.14 text boxes.

Calibration Utilities ENVI User’s Guide


Chapter 5: Basic Tools 485

• For the iron-rich example, enter the same wavelengths that are in the 1.14
text boxes into the 0.94 text boxes.
• To use default channel ratio parameters, select from the “Apply Defaults”
button menu. For more information, see the ATREM User’s Guide.
8. Select which of the seven atmospheric gases should be modeled and removed
during the reflectance calculation by clicking in the check box next to the gas
name.
By default, all the gases are selected.
9. Select an aerosol model using the pulldown selections.
10. Enter a visibility for the conditions during the overflight or click the arrow
toggle button to enter an aerosol optical depth measured at the time of the
overflight.
11. Select a standard atmospheric model from the pulldown selections and enter a
vertical column ozone amount in atm-cm units. Enter the average surface
elevation of the data scene in kilometers.
12. Set the output parameters as described in the next section.
Setting ATREM Output Parameters
Use the ATREM Output Parameters dialog to change the output filenames, scale
factor, output spectral resolution, and execution path string. The output ATREM
parameters file contains the defined parameters in the necessary ATREM input
format. ENVI automatically executes ATREM using this file as input. The output
image file contains the output apparent reflectance data scaled by the output data
scale factor into two-byte integers.
1. In the ATREM Input Parameters dialog, click the “Edit Output Parameters”
button.
The ATREM Output Parameters dialog appears.
2. Select from the following options:
• To change any of the default output filenames, enter the new filenames.
The output ATREM parameters file contains the defined parameters in the
necessary ATREM input format. ENVI automatically executes ATREM
using this file as input. The output image file contains the output apparent
reflectance data scaled by the output data scale factor into two-byte
integers. The output water vapor image contains the total column water
vapor amount for every pixel in cm * 1000 so it is two-byte integer data.

ENVI User’s Guide Calibration Utilities


486 Chapter 5: Basic Tools

The output transmission file is an ASCII file that contains 60 atmospheric


transmittance spectra. For details on the file format, see the ATREM User’s
Guide.
• Change the “Output Data Scale Factor” if desired.
The ATREM output apparent reflectance values, between 0 and 1, are
multiplied by the scale factor to make them into two-byte integer data.
• If desired, enter an output spectral resolution.
If no value is entered for this parameter, the output spectral resolution will
be the same as the input. See the ATREM User’s Guide for more
information.
• Enter the directory path and name of the ATREM executable.
ENVI automatically spawns the executable.
3. In the Output Parameters dialog, click “OK.”
Executing ATREM
• After setting the ATREM input and output parameters, click “OK” in the Input
Parameters dialog to start the ATREM process.
ENVI generates the needed ATREM input file and spawns the ATREM process. A
window appears displaying the line number that ATREM is working on. When the
process is completed, ENVI opens the resulting files, and the water vapor image and
the apparent reflectance bands are listed in the Available Bands List.

Applying 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 263).
2. Select Basic Tools > Calibration Utilities > Flat Field.
3. When the Flat Field Calibration Input File dialog appears, select the input file
and perform any subsetting.
4. Click “OK.”

Calibration Utilities ENVI User’s Guide


Chapter 5: Basic Tools 487

5. When the Flat Field Calibration Parameters dialog appears, select the average
spectrum to use for the flat field calibration by clicking on the desired ROI
name in the column labeled “Select Calibration from Regions.”
The selected ROI name appears at the bottom of the window in the text box
labeled “Selected Item.”
6. Choose “File” or “Memory” output.
7. Click “OK” to start the calibration.

Applying 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. Select Basic Tools > Calibration Utilities > IAR Reflectance.
2. When the Calibration Input File dialog appears, select the input file and
perform any subsetting.
3. Click “OK.”
4. When the IARR Calibration Parameters dialog appears, select output to “File”
or “Memory.”
5. Click “OK.”
If a statistics file doesn’t exist, a processing status window appears while the statistics
are calculated and another status window appears while the calibration is performed.
The calibrated data are added to the Available Bands list when the calibration is
complete.

ENVI User’s Guide Calibration Utilities


488 Chapter 5: Basic Tools

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 gana an offset
values are calculated.
Reflectance (field spectrum) = gain x radiance (input data) + offset
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 data set 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.
Note
To use spectra from ROIs, define the ROIs prior to running this function.

1. Select Basic Tools > Calibration Utilities > Empirical Line > Compute
Factors and Calibrate.
2. When the Empirical Line Input File dialog appears, select the input file and
perform any subsetting.
3. Click “OK.”
The Empirical Line Spectra dialog appears.
4. Collect image spectra and reference spectra, and pair spectra using the
procedures described in the following sections.

Calibration Utilities ENVI User’s Guide


Chapter 5: Basic Tools 489

Figure 5-21: The Empirical Line Spectra dialog.

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 the Data Spectra “Import Spectra”
button.
2. Collect spectra using the Import menu as described in “Importing Endmember
Spectra” on page 496 or using the black draw widget at the top of the dialog as
described in “Using the Drag-and-Drop Window” on page 495.
3. After the data spectra have been selected, click “Apply.”
The spectra names are entered into the Empirical Line Spectra dialog.
4. Click “Cancel” to close the Data Spectra Collection dialog.

ENVI User’s Guide Calibration Utilities


490 Chapter 5: Basic Tools

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 on the Field Spectra “Import
Spectra” button.
2. Collect spectra using the Import menu as described in “Importing Endmember
Spectra” on page 496 or using the black draw widget at the top of the dialog as
described in “Using the Drag-and-Drop Window” on page 495.
3. Click “Apply” to enter the spectra names.
4. Click “Cancel” to close the Field Spectra Collection dialog.
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, click on the data spectrum name in the
top list to select it.
2. In the bottom list, click on the corresponding field spectrum name.
3. Click “Enter Pair” to associate the two spectra.
The paired spectra are listed in the “Selected Pairs” text box.
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, choose “File” or “Memory” output in the
Empirical Line Calibration Parameters dialog.
• To save the correction coefficients in an ASCII file, enter a second file
name in the “Output Calibration Filename” text box.
The default extension for correction coefficients files is .cff.
2. Click “OK” to start the calibration.
A processing status window appears while the calibration is performed. When the
calibration is completed, the calibration factors are plotted in a standard ENVI plot
window and the calibrated image data are added to the Available Bands list.

Calibration Utilities ENVI User’s Guide


Chapter 5: Basic Tools 491

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.
1. Select Basic Tools > Calibration Utilities > Empirical Line > Calibrate Using
Existing Factors.
2. Select the input file and any spatial and spectral subsets using the standard
ENVI file selection procedures.
3. Click “OK.”
4. When the Enter Calibration Factors Filename dialog appears, choose a
calibration factors file (.cff) created during a previous Empirical Line
Calibration session.
5. Click “OK.”
6. When the Empirical Line Calibration Parameters dialog appears, choose “File”
or “Memory” output.
7. Click “OK” to begin the calibration.

Calibrating TIMS to Radiance


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 detailed
instructions, see “Calibrating TIMS to Radiance” on page 476.

Calculating Emissivity
ENVI has three techniques that are used 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


Use Reference Channel Emissivity to calculate emissivity and temperature values
from thermal infrared radiance data. For detailed instructions, see “Using Reference
Channel Emissivity” on page 477.

ENVI User’s Guide Calibration Utilities


492 Chapter 5: Basic Tools

Emissivity Normalization
Use Emissivity Normalization to calculate emissivity and temperature values from
thermal infrared radiance data. For detailed instructions, see “Using Emissivity
Normalization” on page 478.

Alpha Residuals
Use Alpha Residuals to produce alpha residual spectra that approximate the shape of
emissivity spectra from thermal infrared radiance data. For detailed instructions, see
“Using Alpha Residuals” on page 478.

Calibration Utilities ENVI User’s Guide


Chapter 6:
Classification

This chapter covers the following topics:

The Classification Menu . . . . . . . . . . . . . . 494 Displaying ROC Curves . . . . . . . . . . . . . . 536


Collecting Endmember Spectra . . . . . . . . . 495 Majority/Minority Analysis . . . . . . . . . . . 540
Supervised Classification . . . . . . . . . . . . . 503 Clumping Classes . . . . . . . . . . . . . . . . . . . 541
Unsupervised Classification . . . . . . . . . . . 517 Sieving Classes . . . . . . . . . . . . . . . . . . . . . 542
Creating Class Images from ROIs . . . . . . . 522 Combining Classes . . . . . . . . . . . . . . . . . . 543
Post Classification . . . . . . . . . . . . . . . . . . . 523 Overlaying Classes . . . . . . . . . . . . . . . . . . 545
Changing Class Colors . . . . . . . . . . . . . . . 523 Calculating Buffer Zone Images . . . . . . . 546
Classifying from Rule Images . . . . . . . . . . 525 Creating Segmentation Images . . . . . . . . . 547
Calculating Class Statistics . . . . . . . . . . . . 528 Exporting Classes To Vector Layers . . . . 548
Calculating Confusion Matrices . . . . . . . . 530

ENVI User’s Guide 493


494 Chapter 6: Classification

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 grayscale images,
calculating buffer zone images, calculating segmentation images, and exporting
classes to vector layers.

Figure 6-1: The Classification menu.

The Classification Menu ENVI User’s Guide


Chapter 6: Classification 495

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.
Note
You can run several classifications using the same endmembers or training classes
as input by changing the Algorithm technique.

1. Select Classification > Endmember Collection.


2. When the Classification Input File dialog appears, select the desired file,
subset, and/or mask.
3. Click “OK.”
The Endmember Collection dialog appears (Figure 6-2).
4. Collect endmembers, select algorithm types, and manage endmembers using
the procedures described in the following sections.

Using the Drag-and-Drop Window


Use the drag-and-drop window (see Figure 6-2) at the top of the Endmember
Collection dialog to collect spectra from Z profiles or spectral plots.
• To collect spectra from Z profiles and spectral plots, click the right mouse
button to toggle on the spectra names, click and hold the left button on a
spectrum name, and drag the spectrum name into the drag-and-drop window
and release the mouse button.
The spectrum name is added to the list of selected spectra.

ENVI User’s Guide Collecting Endmember Spectra


496 Chapter 6: Classification

Drag-and-Drop
Window

Figure 6-2: The Endmember Collection Dialog. The area below the menu bar is
the drag-and-drop window, which is used to collect endmember spectra.

Importing Endmember Spectra


Use the Import menu to import spectra from other sources such as ASCII files, ROI
means, spectral libraries, or statistics files.
Note
When using the Mahalanobis Distance or Maximum Likelihood classifiers, the
endmember spectra can only be imported from ROIs or statistics files because these
classifications use the endmember covariance statistics.

Importing Spectra from ASCII Files


1. In the Endmember Collection dialog, select Import > from ASCII File.
2. When the file selection dialog appears, select an ASCII file or a group of
ASCII files of the same format.
If you select a valid file (i.e., the file contains at least one column of ASCII
numeric data), the ASCII Input 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 6: Classification 497

3. Enter the column number that contains the X axis data in the “X Axis Column”
text box.
4. Select endmember spectra by clicking on the desired column name(s).
• If desired, enter multiplicative scaling factors in the “X Data Multiplier”
and “Y Data Multiplier” text boxes to be applied to both the X and Y
values to match the image data.
5. 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 parameters defined in the
previous Input ASCII File dialog:
1. Select Import > from ASCII file (previous template).
2. Select the filename of an ASCII file.
This option reads the data directly into the Endmember Collection dialog
without the intermediate parameter dialog.
Importing Spectra from Spectral Libraries
1. Select Import > from Spectral Library.
2. When the Spectral Library Input File dialog appears, choose the spectral
library name and click “OK” to open the library.
• If the desired spectral library has not been previously opened, select File>
Open Spectral Library in the Library Input File dialog.
3. When the Input Spectral Library dialog appears, select endmember spectra by
clicking on the desired spectrum name(s).
4. Enter an X and/or Y data multiplication factor to change the scale of the data.
5. Click “OK” to enter the selected spectra into the Endmember Spectra list.

ENVI User’s Guide Collecting Endmember Spectra


498 Chapter 6: Classification

Figure 6-3: The Input ASCII File and Input Spectral Library Dialogs. Both of
these dialogs are accessed from the “Import Spectra” menu on the Endmember
Collection dialog.

Importing Spectra from ROIs


You can import spectra from previously defined regions of interest that are associated
with either the current input file or another file.
Importing ROIs Associated with Current File
1. Select Import > from ROI from Input File.
2. When the Input Regions of Interest dialog appears, select endmember spectra
(ROI averages) by clicking on the ROI name(s).
Note
This dialog is available only if ROIs have been defined previously.

• To select all of the ROIs, click “Select All Items.”

Collecting Endmember Spectra ENVI User’s Guide


Chapter 6: Classification 499

• To de-select all of the ROIs, click “Clear All Items.”


3. Click “OK” to enter the ROI means into the Endmember Spectra list.
Importing ROIs Associated with Another File
1. Select Import > from ROI from Other File.
2. Select the desired input file from the Input File of associated ROI dialog.
3. When the Input Regions of Interest dialog appears, select endmember spectra
(ROI averages) by clicking on the desired ROI name(s).
This dialog is available only if ROIs have been defined previously.
• To select all of the ROIs, click “Select All Items.”
• To de-select all of the ROIs, click “Clear All Items.”
4. Click “OK” to enter the ROI means into the Endmember Spectra list.
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.
2. When the Enter Statistics Filename dialog appears, select the input statistics
file.
The mean spectrum from the statistics file is entered into the list on the Endmember
Collection dialog.
Deleting Spectra
• To remove an endmember spectrum from the “Selected Endmember Spectra”
list, select an endmember name and click “Delete Spectrum.”

Endmember Options
Use the Options menu in the Endmember Collection dialog to edit the endmember
names, plot the endmembers, and clear the endmembers.

Editing Endmember Names


1. In the Endmember Collection dialog, select Options > Edit Endmember
Names.

ENVI User’s Guide Collecting Endmember Spectra


500 Chapter 6: Classification

2. When the Endmember Name Editing dialog appears, select the endmember to
edit by clicking on the name in the “Current Endmember Names” list.
3. Select from the following options:
• To manually change the name, click on it, make the desired changes in the
“Edit Selected Item” text box, and press the return key.
• To import endmember names from an ASCII file, click “Import ASCII”
and select the input ASCII file.
The ASCII file must contain the same number of names as there are
endmember spectra in the dialog—with each name on a single line in the
ASCII file.
• To reset the endmember names to their original names, click “Reset.”
4. Click “OK.”

Plotting Endmember Spectra


• To plot all of the endmember spectra, select Options > Plot Endmembers.

Clearing Endmember Spectra


• To remove all the endmember spectra from the “Selected Endmember
Spectra” list, select Options > Clear Endmembers.

Figure 6-4: A Plot of all Endmember Spectra.

Collecting Endmember Spectra ENVI User’s Guide


Chapter 6: Classification 501

Selecting Processing Techniques


Use the Algorithm menu in the Endmember Collection dialog to select a
classification or advanced spectral processing technique. The classification
techniques available are Parallelepiped, Minimum Distance, Mahalanobis Distance,
Maximum Likelihood, Spectral Angle Mapper, and Binary Encoding. The advanced
spectral processing techniques available are Linear Spectral Unmixing, Matched
Filtering, Mixture Tuned Matched Filtering, and Spectral Feature Fitting.
Note
When using the Mahalanobis Distance or Maximum Likelihood classifiers, the
endmember spectra can only be imported from ROIs or statistic files because these
classifications use the endmember covariance statistics. You must also have at least
two endmembers.

1. In the Endmember Collection dialog, select Algorithm > technique.


Tip
The classification methods can also be started from the Classification > Supervised
menu and the advanced spectral processing techniques can be started from the
Spectral Tools menu.

2. Click “Apply.”
3. When the Algorithm Parameters dialog appears, enter the selected algorithm’s
needed parameters.
The parameters displayed are specific to the selected classification algorithm. For
details about the different classification techniques, see the following topics:
“Applying Parallelepiped Classification” on page 505
“Applying Minimum Distance Classification” on page 507
“Applying Mahalanobis Distance Classification” on page 509
“Applying Maximum Likelihood Classification” on page 510
“Applying Spectral Angle Mapper Classification” on page 511
“Applying Binary Encoding Classification” on page 513

ENVI User’s Guide Collecting Endmember Spectra


502 Chapter 6: Classification

For details about the advanced processing techniques, see the following topics:
“Using Linear Spectral Unmixing” on page 651
“Using Matched Filtering” on page 655
“Using Mixture Tuned Matched Filtering” on page 657
“Using Spectral Feature Fitting” on page 661

Managing Endmember Spectra


Use the File menu in the Endmember Collection dialog to output endmember spectra
to an ASCII file or as a spectral library.

Outputting Spectra to ASCII Files


1. In the Endmember Collection dialog, select File > Save Plot As > ASCII.
2. When the Output Plots to ASCII File dialog appears, enter an output filename
or use the “Choose” button to select an output filename.
Outputting Spectra to Spectral Libraries
To build a standard ENVI spectral library file from the endmember spectra:
1. Select File > Save Spectra As > Spectral Library.
2. When the Output Plots to Spectral Library dialog appears, enter the output
filename or use the “Choose” button to select an output filename.
Closing the Dialog
• To close the Endmember Collection dialog, select File > Cancel.

Collecting Endmember Spectra ENVI User’s Guide


Chapter 6: Classification 503

Supervised Classification
Use Supervised classification to cluster pixels in a data set 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 a 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 detailed instructions, see
“Exporting ROIs to the n-D Visualizer” on page 284. You can also get a report of the
separability values between ROI pairs. For detailed instructions, see “Computing
ROI Separability” on page 281.
Supervised classification techniques include Parallelepiped, Minimum Distance,
Mahalanobis Distance, Maximum Likelihood, Spectral Angle Mapper (SAM), and
Binary Encoding.
Note
You must define training classes prior to performing supervised classification. You
can define training classes in two ways: using the Endmember Collection dialog to
select spectra (see “Collecting Endmember Spectra” on page 495) or by defining
regions of interest (ROIs) (see “Defining Regions of Interest” on page 261). The
training sites can be defined as multiple irregular polygons, vectors, and/or
individual pixels.

Using the Endmember Collection option allows you to use the same training classes
or endmembers for several classifications without reloading, thus simplifying
comparison of classification results.

For all supervised classification methods, you have an option to output “rule” images.
This is highly 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 are the distance between the class and each
unknown pixel. These rule images can be used in the rule classifier to adjust
thresholds and generate new classification images (see “Classifying from Rule
Images” on page 525).

ENVI User’s Guide Supervised Classification


504 Chapter 6: Classification

1. Define training classes using the Endmember Collection dialog or Regions of


Interest.
2. Select Classification > Supervised > the desired method, or initiate the
classification from the Endmember Collection dialog (see “Selecting
Processing Techniques” on page 501).
3. When the Classification Input File dialog appears, select an input file and any
subsetting or masking as described in “Selecting Files in ENVI” on page 42.
The Classification Parameters dialog appears. The dialog options vary
depending on the type of classification selected.

Entering Classification Parameters


A specific Parameters dialog appears for the type of classification you select. The
actual classification type appears in the dialog title. Options common to many of the
classification parameters dialogs include: selection of ROIs to be used for
classification from the active ROI list, disk file or memory output of the classification
image, and calculation of rule images with either file or memory output. The
individual dialogs and parameters unique to each classification type are described in
the following sections under the description of each classification method.

Selecting ROIs
• To select regions of interest as training classes, click on the desired ROI names
in the “Select Classes from Regions:” list of available ROIs.
Note
Maximum Likelihood and Minimum Distance both require at least two regions.

Calculating Rule Images


Use rule images to create intermediate classification image results before final
assignment of classes. For example, rule images for the maximum likelihood
classification will be the probability images themselves; one for each input ROI used
in the classification. The rule image that has the highest probability for a pixel is the
class to which that pixel is assigned. The probability values themselves are only
retained in the rule images, not in the classified image.
• To calculate an optional rule output image (or images—one for each class),
enter a filename in the “Enter Output Rule Filename” text box.

Supervised Classification ENVI User’s Guide


Chapter 6: Classification 505

Note
The rule images will not be saved if the Output Rule Images toggle button is set to
“No.”

The images will appear in the Available Bands List at the end of the classification,
and can be displayed and/or linked/overlaid in any display window and queried using
ENVI’s Pixel Location/Value function.
Rule images can also be used later in the Rule Classifier to create a new
classification image without actually having to recalculate the entire classification
(see “Classifying from Rule Images” on page 525).

Applying Parallelepiped Classification


Parallelepiped classification uses a simple decision rule to classify multispectral data.
The decision boundaries form an n-dimensional parallelepiped in the image data
space. The dimensions of the parallelepiped 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 parallelepipeds
are designated as unclassified. For technical details, see the following reference:
J.A.Richards, 1994, Remote Sensing Digital Image Analysis, Springer-Verlag, Berlin,
p. 340.
1. From the ENVI main menu, select Classification > Supervised >
Parallelepiped; or, in the Endmember Collection dialog, select Algorithm >
Parallelepiped (see “Collecting Endmember Spectra” on page 495).
2. When the Classification Input File dialog appears, select the input file.
The Parallelepiped Parameters dialog appears.
3. Enter the general classification parameters as described in “Entering
Classification Parameters” on page 504.
4. Select a thresholding option:
• To use no standard deviation threshold, click the “None” button.
• To use a single threshold for all classes, click the “Single Value” button
and enter a value in the “Max stdev from Mean” text box to designate the
number of standard deviations to use around the mean.
• To enter a different threshold for each class:

ENVI User’s Guide Supervised Classification


506 Chapter 6: Classification

A. In the list of classes, click on the class or classes to which you want to
assign different threshold values.
B. Click the “Multiple Values” button to select it.
C. Click the “Assign Multiple Values” button.
D. In the dialog that appears, click on a class to select it, then enter a threshold
value in the text box at the bottom of the dialog. Repeat for each class.
Note
Undefined thresholds are not allowed.

5. Click “OK” to start the classification.

Figure 6-5: The Parallelepiped Parameters Dialog.

A status window displays the progress of the operation. 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 be evaluated (the first ROI from the selected list) carries over
into the classified image.

Supervised Classification ENVI User’s Guide


Chapter 6: Classification 507

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. For technical details, see the following reference:
J.A.Richards, 1994, Remote Sensing Digital Image Analysis, Springer-Verlag, Berlin,
p. 340.
1. Select Classification > Supervised > Minimum Distance; or, in the
Endmember Collection dialog, select Algorithm > Minimum Distance (see
“Collecting Endmember Spectra” on page 495).
2. When the Classification Input File dialog appears, select the input file.
The Minimum Distance Parameters dialog appears.
3. Enter the general classification parameters as described in “Entering
Classification Parameters” on page 504.
4. To set threshold values based on standard deviations or maximum distance
values, select from the following options in the “Set Max stdev from Mean”
and/or “Set Max Distance Error” areas of the dialog:
Note
If you are running the Minimum Distance Classification from within the
Endmember Collection dialog, the “Max Stdev from Mean” area is not available.

• To use no threshold, click the “None” button.


• To use a single threshold for all classes, click the “Single Value” button
and enter a value in the “Max stdev from Mean” or “Max Distance Error”
(in DN) text box.
For “Max stdev from Mean,” enter the number of standard deviations to
use around the mean. Pixels outside this range will not. For “Max Distance
Error,” enter the value in DNs. Pixels at a distance greater than this value
will not be classified.
• To enter a different threshold for each class:
A. In the list of classes, click on the class or classes to which you want to
assign different threshold values.
B. Click the “Multiple Values” button to select it.

ENVI User’s Guide Supervised Classification


508 Chapter 6: Classification

C. Click the “Assign Multiple Values” button.


D. In the dialog that appears, click on a class to select it, then enter a threshold
value in the text box at the bottom of the dialog. Repeat for each class.
Note
Undefined thresholds are not allowed.

Note
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 will
be classified. If you select “None” for both parameters, then all pixels will be
classified.

Figure 6-6: The Minimum Distance Parameters Dialog

5. Click “OK” to begin the classification.


A status window displays the progress of the operation. If output of rule images was
selected, one is created for each class with the pixel values equal to the Euclidean

Supervised Classification ENVI User’s Guide


Chapter 6: Classification 509

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. For technical details, see the following reference:
J.A.Richards, 1994, Remote Sensing Digital Image Analysis, Springer-Verlag, Berlin,
p. 340.
1. Select Classification > Supervised > Mahalanobis Distance; or, in the
Endmember Collection dialog, select Algorithm > Mahalanobis Distance
(see “Collecting Endmember Spectra” on page 495).
2. When the Classification Input File dialog appears, select the input file.
Note
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.

The Mahalanobis Distance Parameters dialog appears.


3. Enter the general classification parameters as described in “Entering
Classification Parameters” on page 504.
4. Set a threshold based on a maximum distance in DNs by selecting one of the
following options:
• To use no threshold, click the “None” button.
• To use a single threshold for all classes, click the “Single Value” button
and enter a value, in DNs, in the “Max Distance Threshold” text box.
Pixels at a distance greater than this value will not be classified.
• To enter a different threshold for each class:
A. In the list of classes, click on the class or classes to which you want to
assign different threshold values.
B. Click the “Multiple Values” button to select it.

ENVI User’s Guide Supervised Classification


510 Chapter 6: Classification

C. Click the “Assign Multiple Values” button.


D. In the dialog that appears, click on a class to select it, then enter a threshold
value in the text box at the bottom of the dialog. Repeat for each class.
Undefined thresholds are not allowed.
Note
Undefined thresholds are not allowed.

5. Click “OK” to start the classification.


A status window displays the progress of the operation. If output of rule images was
selected, one is created 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, it will be classified 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
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 (i.e., the “maximum
likelihood”). For technical details, see following reference:
J.A.Richards, 1994, Remote Sensing Digital Image Analysis, Springer-Verlag, Berlin,
p. 340.
1. Select Classification > Supervised > Maximum Likelihood; or, in the
Endmember Collection dialog, select Algorithm > Maximum Likelihood
(see “Collecting Endmember Spectra” on page 495).
2. When the Classification Input File dialog appears, select the input file.
The Maximum Likelihood Parameters dialog appears.
Note
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.

3. Enter the general classification parameters as described in “Entering


Classification Parameters” on page 504.
4. Set a threshold based on probability by selecting one of the following options:

Supervised Classification ENVI User’s Guide


Chapter 6: Classification 511

• To use no threshold, click the “None” button.


• To use a single threshold for all classes, click the “Single Value” button
and enter a value, between 0 and 1, in the “Probability Threshold” text
box.
Pixels with probabilities lower than this value will not be classified.
• To enter a different threshold for each class:
A. In the list of classes, click on the class or classes to which you want to
assign different threshold values.
B. Click the “Multiple Values” button to select it.
C. Click the “Assign Multiple Values” button.
D. In the dialog that appears, click on a class to select it, then enter a threshold
value in the text box at the bottom of the dialog. Repeat for each class.
Undefined thresholds are not allowed.
5. Click “OK” to begin the classification.
A status window displays the progress of the operation. The pixel values of the rule
images, one image per class, represent the probability that the pixel matches that
class. The final classification allocates each pixel to the class with the highest
probability.

Applying Spectral Angle Mapper Classification


The Spectral Angle Mapper (SAM) is a physically-based spectral classification that
uses an n-dimensional angle to match pixels to reference spectra. The algorithm
determines the spectral similarity between two spectra by calculating the angle
between the spectra, 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, spectral libraries, or can be extracted directly from
the image (as ROI average spectra). SAM compares the angle between the
endmember spectrum vector and each pixel vector in n-dimensional space. Smaller
angles represent closer matches to the reference spectrum. Pixels further away than
the specified maximum angle threshold in radians are not classified. For additional
information see the following reference:
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

ENVI User’s Guide Supervised Classification


512 Chapter 6: Classification

(SIPS) - Interactive Visualization and Analysis of Imaging spectrometer Data:


Remote Sensing of Environment, v. 44, p. 145 - 163.
Note
You can use ENVI’s Spectral Mapping Wizard to guide you step-by-step through
the ENVI “hourglass” processing flow, including SAM Classification, to find and
map image spectral endmembers from hyperspectral or multispectral data. For
details, see “Spectral Mapping Wizard” on page 664.

1. Select Classification > Supervised > Spectral Angle Mapper; or, in the
Endmember Collection dialog, select Algorithm > Spectral Angle Mapper
(see “Collecting Endmember Spectra” on page 495).
2. When the Classification Input File dialog appears, perform standard file
selection and any subsetting and masking of the input file.
The Endmember Collection: SAM dialog appears.
Spectra can be imported from ASCII files, spectral libraries, ROI means, or statistics
files.
3. From the Import_Spectra menu, select endmember spectra from the variety of
sources (see “Collecting Endmember Spectra” on page 495).
• If desired, change the names of the spectra and plot the spectra.
4. After all endmember spectra are selected, click “Apply.”
The Spectral Angle Mapper Parameters dialog appears.
5. Enter the general classification parameters as described in “Entering
Classification Parameters” on page 504.
6. Set a threshold based on the spectral angle by selecting one of the following
options:
• To use no threshold, click the “None” button.
• To use a single threshold for all classes, click the “Single Value” button
and enter a value, in radians, in the “Maximum Angle” text box.
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. Pixels with an angle larger than this value will
not be classified.
• To enter a different threshold for each class:

Supervised Classification ENVI User’s Guide


Chapter 6: Classification 513

A. In the list of classes, click on the class or classes to which you want to
assign different threshold values.
B. Click the “Multiple Values” button to select it.
C. Click the “Assign Multiple Values” button.
D. In the dialog that appears, click on a class to select it, then enter a threshold
value in the text box at the bottom of the dialog. Repeat for each class.
Undefined thresholds are not allowed.
7. Click “OK” to begin the SAM classification.
A status window displays the progress of the operation. 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 match to the endmember spectra. Areas
that satisfied the selected radian 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 0s and 1s based on whether a band falls below or above the spectrum
mean. An exclusive OR function is used to compare each encoded reference
spectrum with the encoded data spectra and a classification image produced. All
pixels are classified to the endmember with the greatest number of bands that match
unless the user specifies a minimum match threshold, in which case some pixels may
be unclassified if they do not meet the criteria. For details, see the following
reference:
Mazer, A. S., Martin, M., Lee, M., and Solomon, J. E., 1988, Image Processing
Software for Imaging Spectrometry Analysis: Remote Sensing of Environment, v. 24,
no. 1, p. 201 - 210.
1. Select Classification > Supervised > Binary Encoding; or, in the Endmember
Collection dialog, select Algorithm > Binary Encoding (see “Collecting
Endmember Spectra” on page 495).
2. When the Classification Input File dialog appears, perform standard file
selection and any subsetting and masking of the input file.
The Binary Encoding Parameters dialog appears.
3. Enter the general classification parameters as described in “Entering
Classification Parameters” on page 504.

ENVI User’s Guide Supervised Classification


514 Chapter 6: Classification

4. Set a threshold based on the percentage of bands that match by selecting one of
the following options:
• To use no threshold, click the “None” button.
• To use a single threshold for all classes, click the “Single Value” button
and enter decimal percentage value, between 0 and 1, in the “Minimum
Encoding Threshold” text box.
The percentage value represents the number of bands that must match.
• To enter a different threshold for each class:
A. In the list of classes, click on the class or classes to which you want to
assign different threshold values.
B. Click the “Multiple Values” button to select it.
C. Click the “Assign Multiple Values” button.
D. In the dialog that appears, click on a class to select it, then enter a threshold
value, between 0 and, in the text box at the bottom of the dialog. Repeat
for each class.
Undefined thresholds are not allowed.
If a minimum value is not entered, all pixels will be classified.
5. Click “OK” to begin the classification.
A status window displays the progress of the operation. If a rule image was selected,
one is created 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.

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 desired output. The error is backpropagated through the network and weight
adjustment is made using a recursive method. Neural Net classification can be used to
perform non-linear classification. See the following references for more information:
J.A.Richards, 1994, Remote Sensing Digital Image Analysis, Springer-Verlag,
Berlin, p.340.

Supervised Classification ENVI User’s Guide


Chapter 6: Classification 515

D. Rumelhart and J. Mc Clelland, 1987 Parallel Distributed Processing Vol. 1, MIT


Press, Chp. 8 “Learning Internal Representation by Error Propagation,” Rumelhart,
Hinton, and Williams.
Note
You must first have ROIs selected to use as training pixels for each class. The more
pixels, the better the results will be.

1. Select Classification > Supervised > Neural Net.


2. When the file selection dialog appears, select the input file and any subsetting.
The Neural Net Parameters dialog appears.
3. Select the classes to map by clicking on the ROI names in the “Select Classes
from Regions” list.
4. Select the desired activation method by clicking on the corresponding toggle
button.
5. In the “Training Threshold Contribution” text box, 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.
6. In the “Training Rate” text box, 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” text box, 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” text box, 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. In the “Number of Hidden Layers” text box, enter the number of hidden layers
to use.

ENVI User’s Guide Supervised Classification


516 Chapter 6: Classification

Note
For a linear classification, enter a value of 0. You can perform non-linear
classification using 1 or 2 hidden layers.

10. In the “Number of Training Iterations” text box, enter the number of iterations
for training.
• To enter a minimum output activation threshold, enter a value in the “Min
Output Activation Threshold” text box.
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.
11. Select output to “File” or “Memory.”
12. Select whether or not to output rule images by clicking the “Output Rule
Images” toggle button to select “Yes” or “No.”
If you output rule images, there is a rule image for every class. The rule image
is the output activation value for every pixel in that class.
• If you select “Yes,” select output to “File” or “Memory” for the rule
images.
A status window displays the progress of the operation. 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. The
resulting neural net classification image, and rule images if output, appear in the
Available Bands List when processing is complete.

Supervised Classification ENVI User’s Guide


Chapter 6: Classification 517

Unsupervised Classification
Use Unsupervised classification to cluster pixels in a data set 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 and 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. For technical details, see
the following reference:
Tou, J. T. and R. C. Gonzalez, 1974. Pattern Recognition Principles, Addison-
Wesley Publishing Company, Reading, Massachusetts.
1. Select Classification > Unsupervised > Isodata.
2. When the Classification Input File dialog appears, perform standard file
selection and any subsetting and masking of the input file.
The ISODATA Parameters dialog appears. Options available in the ISODATA
Parameters dialog include input of a range for the number of classes to be
defined, the pixel change threshold (0 - 100%), the maximum number of
iterations to be used to separate the classes, splitting, merging, and deleting
classes thresholds, and optional distance thresholds.
3. Enter the minimum and maximum number of classes to be defined.
A range for the number of classes is used because the Isodata algorithm splits
and merges classes based on input thresholds and does not keep a fixed
number of classes.

ENVI User’s Guide Unsupervised Classification


518 Chapter 6: Classification

4. Enter the maximum number of iterations and a change threshold (0-100%) in


the appropriate text boxes.
The change threshold is used to end the iterative process when the number of
pixels in each class changes by less than the threshold. The classification will
end when either this threshold is met or the maximum number of iterations has
been reached.
5. Enter the minimum number of pixels needed to form a class in the appropriate
text box.
If there are fewer than the minimum number of pixels in a class then that class
will be deleted 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” text box.
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 appropriate text boxes.

Figure 6-7: The IsoData Parameters Dialog.

Unsupervised Classification ENVI User’s Guide


Chapter 6: Classification 519

If the distance between class means is less than the minimum value entered,
then the classes will be merged. The maximum number of class pairs to be
merged 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:” text
boxes, respectively.
If both of these optional parameters are entered, the classification uses the
smaller of the two to determine which pixels will be classified. If neither
parameter is entered, then all pixels will be classified.
8. Select output to “File” or “Memory.”
9. Click “OK” to start the Isodata classification.
Statistics are calculated for each band of the image, and a status window displays the
progress of the operation. The status bar cycles from 0 to 100% for each iteration of
the classifier.
Note
The statistics for the initial class seeds are computed 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 and 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. For technical
details, see the following reference:
Tou, J. T. and R. C. Gonzalez, 1974. Pattern Recognition Principles, Addison-
Wesley Publishing Company, Reading, Massachusetts.
1. Select Classification > Unsupervised > K-Means.
2. When the Classification Input File dialog appears, perform standard file
selection and any subsetting and masking of the input file.

ENVI User’s Guide Unsupervised Classification


520 Chapter 6: Classification

The K-Means Parameters dialog appears. Options available in the K-Means


Parameters dialog include selection of the number of classes to be defined by
the clustering procedure, the pixel change threshold (0 - 100%), the maximum
number of iterations to be used to separate the classes and optional distance
thresholds.
3. Enter the desired number of classes and maximum number of iterations in the
appropriate text boxes.
4. Enter a change threshold (0-100%) which is used to end the iterative process
when the number of pixels in each class changes by less than the threshold.
The classification will end when either this threshold is met or the maximum
number of iterations has been 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:” text
boxes, respectively.
If both of these optional parameters are entered, the classification uses the
smaller of the two to determine which pixels will be classified. If neither
parameter is entered, then all pixels will be classified.

Figure 6-8: The K-Means Parameters Dialog.

Unsupervised Classification ENVI User’s Guide


Chapter 6: Classification 521

5. To select either disk file or memory output, select the “File” or “Memory”
toggle button.
• If output to “File” is selected, enter an output filename.
6. Click “OK” to start the K-Means classification.
Statistics are calculated for each band of the image, and a status displays the progress
of the operation. The status bar cycles from 0 to 100% for each iteration of the
classifier.
Note
The statistics for the initial class seeds are computed with a skip factor of 2.5 for
both the sample and line directions.

ENVI User’s Guide Unsupervised Classification


522 Chapter 6: Classification

Creating Class Images from ROIs


Use Create Class Image from ROIs to convert selected ROIs into an ENVI
classification image.
For detailed instructions, see “Creating Class Images from ROIs” on page 280.

Creating Class Images from ROIs ENVI User’s Guide


Chapter 6: Classification 523

Post Classification
Use Post Classification to classify rule images, to calculate class statistics and
confusion matrices, to apply majority or minority analysis to a 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.

Figure 6-9: The Post Classification Menu.

Changing Class Colors


Use Class Color Mapping to change the colors of classes after a classified image is
loaded into a display window. 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.

ENVI User’s Guide Post Classification


524 Chapter 6: Classification

Figure 6-10: Selecting Class Color Mapping from the Display menu.

1. Select Tools > Color Mapping > Class Color Mapping from the Display menu
in the Main Image window.
2. When the Classification Mapping dialog appears, select from the following
options to change the class colors and/or names.
• To change the color system, select “RGB,” “HLS,” or “HSV” from the
“System” button menu.
• To modify the class color, click on a class name in the “Selected Classes”
list and either type new values into the text boxes and press “Enter,” or
move the color adjustment slider bars, or click the arrow increment buttons
to set the color values.
• To change the name of the selected class, edit it in the “Class Name:” text
box.
• To reset the colors and names to their original values, select Options >
Reset Color Mapping.

Post Classification ENVI User’s Guide


Chapter 6: Classification 525

3. When you are finished with your color modifications, select File > Save
Changes to retain the new colors.
4. Select File > Cancel to close the dialog.
For more information, see “Mapping Class Colors” on page 364 and “Editing
Classification Info” on page 108.

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. A significant amount of the time required to run
classification routines can be attributed to calculation of the classification measures.
Classification itself doesn’t actually require extensive computation.
Note
To use the Rule Classifier, you must first generate rule images. For details, see
“Supervised Classification” on page 503 and “Calculating Rule Images” on
page 504.

1. Select Classification > Post Classification > Rule Classifier.


2. In the file input dialog, select the input rule image file and perform any spatial
subsetting.
The new interactive Rule Image Classifier Tool dialog appears (see
Figure 6-11).
3. Click the “Classify By” arrow 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” text box and click the “Set All Thresholds” button.
The threshold value appears in the “Thresh” text box for each class.
• To enter a different threshold for each class, enter a value in the “Thresh”
text box for each class.
• To enter a threshold value based on histogram percentage, enter the
percent value (e.g. “5%”) in the “Thresh” text box.

ENVI User’s Guide Post Classification


526 Chapter 6: Classification

Tip
You can plot a histogram of a rule band to help you determine threshold values. For
details, see “Plotting Histograms” on page 526.

5. Click the “Quick Apply” button.


A classification image based on the current settings is displayed in a new
display window.
• To remove a class from the display, click in the “On” check box for that
class to deselect it. To display that class again, click the “On” check box
again.

Figure 6-11: The interactive Rule Image Classifier Tool.

6. Click the “Quick Apply” button 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:
• Click the “Hist” button for that class.
A plot window is displayed with the histogram of the selected band.

Post Classification ENVI User’s Guide


Chapter 6: Classification 527

For details about working with ENVI plots, see “Using Interactive Plot Functions” on
page 343.

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. Use the “Save to File” button to save the classification
image to a file. Use the File menu or the “Cancel” button to cancel the post
classification process. Detailed instructions follow:
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 will appear.
2. Click on class name in the list to highlight it and select from the following
options:
• To change the class name, enter the new name in the “Class Name” text
box.
• To change the class color, select a color system and/or color using the
button menus. To further adjust the color, use the slider bars.
For detailed instructions about color selection, see “Class Color Mapping” in the
ENVI User’s Guide or online help.
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.
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 are displayed in
the File Statistics Report window.
• To save the report as an ASCII file, select File > Save Text to ASCII in the
report window.

ENVI User’s Guide Post Classification


528 Chapter 6: Classification

Turning Rule Bands On/Off


• To turn all of the rule bands on or off without having to click each check box,
select Options > Select All Rule Bands, or Options > Clear All Rule Bands.
Canceling the Classification
• To cancel the Rule Image Classifier Tool at any time, click the “Cancel”
button or select File > Cancel.
Warning
Any unsaved changes will be lost and the rule classification image will close.

Saving the Classification Image


• To save the displayed classification image to a file, click the “Save to File”
button 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.
Minimum, maximum, mean, and standard deviation plots can be plotted 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. Select Classification > Post Classification > Class Statistics.
2. When the Classification Input File dialog appears, select a classified image.
Only classified images can be selected (based upon the file type described in
the image’s header).
3. Click “OK.”
4. When the Statistics Input File dialog appears, select an input file from which to
calculate the statistics and perform any spatial subsetting and/or spectral
subsetting using the standard ENVI file selection procedures.
Select the file that will be used to calculate class statistics for the areas
identified in the classification image (usually the data file).

Post Classification ENVI User’s Guide


Chapter 6: Classification 529

5. After the input data has been selected, click “OK.”


The Class Selection dialog appears.
6. Select the classes that you want to calculate statistics for by clicking on the
class names in the list.
7. Click “OK.”
The Compute Statistics Parameters dialog appears.
8. Select the desired statistics options by clicking in the check boxes. See
“Computing Statistics” on page 427 for detailed information about the options
available in the Compute Statistics Parameters dialog.
The final output includes separate statistics reports and plots for each class as well as
a summary report of all classes.

Figure 6-12: The Compute Statistics Parameters Dialog

ENVI User’s Guide Post Classification


530 Chapter 6: Classification

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
regions of interest (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. For more information, see the
following reference:
J. R. Jensen, 1986, Introductory Digital Image Processing, Prentice-Hall, Englewood
Cliffs, New Jersey, p. 379.
1. Select Classification > Post Classification > Confusion Matrix > Using
Ground Truth Image.
2. In the Classification Input File dialog, select the classification image and
perform any spatial subsetting.
3. From the Ground Truth Input File dialog, select the ground truth image and
perform any spatial subsetting.
The Match Classes Parameters dialog appears.
4. Match the ground truth classes with the classification result classes by clicking
on 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, click on the combination name. The
two class names reappear in the lists at the top of the dialog.
5. After all of your class combinations are made, click “OK.”
The Confusion Matrix Parameters dialog appears.
6. Next to the “Output Confusion Matrix in” label, select the “Pixels” and/or the
“Percent” check boxes.
If both are selected, they will be reported in the same window.

Post Classification ENVI User’s Guide


Chapter 6: Classification 531

7. Next to the “Report Accuracy Assessment” label, select the “Yes” or “No”
toggle button.
8. Next to “Output Error Images” label, click the arrow 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. Choose output to “File” or “Memory.”
10. Click “OK.”

Figure 6-13: Confusion Matrix Report

ENVI User’s Guide Post Classification


532 Chapter 6: Classification

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 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 Figure 6-13 and “Confusion Matrix Example” on
page 533.

Using Ground Truth Regions of Interest


To display a confusion matrix report using regions of interest for ground truth:
1. Select Classification > Post Classification > Confusion Matrix > Using
Ground Truth ROIs.
2. In the Classification Input File dialog, select the classification image and
perform any spatial subsetting.
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.
Note
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 classification image (see “Reconciling ROIs” on page 277).

3. When the Match Classes Parameters dialog appears, match the ground truth
ROIs with the classification result classes by clicking on 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, click on the combination name. The
two class names reappear in the lists at the top of the dialog.
4. After all of your class combinations are made, 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.

Post Classification ENVI User’s Guide


Chapter 6: Classification 533

6. Next to the “Report Accuracy Assessment” label, click the “Yes” or “No”
toggle button.
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 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. See the following example for details.

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 regions of interest (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

ENVI User’s Guide Post Classification


534 Chapter 6: Classification

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

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/10944
Forest 30.32 30.30 6133/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 6: Classification 535

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 (xkΣxΣk), 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.
å x – åx x
N kk kΣ Σk
κ = ---------------------------------------------------
k k

N – åx x
2
kΣ Σk
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
incorrectly by the total number of pixels in the ground truth class forms an error of

ENVI User’s Guide Post Classification


536 Chapter 6: Classification

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
The 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 regions of interest (ROIs). A probability of
detection (Pd) verses probability of false alarm (Pfa) curve and a Pd verses threshold
curve are reported for each selected class (rule band). For more information, see the
following 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.

Post Classification ENVI User’s Guide


Chapter 6: Classification 537

Using Ground Truth Image


To display a ROC Curve plot using a ground truth image:
1. Select Classification > Post Classification > ROC Curves > Using Ground
Truth Image.
2. From the Rule Input File dialog, choose the classification rule image and
perform any spatial or spectral subsetting.
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 Ground Truth Input File dialog, select the ground truth image and
perform any spatial subsetting.
4. When the Match Classes Parameters dialog appears, match the ground truth
classes with the rule image classes by clicking on the matching names in the
two lists and clicking “Add Combination.”
The class combinations are displayed 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, click on the combination name.
The two class names reappear in the lists at the top of the dialog.
5. After all of your class combinations are made, click “OK.”
The ROC Curve Parameters dialog appears.

Figure 6-14: The ROC Curve Parameters dialog.

ENVI User’s Guide Post Classification


538 Chapter 6: Classification

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 text boxes, 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” text box, enter the number of points in the ROC
curves.
9. In the “ROC curve plots per window” text box, enter the number of plots per
window.
10. Select whether to output probability of detection verses 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
(see Figure 6-15).

Figure 6-15: An ROC Curves plot window.

Post Classification ENVI User’s Guide


Chapter 6: Classification 539

Using Ground Truth Regions of Interest


To display a ROC curve using regions of interest for ground truth:
1. Select Classification > Post Classification > ROC Curves > Using Ground
Truth ROIs.
2. From the Rule Input File dialog, choose the classification rule image and
perform any spatial or spectral subsetting.
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 ROIs will automatically be loaded into the Match Classes
Parameters dialog.
Note
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 277).

3. When the Match Classes Parameters dialog appears, match the ground truth
classes with the rule image classes by clicking on the matching names in the
two lists and clicking “Add Combination”.
The class combinations are displayed 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, click on the combination name. The
two class names reappear in the lists at the top of the dialog.
4. After all of your class combinations are made, 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 text boxes, 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

ENVI User’s Guide Post Classification


540 Chapter 6: Classification

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” text box, enter the number of points in the ROC
curves.
8. In the “ROC curve plots per window” text box, enter the number of plots per
window.
9. Select whether to output probability of detection verses 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.

Figure 6-16: ROC and Probability of Detection Curves.

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. Select Classification > Post Classification > Majority/Minority Analysis.

Post Classification ENVI User’s Guide


Chapter 6: Classification 541

2. When the file selection dialog appears, select the classification input file and
any subsetting.
The Majority/Minority Parameters dialog appears.
3. In the list of classes, click on the classes that you want to apply the analysis to.
Note
If the center pixel is from a class that was not selected in the “Select Classes” list,
that pixel will not be changed. However, center pixels of selected classes can be
changed into a class that is not selected if the unselected class is the majority class
in the kernel.

4. Select the analysis method, by clicking the corresponding toggle button.


5. Enter or select 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.”
The resulting file is listed in 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 and then an erode operation on the
classified image using a kernel of the size specified in the parameters dialog.
1. Select Classification > Post Classification > Clump Classes.
2. When the Classification Input File dialog appears, select a classified image and
perform any spatial subsetting.

ENVI User’s Guide Post Classification


542 Chapter 6: Classification

Note
Only classified images can be selected (based upon the file type described in the
image’s header).

3. Click “OK.”
The Clump Parameters dialog appears with all of the available classes in the
image in the “Select Classes” list.
4. Select the classes on which to perform clumping by clicking on the class
names in the list.
Note
Any classes not selected for clumping will be passed to the output image
unchanged.

5. Enter the desired morphological operator size in the “Rows” and “Cols” text
boxes.
6. Select output to “File” or “Memory.”
7. Click “OK” to start the processing.

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 541) after
sieving to replace the black pixels.

1. Select Classification > Post Classification > Sieve Classes.


2. When the Classification Input File dialog appears, select a classified image and
perform any spatial subsetting using standardized ENVI procedures.

Post Classification ENVI User’s Guide


Chapter 6: Classification 543

Note
Only classified images can be selected (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 by clicking on the class names
in the list.
Note
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” text box.
Any groups of pixels smaller than this value will be removed from the class.
6. Use the arrow 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” to start the processing.

Combining Classes
Use Combine Classes to selectively combine classes in classified images. You can
also merge classes using Overlay > Classification from the Display menu in the Main
Image window (see “Merging Classes” on page 246 for details).
Note
Combining classes or removing the “unclassified” class effectively deletes those
individual classes.

1. Select Classification > Post Classification > Combine Classes.


2. When the Classification Combine Classes dialog appears, select a classified
image and perform and any spatial subsetting using standard ENVI
procedures.

ENVI User’s Guide Post Classification


544 Chapter 6: Classification

3. After the input classification data has been selected, click “OK.”
The Combine Classes Parameters dialog appears.
4. In the Combine Classes Parameters dialog, select a class for input by clicking
on a name in the “Input Classes” list.
The selected class name appears in the “Input Class” text box.
5. Select an output class by clicking on a class name in the “Output Classes” list.
6. When both the input and output classes have been selected, click “Add
Combination” to finalize the selection.
The new, combined class to be created are 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.

Figure 6-17: The Combine Classes Dialog.

• To deselect combined classes, click on the name in the “Combined


Classes” list.
7. Click “OK” to combine the contents of the input class into the output class.

Post Classification ENVI User’s Guide


Chapter 6: Classification 545

8. When the Combine Classes Output dialog appears, select output to “File” or
“Memory.”
A status window appears while the classes are processed. The new classified image
name is added to the Available Bands List where it can be displayed using standard
ENVI procedures.

Overlaying Classes
Use Overlay Classes to produce an image map with a color composite or grayscale
background image and the classes overlaid in color. It outputs a three-band RGB
image that can be displayed using standard ENVI procedures.
You can also overlay classes using the Overlay menu in the Main Image window. For
details, see “Overlaying Classes” on page 243.
Note
Due to the nature of the classification overlay, the background image should be
stretched and saved to byte output images prior to overlay.

1. Select Classification > Post Classification > Overlay Classes.


2. When the Classification Input File dialog appears, select the classification
image and any spatial subsetting using the standardized ENVI spatial
subsetting procedures.
3. When the Input Background RGB Input Bands dialog appears, click
sequentially on the red, green, and blue bands to be used for the background
image.
• If a grayscale background is desired, click on the same spectral band for
the RGB inputs.
The input files must be byte images (i.e., files containing values between 0 and
255).
4. Click “OK” to continue.
5. When the Class Overlay to RGB Parameters dialog appears, select the desired
classes to overlay on the background image by clicking on the toggle button
associated with the class name in the list.
6. Select output to “File” or “Memory.”
7. Click “OK” to create the class overlay image.

ENVI User’s Guide Post Classification


546 Chapter 6: Classification

Note
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
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 Figure 6-18.
1. Select Classification > Post Classification > Buffer Zone Image.

Figure 6-18: An example of a buffer zone image.

2. When the file selection dialog appears, select the input classification file and
any spatial subsetting.
The Buffer Zone Image Parameters dialog appears.

Post Classification ENVI User’s Guide


Chapter 6: Classification 547

3. In the list of classes, click on the class names to select which class(es) to
measure the distance to.
Note
If more than one class is selected, the distance will be from the pixel to the nearest
class.

4. Click the “Maximum Distance” arrow increment buttons to set the maximum
distance to measure, or type the value (in pixels) into the corresponding text
box.
Any pixels with a distance larger than this value will be set to the maximum
distance value.
5. From the Distance Kernel button menu, select “Floating Point” or “Integer”
output.
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. Select Classification > Post Classification > Segmentation Image.
2. When the file selection dialog appears, select the input classification file and
any spatial subsetting.
The Segmentation Image Parameters dialog appears.
3. In the list of classes, click on the classes to be used for segmenting the image.
Note
All the selected classes will be combined before segmenting.

4. In the “Population Minimum” text box, enter the minimum number of pixels
that must be contained in a region for it to become a segment.
5. Use the arrow toggle button to designate whether to consider eight or four
neighboring pixels for the connectivity.

ENVI User’s Guide Post Classification


548 Chapter 6: Classification

6. Select output to “File” or “Memory.”


7. Click “OK.”
The results appear in 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. Select Classification > Post Classification > Classification to Vector.
2. When the Raster to Vector Input Band dialog appears, select the desired input
classification file and perform any subsetting.
3. When the Raster to Vector Parameters dialog appears, select the desired class
names to convert to vector polygons by clicking on the class names.
4. Use the arrow 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 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” to make 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”, etc. appended to the root name.

Post Classification ENVI User’s Guide


Chapter 7:
Transforms

This chapter covers the following topics:

The Transforms Menu . . . . . . . . . . . . . . . . 550 Color Transforms . . . . . . . . . . . . . . . . . . . 575


Image Sharpening . . . . . . . . . . . . . . . . . . . 551 Applying Decorrelation Stretch . . . . . . . . 580
Calculating Band Ratios . . . . . . . . . . . . . . 553 Applying Saturation Stretch . . . . . . . . . . . 581
Principal Component Analysis . . . . . . . . . 556 Creating Synthetic Color Images . . . . . . . 582
Minimum Noise Fraction Transform . . . . . 563 Calculating Vegetation Indices . . . . . . . . . 584

ENVI User’s Guide 549


550 Chapter 7: Transforms

The Transforms Menu


Use the Transforms 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.

Figure 7-1: The Transforms Menu.

The Transforms Menu ENVI User’s Guide


Chapter 7: Transforms 551

Image Sharpening
Use Image Sharpening tools to automatically merge a low-resolution color image
with a high-resolution grayscale image (with resampling to the high-resolution pixel
size). ENVI has two image sharpening techniques, using an HSV transform, and
using 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.

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. Select Transforms > Image Sharpening > HSV.
2. Select the three color bands to transform from either an open color image
display or from the Available Bands List (for detailed instructions, see “Color
Transforms” on page 575).
3. When the High Resolution Input File dialog appears, select the high-resolution
input image and perform any spatial subsetting.
4. Click “OK.”
5. When the HSV Sharpening Parameters dialog appears, select the resampling
method from the “Resampling” pulldown menu.
6. Select output to “Memory” or “File.”
7. Click “OK” to start the processing.
The output bands appear in the Available Bands List.

ENVI User’s Guide Image Sharpening


552 Chapter 7: Transforms

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 a nearest neighbor, bilinear, or cubic convolution
technique. The output RGB images will have the pixel size of the input high-
resolution data. See the following reference for details:
Vrabel, Jim, 1996, Multispectral Imagery Band Sharpening Study, Photogrammetric
Engineering & Remote Sensing, Vol. 62, No. 9, pp. 1075-1083.
1. Select Transforms > Image Sharpening > Color Normalized (Brovey).
2. Select the three color bands to transform from either an open color image
display or from the Available Bands List (for detailed instructions, see “Color
Transforms” on page 575).
3. When the High Resolution Input File dialog appears, select the high-resolution
input image and perform any spatial subsetting
4. Click “OK.”
5. When the Color Normalized Sharpening Parameters dialog appears, select the
resampling method from the “Resampling” pulldown menu.
6. Select “Memory” or “File” output.
7. Click “OK” to start the processing.
The output bands appear in the Available Bands List.

Image Sharpening ENVI User’s Guide


Chapter 7: Transforms 553

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, where 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 must enter 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.
1. Select Transforms > Band Ratios.
2. When the Band Ratio Entry dialog (Figure 7-2) appears, select your numerator
and denominator bands from the list of available bands.
The first band you click on will be used as the “numerator” band. The second
band you click on will be used as the “denominator” band.
• To fold a data set, click on the filename of the data set.
All of the bands of the data set are compressed and the data set appears in
the list in this format:
+<filename>[number of bands]
• To “unfold” a data set and make its bands available for display, simply
click the folded filename.
• To change the bands you have selected, click “Clear.”
3. Once you have selected the two input bands, click “Enter Pair” to create a new
band pair listed in the “Selected Ratio Pairs” list.
Once you select the first pair, only bands with the same spatial size appear in
the available bands list.

ENVI User’s Guide Calculating Band Ratios


554 Chapter 7: Transforms

Figure 7-2: The Band Ratio Input Bands dialog.

Tip
Create as many ratio combinations as needed by entering additional band pairs. All
ratios in the “Selected Ratio Pairs” list will be output as multiple bands in a single
file.

4. Click “OK.”
The Band Ratios Parameters dialog appears.
5. Select from the following options.
• To select a spatial subset, click “Spatial Subset” and use the standard
ENVI spatial subsetting procedures.

Calculating Band Ratios ENVI User’s Guide


Chapter 7: Transforms 555

• To output the ratio values as byte data (instead of the default floating-point
type), select “Byte” from the “Output Data Type” button menu.
ENVI will stretch the output ratio values by mapping the values entered in
the “Min” and “Max” text boxes to 0 to 255.
• To change the byte stretching ratio data range, enter new “Min” and
“Max” values.
6. Select “File” or “Memory” output.
7. Click “OK.”
As the ratios are calculated, a status message is displayed.
When the ratio calculations have concluded, the ratio band names appear in the
Available Bands List and are available for display.

Creating Complex Band Ratios


Also use 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 553.
2. Select Transforms > Band Ratios again.
You may now 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 would then allow you to
calculate a complex ratio of 5/7 divided by 3/1 by selecting the 5/7 ratio from
the Available Bands List as the numerator and the 3/1 ratio as the denominator.
3. After selecting a new numerator and denominator, click “Enter Pair.”
4. Click “OK” to calculate a new complex ratio.
The new result is loaded into the Available Bands list. Note that you can also use the
Band Math function to calculate these kinds of ratios (see “Available Band Math
Functions” on page 441).

ENVI User’s Guide Calculating Band Ratios


556 Chapter 7: Transforms

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 Component (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, etc. 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 Component 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.
Richards, J.A., 1994. Remote Sensing Digital Image Analysis: An Introduction,
Springer-Verlag, Berlin, Germany, p. 340.

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. The output of either can be saved 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. Select Transforms > Principal Components > Forward PC Rotation >
Compute New Statistics and Rotate.
2. When the Principal Components Input File dialog appears, select and subset
your input file using standard ENVI file selection procedures.
The Forward PC Rotation Parameters dialog appears.

Principal Component Analysis ENVI User’s Guide


Chapter 7: Transforms 557

Tip
Click the “Stats Subset” button 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. For instructions, see “Using Statistics
Subsetting” on page 558.

3. Enter resize factors less than 1 in the “Stats X/Y Resize Factor” text boxes
to sub-sample the data when calculating the statistics.
Tip
Enter a resize factor of less than 1 to increase the speed of the statistics calculations.
For example, using a resize factor of 0.1 will use every 10th pixel in the statistics
calculations.

4. Enter an output statistics filename, if needed.


5. Select whether to calculate the PC’s based on the “Covariance Matrix” or
“Correlation Matrix” using the arrow toggle button.
Typically, use the covariance matrix when calculating the principal
components. Use the correlation matrix when the data range differs greatly
between bands and normalization is needed.
6. Select “File” or “Memory” output.
7. From the “Output Data Type” menu, select the desired data type of the output
file.
8. Select the number of output PC bands by using one of the following options:
• To limit the number of output PC bands, enter the desired number of
output bands or use the arrow increment button next to the “Number of
Output PC Bands” label to set the number of output bands.
The default number of output bands is equal to the number of input bands.
• To select the number of output PC bands by examining the eigenvalues:
A. Click the arrow toggle button next to the “Select Subset from Eigenvalues”
label to select “Yes.”
The statistics are calculated 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 PC bands.

ENVI User’s Guide Principal Component Analysis


558 Chapter 7: Transforms

B. Select the number of bands to output by entering a number into the


“Number of Output PC Bands” box or by clicking on the arrow buttons.
PC Bands with large eigenvalues contain the largest amounts of data
variance. 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.
C. Click “OK” in the Select Output PC Bands dialog.
The output PC rotation will contain only the number of bands that you
selected. For example, if you chose “4” as the number of output bands,
only the first four PC bands will appear in your output file.
9. In the Forward PC Rotation Parameters dialog, Click “OK.”
When ENVI has finished processing, the PC EigenValues plot window appears (see
Figure 7-3) and the PC bands are loaded into the Available Bands List where you
may access them for display. For information on editing and other options in the
eigenvalue plot window, see “Using Interactive Plot Functions” on page 343.

Figure 7-3: The PC EigenValues Plot Window.

Using Statistics Subsetting


Use the “Stats Subset” button 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.
1. In the Forward PC Parameters dialog, click the “Stats Subset” button.

Principal Component Analysis ENVI User’s Guide


Chapter 7: Transforms 559

2. In the Select Statistics Subset dialog, select one of the following options:
• To select a standard image spatial subset, click the “Calculate Stats On”
“Image Subset” button and subset using standard ENVI methods.
• To select a ROI as the subset, click the “Calculate Stats On” “ROI” button
to display a list of ROIs, then click on the ROI name to select it.
Tip
To add a previously saved ROI to the list of ROIs, click the “Restore ROIs” button
in the subset dialog, select the ROI file, then select the ROI.

Figure 7-4: The Select Statistics Subset dialog for “Image Subset” calculation
(left), or “ROI” calculation (right).

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 > Compute Statistics option or during a previous PC rotation session.)

ENVI User’s Guide Principal Component Analysis


560 Chapter 7: Transforms

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. You can then use this statistics file to do the Principal Components
Analysis.

1. Select Transforms > Principal Components > Forward PC Rotation > PC


Rotation from Existing Stats.
2. When the standard ENVI file selection and subsetting dialogs appear, select
and subset your input file using the standard ENVI file selection procedures.
Another file selection 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 with standard ENVI file selection procedures.
4. Select “File” or “Memory” output.
5. From the “Output Data Type” button menu, select the data type of the output
file.
6. Select one of the following options:
• To limit the number of output PC bands, enter the desired number of
output bands or use the arrow increment button next to the “Number of
Output PC Bands” label to set the number of output bands.
The default number of output bands is equal to the number of input bands.
• To select the number of output PC bands by examining the eigenvalues:
A. Click the arrow toggle button next to the “Select Subset from Eigenvalues”
label to select “Yes.”
The statistics will be calculated and the Select Output PC Bands dialog
will appear with each band listed with its corresponding eigenvalue. Also
listed will be the cumulative percentage of data variance contained in each
PC band for all PC bands.
B. Select the number of bands to output by entering a number into the
“Number of Output PC Bands” box or by clicking on the arrow buttons.
PC Bands with large eigenvalues contain the largest amounts of data
variance. Bands with lower eigenvalues contain less data information and

Principal Component Analysis ENVI User’s Guide


Chapter 7: Transforms 561

more noise. Sometimes only those bands with large eigenvalues are output
to save disk space.
C. In the Select Output PC Bands dialog, click “OK.”
The output PC rotation will contain only the number of bands that you
selected. For example, if you chose “4” as the number of output bands,
only the first four PC bands will appear in your output file.
7. In the Forward PC Rotation Parameters dialog, click “OK.”
When ENVI has finished processing, the PC EigenValues plot window appears and
the PC bands are loaded into the Available Bands List where you may access them
for display. For information on editing and other options in the eigenvalue plot
window, see “Using Interactive Plot Functions” on page 343.

Inversing PC Rotations
Use Inverse PC Rotation to transform principal component images back into their
original data space.
1. Select Transforms > Principal Components > Inverse PC Rotation.
2. When the standard ENVI file selection and subsetting dialogs appear, select
and subset your input file using the standard ENVI file selection procedures.
Another file selection 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.
Note
The statistics file must already exist prior to selecting the inverse PC rotation.

4. Next to the “Calculate using” label, select either “Covariance Matrix” or


“Correlation Matrix” by clicking the arrow 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 “File” or “Memory” output.
6. From the “Output Data Type” button menu, select the data type of the output
file.
7. Click “OK” to perform the inverse transform.

ENVI User’s Guide Principal Component Analysis


562 Chapter 7: Transforms

When ENVI has finished processing, the bands are loaded into the Available Bands
List where they may be displayed using standard gray-scale or RGB color composite
methods.

Principal Component Analysis ENVI User’s Guide


Chapter 7: Transforms 563

Minimum Noise Fraction Transform


Use the MNF Rotation (minimum noise fraction) 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 essentially two cascaded Principal Components transformations. The first
transformation, based on an estimated noise covariance matrix, decorrelates and
rescales the noise in the data. This first step results in transformed data in which the
noise has unit variance and no band-to-band correlations. The second step is a
standard Principal Components transformation of the noise-whitened data. For the
purposes of further spectral processing, the inherent dimensionality of the data is
determined by examination of the final eigenvalues and the associated images. The
data space can be divided into two parts: one part associated with large eigenvalues
and coherent eigenimages, and a complementary part with near-unity eigenvalues
and noise-dominated images. By using only the coherent portions, the noise is
separated from the data, thus improving spectral processing results. See the
references at the end of this section for additional details.
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 don’t 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
function is used to transform endmember spectra into MNF space for input into
Mixture Tuned Matched Filtering (MTMF). For details see “Matched Filtering
Results” on page 656).
Note
You can use ENVI’s Spectral Mapping 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 Mapping Wizard” on page 664.

For more information about MNF transforms, see the following references:

ENVI User’s Guide Minimum Noise Fraction Transform


564 Chapter 7: Transforms

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.

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 data set.
Estimating Noise Statistics from the Data
Use Estimate Noise Statistics From Data to estimate noise when you have no 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 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. Select Transforms > MNF Rotation > Forward MNF > Estimate Noise
Statistics From Data or Spectral > MNF Rotation > Forward MNF > Estimate
Noise Statistics From Data.
2. When the standard ENVI file selection and subsetting dialogs appear, select
and subset your input file using the standard ENVI file selection procedures.
The Forward MNF Transform Parameters dialog appears.
Tip
Click the “Shift Diff Subset” button to select a spatial subset or an area under an
ROI 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 “Using Statistics Subsetting” on page 566.

Minimum Noise Fraction Transform ENVI User’s Guide


Chapter 7: Transforms 565

3. In the “Enter Output Noise Stats Filename [.sta]” text box, enter a filename
for the noise statistics.
• To select a homogeneous area for calculating the noise statistics, click the
“Spatial Subset” button and use ENVI’s standard spatial subset procedures
to either manually enter a subset or to graphically indicate the area for
statistics extraction (see “Selecting a Spatial Subset” on page 45).
4. In the “Enter Output MNF Stats Filename [.sta]” text box, enter an output file
for the MNF statistics.
Warning
Be sure that the MNF and noise statistics files have different names.

5. Select “File” or “Memory” output.


6. Select the number of output MNF bands by using one of the following options.
• To select the number of output MNF bands by examining the eigenvalues:
A. Click the arrow toggle button next to the “Select Subset from Eigenvalues”
label to select “Yes.”
B. Click “OK” to calculate the noise statistics and the first rotation.
The statistics are calculated 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. Click the arrow buttons next to the “Number of Output MNF Bands” label
to set your desired number of output bands, or enter the number into the
box.
Tip
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.

D. Click “OK” in the Select Output MNF Bands dialog to complete the
rotation.
• To limit the number of output MNF bands without selecting a subset from
eigenvalues, enter the desired number of output bands or use the arrow
increment buttons next to the “Number of Output MNF Bands” label.
7. Click “OK” to start the processing.

ENVI User’s Guide Minimum Noise Fraction Transform


566 Chapter 7: Transforms

When ENVI has finished processing, it loads the MNF bands into 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
contained 224 bands, but you selected only 50 bands for output, your output will only
contain the first 50 calculated MNF bands from you input file.
Bands with large eigenvalues (greater than one) contain data, and bands with
eigenvalues near one contain noise. Display the EigenImages (MNF bands) from the
Available Bands List and compare with the MNF EigenValue plot to determine
which bands contain 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
Figure 7-6, you should only include the first ten to twelve MNF bands.
Note
The MNF statistics file does not contain normal data statistics. Only the needed
statistics are stored in MNF statistics file and the statistics labeled Covariance really
contain the transpose of the composite transformation array. This produces
incorrect values in the correlation matrix that should be ignored. The eigenvalues
and eigenvectors are those for the noise-whitened data (e.g., the second Principal
Components rotation) Statistics from the file that are missing are reported as cell
zeros).

Using Statistics Subsetting


Use the “Shift Diff Subset” button 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.
1. In the Forward MNF Transform Parameters dialog, click the “Shift Diff
Subset” button.
The standard ENVI Select Spatial Subset dialog appears.
2. Select a spatial subset using standard ENVI methods.

Minimum Noise Fraction Transform ENVI User’s Guide


Chapter 7: Transforms 567

Figure 7-5: In the Forward MNF Transform Parameters dialog, click the “Shift
Diff Subset” button to access standard ENVI Spatial Subset dialog.

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. Select Transforms > MNF Rotation > Forward MNF > Previous Noise
Statistics or Spectral > MNF Rotation > Forward MNF > Previous Noise
Statistics.
2. When the standard ENVI file selection and subsetting dialogs appear, select
and subset your input file using the standard ENVI file selection procedures.
Another file selection 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 a noise statistics file from a previous MNF transform processing
session.

ENVI User’s Guide Minimum Noise Fraction Transform


568 Chapter 7: Transforms

4. The Forward MNF Transform Parameters dialog appears.


5. In the “Enter Output MNF Stats Filename [.sta]” text box, enter an output
filename for the MNF statistics.
6. Select “File” or “Memory” output.
7. Select the number of output MNF bands using one of the following options.
• To select the number of output MNF bands by examining the eigenvalues:
A. Click the arrow toggle button next to the “Select Subset from Eigenvalues”
label to select “Yes.”
B. Click “OK” to calculate the noise statistics and the first rotation.
The statistics are calculated 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. Click the arrow buttons next to the “Number of Output MNF Bands” label
to set your desired number of output bands, or enter the number into the
box.
Tip
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.

D. In the Select Output MNF Bands dialog, click “OK.”


• To limit the number of output MNF bands without selecting a subset from
eigenvalues, enter the desired number of output bands or use the arrow
increment buttons next to the “Number of Output MNF Bands” label:
E. Click “OK” to start the processing.
When ENVI has finished processing, the MNF bands are loaded into the Available
Bands List and the MNF EigenValues Plot Window is displayed. The output only
contains the number of bands you selected for output. For example, if your input data
contained 224 bands, but you selected only 50 bands for output, your output will only
contain the first 50 calculated MNF bands from you input file.
Bands with large eigenvalues (greater than one) contain data, and bands with
eigenvalues near one contain noise. Display the EigenImages (MNF bands) from the
Available Bands List and compare with the MNF EigenValue plot to determine
which bands contain data and which bands contain predominantly noise. In
subsequent processing of this data, spectrally subset the MNF bands to only include

Minimum Noise Fraction Transform ENVI User’s Guide


Chapter 7: Transforms 569

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
Figure 7-6, you should only include the first ten to twelve MNF bands.
Note
The MNF statistics file does not contain normal data statistics. Only the needed
statistics are stored in MNF statistics file and the statistics labeled Covariance really
contain the transpose of the composite transformation array. This produces
incorrect values in the correlation matrix that should be ignored. The eigenvalues
and eigenvectors are those for the noise-whitened data.

Figure 7-6: The MNF EigenValues Plot Window.

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. The dark image can be used to characterize the instrument noise.
1. Select Transforms > MNF Rotation > Forward MNF > Noise Statistics from
Dark Image or Spectral > MNF Rotation > Forward MNF > Noise Statistics
from Dark Image.

ENVI User’s Guide Minimum Noise Fraction Transform


570 Chapter 7: Transforms

2. When the standard ENVI file selection and subsetting dialogs appear, select
and subset your input file using the standard ENVI file selection procedures.
3. When the Dark Current Input File dialog appears, select the dark current file
and perform spatial subsetting as required.
The noise statistics are calculated using the dark current input file.
The Forward MNF Transform Parameters dialog appears.
4. In the “Enter Output Noise Stats Filename [.sta]” text box, enter an output file
for the noise statistics.
5. In the “Enter Output MNF Stats Filename [.sta]” text box, enter an output file
for the MNF statistics.
Warning
Be sure that the MNF and noise statistics files have different names.

6. Select “File” or “Memory” output.


7. Select the number of output MNF bands by using one of the following options.
• To select the number of output MNF bands by examining the eigenvalues:
A. Click the arrow toggle button next to the “Select Subset from Eigenvalues”
label to select “Yes.”
B. Click “OK” to calculate the noise statistics and the first rotation.
The statistics are calculated 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. Click the arrow buttons next to the “Number of Output MNF Bands” label
to set your desired number of output bands, or enter the number into the
box.
Tip
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.

D. In the Select Output MNF Bands dialog, click “OK.”


• To limit the number of output MNF bands without selecting a subset from
eigenvalues, enter the desired number of output bands or use the arrow
increment buttons next to the “Number of Output MNF Bands” label:

Minimum Noise Fraction Transform ENVI User’s Guide


Chapter 7: Transforms 571

E. Click “OK” to start the processing.


The MNF EigenValues plot window appears. The output only contains the number of
bands you selected for output. For example, if your input data contained 224 bands,
but you selected only 50 bands for output, your output will only contain the first 50
calculated MNF bands from you input file.
Bands with large eigenvalues (greater than one) contain data, and bands with
eigenvalues near one contain noise. Display the EigenImages (MNF bands) from the
Available Bands List and compare with the MNF EigenValue plot to determine
which bands contain 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
Figure 7-6, you should only include the first ten to twelve MNF bands.
Note
The MNF statistics file does not contain normal data statistics. Only the needed
statistics are stored in MNF statistics file and the statistics labeled Covariance really
contain the transpose of the composite transformation array. This produces
incorrect values in the correlation matrix that should be ignored. The eigenvalues
and eigenvectors are those for the noise-whitened data.

Inversing MNF Transforms


Use Inverse MNF Transforms 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. Select Transforms > MNF Rotation > Inverse MNF Transform or Spectral >
MNF Rotation> Inverse MNF Transform.
2. When the standard ENVI file selection and subsetting dialogs appear, select
and subset a previously calculated MNF transform image using the standard
ENVI file selection procedures.
3. When the Enter Forward MNF Stats Filename dialog appears, enter the name
of the forward MNF statistics file and click “OK.”

ENVI User’s Guide Minimum Noise Fraction Transform


572 Chapter 7: Transforms

4. When the Inverse MNF Transform Parameters dialog appears, select “File” or
“Memory” output.
5. From the “Output Data Type” menu, select the data type (byte, integer,
unsigned integer, long integer, unsigned long integer, floating point, double
precision).
6. Click “OK” to start the processing.
The inverse MNF results are loaded into the Available Bands List when the
processing is complete.

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 657). Use the MNF statistics from the Mixture Tuned
Matched Filtering input data file for the transform. The spectra to be transformed can
be collected from plot windows, spectral libraries, ASCII files, ROIs, and statistics
files using a dialog similar to the endmember collection dialog.
1. Select Transforms > MNF Rotation > Apply Forward MNF to Spectra.
2. When the Forward MNF Statistics Filename dialog appears, select the MNF
statistics filename that was calculated for the Mixture Tuned Matched Filtering
input data file.
The Forward MNF Convert Spectra dialog appears.
3. Import spectra into the dialog by using the Import menu selections, or by
dragging and dropping the spectra into the black draw widget at the top of the
dialog (for detailed instructions, see “Using the Drag-and-Drop Window” on
page 495, “Importing Endmember Spectra” on page 496, and “Endmember
Options” on page 499).
Warning
If you are transforming library spectra into forward MNF space for use as
endmembers in Mixture Tuned Matched Filtering, the input library spectra must be
scaled identically to the image for which the MNF statistics are being used to do the
forward transformation.

4. To delete a spectrum from the dialog, click on the spectrum and click “Delete
Spectrum.”
5. Click “Apply.”

Minimum Noise Fraction Transform ENVI User’s Guide


Chapter 7: Transforms 573

The transformed spectra appear in the Forward MNF Spectra plot window and
can be input into the Mixture Tuned Matched Filtering Endmember Collection
dialog.

Outputting Transformed Spectra


You can print transformed spectral plots or save them as ASCII files, spectral
libraries, IDL variables, PostScript files, or image files.
• To output plot data, select File > Save Plot As > output type in the MNF plot
window.
• To print, select File > Print.
For detailed instructions, see “Outputting Plot Data” on page 353.

Applying Inverse MNFs to Spectra


Use the Apply Inverse MNF to Spectra to transform MNF spectra back to the original
data space. Forward MNF statistics from a data file are used for the transform. The
spectra to be transformed can be collected from plot windows, spectral libraries,
ASCII files, ROIs, and statistics files using a dialog similar to the endmember
collection dialog.
1. Select Transforms > MNF Rotation > Apply Inverse MNF to Spectra.
2. When the Forward MNF Statistics Filename dialog appears, select the forward
MNF statistics filename.
The Inverse MNF Convert Spectra dialog appears.
3. Use the Import menu to import spectra into the dialog or by dragging and
dropping the spectra into the black draw widget at the top of the dialog (for
detailed instructions, see “Using the Drag-and-Drop Window” on page 495,
“Importing Endmember Spectra” on page 496, and “Endmember Options” on
page 499).
4. Click “Apply.”
The transformed spectra appear in the Inverse MNF Spectra plot window.

Outputting Transformed Spectra


You can print transformed spectral plots or save them as ASCII files, spectral
libraries, IDL variables, PostScript files, or image files.
• To output plot data, select File > Save Plot As > output type in the MNF plot
window.

ENVI User’s Guide Minimum Noise Fraction Transform


574 Chapter 7: Transforms

• To print, select File > Print.


For detailed instructions, see “Outputting Plot Data” on page 353.

Minimum Noise Fraction Transform ENVI User’s Guide


Chapter 7: Transforms 575

Color Transforms
Use Color Transforms to convert 3-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, the value or lightness band can be
replaced by 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.
Note
This is done automatically in HSV Sharpening (see “Image Sharpening” on
page 551).

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. For more
details, see the following 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.
The Munsell color transforms were written as an ENVI User Function, and the code
is included as an example (see munsell.pro in the ENVI lib directory).
Note
Color transforms require three bands for input. These bands should be stretched
byte data or selected from an open color display.

Transforming RGB to HSV


Use RGB to HSV to transform an RGB image into the HSV (hue, saturation, and
value) color space. The input RGB values must be byte data in the range 0 to 255. An

ENVI User’s Guide Color Transforms


576 Chapter 7: Transforms

input file with at least 3 bands or a color display must be open to execute 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).
1. Select Transforms > Color Transforms > RGB to HSV.
2. When the RGB to HSV Input dialog appears, select the three bands to
transform from either a displayed color image or from the Available Bands
List (for detailed instructions, see “Selecting Bands from Color Displays”).
The RGB to HSV Parameters dialog appears.
3. Select “File” or “Memory” output.
4. Click “OK” to start the processing.
A status window appears. When the forward transform is completed, the HSV names
are entered into the Available Bands List where they can be displayed using standard
ENVI gray-scale or RGB color composite methods.
Selecting Bands from Color Displays
• To select your bands from a color display and use the displayed stretch
number, select a display number, such as “Display #1,” from the Input list.
• To select a spatial subset, click the “Spatial Subset” button.
When the Parameters dialog appears, ENVI automatically uses the RGB bands from
the selected window and lists them in the “Input RGB Bands” list.
Selecting Bands from the Available Bands List
Note
If you select bands from the Available Bands List, no stretching will be applied and
all data will be clipped to byte type.

1. In the Input dialog, click “Available Bands List.”


The Input Bands dialog appears.
2. In the integrated Available Bands List, click on the three band names to use in
the forward transform.
• To select a spatial subset, click the “Spatial Subset” button.
• To reset the selections, click “Reset.”

Color Transforms ENVI User’s Guide


Chapter 7: Transforms 577

3. Click “OK.”
The Parameters dialog appears.
Transforming RGB to HLS
Use RGB to HLS to transform an RGB image into the HLS (hue, lightness,
saturation) color space. 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 lightness
and saturation in the range 0 to 1 (floating-point). An input file with at least 3 bands
or a color display must be open to execute this function. The input RGB values must
be byte data in the range 0 to 255.
1. Select Transforms > Color Transforms > RGB to HLS.
2. When the RGB to HLS Input dialog appears, select the three bands to
transform from either a displayed color image or from the Available Bands
List (for detailed instructions, see “Selecting Bands from Color Displays” on
page 576).
3. Select “File” or “Memory” output.
4. Click “OK” to start the processing.
A status window displays the progress of the operation. When the forward transform
is complete, the HLS names are entered into the Available Bands List where they can
be displayed using standard ENVI gray-scale or RGB color composite methods.

Transforming RGB to USGS Munsell HSV


Use USGS Munsell RGB to HSV to transform an RGB image into the USGS Munsell
HSV color space.
1. Select Transforms > Color Transforms > RGB to HSV (USGS Munsell).
The ENVI user function “MUNSELL.PRO” is automatically loaded and
executed.
2. When the USGS Munsell RGB to HSV Input File dialog appears, click
sequentially on the three bands to load as RGB.
• To select a spatial subset, click the “Spatial Subset” button.
• To reset the selections, click “Reset”
3. Click “OK” to continue.
4. When the Munsell HSV Output dialog appears, select “File” or “Memory”
output.

ENVI User’s Guide Color Transforms


578 Chapter 7: Transforms

5. Click “OK” to start the processing.


When the transform is complete, the bands appear in the Available Bands List.
Transforming HSV to RGB
Use HSV to RGB to transform 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 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. Select Transforms > Color Transforms > HSV to RGB.
2. When the HSV to RGB Input dialog appears, select bands to transform from
the integral Available Bands List by clicking on appropriate band names.
The names of the bands appear in the “H,” “S,” and “V,” text boxes for hue,
saturation, and value.
• To spatially subset your data, click the “Spatial Subset” button.
3. Click “OK.”
4. When the HSV to RGB Parameters dialog appears, select “File” or “Memory”
output.
5. Click “OK.”
A status window appears. When the reverse transform is complete, the RGB names
appear in the Available Bands List.
Transforming HLS to RGB
Use the HLS to RGB to transform an HLS (hue, lightness, saturation) image back to
the RGB color space. The input H, S, and L bands must have the following data
ranges: hues in the range of 0 to 360 degrees (where red is 0 degrees, green is 120
degrees, and blue is 240 degrees) and lightness and saturation in the range 0 to 1
(floating-point). The RGB values produced are byte data in the range 0 to 255.
1. Select Transforms > Color Transforms > HLS to RGB.
2. When the HLS to RGB Input dialog appears, select bands to transform by
clicking on the appropriate band names.
The names of the bands appear in the “H,” “L,” and “S,” text boxes for hue,
lightness, and saturation.
• To spatially subset your data, click the “Spatial Subset” button.

Color Transforms ENVI User’s Guide


Chapter 7: Transforms 579

3. Click “OK” to continue.


4. When the HLS to RGB Parameters dialog appears, select “File” or “Memory”
output.
5. Click “OK.”
A status window appears. When the reverse transform is complete, the RGB names
appear in the Available Bands List.

Transforming USGS Munsell HSV to RGB


Use USGS Munsell HSV to RGB to transform 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. Select Transforms > Color Transforms > HSV to RGB (USGS Munsell).
The ENVI user function “MUNSELL.PRO” is automatically loaded and
executed.
2. When the USGS Munsell HSV to RGB Input File dialog appears, click
sequentially on the three bands to load as HSV.
• To spatially subset your data, click the “Spatial Subset” button.
• To reset the selections, click the “Reset” button.
3. Click “OK.”
4. When the Munsell RGB Output dialog appears, select “File” or “Memory”
output.
5. Click “OK” to start the processing.
When the transform is complete, the bands appear in the Available Bands List.

ENVI User’s Guide Color Transforms


580 Chapter 7: Transforms

Applying Decorrelation Stretch


Use Decorrelation Stretch to remove the high correlation commonly found in
multispectral datasets 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.
Note
Similar results to decorrelation can be obtained by using a sequence of forward
Principal Components (PC), contrast stretching, and inverse PC transforms.

1. Select Transforms > Decorrelation Stretch.


2. When the Decorrelation Stretch Input dialog appears, select three bands for
input from either an open color image display or from the Available Bands List
(for detailed instructions, see page “Selecting Bands from Color Displays” on
page 576).
The Decorrelation Stretch Parameters dialog appears.
3. Select either “File” or “Memory” output.
4. Click “OK” to start the decorrelation processing.
A status message appears while each band is calculated. When processing is
complete, the decorrelation stretch names are entered into the Available Bands List.

Applying Decorrelation Stretch ENVI User’s Guide


Chapter 7: Transforms 581

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. Select Transforms > Saturation Stretch.
2. When the Saturation Stretch Input dialog appears, select three bands for input
from an open color image display or from the Available Bands List (for
detailed instructions, see “Selecting Bands from Color Displays” on page 576).
3. Select either “File” or “Memory” output.
4. Click “OK” to start the decorrelation processing.
A status message appears while each band is calculated. When complete, the
saturation stretch names are entered into the Available Bands List.

ENVI User’s Guide Applying Saturation Stretch


582 Chapter 7: Transforms

Creating Synthetic Color Images


Use the Synthetic Color Image transform to transform a grayscale image into a
synthetic color image. ENVI changes the grayscale 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. See the following reference for more information:
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:
• Select Transforms > Synthetic Color Image.
• Select Radar > Synthetic Color Image.
2. When the file selection dialog appears, select the input band and perform any
spatial subsetting.
3. When the Synthetic Color Parameters dialog appears, select the kernel size for
the high and low pass filters by using the arrow increment buttons next to the
“High Pass Kernel Size” and “Low Pass Kernel Size” labels.
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 will produce more saturated or “pure” colors.
5. Select “File” or “Memory” output.
6. Click “OK” to start the transform.

Creating Synthetic Color Images ENVI User’s Guide


Chapter 7: Transforms 583

The transform process is reported in the Synthetic Color Processing dialog and the
resulting synthetic color image bands are available for display from the Available
Bands List.

ENVI User’s Guide Creating Synthetic Color Images


584 Chapter 7: Transforms

Calculating Vegetation Indices


Use the NDVI and Tassled Cap transforms to calculate vegetation indices from data.

Using NDVI
Use the NDVI (Vegetation Index) 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. For more information, see the following reference:
Jensen, J. R., 1986. Introductory Digital Image Processing, Prentice-Hall, New
Jersey, p. 379.
1. Select Transforms > NDVI (Vegetation Index).
2. When the NDVI Calculation Input File window appears, select the input file
and perform any subsetting.
3. Click “OK.”

Calculating Vegetation Indices ENVI User’s Guide


Chapter 7: Transforms 585

Figure 7-7: The NDVI Calculation Parameters Dialog.

4. In the NDVI Calculation Parameters dialog, specify the input file type (TM,
MSS, AVHRR, etc.) from the “Input File Type” pulldown menu.
The bands used to calculate the NDVI are automatically entered into the
“Red” and “Near IR” text boxes.
• To calculate the NDVI for a sensor type not listed in the pulldown
menu, enter the desired band numbers in the “Red” and “Near IR” text
boxes.
5. From the “Output Data Type” button menu, select either byte or floating-
point output.
• If you select byte output, enter the minimum NDVI value. This value
will be set to zero.
• If you select floating-point output, enter the maximum value. This value
will be set to 255.
6. Select “File” or “Memory” output.
7. Click “OK.”

ENVI User’s Guide Calculating Vegetation Indices


586 Chapter 7: Transforms

A status message appears while the transform is calculated. When complete, ENVI
enters the NDVI band name into the Available Bands List.

Using Tasseled Cap


Use Tassled Cap to transform Landsat MSS data or Landsat TM 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 more information, see the following 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.
1. Select Transforms > Tassled Cap.
2. When the Tasseled Cap Transformation Input File dialog appears, select the
input file and perform any subsetting.
3. Click “OK.”
The Tasseled Cap Transform Parameters dialog appears.
4. From the “Input File Type” button menu, select Landsat TM or Landsat MSS.
5. Select “File” or “Memory” output.
6. Click “OK.”
A status message appears while the Tassled Cap transform is calculated. When
complete, ENVI enters the tasseled cap band names into the Available Bands List.

Calculating Vegetation Indices ENVI User’s Guide


Chapter 8:
Filters

This chapter covers the following topics:

The Filter Menu . . . . . . . . . . . . . . . . . . . . . 588 Using Texture Filters . . . . . . . . . . . . . . . . 599


Convolution Filters . . . . . . . . . . . . . . . . . . 589 Using Adaptive Filters . . . . . . . . . . . . . . . 604
Morphology Filters . . . . . . . . . . . . . . . . . . 594 Using Frequency Filters (FFTs) . . . . . . . . 611

ENVI User’s Guide 587


588 Chapter 8: Filters

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.

Figure 8-1: The Filter menu.

The Filter Menu ENVI User’s Guide


Chapter 8: Filters 589

Convolution Filters
Use Convolutions to apply convolution filters to image data. Convolution filter types
in ENVI include the following: high pass, low pass, Laplacian, directional, Gaussian
High Pass, Gaussian Low Pass, median, Sobel, Roberts, and user-defined. Each filter
type is described in this section. For detailed instructions, see “Using Convolution
Filters” on page 591.

High Pass Filters


High pass filtering removes the low frequency components of an image while
retaining the high frequency (local variations). It can be used to 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 3 x 3 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 Filters


Low pass filtering preserves the low frequency components of an image, which
smooths it. ENVI’s default 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 3 x 3.

Laplacian Filters
A Laplacian filter is 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 3 x 3 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.

ENVI User’s Guide Convolution Filters


590 Chapter 8: Filters

Directional Filters
A directional filter is 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 Filters
A Gaussian filter passes a Gaussian convolution function of specified size over the
image. The default is a 3 x 3 kernel and kernel dimensions must be odd.

Median Filters
Median filtering 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 3 x 3
kernel.

Sobel Filters
The Sobel filter is a non-linear edge enhancement, special case filter that uses an
approximation of the true Sobel function, and is a preset 3 x 3, non-linear edge
enhancement operator. The size of the filter cannot be changed and no kernel editing
is possible.

Roberts Filters
The Roberts filter is a non-linear edge detector filter similar to the Sobel. It is a
special case filter that uses a preset 2 x 2 approximation of the true Roberts function,
a simple, two dimensional differencing method for edge-sharpening and isolation.
The size of the filter cannot be changed and no kernel editing is possible.

User-Defined Convolution Filters


You can define custom convolution kernels (including rectangular rather than square
filters) by selecting and editing a user kernel.

Convolution Filters ENVI User’s Guide


Chapter 8: Filters 591

Using Convolution Filters


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 filters include high pass, low pass, Laplacian,
directional, Gaussian, median, Sobel, Roberts, and user-defined. For descriptions of
each filter type, see “Convolution Filters” on page 589.
1. Select Filter > Convolutions.
The Convolutions and Morphology Tool dialog appears (see Figure 8-2).
2. Select Convolutions > filter type (the filter types are described in the section
beginning on page 589).
• If you select the Directional filter, 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 by clicking the “Kernel Size” arrow increment buttons.
Note
Some specialized filters have default sizes that can not be changed. If you select
filter types such as Sobel and Roberts, you cannot change the kernel size.

The kernel sizes are in odd-number increments. Clicking with the left mouse
button increases/decreases the value by 2, clicking with the middle mouse
button increases/decreases value by 10, and clicking with the right mouse
button sets the kernel size back to 3 x 3.
By default, the kernel size is set to a square kernel.
• To change to a non-square kernel, select Options > Square kernel:No.
Note
The Median filter is always a square.

• To edit individual kernels, see the next section.

ENVI User’s Guide Convolution Filters


592 Chapter 8: Filters

4. Enter an add back value in the “Image Add Back (0-100%)” text box.
“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 an “apply” method as described in “Applying Convolution and
Morphology Filters” on page 596.

Figure 8-2: The Convolution and Morphology Tool dialog with a convolution filter
type selected.

Editing Kernels
To edit the selected kernel and change any of the weight values:
1. In the Convolutions and Morphology Tool, double-click within the text box of
the value to be edited.
The line cursor appears.
2. Highlight the value, enter a new value, and press the “Return” key.

Convolution Filters ENVI User’s Guide


Chapter 8: Filters 593

Saving Kernels to Files


1. Select File > Save Kernel.
2. When the Output Kernel to File dialog appears, enter or select an output
filename. Use the extension .ker.
3. Click “OK.”

Restoring Saved Kernel Files


1. Select File > Restore Kernel.
2. Select the saved kernel file.

ENVI User’s Guide Convolution Filters


594 Chapter 8: Filters

Morphology Filters
Use Morphology to apply morphological filters to image data. Morphology filter
types in ENVI include the following: Erode, Dilate, Opening, and Closing. Each
filter type is described in this section. For detailed instructions, see “Using
Morphology Filters” on page 595.

Dilate Filters
Dilate filters, commonly known as “fill,” “expand,” or “grow,” fills holes smaller
than the structural element (kernel) in a binary or grayscale image.

Erode Filters
The Erode filter, commonly known as “shrink” or “reduce,” removes islands of
pixels smaller than the structural element (kernel) in a binary or grayscale image.

Opening Filters
Opening filters 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.
Tip
Using the Erode filter followed by using the Dilate filter produces the same result as
using an Opening filter.

Closing Filters
Closing filters 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.

Morphology Filters ENVI User’s Guide


Chapter 8: Filters 595

Using Morphology Filters


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. A detailed discussion of this topic is beyond the scope of this manual. For
additional information, see the following 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.
Morphology filter types include the following: Erode, Dilate, Opening, and Closing.
For descriptions of each filter type, see “Morphology Filters” on page 594. There are
several predefined morphological kernels. (Morphological kernels used here are just
the structuring element and should not to be confused with convolution kernels.)
1. Select Filter > Morphology.
The Convolutions and Morphology Tool dialog appears (see Figure 8-3).
2. Select Morphology > filter type (the filter types are described beginning on
page 594).
3. Specify the kernel size by clicking the “Kernel Size” arrow increment buttons.
The kernel sizes are in odd-number increments. Clicking with the left mouse
button increases/decreases the value by 2, clicking with the middle mouse
button increases/decreases value by 10, and clicking with the right mouse
button sets the kernel size back to 3 x 3.
By default, the kernel size is set to a square kernel.
• To change to a non-square kernel, select Options > Square kernel:No.
• To edit individual kernels, see “Editing Kernels” on page 592.
4. Select the number of iterations of the filter by clicking the “Cycles” arrow
increment buttons.
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 an “apply” method as described in “Applying Convolution and
Morphology Filters” on page 596.

ENVI User’s Guide Morphology Filters


596 Chapter 8: Filters

Figure 8-3: The Convolutions and Morphology Tool dialog with a morphology
filter type selected.

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. When completed, the filtered
image is added to the top of the Available Bands List and can be displayed using
standard ENVI procedures.

Applying Convolution and Morphology Filters


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; 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


In the Convolutions and Morphology Tool dialog, use the “Quick Apply” button to
examine the results of the filter quickly. You can make changes if needed and re-
display the image.
1. Click the “Quick Apply” button to apply the selected filter to a single image
band.
2. In the Convolution Quick-Apply Input Band dialog, select the input band and
any subsetting.

Morphology Filters ENVI User’s Guide


Chapter 8: Filters 597

Note
If you select a band for input, spectral subsetting is not available.

3. Click “OK.”
The resulting file appears in a display window. The file displayed is a
temporary file placed in the default temporary ENVI directory (see “Setting
ENVI Preferences” on page 160). The display window and the file are
automatically deleted when the Convolutions and Morphology Tool dialog is
closed.
• If you change any parameters in the Convolutions and Morphology Tool
dialog, click the “Quick Apply” button again.
The new parameters overwrite the existing results.
Changing the Quick Apply Input Band
To change the band used for the Quick Apply output:
1. In the Convolutions and Morphology Tool dialog, select Options > Change
Quick-Apply Input Band.
2. In the file selection dialog, select the input band and any subsetting.
Note
If you select a band for input, spectral subsetting is not available.

3. Click “OK.”
Saving Quick Apply Results
To save the Quick Apply image result to a file:
1. Select File > Save Quick Result to File.
2. When the Output Convolution Filename dialog appears, enter an output
filename.
3. Click “OK.”

ENVI User’s Guide Morphology Filters


598 Chapter 8: Filters

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 the “Apply to File” button.
2. When the file selection dialog appears, select the input file and any subsetting.
3. Click “OK.”
The Convolution Parameters dialog appears.
4. Select output to “File” or “Memory.”
The resulting file is listed in the Available Bands List.

Morphology Filters ENVI User’s Guide


Chapter 8: Filters 599

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. See the following reference for more information:
Anys, H., A. Bannari, D. C. He, and D. Morin, 1994. Texture analysis for the
mapping of urban areas using airborne MEIS-II images, in Proceedings of the First
International Airborne Remote Sensing Conference and Exhibition, Strasbourg,
France, Vol. 3, pp. 231-245.
1. Select Filter > Texture > Occurrence Measures.
The Texture Input File dialog appears.
2. Select an input file or band (see “Selecting Bands or Files for Processing” on
page 43).
• To select a subset, click the “Spatial Subset” or “Spectral Subset” buttons
and use standard subsetting procedures (see “Selecting a Spatial Subset”
on page 45 or “Selecting a Spectral Subset” on page 50).
Note
If you select a band for input, spectral subsetting is not available.

3. After the input data has been selected, click “OK.”


The Occurrence Texture Parameters dialog appears.
4. Select texture images to be created by clicking on the check boxes next to the
texture type in the “Textures to Compute” portion of the dialog.

ENVI User’s Guide Using Texture Filters


600 Chapter 8: Filters

Figure 8-4: The Occurrence Texture Parameters Dialog.

5. Enter the size of the processing window in the “Rows” (Y) and “Cols” (X) text
boxes to set the area to be considered for the texture evaluation.
6. Select output to “File” or “Memory.”
7. Click “OK” to start the processing.
The texture images selected are calculated and placed in the Available Bands List.

Applying Co-occurrence-Based Filters


Use Co-Occurrence Measures to apply any of eight texture filters that are based on
the co-occurrence matrix. These filters include mean, variance, homogeneity,
contrast, dissimilarity, entropy, second moment, and correlation. 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 below was produced using each pixel
and its horizontal neighbor (shift values of X=1, Y=0) for a 3 x 3 window. The pixels
in the 3 x 3 base window and the pixels in a 3 x 3 window that was shifted by 1 pixel

Using Texture Filters ENVI User’s Guide


Chapter 8: Filters 601

are used to create the co-occurrence matrix. See the following references for more
information.
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, in Proceedings of the First
International Airborne Remote Sensing Conference and Exhibition, Strasbourg,
France, Vol. 3, pp. 231-245.

Figure 8-5: Co-occurrence Matrix.

ENVI User’s Guide Using Texture Filters


602 Chapter 8: Filters

Figure 8-6: The Co-occurrence Texture Parameters Dialog.

1. Select Filter > Texture > Co-occurrence Measures.


The Texture Input File dialog appears.
2. Select an input file or band (see “Selecting Bands or Files for Processing” on
page 43).
• To select a subset, click the “Spatial Subset” or “Spectral Subset” buttons
and use standard subsetting procedures (see “Selecting a Spatial Subset”
on page 45 or “Selecting a Spectral Subset” on page 50).
Note
If you select a band for input, spectral subsetting is not available.

3. After the input data has been selected, click “OK.”


The Co-occurrence Texture Parameters dialog appears.

Using Texture Filters ENVI User’s Guide


Chapter 8: Filters 603

4. Select the texture images to be created by clicking on the check boxes next to
the texture types in the “Textures to Compute” portion of the dialog.
5. Enter the size of the processing window in the “Rows” (Y) and “Cols” (X) text
boxes.
6. Enter the X and Y shift values used to calculate the co-occurrence matrix (see
above for example).
7. Select output to “File” or “Memory.”
8. Click “OK” to start the processing.
The texture images selected are calculated and placed in the Available Bands List.

ENVI User’s Guide Using Texture Filters


604 Chapter 8: Filters

Using Adaptive Filters


Use Adaptive filters to apply any of six different 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 can be slow to execute.

Figure 8-7: The Adaptive Filters Cascading Menu.

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. See the following reference for details:
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. Select Filter > Adaptive > Lee.

Using Adaptive Filters ENVI User’s Guide


Chapter 8: Filters 605

The Input File dialog appears.


2. Select an input file or band and any spatial/spectral subsetting as described
in “Selecting Bands or Files for Processing” on page 43.
Note
If you select a band for input, spectral subsetting is not available.

3. Click “OK.”
4. When the Lee Filter Parameters dialog appears, enter the desired filter size in
the “Filter Size” text box.
5. Select the desired noise model by clicking the toggle buttons next to the labels
“Additive,” “Multiplicative,” or “Both.”
Typically, speckle in radar images is multiplicative.
6. Select from the following options:
• 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 text boxes.
Larger noise mean values will produce less smoothing.
• To change the “Noise Variance” value, enter a new value in the text box.
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
An estimate of the noise variance can be obtained by calculating the data variance
over a flat area, such as a lake or smooth playa, in the image. For multiplicative
noise in radar data, the noise variance can be estimated by 1/(number of looks).

7. Select output to “Memory” or “File.”


8. Click “OK” to start the processing.

ENVI User’s Guide Using Adaptive Filters


606 Chapter 8: Filters

Figure 8-8: The 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. See the following
reference for more information:
Zhenghao Shi and Ko B. Fung, “A Comparison of Digital Speckle Filters,”
Proceedings of IGARSS 94, August 8-12, 1994, pp. 2129-2133.
1. Select Filter > Adaptive > Frost.
2. Select an input file or band and any spatial/spectral subsetting as described
in “Selecting Bands or Files for Processing” on page 43.
Note
If you select a band for input, spectral subsetting is not available.

Using Adaptive Filters ENVI User’s Guide


Chapter 8: Filters 607

3. Click “OK.”
4. When the Frost Filter Parameters dialog appears, enter the desired filter size in
the “Filter Size” text box.
5. Enter the desired value in the “Damping Factor” text box.
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.
6. Select output to “File” or “Memory.”
7. Click “OK” to execute the filter.
A status window displays the progress of the operation.

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 608). The pixel being filtered is
replaced with a value calculated based on the local statistics. See the following
reference for more information:
Zhenghao Shi and Ko B. Fung, “A Comparison of Digital Speckle Filters,”
Proceedings of IGRASS 94, August 8-12, 1994, pp. 2129-2133.
1. Select Filter > Adaptive > Gamma.
2. When the file selection dialog appears, select a file or band and any spectral
and/or spatial subsetting as described in “Applying Lee Filters” on page 604.
3. Click “OK.”
4. When the Gamma Filter Parameters dialog appears, enter the desired filter size
in the “Filter Size” text box.
5. Enter the number of looks in the appropriate text box.
The “Number of Looks” parameter is used to calculate the noise variance by
1/(number of looks).
6. Select output to “File” or “Memory.”
7. Click “OK” to execute the filter.
A status window displays the progress of the operation.

ENVI User’s Guide Using Adaptive Filters


608 Chapter 8: Filters

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. See the
following reference for more information:
Zhenghao Shi and Ko B. Fung, “A Comparison of Digital Speckle Filters,”
Proceedings of IGARSS 94, August 8-12, 1994, pp. 2129-2133.
1. Select Filter > Adaptive > Kuan.
2. Select an input file or band and any spatial/spectral subsetting as described
in “Selecting Bands or Files for Processing” on page 43.
Note
If you select a band for input, spectral subsetting is not available.

3. Click “OK.”
4. When the Kuan Filter Parameters dialog appears, enter the filter size in the
“Filter Size” text box.
5. Enter the number of looks in the appropriate text box.
The “Number of Looks” parameter is used to calculate the noise variance by
1/(number of looks).
6. Select output to “File” or “Memory.”
7. Click “OK” to execute the filter.
A status window displays the progress of the operation.

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. See the following reference for more information:
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. Select Filter > Adaptive > Local Sigma.

Using Adaptive Filters ENVI User’s Guide


Chapter 8: Filters 609

2. Select an input file or band and any spatial/spectral subsetting as described


in “Selecting Bands or Files for Processing” on page 43.
Note
If you select a band for input, spectral subsetting is not available.

3. Click “OK.”
4. When the Localized Sigma Filter Parameters dialog appears, enter the filter
size in pixels.
5. Enter the number of standard deviations to consider valid in the “Sigma
Factor” text box.
The “Sigma Factor” is used 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
6. Select output to “File” or “Memory.”
7. Click “OK” to execute the filter.
A status window displays the progress of the operation.

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. See the following reference for
more information:
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.

ENVI User’s Guide Using Adaptive Filters


610 Chapter 8: Filters

1. Select Filter > Adaptive > Bit Errors.


2. Select an input file or band and any spatial/spectral subsetting as described
in “Selecting Bands or Files for Processing” on page 43.
Note
If you select a band for input, spectral subsetting is not available.

3. Click “OK.”
4. When the Bit Error Removal Parameters dialog appears, enter the filter size in
pixels.
5. Enter a “Sigma Factor” for the number of standard deviations to be used for
determining valid pixels.
6. 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.
7. To set bad pixels to zero instead of replacing them with an average, click
“Yes” next to the “Zero Bit Errors?” text label.
8. Optionally, enter the minimum and maximum values to be considered as valid
data for the mean determination in the “Valid Data Min” and “Valid Data
Max” text boxes.
9. Select “File” or “Memory” output.
10. Click “OK” to execute the filter.
A status window displays the progress of the operation.

Using Adaptive Filters ENVI User’s Guide


Chapter 8: Filters 611

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. Presently, FFT
processing does not use the ENVI tiling procedures, so the size image that can be
processed is limited by the available system memory.
Note
FFT images, which are “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 612).
Note
If your input data 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.

1. Select Filter > FFT Filtering > Forward FFT.


The Forward FFT Input File dialog appears. The file selection dialog allows
selection of either an input file or a single input band (unlike most other ENVI
File Selection dialogs).
2. Select an input file or band and any spatial/spectral subsetting as described in
“Selecting Bands or Files for Processing” on page 43.
Note
If you select a band for input, spectral subsetting is not available.

3. Click “OK.”

ENVI User’s Guide Using Frequency Filters (FFTs)


612 Chapter 8: Filters

4. When the Forward FFT Parameters dialog appears, select output to


“File” or “Memory.”
Note
The file output option is strongly recommended.

5. Click “OK” to start the FFT calculation.


A status window displays the progress of the operation. Currently, the entire FFT is
done without tiling, so processing is limited by system memory and the status goes
abruptly from 0 to 100%. When the transform is done, all bands in the output file are
added to the Available Bands List. Display the resulting images using standard ENVI
procedures.
Note
When you display a forward FFT image, the power component of the complex data
is displayed by default (see “Using the Complex Lookup Function” on page 110).

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. Select Filter > FFT Filtering > Filter Definition.
The Filter Definition selection dialog appears.
2. Select one of the following options:
• If an FFT image is displayed, 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 is displayed, specify the desired filter size by entering values
into the “Samples” and “Lines” text boxes.
3. In the Filter Definition dialog, 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 filters (low pass or high pass filters,
respectively), enter a filter radius, in pixels, in the “Radius” text box.

Using Frequency Filters (FFTs) ENVI User’s Guide


Chapter 8: Filters 613

• For Band Pass or Band Cut filters, enter values, in pixels, in the “Inner
Radius” and “Outer Radius” text boxes.
• For User Defined Pass and User Defined Cut filters, you can load ENVI
annotation (polygons and shapes only) into the filter (see “Loading
Annotation into User-Defined Filters” on page 615).

Figure 8-9: The Filter Definition Dialog.

5. Click the arrow buttons to select the “Number of Border Pixels” used 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)


614 Chapter 8: Filters

Figure 8-10: 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” to build the FFT filter.
8. Click “Cancel” to close the Filter Definition dialog.
The filter is a single band image of the specified dimensions. It appears in the
Available Bands List. It can be displayed using standard ENVI procedures prior to
application to the images.
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 8: Filters 615

Loading Annotation 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:
Note
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 image window (see “Annotating
Images” on page 222).
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 in
the Annotation window.
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. Select Filter > FFT Filtering > Inverse FFT.
The Inverse FFT Input File dialog appears. The file selection dialog allows
selection of either an input file or a single input band (unlike most other ENVI
File Selection dialogs).
2. Select an input file or band and any spatial/spectral subsetting as described in
“Selecting Bands or Files for Processing” on page 43.
Note
If you select a band for input, spectral subsetting is not available.

3. Click “OK.”
4. When the Inverse FFT Filter File dialog appears, select the filter image
to apply.

ENVI User’s Guide Using Frequency Filters (FFTs)


616 Chapter 8: Filters

Note
The filter image must have been generated previously using the filter definition
procedures described in “Defining FFT Filters” on page 612.

5. Click “OK.”
6. When the Inverse FFT Parameters window appears, with the input file
characteristics listed, select either output to “File” or “Memory.”
7. Select the output data type (byte, integer, floating point, etc.) from the
appropriate pulldown menu.
8. Click “OK” to process the image.
The FFT-filtered image can be displayed using standard ENVI procedures.

Using Frequency Filters (FFTs) ENVI User’s Guide


Chapter 9:
Spectral Tools

This chapter covers the following topics:

The Spectral Menu . . . . . . . . . . . . . . . . . . 618 Spectral Mapping Wizard . . . . . . . . . . . . . 664


Spectral Libraries . . . . . . . . . . . . . . . . . . . . 619 Spectral Analyst . . . . . . . . . . . . . . . . . . . . 673
Spectral Slices . . . . . . . . . . . . . . . . . . . . . . 627 Spectral Math . . . . . . . . . . . . . . . . . . . . . . 679
MNF Rotations . . . . . . . . . . . . . . . . . . . . . 630 Resampling Spectral Data Files . . . . . . . . 686
Pixel Purity Index . . . . . . . . . . . . . . . . . . . 631 EFFORT Polishing . . . . . . . . . . . . . . . . . . 687
The n-Dimensional Visualizer . . . . . . . . . . 636 Generating 3-D Image Cubes . . . . . . . . . . 692
Mapping Methods . . . . . . . . . . . . . . . . . . . 649 Spectral Tools References . . . . . . . . . . . . 694

ENVI User’s Guide 617


618 Chapter 9: Spectral Tools

The Spectral Menu


Use the Spectral menu to access several 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.
See the ENVI Hyperspectral Tutorials for further step-by-step descriptions for using
some of the ENVI spectral tools.

Figure 9-1: The Spectral menu.

The Spectral Menu ENVI User’s Guide


Chapter 9: Spectral Tools 619

Spectral Libraries
Use Spectral Libraries to access several included public domain spectral libraries
that are included with ENVI. Spectral libraries developed at Jet Propulsion
Laboratory contain spectra for three different grain sizes of approximately 160 “pure”
minerals from 0.4 to 2.5 µm. The public domain U. S. Geological Survey Spectral
library contains nearly 500 spectra of well-characterized minerals and a few
vegetation spectra. These data are provided in ENVI for the 0.4 to 2.5 µm range.
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, DRI measured from 0.4 to 2.5 µm. See
Appendix C, “ENVI Spectral Libraries” for more information and references
regarding the spectral libraries available in ENVI.
ENVI spectral libraries are stored in ENVI “image” format, with each line of the
image corresponding to an individual spectrum and each sample of the image
corresponding to an individual spectral measurement at a specific wavelength (see
“ENVI Spectral Library Files” on page 890). The ENVI spectral libraries can be
displayed and/or enhanced using the standard ENVI image display and analysis
routines.

Opening Spectral Libraries


Use Spectral Library Viewer to open and view new spectral libraries or to open and
view spectral libraries that have been opened previously.
1. Select Spectral > Spectral Libraries > Spectral Library Viewer.
The Spectral Library Input File dialog appears. Use the dialog to select a
library for viewing. If a spectral library has been opened previously, it is in the
“Select Input File” list.
2. Click on a spectral library name and click “OK.”
The Spectral Library Viewer dialog appears for selection and plotting of individual
library spectra.

ENVI User’s Guide Spectral Libraries


620 Chapter 9: Spectral Tools

Opening a Spectral Library Not Listed


To open a new spectral library file if the input file does not appear in the Spectral
Library Input File dialog:
1. In the Spectral Library Input File dialog, Click “Open Spec Lib.”
2. When the file selection dialog appears, select a spectral library filename.
It will be available for selection in the Spectral Library Input File dialog.
3. In the Spectral Library Input File dialog, click on a spectral library name and
click “OK.”
The Spectral Library Viewer dialog appears for selection and plotting of individual
library spectra.

Plotting Library Spectra


After opening spectral libraries, use the Spectral Library Viewer dialog to plot the
spectra.
• To plot a spectrum in the Spectral Library Viewer plot window, click on an
individual spectrum name in the Spectral Library Viewer dialog (Figure 9-2).
A plot window appears with a plot of that spectrum.
• To plot multiple spectra at the same time, click on multiple spectrum names.
Each new spectrum is plotted in the same plot window in a new color.
• To show the names and colors of the plotted spectra, click the right mouse
button inside the plot window.
• To scale the library spectra by a constant, select Options > Edit (x,y) Scale
Factors, enter a value into the “Data Multiplier” text box. The spectral library
spectrum are multiplied by that value.
Scale factors are used for comparison of library spectra to image spectra that
have been scaled into integers, or for converting units between microns and
nanometers.
Plotting Other Spectra
To plot spectra from other plot windows with the spectral library entries:
1. Click the right mouse button inside the plot window to show the plot names.

Spectral Libraries ENVI User’s Guide


Chapter 9: Spectral Tools 621

2. Click and hold the left mouse button on the plot name and drag the plot name
to the Spectral Library Viewer plot window and release the left mouse button
(see “Moving Plots to Another Plot Window” on page 343).

Figure 9-2: The Spectral Library Viewer Dialog (left). Each name in the list is an
individual spectrum. The Spectral Library Viewer Plot Window is shown at right.

Editing and Managing Spectral Library Plots


To interact with and edit spectral library plots, use the same standard procedures as
are described in “Using Interactive Plot Functions” on page 343.
The options include input and output of plot values to ASCII or spectral libraries,
setting data plot characteristics such as line color and type, changing plot
characteristics such as data range and titles, stacking the data plots, editing data
values, creating ASCII and PostScript output, printing plots, annotating plots, and
removing continuums.
Closing the Dialog
• To exit the Spectral Library Viewer dialog, select File > Cancel.

ENVI User’s Guide Spectral Libraries


622 Chapter 9: Spectral Tools

Resampling Spectral Libraries


Use Spectral Library Resampling to resample spectral libraries to match either the
response of a known instrument (e.g., TM, MSS, AVIRIS) or a user-defined filter
function; an ASCII wavelength file (with or without full width half maximum
[FWHM] information) or the wavelengths of a specific image input file. The
resampling method depends on the input information. If only wavelengths (band
centers) are provided, ENVI assumes critical sampling and uses a gaussian model
with a FWHM equal to the band spacings. If wavelengths and FWHM information
are provided, a gaussian model using the FWHM spacings is used. If a filter function
is provided, ENVI uses that for the resampling.
1. Select Spectral > Spectral Libraries > Spectral Library Resampling.
2. When the Spectral Resampling Input File dialog appears, select a spectral
library to be resampled by clicking on its name and then clicking “OK.”
If a spectral library has already been opened, its name is in the “Select Input
File” list.
Opening a File Not Listed
1. In the Spectral Resampling Input File dialog, click the “Open Spec Lib”
button.
2. When the file selection dialog appears, select a spectral library filename.
It is available for selection in the Spectral Resampling Input File dialog.
3. In the Spectral Resampling Input File dialog, click on the spectral library name
and click “OK.”
The Spectral Library Resampling Parameters dialog appears.

Selecting Resampling Types


Use the Spectral Library Resampling Parameters dialog to select the type of
resampling to perform.
1. Select the appropriate “Resample Wavelength to” toggle button.
2. Enter a value in the “Set Bad Values to” textbox.
Bands that fall outside the input wavelength range are considered bad values
and the entered value will be used for these bands. No extrapolation is done.
For example, if your input data ranges from .4 to 2.4 µm and you resample to
.3-2.5 µm, the bands between .3 to .4 and 2.4 to 2.5 µm will contain the “Set
Bad Values To” value.

Spectral Libraries ENVI User’s Guide


Chapter 9: Spectral Tools 623

3. Select output to “File” or “Memory” and 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.
1. In the File Containing Output Wavelength dialog, click on the desired
filename.
2. Click “OK” to start the resampling process.
Note
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.

The resulting library appears in the Available Bands List.


Resampling from ASCII Files
If you select “Input ASCII File” as the resampling method in the Spectral
Resampling Parameters dialog, an input file selection dialog appears.
1. In the File Containing Output Wavelength, select the ASCII wavelength file.
2. When the Input ASCII File dialog appears, select the wavelength data column.
• To specify a multiplication factor for scaling the wavelengths, enter the
desired value into the “Multiply Factor” text box.
• If the ASCII file also contains full-width-half-maximum (FWHM) values,
enter the FWHM column number.
3. Click “OK” to start the resampling.
The resulting library appear in the Available Bands List.
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.

ENVI User’s Guide Spectral Libraries


624 Chapter 9: Spectral Tools

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. For an example of a filter function file, open the Landsat
TM file, tm_fsli (in the ENVI Spectral Library directory), as a spectral library file
and plot the filter functions.
1. In the Input Filter Function Spectral Library dialog, select the desired filter
function.
2. Click “OK.”
The resulting library appears in the Available Bands List.
Warning
It is not recommended to resample from a low resolution to a high resolution
spectrum. If you do this, the results may be spurious.

Resampling from Pre-Defined Filter Functions


If you select “Pre-Defined Filter Function” as the resampling method in the Spectral
Resampling Parameters dialog, a button menu appears.
1. From the button menu that appears, select a supported sensor type (e.g.,
ASTER, AVHRR).
The resulting library appears in the Available Bands List.

Building Spectral Libraries


Use Spectral Library Builder to create ENVI spectral libraries from a variety of
spectra sources including ASCII files, other spectral libraries, ROI means, and
spectral profiles and plots. The collected spectra are automatically resampled to an
input wavelength space using full-width-half-maximum (FWHM) information, if
available.

Inputting Wavelength Data


1. Select Spectral > Spectral Libraries > Spectral Library Builder.
2. When the Spectral Library Builder dialog appears, select the wavelength set
for the new library from either an “Input Data File” (ENVI image file) or from
an “Input ASCII File.”

Spectral Libraries ENVI User’s Guide


Chapter 9: Spectral Tools 625

3. When the File Containing Output Wavelength dialog appears, select the input
file containing the wavelengths and optional FWHM values using standard
selection procedures.
• If you select “Input Data File,” the wavelengths and FWHM values (if
present) are read from the ENVI header file.
• If you select “Input ASCII File,” the column that contains the wavelength
values and FWHM (if present) must be selected.
4. Click “OK.”
The Spectral Library Builder dialog appears.

Drag-and-Drop
Window

Figure 9-3: The Spectral Library Builder dialog.

Collecting Spectra
Use the Spectral Library Builder dialog (Figure 9-3) to collect endmember spectra
from a variety of sources. All spectra are automatically resampled to the selected
wavelength space
The methods for collecting spectra in the Spectral Library Builder dialog are exactly
the same as those for collecting spectra in the Endmember Collection dialog. For
detailed instructions, see “Using the Drag-and-Drop Window” on page 495,
“Importing Endmember Spectra” on page 496, “Endmember Options” on page 499
and “Managing Endmember Spectra” on page 502).

ENVI User’s Guide Spectral Libraries


626 Chapter 9: Spectral Tools

Outputting 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 in the Spectral Library Builder dialog.
• To create an ENVI spectral library either as an output file or in memory, select
File > Save Spectra As > Spectral Library.

Figure 9-4: A Plot of all Endmember Spectra.

Spectral Libraries ENVI User’s Guide


Chapter 9: Spectral Tools 627

Spectral Slices
Use Spectral Slices to extract a combined spatial/spectral profile from a multiband
image. Slices in ENVI are saved as grayscale images, with the line direction (Y)
corresponding to the spatial dimension of the image being sliced (“horizontal,”
“vertical,” or “arbitrary”), the sample direction (X) corresponding to the spectral
dimension (the number of bands in the sliced image), and the grayscale (DN level)
showing the spectral intensity (reflectance, radiance, etc.) depending on the
calibration of the data.
You can slice images in either the horizontal direction (all of the bands for a single
line of the image), along the vertical direction (all of the bands for a singe pixel
column of the image), or in an arbitrary direction that you define using ROI polyline
selection (see “Drawing ROIs” on page 263). The resulting slice is an ENVI image
with the number of samples equal to the number of spectral bands and the number of
lines equal to the number of samples (for a horizontal slice), number of lines (for a
vertical slice), or total number of pixels along the ROI polyline (for an arbitrary
slice).

Figure 9-5: A Vertical Spectral Slice.

ENVI User’s Guide Spectral Slices


628 Chapter 9: Spectral Tools

Extracting Horizontal Slices


Use Horizontal Slice to show the spectral response (all bands) for all of the pixels in a
line of the input image data. The position for the slice can be pre-determined using
the Cursor Location/Value function in the image window (see “Viewing Cursor
Location and Value” on page 393).
1. Select Spectral > Spectral Slices > Horizontal Slice.
2. When the Spectral Slice Input File dialog appears, select an input file and any
spectral subsetting.
3. When the Spectral Slice Parameters dialog appears, enter the line number for
the horizontal slice in the “Line” text box.
4. Select either “File” or “Memory” output.
5. After all of the parameters have been entered, click “OK” to continue.
The horizontal spectral slice image is added to the Available Bands List and can be
viewed and processed using standard ENVI functions.

Extracting Vertical Slices


Use Vertical Slice to show the spectral response (all bands) for a single column of
input image data. The position for the slice can be pre-determined using the Cursor
Location/Value function in the image window (see “Viewing Cursor Location and
Value” on page 393).
1. Select Spectral > Spectral Slice > Vertical Slice.
2. When the Spectral Slice Input File dialog appears, select an input file and any
spectral subsetting.
3. When the Spectral Slice Parameters dialog appears, enter the sample number
for the vertical slice in the “Sample” text box.
4. Select either “File” or “Memory” output.
5. After all of the parameters have been entered, click “OK” to continue.
The vertical spectral slice image is added to the Available Bands List and can be
viewed and processed using standard ENVI functions.

Extracting Arbitrary Slices


Use Arbitrary Slice to show the spectral response (all bands) for a user-defined
region of interest (ROI). ROIs must be defined using ENVI’s standard ROI selection

Spectral Slices ENVI User’s Guide


Chapter 9: Spectral Tools 629

procedures prior to executing the arbitrary slice function. Typically, the arbitrary
slice is defined using the “Polyline” option for defining ROIs (see “Drawing
Polylines” on page 265), however, polygons or points can also be used. All the pixels
included in the ROI are used to make the spectral slice.
1. Select Spectral > Spectral Slice > Arbitrary Slice.
2. When the Spectral Slice Input File dialog appears, select an input file and any
spectral subsetting.
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 be used for the slice by
clicking on the name of the desired region in the “Select Region for Spectral
Slice” list.
3. Select either “File” or “Memory” output.
4. Once all of the parameters have been entered, click “OK” to continue.
The arbitrary spectral slice image is added to the Available Bands List and can be
viewed and processed using standard ENVI functions.

ENVI User’s Guide Spectral Slices


630 Chapter 9: Spectral Tools

MNF Rotations
Use the MNF Rotation (minimum noise fraction) transforms to determine the
inherent dimensionality of image data, to segregate noise in the data, and to reduce
the computational requirements for subsequent processing. For a detailed explanation
and instructions, see “Minimum Noise Fraction Transform” on page 563.

MNF Rotations ENVI User’s Guide


Chapter 9: Spectral Tools 631

Pixel Purity Index


Use Pixel Purity IndexTM (PPITM) to find the most “spectrally pure” (extreme) pixels in
multispectral and hyperspectral images. The most spectrally pure pixels typically
correspond to mixing endmembers. The Pixel Purity Index is computed by repeatedly
projecting n-dimensional scatterplots onto a random unit vector. The extreme pixels
in each projection—those pixels that fall onto the ends of the unit vector—are
recorded and the total number of times each pixel is marked as extreme is noted. A
“Pixel Purity Image” is created in which the DN of each pixel corresponds to the
number of times that pixel was recorded as extreme. See “Spectral Tools References”
on page 694 for more details. For examples on using the PPI results, see the
Advanced Hyperspectral Analysis ENVI Tutorial.
The Pixel Purity Index 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 a Minimum Noise Fraction (MNF) transform result excluding the noise bands
(see “Minimum Noise Fraction Transform” on page 563). The results of the PPI are
usually used as input into ENVI’s n-D Visualizer (see “The n-Dimensional
Visualizer” on page 636).
Note
You can use ENVI’s Spectral Mapping Wizard to guide you step-by-step through
the ENVI “hourglass” processing flow, including the Pixel Purity Index, to find and
map image spectral endmembers from hyperspectral or multispectral data. For
details, see “Spectral Mapping Wizard” on page 664.

FAST Pixel Purity Index


You have the choice of a disk-based PPI method and a FAST PPI method. The FAST
PPI 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
space. Use spatial and spectral subsetting or a sparser array of the data (subsampled
resolution) to help 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 options of creating a new output file and of
adding to an existing output band.

Selecting Input Files


Use New Output Band the first time you run the Pixel Purity Index. An output band
containing the number of times each pixel was found to be extreme (pure) is created

ENVI User’s Guide Pixel Purity Index


632 Chapter 9: Spectral Tools

and used as input into ENVI’s n-D visualizer (see “The n-Dimensional Visualizer”
on page 636).
1. Select Spectral > Pixel Purity Index > New Output Band or [FAST] New
Output Band.
2. When the Pixel Purity Index Input File dialog appears, select an input file and
any subsetting using standard ENVI procedures.
Tip
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 564).

3. Click “OK” to continue.


The Pixel Purity Index Parameters dialog appears.

Figure 9-6: The Pixel Purity Index Parameters Dialog.

Pixel Purity Index ENVI User’s Guide


Chapter 9: Spectral Tools 633

Setting the Number of Iterations


• In the Pixel Purity Index Parameters dialog, designate the number of times the
data will be projected onto the random vector by entering a number into the
“Number of Iterations” text box.
Note
The maximum number of iterations you can enter is 32,767.

The more iterations run, the better job ENVI does 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
number of iterations run is listed in the description line of the image header
file.

Setting the Threshold Factor


• In the “Threshold Factor” text box, enter a threshold value in data units for
extreme pixel selection.
For example, a threshold of “2” marks all pixels greater than two digital
numbers (DN) from the extreme pixels (both high and low) as being extreme.
This threshold selects the pixels on the ends of the projected vector. The
threshold should be approximately 2-3 times the noise level in the data. For
example, for TM data, which typically has less than 1 DN noise, a threshold of
2 or 3 works well. When using MNF data, which normalizes the noise, a DN is
equivalent to 1 standard deviation and, again, 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
• To subsample the data to help it fit in memory, enter a X and Y resize factor
less than 1 (i.e. a resize factor of .5 will use every other pixel).
It is not recommended to subsample by less than .25 (every fourth pixel)
because extreme pixels may be thrown out.
Starting the Processing
1. In the Pixel Purity Index Parameters dialog, select “File” or “Memory” output.
2. Click “OK” to start the processing.

ENVI User’s Guide Pixel Purity Index


634 Chapter 9: Spectral Tools

• To interrupt PPI processing, click “Cancel” in the processing status


window.
• To restart at the same place, select Spectral > Pixel Purity Index > Existing
Output Band as described in “Restarting or Continuing PPI” on page 634.
If you are using the FAST PPI, a window indicating the amount of memory needed
appears and prompts you to continue if that amount of memory is acceptable.
A processing status window appears with the Pixel Purity Index 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 have been found.

Figure 9-7: The 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. 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.”

Pixel Purity Index ENVI User’s Guide


Chapter 9: Spectral Tools 635

4. When the Pixel Purity Index Previous Result dialog appears, select a previous
PPI image as the input file and click “OK.”
5. When the Pixel Purity Index Parameters dialog appears, select the number of
iterations and threshold as described in the previous sections.
• For FAST PPI, enter a X and Y Resize Factor if desired.
6. Click “OK” to start the processing.
A processing status window and the Pixel Purity Index plot appear. The PPI image
appears in the Available Bands List when the processing is completed.

Using PPI Images for Endmember Selection


After the PPI is processed, the PPI image appears in the Available Bands List:
1. Display the image using standardized ENVI display procedures.
Brighter pixels represent more spectrally extreme “hits” and indicate pixels
that are more spectrally pure. Darker pixels are less spectrally pure.
2. Select Window > Cursor Location/Value on the ENVI main menu or Tools >
Cursor Location/Value from the Display menu to determine the range of
values present in the image.
Tip
Use Interactive density slicing to get a better visual representation of the
high values.

3. In the image window, select Overlay > Region of Interest > Image
Threshold to ROI to create an ROI containing only the pixels with high PPI
values (see “Converting Band Values to ROIs” on page 279)
Typically, use a minimum threshold. For example, a minimum of 10 will include all
of those pixels with PPI values greater than 10 in the ROI. However, if bad data
points exist in the PPI image, both a minimum and maximum threshold can be used.
Once an ROI has been created containing the high PPI values, you can use the n-
Dimensional Visualizer (see the following section) to interactively define the image
endmembers.

ENVI User’s Guide Pixel Purity Index


636 Chapter 9: Spectral Tools

The n-Dimensional Visualizer


Use n-D VisualizerTM in conjunction with the Minimum Noise Fraction Transform
(MNF) and Pixel Purity Index (PPI) tools to locate, identify, and cluster the purest
pixels and most extreme spectral responses in a data set (see “Spectral Tools
References” on page 694 for more details). 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 284). The n-
Dimensional VisualizerTM is an interactive tool to use for selecting the endmembers in
n-space. Spectra can be thought of as points in an n-dimensional scatterplot, where n
is the number of bands. The coordinates of the points in n-space consist of “n” values
that are simply the spectral radiance or reflectance values in each band for a given
pixel. The distribution of these points in n-space can be used to estimate the number
of spectral endmembers and their pure spectral signatures. See the Advanced
Hyperspectral Analysis ENVI Tutorial for examples on using the n-D Visualizer. 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-Dimensional 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. The selected classes can be exported to Regions of Interest
(ROIs) and used as input into classification, unmixing or matched filtering
techniques.
Note
You can use ENVI’s Spectral Mapping Wizard to guide you step-by-step through
the ENVI “hourglass” processing flow, including the n-D Visualizer, to find and
map image spectral endmembers from hyperspectral or multispectral data. For
details, see “Spectral Mapping Wizard” on page 664.

Starting the n-D Visualizer


The n-Dimensional Visualizer is usually used with Minimum Noise Fraction (MNF)
data that have been spatially subset using only the purest pixels determined from the
Pixel Purity Index.
1. 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 648).

The n-Dimensional Visualizer ENVI User’s Guide


Chapter 9: Spectral Tools 637

The n-D Visualizer Input File dialog appears.


2. Select the file to extract the n-dimensional scatter plots from (usually this
would be an MNF file).
• If the input file is an MNF result, spectrally subset the MNF data to
exclude noise bands as determined by reviewing the eigenimages and
eigenvalue plot (see “Minimum Noise Fraction Transform” on page 563).
3. Click “OK” to open the file and start the function.
For speed and clarity, an ROI is used to limit the number of pixels that are
input into the n-D Visualizer. It is recommended that the ROI is computed as a
threshold from the PPI results (see “Using PPI Images for Endmember
Selection” on page 635). If only one ROI is present for the input image, it is
automatically used as input to the n-D Visualizer. If, however, more than one
ROI is present, the n-D Visualizer Input ROI dialog appears.
4. Click on the ROI to be used in the n-Dimensional Visualizer.
A status box appears while the ROI is loaded. After the ROI is loaded, the n-D
Controls dialog appears with the n-D Visualizer plot window.

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 that are shown as colored points in the
data cloud. The pre-clustering operation attempts to find the corners of the data cloud
in n-dimensions 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, the results of the pre-clustering should be seen as a
starting point for interactive validation, editing and modification. Rotate the data

ENVI User’s Guide The n-Dimensional Visualizer


638 Chapter 9: Spectral Tools

cloud in the n-D Visualizer and modify the endmembers, as needed, using the tools
described in “The n-Dimensional Visualizer” on page 636.
Warning
The pre-clustering result is only a “first cut” attempt at selecting endmembers. You
should examine the data cloud and modify the endmember selections as needed.

1. From the ENVI main menu, select Spectral > n-Dimensional Visualizer >
Precluster from MNF/PPI.
2. In the input file selection dialog, select the MNF input file.
3. In the next input file selection dialog, select the PPI input file.
4. In the n-D Precluster Parameters dialog, enter the maximum number of input
pixels to use in the n-D Visualizer.
Smaller numbers animate in the n-D Visualizer faster and show only the purest
pixels; larger numbers give a better overall picture of the scatter plot, but
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 plot window and Controls dialog appear. The precluster
results are shown as colored pixels in the n-D Visualizer plot window.
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-Dimensional scatterplot of data
selected for visualization (Figure 9-8). It is a projection of the n-D data onto a 2-D
plane.
• The n-D Visualizer can contain data (plotted as white pixels), axes, and color-
coded classes, depending on the options selected in the n-D Controls dialog
below.
• Individual pixels and groups of pixels can be highlighted and grouped into a
region of interest using standardized ENVI polygon drawing routines.
• Once the bands to plot are selected (see below), click in the window using the
left mouse button to start the polygon, click using the left mouse button on
each vertex of the polygon, and click the right mouse button to close the
polygon.

The n-Dimensional Visualizer ENVI User’s Guide


Chapter 9: Spectral Tools 639

• The scatter plot can be rotated in “n” dimensions to isolate specific groups of
pixels.

General n-D Controls Dialog Functions


After the ROI thresholded from the PPI image has been loaded, the n-D Controls
dialog appears with the n-D Visualizer. The n-D Controls dialog contains
representations of all of the bands that were selected during the file selection. The
bands are represented by numbered boxes which initially appear black.

Figure 9-8: The n-D Controls dialog (right) and the n-D Visualizer (left).

• Clicking on an individual box (band number) turns it white and toggles on


display of the corresponding band pixel data in the n-D Visualizer as part of an
n-dimensional scatterplot (at least 2 bands must be selected to view a
scatterplot).
• Clicking again on the same box (band number) turns the box black again and
toggles off the band data in the n-D scatterplot.
• Selecting two bands (by clicking on the associated numbered box) produces a
2-D scatterplot; clicking on three bands produces a 3-D scatterplot, etc.
Any number combination of bands may be selected at once.

ENVI User’s Guide The n-Dimensional Visualizer


640 Chapter 9: Spectral Tools

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.
1. In the n-D Controls dialog, select bands (dimensions) for projection in the n-D
Visualizer.
Note
If you select only two dimensions, rotation is not possible.

If you select three dimensions, you have the option of “driving” the axes, or
initiating automatic rotation.

If you select more than three dimensions, only automatic random rotation is
available.

2. Select from the following options:


• To drive the axes, select Options > 3D:Drive Axes. Click and drag in the n-D
Visualizer window to manually spin the axes of the 3-D scatterplot.
• To display the axes themselves, select Options > Axes:On.
• To start or stop the rotation, click “Start” or “Stop.”
• To control the rotation speed, enter a value in the “Speed” text box, or use the
arrow increment buttons to increase or decrease the speed. Higher values cause
faster rotation with fewer steps between views.
The information in the “View” status box 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 the “<-” button to go
backward and the “->” button to go forward.
• To display a new random projection view, click the “New” button.
N-D Visualizer Shortcut Menu
Many options in the n-D Visualizer can also be accessed by right-clicking in the
scatter plot and selecting from the shortcut menu that appears.

The n-Dimensional Visualizer ENVI User’s Guide


Chapter 9: Spectral Tools 641

Defining Classes
Typically, classes are defined where groups of pixels stay together during rotation
and are separated from the rest of the pixels. Multiple classes can be defined at once.
Use the Z-Profile option to aid in defining classes (see “N-D Visualizer/Controls
Options” on page 644).
1. Click the “Stop” button to stop the rotation when a group of pixels is isolated
from the main body of pixels that are 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 using standardized ENVI
polygon selection procedures (left button to set a vertex, right mouse button to
close the polygon).
• If a 3-D projection is selected, be sure to select Options > 3D: ROI
Definition.
3. From the “Class” menu, select a color for the class.
• To automatically use the next available class color for the next ROI, select
Class > New.
4. Click the “Start” button to rotate the scatterplot 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 number of
points in each defined class and the class color are listed in the dialog. You can
change the symbol used, turn individual classes on and off, and select classes to use
when collapsing classes. You can also plot the minimum, maximum, mean, and
standard deviation spectra for a class, plot the mean for a class alone, and /or plot all
the spectra within a class. Also, you can clear a class and export a class to an ROI.
1. In the n-D Controls dialog, 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 text boxes next to the colored squares.
Turning Classes On/Off
• To turn a class off in the n-D Visualizer window, click the “On” check box for
that class. Click again to turn it back on.

ENVI User’s Guide The n-Dimensional Visualizer


642 Chapter 9: Spectral Tools

• To turn all but one of the classes off in the n-D Visualizer window, double-
click on the colored box of 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 on the colored square
corresponding to that class.
The color appears next to the “Active Class” label and any functions executed
from the Class Controls dialog affect only that class.
Note
A class may be selected as the active class even though it is not turned on in the n-D
Visualizer.

Changing Plot Symbols


• To change the plot symbol for the active class, select the desired symbol from
the “Symbol” button menu.
Producing Spectral Plots
To produce spectral plots for the active class:
1. Click the “Stats,” “Mean,” or “Plot” buttons.
2. When the file selection dialog appears, select the input file that you want to
calculate the spectra from.
• 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 the “Clear” button.
Exporting Classes
• To export the points to an ROI, click “Export.”

The n-Dimensional Visualizer ENVI User’s Guide


Chapter 9: Spectral Tools 643

Designating Classes for Collapsing


• To include the statistics from a class when calculating the projection used to
collapse the data, click in the “Clp” check box next to that class name.
If you are in a collapsed state, the data will be recollapsed using the selected classes
when you click in any of the “Clp” check boxes (see “Collapsing Classes”).

Collapsing Classes
In the n-D Visualizer use Collapse Classes by Means and Collapse Classes by
Variance to make class definition easier when the dimensionality of a data set is
higher than four or five. With more than four or five dimensions, it is often difficult
to interactively identify and define many classes. Both collapsing methods involve an
iterative collapsing of the data cloud based on the classes defined. To collapse the
data, a projection is calculated (based either on class means or covariance) to
minimize or hide the space spanned by the already defined classes and to maximize
or enhance the remaining variation in the data set. The data are subjected to this
special projection and replace the original data in the n-D Visualizer. Additionally, an
eigenvalue plot is displayed showing the residual spectral dimension of the collapsed
data. The collapsed classes should form a tight cluster so the remaining pixels can be
more readily examined. The dimensionality of the data, shown by the eigenvalue
plot, should drop with each collapse.
1. Select Options > Collapse Classes by Means or Collapse Classes by Variance
(see the descriptions in the following sections).
An eigenvalue plot is displayed, showing the remaining dimensionality of the
data and suggesting the number of remaining classes to be defined. The “n-D
Selected Bands” widget changes color to red to indicate that collapsed data is
being displayed in the n-D Visualizer.
2. Use the low number bands to rotate and to select additional classes.
3. Select Options > Collapse Classes by Means or Collapse Classes by Variance
again to collapses all of the defined classes.
4. Repeat these steps until all of the desired classes have been selected.
Note
The data can be “Uncollapsed” to the original data at any time.

About Collapsing Classes by Means


You must have at least two classes defined before using this collapsing method. The
space spanned by the spectral mean of each class is derived through a modified

ENVI User’s Guide The n-Dimensional Visualizer


644 Chapter 9: Spectral Tools

Gramm-Schmidt process. The complementary, or null, space is also calculated. The


data set is projected onto the null space, exactly collapsing the class means to an
identical point. 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 that need to be defined.
About Collapsing Classes by Variance
The band-by-band covariance matrix of the defined classes is calculated and the
eigenvectors and eigenvalues computed. The full set of data 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 a standard deviation of one. 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 that need to be defined.
UnCollapsing Classes
• To uncollapse the data and return to the original data set, select Options >
UnCollapse.
All the defined classes are shown in the n-D Visualizer plot window and the “n-D
Selected Bands” widget returns to a white color.

n-D Visualizer/Controls Options


Use the Options menu in the n-D Controls dialog to access the n-D Class Controls
dialog, annotate the n-D visualizer, start a Z-profile plot window, import library
spectra, collapse classes, clear classes, export classes to ROIs, calculate mean
spectra, and turn the axes graphics on and off.

Opening the Class Controls Dialog


• To access the n-D Class Controls dialog, select Options > Class Controls (for
details, see “Interacting with Classes” on page 641).

The n-Dimensional Visualizer ENVI User’s Guide


Chapter 9: Spectral Tools 645

Adding Annotation
• To add an annotation to the n-D visualizer window, select Options > Annotate
Plot.
Note
You cannot add borders to the n-D Visualizer window (see “Annotating Images” on
page 222 for details).

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.
2. When the file selection dialog appears, 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 of 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.
3. Select from the following options:
• To plot the Z profile for the point nearest the cursor, click the middle
mouse button in the n-D plot window.
• To add plots to the Z profile plot window in the n-D Visualizer plot
window, click the right mouse button in the n-D 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.
Importing Spectra
To import spectra from other sources such as spectral libraries:
1. Select Options > Import Library Spectra.
The input spectra must be in the same space as the n-D input data (i.e., MNF
space).

ENVI User’s Guide The n-Dimensional Visualizer


646 Chapter 9: Spectral Tools

Tip
To convert the spectra to MNF, use the Transforms > MNF Rotation > Apply
Forward MNF to Spectra function and use the statistics you saved when you ran the
MNF on the original data (see “Minimum Noise Fraction Transform” on page 563).

2. When the n-D Visualizer Import Spectra dialog appears, drag spectra into the
black draw widget or import spectra from a Spectral Library, ROI, or ASCII
file using the Import menu. For detailed instructions, see “Collecting
Endmember Spectra” on page 495 for details.
3. Click “Apply.”
4. When the Import Spectra Parameters dialog appears, select from the following
options to set the spectra parameters.
• To edit a spectrum name, click on the spectrum and make any changes in
the “Name” text box.
• To edit the spectrum color, click on the name and select a color from the
“Color” button menu.
• To plot the spectrum in the n-D Visualizer plot window, click in the
“Show Spectrum” check box.
5. Click “OK.”
The spectra appear in the n-D Visualizer plot window as stars with the name
labels next to them. 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.
2. Select the spectra to delete and 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.
2. In the Import Spectra Parameters dialog, select the spectra to edit by clicking
on the names.

The n-Dimensional Visualizer ENVI User’s Guide


Chapter 9: Spectral Tools 647

3. Edit the color, change the names, and turn the “Show Spectrum” check box on
or off for the individual spectra and click “OK.”

Plotting Mean Spectra


• To plot a mean spectrum for the current class, select Options > Mean Class.
A file selection dialog appears to select the file to use when calculating the
mean. Typically, this file is the reflectance data.
• To plot the mean spectra for all the defined classes, select Options > Mean All.
A dialog for selecting the reflectance file appears.
If a Z profile window is active (see “Plotting Z Profiles” on page 645), 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, select Options >
Clear Class.
The currently selected class is defined by the selected color under the class
menu items in the n-D Controls dialog.
• To clear all of the classes from the n-D Visualizer, select Options > Clear All.
Exporting Classes to ROIs
After you have defined all desired classes, you can export their image pixel locations
to Regions of Interest (ROIs). These ROIs can then be used as input for
classifications, unmixing, matched filtering, or other techniques.
• To export the current class to a ROI, select Options > Export Class.
• To export all of the classes defined in the n-D Visualizer to ROIs, select
Options > Export All.
A Region of Interest (ROI) is created to match the spatial location of the
corresponding image pixels. These can be used with the original reflectance image
for extraction of endmembers and classification.

Turning Axes On/Off


• To turn the axes on or off in the n-D Visualizer, select Options > Axes:On or
Axes:Off.

ENVI User’s Guide The n-Dimensional Visualizer


648 Chapter 9: Spectral Tools

Warning
ENVI does not keep track of which classes have already been exported to ROIs. If a
selected class is exported more than once, multiple (identical) ROIs will be created.

Changing Mouse Functions


• To change the active mouse function in the n-D Visualizer when rotating in 3-
dimensions, select Options > 3D:ROI Definition or 3D:Drive Axes.

Managing n-D Visualizer States


Use the File menu in the n-D Controls dialog to save and restore the state of the n-D
Visualizer, including the highlighted groups of pixels.

Outputting the n-D Visualizer


• To export the n-D Visualizer display to postscript or to an image, select File >
Save Plot As > Postscript or Image.
• To print the n-D Visualizer window, select File > Print (see “Printing” on
page 405 for details).

Saving States
• To save the n-D Visualizer state, select File > Save State 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.

Closing the Dialog


• To exit the n-D Visualizer, select File > Cancel.

The n-Dimensional Visualizer ENVI User’s Guide


Chapter 9: Spectral Tools 649

Mapping Methods
ENVI has many spectral mapping methods which include binary encoding, spectral
angle mapping, linear band prediction (LS-Fit), linear spectral unmixing, matched
filtering, mixture tuned matched filtering, continuum removal, and spectral feature
fitting.

Using Binary Encoding


The binary encoding classification technique encodes the data and endmember
spectra into 0s and 1s based on whether a band falls below or above the spectrum
mean. An exclusive OR function is used to compare each encoded reference
spectrum with the encoded data spectra and a classification image produced. 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.
• Start the Binary Encoding classification by choosing Spectral > Mapping
Methods > Binary Encoding. For details about the classification dialogs,
see “Applying Binary Encoding Classification” on page 513.

Spectral Angle Mapper Classification


Use Spectral Angle Mapper (SAM) to match image spectra to reference spectra in n-
dimensions using a physically-based spectral classification method. The reference
endmember spectra used by SAM can come from ASCII files, spectral libraries,
statistics files, or can be extracted directly from the image (as ROI average spectra).
SAM compares the angle between the endmember spectrum (considered as a 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. This technique, when used on calibrated data, is relatively insensitive to
illumination and albedo effects.
• Start the SAM classification by choosing Spectral > Mapping Methods >
Spectral Angle Mapper. For details about the classification dialogs, see
“Applying Spectral Angle Mapper Classification” on page 511.

ENVI User’s Guide Mapping Methods


650 Chapter 9: Spectral Tools

Using LS-Fit (Linear Band Prediction)


LS-Fit performs a linear band prediction using a least squares fitting technique. It can
be used to find regions of anomalous spectral response in a data set. 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 not
predicted (i.e. an absorption band). The modeled band image is also included in the
output. The predicted band can be calculated using existing statistics or from new
statistics.

Predicting from New Statistics


To predict a band using new statistics:
1. Select Spectral > Mapping Methods > LS-Fit (Linear Band Prediction) >
Predict with new Statistics.
2. Select the input file and perform any subsetting.
The LS-Fit Parameters dialog appears.
3. Select the bands to be used as predictor bands by clicking on the desired band
names.
4. Select the band to be predicted by clicking on the band name in the “Select the
Model Band” list.
If this band was selected as a predictor band, it will be deselected.
5. To subsample the data when calculating the statistics, enter a resize factor less
than one in the “Stats X/Y Resize Factor” text boxes.
• Enter an output statistics filename, if desired.
6. Select output to “Memory” or “File.”
The output contains two bands, the modeled band and the residual image. The actual
band and modeled band can be compared using dynamic overlays (see “Working
with Multiple Dynamic Overlays” on page 334). Pixels in the residual image with
large values, both positive and negative, show where the actual and modeled bands
differ. These resulting bands appear in the Available Bands List when the function is
completed.

Mapping Methods ENVI User’s Guide


Chapter 9: Spectral Tools 651

Predicting from Existing Statistics


Use Predict from Existing Stats to use an existing statistics file for band prediction.
Only the bands with covariance values in the statistics file can be selected as
predictor or model bands.
1. Select Spectral > Mapping Methods > LS-Fit (Linear Band Prediction) >
Predict from Existing Stats.
2. Select the input file and perform any spatial subsetting.
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 to be selected as predictor or model bands.
4. Select the bands to be used as predictor bands by clicking on the desired band
names.
5. Select the band to be predicted by clicking on the desired band name in the
“Select the Model Band” list.
If this band was selected as a predictor band, it will be deselected.
6. Select output to “Memory” or “File.”
The output contains two bands, the modeled band and the residual image. The actual
band and modeled band can be compared using dynamic overlays (see “Working
with Multiple Dynamic Overlays” on page 334). Pixels in the residual image with
large values, both positive and negative, show where the actual and modeled bands
differ. These resulting bands appear in the Available Bands List when the function is
completed.

Using Linear Spectral Unmixing


Use Linear Spectral Unmixing to determine the relative abundances of materials that
are depicted in multispectral 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, the linear unmixing is solving 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

ENVI User’s Guide Mapping Methods


652 Chapter 9: Spectral Tools

endmembers and changing the endmembers changes the results. For additional
information, see “Spectral Tools References” on page 694 and “Spectral Unmixing
Results” on page 653.
ENVI 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 was implemented to allow for user-defined weighting of a sum-to-
unity constraint on the abundance fractions. It also permits proper unmixing of MNF-
transform data, with zero-mean bands. The user picks a weight factor, default value
of one, 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, make the weight
many times the spectral variance of the data.
Note
If not all endmembers are known or if you only want to map a few endmembers, use
Matched Filtering or Mixture Tuned Matched Filtering (see “Using Matched
Filtering” on page 655 and “Using Mixture Tuned Matched Filtering” on
page 657).

1. Select Spectral > Mapping Methods > Linear Spectral Unmixing.


2. When the Unmixing Input File dialog appears, select an input file and any
subsetting or masking.
3. Click “OK” to continue.
The Unmixing Endmember Collection dialog appears (Figure 9-9).
Use the dialog (Figure 9-9) to 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 detailed instructions, see “Using the Drag-and-Drop Window” on page 495,
“Importing Endmember Spectra” on page 496, “Endmember Options” on page 499
and “Managing Endmember Spectra” on page 502).

Mapping Methods ENVI User’s Guide


Chapter 9: Spectral Tools 653

Drag-and-Drop
Window

Figure 9-9: The Unmixing Endmember Collection Dialog.

4. When all of the desired endmembers have been collected, click “Apply” at the
bottom of the Endmember Collection:Unmixing dialog.
The Unmixing Parameters dialog appears.
5. If you want to apply a unit sum constraint in the unmixing, use the arrow
toggle button to select “Yes.”
• If you select “Yes,” enter a weight in the appropriate text box.
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 either output to “Memory” or “File.”
7. Click “OK” to begin the spectral unmixing.
A processing status window appears.
Spectral Unmixing Results
The results of spectral unmixing appear as a series of gray-scale images, one for each
endmember, plus a root-mean-square (RMS) error image. Higher abundances (and

ENVI User’s Guide Mapping Methods


654 Chapter 9: Spectral Tools

higher errors for the RMS error image) are represented by brighter pixels (larger
floating-point numbers). For example, in Figure 9-10, the brighter pixels represent
high abundances of cultivated vegetation unmixed from the other components using
an ROI spectrum and the linear spectral unmixing technique. The unmixing results
should have a data range (representing endmember abundance) from 0-1. However,
negative values and values greater than one are possible. Infeasible abundances
indicate erroneous endmembers. The results are dependent on the input endmembers
and will change if the endmembers are changed. View the RMS error image to help
determine areas of missing or incorrect endmembers.

Figure 9-10: Image Resulting from Linear Spectral Unmixing.

Mapping Methods ENVI User’s Guide


Chapter 9: Spectral Tools 655

Using Matched Filtering


Use Matched Filtering to find the abundances of user-defined endmembers using a
partial unmixing. Not all of the endmembers in the image need to be known. 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 694 and “Matched
Filtering Results” on page 656 for additional information.
Tip
Mixture Tuned Matched Filtering can be used to reduce the number of false
positives found.

1. Select Spectral > Mapping Methods > Matched Filtering.


2. When the Matched Filter Input File selection dialog appears, select the input
file and any spatial subsetting, spectral subsetting or masking.
3. Click “OK.”
The Endmember Collection: Matched Filter dialog appears.
4. Import spectra to be matched.
For detailed instructions, see “Using the Drag-and-Drop Window” on
page 495, “Importing Endmember Spectra” on page 496, “Endmember
Options” on page 499 and “Managing Endmember Spectra” on page 502).
5. When all desired spectra are selected, click “Apply.”
The Matched Filter Parameters dialog appears.
6. Use the arrow toggle button to select “Compute New Covariance Stats” and
enter an output statistics filename or toggle to “Use Existing Stats File.”
7. Choose output to “Memory” or “File.”

ENVI User’s Guide Mapping Methods


656 Chapter 9: Spectral Tools

8. From the “Output Data Type” menu, select an output data type: floating point
or byte.
• If you select “Byte,” enter a minimum and maximum data value to stretch
to.
9. Click “OK” to start the processing.
• If you selected “Use Existing Stats File,” select the statistics file that
corresponds to the input data file when the file selection dialog appears.
Note
This statistics file must contain both the mean and covariance statistics for the
input data.

A processing status window appears.

Matched Filtering Results


The results of the matched filtering appear as a series of gray-scale images, one for
each selected endmember. Floating point results provide a means of estimating
relative degree of match to the reference spectrum and approximate sub-pixel
abundance, where 1.0 is a perfect match.
• When the results are loaded into a display image you should stretch the image
(see “Using Interactive Stretching” on page 321).
Note
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 9-
11). Therefore, the data in the upper tail of the histogram should be stretched
over the range 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.

Mapping Methods ENVI User’s Guide


Chapter 9: Spectral Tools 657

Tip
To set a default stretch range so that the data does not have to be stretched each time
it is displayed, see “Editing ENVI Headers” on page 99.

Figure 9-11: Histogram of a Matched Filter result.

Using Mixture Tuned Matched Filtering


Use Mixture Tuned Matched Filtering TM (MTMFTM) to perform matched filtering that
also adds an output “Infeasibility” image to the results. The infeasibility image is
used to reduce the number of “false positives” that are sometimes found when using
matched filtering. Pixels with a high infeasibility are likely to be matched filter false
positives. Correctly mapped pixels will have a matched filter score above the
background distribution around zero and a low infeasibility value. The
infeasibility values are in noise sigma units which vary in DN scale with matched
filter score (see Figure 9-12). For additional information, see “Mixture Tuned
Matched Filtering Results” on page 659.
Note
The Mixture Tuned Matched Filter requires a minimum noise fraction (MNF)
transformed input file, or other data with isotropic, unit variance noise (see
“Applying Forward MNFs to Spectra” on page 572). You can use ENVI’s Spectral
Mapping Wizard to guide you step-by-step through the ENVI “hourglass”
processing flow, including MNF Transforms and MTMF, to find and map image
spectral endmembers from hyperspectral or multispectral data. For details, see
“Spectral Mapping Wizard” on page 664.

ENVI User’s Guide Mapping Methods


658 Chapter 9: Spectral Tools

Figure 9-12: Diagram showing Mixture Tuned Matched Filtering technique.

1. Select Spectral > Mapping Methods > Mixture Tuned Matched Filtering.
2. When the Mixture Tuned Matched Filter Input File selection dialog appears,
select the input MNF file and any spatial or spectral subsetting.
3. Click “OK.”
The Endmember Collection:Mixture Tuned Matched Filter dialog appears.
4. Import spectra (in MNF space) to be matched.
For detailed instructions, see “Using the Drag-and-Drop Window” on
page 495, “Importing Endmember Spectra” on page 496, “Endmember
Options” on page 499 and “Managing Endmember Spectra” on page 502).
The spectra must be in the MNF space. They can be calculated from ROIs
found in the MNF input file or transformed into MNF space (see “Applying
Forward MNFs to Spectra” on page 572).

Mapping Methods ENVI User’s Guide


Chapter 9: Spectral Tools 659

Warning
The input spectra must be pure and spectrally extreme endmembers for the mixture
tuned matched filtering to be interpretable. These types of endmembers can be
found using ENVI’s PPI and n-D Visualizer (see the ENVI Advanced
Hyperspectral Analysis Tutorial).

5. When all the desired spectra are selected, click “Apply.”


The Mixture Tuned Matched Filter Parameters dialog appears.
6. Use the arrow toggle button to select “Compute New Covariance Stats” or
toggle to “Use Existing Stats File.”
7. Choose output to “Memory” or “File.”
8. From the “Output Data Type” menu, select an output data type: floating point
or byte.
• If you select “Byte,” enter a minimum and maximum data value to stretch
to.
9. Click “OK” to start the processing.
• If you selected “Use Existing Stats File,” select the statistics file that
corresponds to the input MNF data file when the file selection dialog
appears.
A processing status window appears.
Mixture Tuned Matched Filtering Results
The results of the mixture tuned matched filtering appear as a series of gray-scale
images (two for each selected endmember). The matched filtering floating point
results provide a means of estimating 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
matched filter result. Correctly mapped pixels will have a matched filter score above
the background distribution around zero and a low infeasibility value. Pixels with a
high matched filter result and high infeasibility are “false positive” pixels and do not
match the target. You can use 2-d scatter plotting to identify the pixels with low
infeasibilities and high matched filter scores (see “Using 2-D Scatter Plots” on
page 382). Interactive stretching should be used to stretch the upper tail of the
histogram when viewing the matched filter resulting bands to show only pixels
containing the target material (see “Matched Filtering Results” on page 656).

ENVI User’s Guide Mapping Methods


660 Chapter 9: Spectral Tools

Using Continuum Removal


Use Continuum Removal to normalize reflectance spectra to allow comparison of
individual absorption features from a common baseline. The continuum is a convex
hull fit over the top of a spectrum utilizing straight line segments that connect local
spectra maxima. The first and last spectral data values are on the hull and 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. 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. Continuum removal can be performed on data files or on individual
spectra in a plot window. For references, see “Spectral Tools References” on
page 694.
1. Select Spectral > Mapping Methods > Continuum Removal.
2. When the Continuum Removal Input File dialog appears, select the input file
and any spatial subsetting, spectral subsetting, or masking.
Tip
For the best results, spectrally subset around the region containing the absorption
features of interest.

3. Click “OK.”
4. When the Continuum Removal Parameters dialog appears, select output to
“Memory” or “File.”
5. Click “OK” to begin processing.
A processing status window appears. The results are listed in the Available Bands
list.

Mapping Methods ENVI User’s Guide


Chapter 9: Spectral Tools 661

Using Spectral Feature Fitting


Use Spectral Feature FittingTM (SFFTM) to compare the fit of image spectra to
selected 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 continuum removal from both data sets.
A scale image is output for each reference spectrum and is a measure of absorption
feature depth which is related to material abundance. The image and reference
spectra are compared at each selected wavelength in a least-squares sense and the
root mean square (rms) error is determined for each reference spectrum. For more
information, see “Spectral Tools References” on page 694 and “Spectral Feature
Fitting Results” on page 662.
1. Select Spectral > Mapping Methods > Spectral Feature Fitting.
2. When the Spectral Feature Fitting Input File dialog appears, select the
continuum removed input file and any spatial subsetting, spectral subsetting,
or masking.
If the selected input file is not continuum-removed, ENVI removes the
continuum on-the-fly. However, this makes execution of the function
considerably slower.
Tip
For best results, spectrally subset around the region containing the absorption
features of interest.

The Endmember Collection: Feature Fitting dialog appears.


3. Import the reference spectra.
For detailed instructions, see “Using the Drag-and-Drop Window” on
page 495, “Importing Endmember Spectra” on page 496, “Endmember
Options” on page 499 and “Managing Endmember Spectra” on page 502).
4. Click “Apply.”
5. When the Spectral Feature Fitting Parameters dialog appears, use the toggle
arrow button to select “Output separate Scale and RMS Images” or “Output
Combined (Scale/RMS) Image.” For more information, see “Working with
SFF Results” in the following section.
6. Select output to “Memory” or “File.”
A processing status window appears. The resulting output bands are listed in the
Available Bands list.

ENVI User’s Guide Mapping Methods


662 Chapter 9: Spectral Tools

Spectral Feature Fitting Results


A scale image and rms image are output for each reference spectrum or a combined
“fit” (Scale/RMS) image is output for each reference spectrum. The scale image is a
measure of absorption feature depth which is related to material abundance.
Therefore, the brighter pixels in the scale image indicate a better match to the
reference material in those pixels (for areas with 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 root mean square (rms) error is
determined for each reference spectrum. Dark pixels in the rms error image indicate a
low error and combined with the scale image results can be used to locate the areas
that best match the reference spectrum.
Working with SFF Results
• To view areas in the image that best match the reference spectrum, use 2-D
scatterplots to plot the scale versus rms. Draw an ROI over the scatterplot area
that has 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 result image, select Classification >
Rule Classifier on the ENVI main menu to threshold the output images using a
maximum threshold value.

Using Endmember Collection


Use Endmember Collection to collect spectral endmembers from a variety of sources
to use in spectral processing techniques. Endmembers can be imported from ASCII
files, spectral libraries, statistics files, or from ROI means. Endmember Collection
also allows you to select a classification algorithm or an advanced spectral processing
technique from the dialog.
1. Select Spectral > Mapping Methods > Endmember Collection.
2. When the Classification Input File dialog appears, select an input file and any
spatial subsetting, spectral subsetting, and masking.
3. When the Endmember Collection: Algorithm dialog appears, use the Import
pulldown menu to import spectral endmembers.

Mapping Methods ENVI User’s Guide


Chapter 9: Spectral Tools 663

For detailed instructions, see “Using the Drag-and-Drop Window” on page 495,
“Importing Endmember Spectra” on page 496, “Endmember Options” on page 499
and “Managing Endmember Spectra” on page 502.

ENVI User’s Guide Mapping Methods


664 Chapter 9: Spectral Tools

Spectral Mapping Wizard


Use the new Spectral Mapping Wizard to guide you step-by-step through the ENVI
“hourglass” processing flow (see Figure 9-13) to find and map image spectral
endmembers from hyperspectral or multispectral data. The wizard is a unique ENVI
feature in that it displays detailed instructions and useful information for each
function on-screen.

Figure 9-13: End-to-End Hyperspectral “hourglass” processing in ENVI.

The “hourglass” processing flow uses the spectrally over-determined nature of


hyperspectral data to find the most spectrally pure (or spectrally unique) pixels (i.e.
endmembers) within the data set and map their locations and sub-pixel abundances.
This processing flow begins with reflectance or radiance input data and aids you in

Spectral Mapping Wizard ENVI User’s Guide


Chapter 9: Spectral Tools 665

spectrally and spatially subsetting the data. It helps you to visualize the data in n-
dimensions and to cluster the purest pixels into endmembers and optionally allows
you to input user-supplied endmembers. It also allows you to map the distribution
and abundance of the endmembers and aids you in reviewing the mapping results.
Each step in the wizard executes a stand-alone ENVI function and all steps can be
performed using the individual functions separately if desired. Detailed
documentation for the functions used in this wizard can be found in this manual
under each separate function name (i.e. Forward MNF Transform, n-Dimensional
Visualizer, etc.). The name of the function to be executed appears in the top panel of
the screen. Results from specific steps are output to the Available Bands List and can
be viewed using standard ENVI methods. Various plots appear to help assess results
along the way.
The Wizard has individual panels that take you through the following steps, which
are outlined further in Figure 9-14 and explained step-by-step in “Using the Spectral
Mapping Wizard” on page 668.
1. Introduction
2. Input/Output file selection
3. Minimum Noise Transform (MNF)
4. Review of MNF results
5. Data dimensionality determination
6. Derive endmembers from data or select user endmembers
7. Pixel Purity Index (PPI)
8. Examine PPI results
9. n-Dimensional Visualization and endmember selection
10. Option to input user supplied endmembers
11. Mapping with the Spectral Angle Mapper (SAM) and/or Mixture Tuned
Matched Filtering (MTMF)
12. Investigate mapping results
13. Summary report.

ENVI User’s Guide Spectral Mapping Wizard


666 Chapter 9: Spectral Tools

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
and/or MTMF

Investigate Mapping Results

Summary Report

Figure 9-14: The Spectral Mapping Wizard takes you through the these steps.
Each step in the flow chart represents a panel in the wizard.

Spectral Mapping Wizard ENVI User’s Guide


Chapter 9: Spectral Tools 667

Wizard Basics
To successfully use the Spectral Mapping Wizard, familiarize yourself with the basic
functions and concepts as shown in Figure 9-15 and as described following the
figure:

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 9-15: The Spectral Mapping Wizard screen with the Select Input/Output Files
panels displayed.

• Text in the top panel of the Wizard provides background information and
guidance for each step. It is very important that you read this information
before proceeding with each step. Use the vertical and horizontal scroll bars to
view all of the text.

ENVI User’s Guide Spectral Mapping Wizard


668 Chapter 9: Spectral Tools

• Enter and select the parameters for that step using the buttons and text boxes in
the bottom panel.
• Use the “<-Prev” and “Next->” buttons to step through the wizard.
• Each processing step will execute when the “Next->” button is selected.
• If the “Next->” button is not available for selection make sure that all the
necessary parameters have been set.
• Use the “<-Prev” button to go back to a previous step to modify parameters
and to re-execute the process.
• The results of the processing steps appear in the Available Bands List.
• You can examine the results of a function at any time during the wizard
process using standard ENVI display functions.
• Various plots are displayed during processing and can be saved by selecting
File > Save Plot As in the plot window.

Using the Spectral Mapping Wizard


This section provides instructions for using the new Spectral Mapping Wizard.
Warning
The Wizard can guide you through the steps involved in state-of-the-art
hyperspectral processing, but it is no substitute for a firm foundation of remote
sensing knowledge. Without such a foundation, it is possible to produce poor results
despite the power of the algorithms involved.

1. Select Spectral > Spectral Mapping Wizard.


The ENVI Spectral Mapping Wizard window appears, displaying the
Introduction panels.
2. After reading the introduction, click the “Next ->” button.
The Select Input/Output Files panels appears.
3. Select an input file and perform any subsetting using standard ENVI methods.
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 will be “boulder” appended with a function-dependent suffix (e.g.
“boulder.mnf”).
• To change the output root name, click the “Select Output Root Name”
button and enter or choose a different root name.

Spectral Mapping Wizard ENVI User’s Guide


Chapter 9: Spectral Tools 669

4. Click the “Next->” button.


5. In the Forward MNF Transform panels, enter or select the number of output
MNF bands.
Note
It is recommended that you use the default number of bands to preserve full
data dimensionality.

• To use only a subset of a file to calculate noise statistics for the whole file,
click the “Shift Difference Spatial Subset” button.
6. Click the “Next->” button.
The Calculating Forward MNF panels appear and progress windows display
the status of the MNF process.
After the processing is complete, the View MNF Results panels and an
Eigenvalue plot window appear.
7. Choose whether to load the MNF result into an ENVI display as an RGB
image and/or load the MNF result as a grayscale animation.
Refer to the wizard text for descriptions of these two options. For details
about ENVI animation, see “Creating Animations” on page 378.
8. After displaying and analyzing the MNF result, click the “Next->” button in
the wizard.
The Determine Data Dimensionality panels appear.
9. In the Calculate Dimensionality panels, refer to the wizard text for instructions
before clicking the “Calculate Dimensionality” button or changing the “Data
Dimensionality” value.
10. Click the “Calculate Dimensionality” button.
The Spatial Coherence Threshold plot appears.
11. Evaluate the Spatial Coherence Threshold plot.
• To calculate the data dimensionality using a different value, click
“Cancel” in the plot window, enter a new value in the “Data
Dimensionality” text box and click “Calculate Dimensionality.”
12. Click “OK” in the plot window, then click “Next ->” in the wizard.
The Derive or Select Endmember panels appear.

ENVI User’s Guide Spectral Mapping Wizard


670 Chapter 9: Spectral Tools

13. Select from the following options for selecting endmembers to be used in the
classification and unmixing of the image:
• To derive endmembers from the input image, see “Deriving Endmembers
from the Input Image”.
• To manually select endmembers from another source, such as a spectral
library or an ROI, click the arrow button and select “No.” Click “Next ->”
to display the User Supplied Endmember screen, then refer to “Manually
Selecting Endmembers” on page 671 for instructions.
Deriving Endmembers from the Input Image
1. In the Derive or Select Endmember panels, select “Yes” and click “Next ->.”
The Pixel Purity Index panels appear.
2. Refer to the wizard text for information and instructions.
• To change the number of iterations, the threshold value, or your system
memory usage, enter or change the values in the corresponding text boxes.
3. Click the “Next ->” button.
The Calculating Pixel Purity Index panels appear and progress windows
display the status of the operation.
4. Refer to the wizard text for information about how the Pixel Purity Index
calculation works.
The Pixel Purity Index plot is displayed and the PPI Results screen appears.
5. Refer to the on-screen information and click “Next ->”.
The n-D Visualizer is displayed and the n-D Visualizer panels appear in the
wizard.
6. Refer to the wizard text for information and instructions for retrieving
endmembers from the n-D Visualizer.
• To plot endmembers once they are loaded into the wizard, click “Plot
Endmembers.”
Note
For further details about the n-D Visualizer, see “The n-Dimensional Visualizer” on
page 636.

Spectral Mapping Wizard ENVI User’s Guide


Chapter 9: Spectral Tools 671

7. Click the “Next ->” button.


The User Supplied Endmembers panels appear.
8. Select from the following options:
• To manually supply the endmembers for mapping from another source,
such as a spectral library or an ROI, see “Manually Selecting
Endmembers”.
• To use endmembers for mapping from the image, click the arrow button to
select “No” then click “Next ->” to display the Mapping Methods screen.
Proceed to “Performing Classification and MTMF” on page 671 for
instructions.
Manually Selecting Endmembers
1. In the User Supplied Endmember panels, select “Yes” to manually extract
endmembers from the data.
The Endmember Collection dialog and Endmember Collection panels
appear.
2. Collect the endmembers using standard ENVI endmember collection
methods (see“Collecting Endmember Spectra” on page 495) and follow the
on-screen instruction for loading them into the wizard.
• To view a plot of the collected endmember spectra, click “Plot
Endmembers.”
3. In the wizard, click the “Next->” button.
The Mapping Methods panels appear.
4. Proceed to the next section, “Performing Classification and MTMF”, for
instructions.

Performing Classification and MTMF


1. In the Mapping Methods panels, choose whether to perform a SAM
classification and/or an Mixture-Tuned Matched Filtering (MTMF) operation.
Refer to the wizard text for descriptions of the two options.
2. Click the “Next->” button.
3. Progress windows display the progress of the operation(s).
The Investigate SAM Results or the Investigate MTMF Results panels appear.

ENVI User’s Guide Spectral Mapping Wizard


672 Chapter 9: Spectral Tools

• To load the SAM classification image into a display, click the “Load SAM
Class Result” button.
4. Follow the wizard instructions for examining SAM rule images and MTMF
results.
Tip
To load a rule image into a display, double-click on the rule image name in the list.

5. Click the “Next ->” button.


A Summary Report appears (see Figure 9-16).
6. Follow the wizard instructions for saving and reviewing the summary report.

Figure 9-16: A wizard summary report.

Spectral Mapping Wizard ENVI User’s Guide


Chapter 9: Spectral Tools 673

Spectral Analyst
Use ENVI’s Spectral AnalystTM 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 “Using Binary
Encoding” on page 649, “Spectral Angle Mapper Classification” on page 649, and
“Using Spectral Feature Fitting” on page 661 for method descriptions). You can also
define your own spectral similarity techniques and add them to the Spectral Analyst
(see Spectral Analyst Functions in the ENVI Programmer’s Guide). 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,” and individual 0 to 1 scores for
each method are reported. For more information, see “Tips for Successful Use of the
Spectral Analyst” on page 676.
Warning
This function does not identify spectra, it just recommends likely candidates for
identification. The results may change when the similarity methods used or weights
are changed. It is still up to you to make the actual identification.

Opening the Spectral Analyst


Note
A plot window must be displayed.

1. Select Spectral > Spectral Analyst.


2. When the Spectrum Analyst Input Spectral Library dialog appears, select the
spectral library to use for the comparisons and click “OK.”
The Edit Identify Methods Weighting dialog appears.
3. In the “Weight” text box for each similarity method, enter the desired
weighting factors.
The weighting factors can have any value. A perfect match to a library
spectrum would have an output “Score” of the sums of the weights.
Tip
A recommended starting point is to use a weight of 1.0 in Spectral Feature
FittingTM.

ENVI User’s Guide Spectral Analyst


674 Chapter 9: Spectral Tools

4. Edit the “Min” and “Max” factors for each method if desired.
Use the “Min” and “Max” factors to indicate which values are considered a
perfect match by scaling them to 0 to 1 (or 1 to 0) scores.
• For the Spectral Angle Mapper (SAM) method, enter the min and max
values in radians. (The similarity to the library spectra are measured as an
angle in radians.)
• For the Spectral Feature Fitting (SFF) method, 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 the min value indicates a perfect
match and gets a score of 1. A SAM or SFF result greater than or equal to
the max value gets a score of 0.
• For the binary encoding method, enter the min and max values as a
percentage of bands correctly matched (0-1).
A binary encoding result less than or equal to the min value gets a score of
0 and a result greater than or equal to the max value a gets a score of 1.
See “Spectral Angle Mapper Classification” on page 649, “Using Spectral
Feature Fitting” on page 661, and “Using Binary Encoding” on page 649 for
method descriptions.
5. In the Edit Identify Methods Weighting dialog, click “OK.”
The Spectral Analyst window appears. Use the Spectral Analyst window to
open a new spectral library, edit the weights and min and max values, input x
and y scale factors, and get input spectra from a Z-profile plot (see the
following Spectral Analyst Options section) When a spectrum is displayed, the
Spectral Analyst works over the range displayed in the plot being analyzed.
6. In the Spectral Analyst window, click “Apply” to load a spectrum.
• If one spectral plot is open, that spectrum is automatically entered into the
Spectral Analyst.
• If more than one spectrum is plotted, select the desired spectrum name.
• Spectra can also be entered directly from a Z-profile window.
The results of the similarity measures are listed. ENVI resamples the spectral library
to match the spectral resolution of the input spectrum.

Spectral Analyst ENVI User’s Guide


Chapter 9: Spectral Tools 675

Spectral Analyst Options


Use the Spectral Analyst window to open a new spectral library, edit the weights and
min and max values, input x and y scale factors, and get input spectra from a Z-
profile plot.

Setting Wavelength Ranges


To use a specific wavelength range:
1. In the 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 with the left mouse button
on the library name in the Spectral Analyst list.

Opening New Spectral Libraries


To open a new spectral library file to use in the comparisons:
1. In the Spectral Analyst window, select File > New Spectral Library File.
2. When the Spectral Analyst Input Spectral Library dialog appears, select the
spectral library to use for the comparisons.
Editing Weighting Factors
To edit the methods’ weighting factors and min and max values:
1. In the Spectral Analyst window, select Options > Edit Method Weights.
2. When the Edit Identify Methods Weighting dialog appears, edit the weight
factors and min and max.
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. Select Options > Edit (x,y) Scale Factors.
2. When the Edit (x,y) Scale Factors dialog appears, enter the desired X and Y
scale factors.

ENVI User’s Guide Spectral Analyst


676 Chapter 9: Spectral Tools

Entering Spectra from Z Profiles


To enter spectra directly from a Z-profile window:
1. Open a Z-profile plot (see “Extracting Z Profiles” on page 338).
2. In the Spectral Analyst window, select Options > Auto Input via Z-profile.
3. In the Select Z Profiles dialog, click on a Z profile name(s).
4. Click “OK.”
5. In the Main Image or Zoom window, click on a pixel to be analyzed.
The Z Profile is updated and the spectral comparison information appears in
the Spectral Analyst window. As you move the zoom box or in the Main
display, the information in the Spectral Analyst changes accordingly.
Tip
If you have two images displayed, 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 score 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 have low scores.

Tips for Successful Use of the Spectral Analyst


The Spectral Analyst is based on use of spectral matching techniques that have
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 very different in another
range. For best results, use the wavelength range that contains the diagnostic
absorption features. When a spectrum is displayed, the Spectral Analyst works over
the range displayed in the plot being analyzed. If a sub-range is desired, use the
middle mouse button in the plot to zoom in on the desired wavelength range before
clicking “Apply” in the Spectral Analyst.

Spectral Analyst ENVI User’s Guide


Chapter 9: Spectral Tools 677

Methods
Determine whether materials have absorption features. If they do, Spectral Feature
Fitting is probably the best method. Otherwise, Spectral Angle Mapper and/or Binary
Encoding will give better results.

Presence of Materials in the Library (Similarity to other Materials)


Materials of interest in the image spectra that are not in the reference spectral library
will not be identified. If a material is not in the reference spectral library, materials
similar to it may score relatively high.

Multiple Materials (Mixtures)


High scores for multiple materials may indicate mixtures, particularly for minerals
that have absorption features in different parts of the spectrum. Because of this, it is
best to run the Spectral Analyst function on the results of endmember
determination— the “pure” endmember spectra.

Score Magnitude and Score Separation


Higher scores indicate higher confidence, because more of the rules have been
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 is very similar to both sets of
rules, whereas a score of 0.98 for one material and a score of 0.50 for another mineral
indicates a high probability that the spectrum represents the first material.

Multiple Matches (same score)


In many cases, the Spectral Analyst may list multiple identical scores for different
materials in the rule base. This indicates that the Analyst can not discriminate the two
materials under the conditions being used for identification. In that case, try a
different wavelength range or use the different weighted methods to produce a unique
answer.

ENVI User’s Guide Spectral Analyst


678 Chapter 9: Spectral Tools

Figure 9-17: 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 library. This is a good indication that the material is not in the
spectral library used, as well as not similar to other materials in the library.

Context
Finally, 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.
Spectral Analyst Caution
This tool is not foolproof. It is meant to be used as a starting point to put you on the
right track towards identifying the materials in an image scene. Used properly and
with a good spectral library, it can provide excellent suggestions for identification.
Used blindly, it can produce totally erroneous results.

Spectral Analyst ENVI User’s Guide


Chapter 9: Spectral Tools 679

Spectral Math
Use Spectral Math TM to apply mathematical expressions or IDL procedures to spectra
(and also to selected multiband images). The spectra can be either from a multiband
image (i.e., a Z profile), a spectral library, or an ASCII file (see “Extracting Z
Profiles” on page 338, “Opening Spectral Libraries” on page 619, and “Importing
Spectra from Spectral Libraries” on page 497). If one or more images are also open
and the number of bands matches the number of channels in one of the displayed
spectra, those images will also be available for processing. Spectral math can be used
to apply mathematical expressions to all of the bands of multiband images provided
that the number of bands and number of spectral channels match.
Note
To apply Spectral Math, at least one spectrum must be open and displayed in a plot
window and each spectrum to be processed must be displayed.

• Select Spectral > Spectral Math.


The Spectral Math dialog appears. The dialog accepts any valid IDL mathematical
expression, function, or procedure provided that the result can be expressed as a
vector (a one-dimensional array) if you are processing spectra or a two-dimensional
array if you are processing images.

Figure 9-18: The Spectrum Math Dialog.

ENVI User’s Guide Spectral Math


680 Chapter 9: Spectral Tools

Note
When using mathematical expressions in Spectral Math, the operations will be
performed in the data type (byte, integer, floating point, etc.) of the input data. Use
the data type conversion functions listed in Table 9-1 to explicitly set each input
band to the desired data type.

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 9-1: Functions and Operators (shown in parenthesis) that can be used
in Spectral Math.

Spectral Math ENVI User’s Guide


Chapter 9: Spectral Tools 681

Entering Mathematical Expressions


The Table 9-1 lists the types of functions and operators that can be used in Spectral
Math expressions. For a description of how to use your own procedures and functions
in spectral math, see “Using IDL Procedures and Functions in Spectral Math” on
page 684.
1. In the Spectral Math dialog, enter the desired mathematical expression,
including variable names, into the text box labeled “Enter an expression.”
The expression will be assigned to the entire spectrum or image.
2. Press the <Return> key.
Variable names must begin with the character “s” or “S” followed by up to 5
numeric characters. For example, if you wanted to calculate the average of six
spectra, the mathematical equation (s1+s2+s3+s4+s5+s6)/6 could be entered
into the text box (where “s1” is one spectrum, “s2” a second spectrum, and
“s3” a third spectrum, etc.). Previously saved expressions can also be recalled
from disk (see “Using Previous Expressions”).
3. After an acceptable expression is entered, click “OK” to continue.
The Variable/Spectra Pairings dialog appears (see “Assigning Spectra to Variables”
on page 682).
Using Previous Expressions
You can reuse, save, or recall any previously-applied math expressions.
1. In the Spectral Math dialog, click on an expression in the “Previous
Expression” list to enter it into the “Enter an expression” text box.
2. After it is entered, the expression can be applied to a new set of spectra by
clicking “OK” and following the procedures described under “Assigning
Spectra to Variables” on page 682.
Clearing Expressions
• To clear all expressions from the Previous Expressions list, click the “Clear”
button.

ENVI User’s Guide Spectral Math


682 Chapter 9: Spectral Tools

Saving Expressions to Files


1. In the Spectral Math dialog, click the “Save” button.
2. Enter an output file name and click “OK.”
The output filename should be given the file extension .exp (both Band Math
and Spectral Math functions can use these .exp files).
Restoring Saved Expressions
• To restore previously saved expressions, click “Restore” and select the desired
file name.

Assigning Spectra to Variables


Use the Variable/Spectra Pairings dialog to assign spectra from a list of available
input spectra (previously displayed spectra) to the variable names entered in the
“Enter an expression” text box.
Continuing with our example from page 681 where the equation
(s1+s2+s3+s4+s5+s6)/6 was entered:
1. In the “Variables used in expression” text box, click on the expression “S1.”
2. In the “Available Spectra List:,” click on a spectrum.
The spectrum is paired with the selected variable.
3. Assign spectra to the other variables using the same steps.
• To clear the variable/spectra pairings, click “Clear.”
4. After all variables have been paired with spectra, choose an output result.
• To plot the results into the same plot window as the input spectra, use the
“Output Result to” arrow toggle button to select “Same Window.”
• To plot the results into a new plot window, use the “Output Result to”
arrow toggle button to select “New Window.”
If spectra from two plot windows are used and you select output to the “Same
Window,” the result is plotted in the same window as the first assigned
spectrum.
5. To start the calculations, 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

Spectral Math ENVI User’s Guide


Chapter 9: Spectral Tools 683

output file using the standard plot functions (see “Using Interactive Plot Functions”
on page 343).

Figure 9-19: The Variable/Spectra Pairings Dialog. The image on the left shows
variables in their unassigned states. The image on the right shows the variables
after they have been assigned to spectra.

Mapping Variables to Input Files


If an image file or image memory item is available, a “Map Variable to Input File”
text box appears in the Variable/Spectrum Pairing dialog.
1. To select a single-band or multiband image for use in Spectral Math, click on a
variable name and then click on “Map Variable to Input File.”
2. Select the desired input file and any spatial or spectral subsetting.
3. Select output to “File” or “Memory.”
4. Click “OK” to start the processing.
When an image is used in Spectral Math, the output is another image of the same
spatial and spectral dimensions.

ENVI User’s Guide Spectral Math


684 Chapter 9: Spectral Tools

Note
Mapping Variables to Input Files can be used to perform mathematical operations
simultaneously on all bands of an image.

Using IDL Procedures and Functions in Spectral Math


Because ENVI provides access to IDL’s capabilities (unless you are using ENVI-
RT), you can use the power of built-in IDL features, IDL user functions, or write your
own Spectral Math expressions to perform custom operations. The only requirement
for these functions is that they accept one or more vectors (spectra) as input and that
they output a vector result. These functions need to be saved in a directory that is
within the IDL path list so they will auto-compile.
Note
You can also compile the functions as described in “Compiling IDL Code” on
page 126.

The following simple examples demonstrate the creation and use of custom Spectral
Math functions (see Band Math Basics in the ENVI Programmer’s Guide for more
information).

Example: Spectral Math User Function 1


The following example is a simple custom spectral math function that adds two
spectra. The following program text can be entered into a text editor and saved with
the filename user_sm1.pro:
Example:
FUNCTION user_sm1, s1, s2
RETURN, s1+s2
END

To call this function from the “Enter an expression:” box, use the syntax:
user_sm1(s1,s2)

Spectral Math ENVI User’s Guide


Chapter 9: Spectral Tools 685

Example: Spectral Math User Function 2


The following example is a simple custom spectrum math function that computes the
average of 6 spectra. The following program text can be entered into a text editor and
saved with the filename user_sm2.pro:
Example:
FUNCTION user_sm2, s1, s2, s3, s4, s5, s6
average = (s1+s2+s3+s4+s5+s6)/6.
RETURN, average
END

To call this function from the “Enter an expression:” box, use the syntax:
user_sm2(s1,s2,s3,s4,s5,s6)

ENVI User’s Guide Spectral Math


686 Chapter 9: Spectral Tools

Resampling Spectral Data Files


Use Spectral Resampling to resample spectral data files in ENVI. The data files can
be resampled to match either the response of a known instrument (e.g., TM, MSS,
AVIRIS) or a user-defined filter function; an ASCII wavelength file (with or without
full width half maximum [FWHM] information) or the wavelengths of a specific
image input file. The resampling method depends on the input information. If only
wavelengths (band centers) are provided, ENVI assumes critical sampling and uses a
gaussian model with a FWHM equal to the band spacings. If wavelengths and
FWHM information is provided, a gaussian model using the FWHM spacings is
used. If a filter function is provided, ENVI uses that for the resampling.
1. Select Spectral > Spectral Resampling.
2. When the Spectral Resampling Input File dialog appears, select your input data
file and any subsetting.
3. Click “OK.”
The Spectral Resampling Parameters dialog appears. For detailed instructions, see
“Selecting Resampling Types” on page 622.

Resampling Spectral Data Files ENVI User’s Guide


Chapter 9: Spectral Tools 687

EFFORT Polishing
Use Effort Polishing to execute Empirical Flat Field Optimal Reflectance
TransformationTM (EFFORTTM) in order 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 one and offsets near zero) 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. For more
information, see the following 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 themselves 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 the data spectra, for pixels that are well fit. A number of spectra

ENVI User’s Guide EFFORT Polishing


688 Chapter 9: Spectral Tools

are used spanning 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. Gain-only corrections can be applied to fix the
model-to-data offset to zero.
One or more reality boost spectra (spectra from spectral libraries or field spectra)
can be used to aid 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 (e.g., 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. Bands within a segment that contain large,
known errors but that are critical to further analysis can be set as invalid and 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). Each segment can be modeled 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.

EFFORT Polishing ENVI User’s Guide


Chapter 9: Spectral Tools 689

Selecting EFFORT Input


1. Select Spectral Tools > Atmospheric Correction > EFFORT.
2. When a standard ENVI file selection dialog appears, select a file and
perform any spatial subsetting.
3. When the EFFORT Input Parameters dialog appears, click on the “Enter
New Segment” button.
A segment appears in the “Segment Information” list.
4. Click the “Edit” button next to the new segment.
5. Select the starting and ending bands for this segment by using the “Add
Range” button, clicking and dragging over the list of bands, or clicking on
the first band and 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 on the bands with the left mouse button to toggle
them off.
6. Click “OK.”
• To change the order of the Legendre polynomial used to fit this
segment, enter the desired order in the “Order” text box 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 that 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.
7. Enter new segments until all the spectral segments have been defined.
• To remove the last segment entered, click the “Delete Last Segment”
button.
Note
Data that is not included between spectral segments will not be adjusted and will
be set to 0. Invalid bands will not be used in the modeling but will be EFFORT
adjusted.

ENVI User’s Guide EFFORT Polishing


690 Chapter 9: Spectral Tools

Inputting Reality Boost Spectra


To input reality boost spectra:
1. In the EFFORT Input Parameters dialog, click the “Input Reality Boost
Spectra” button.
An endmember collection dialog appears.
2. Import the desired spectra and click “Apply.”
For detailed instructions, see “Using the Drag-and-Drop Window” on
page 495, “Importing Endmember Spectra” on page 496, “Endmember
Options” on page 499 and “Managing Endmember Spectra” on page 502.
The Reality Spectra Options dialog appears.
3. Click on the arrow toggle button to select whether to use a continuum
removal on the reality boost spectrum.
• To incorporate the spectral features and not the overall spectral shape,
use continuum removal.
• If the overall shape of the spectrum is important, (i.e., vegetation
spectra), do not use continuum removal.
4. Click “OK.”
• Click on the “Edit” button to change the reality boost spectra options.
• Click on the “Delete” button 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” text box, enter the total number of spectra to use in
the EFFORT process.
Note
We recommend using at least 1000 points, but no more than 10% of the total
image size.

2. Enter the number of bins to divide the albedo range into and select spectra
from.

EFFORT Polishing ENVI User’s Guide


Chapter 9: Spectral Tools 691

The number of spectra used in each albedo bin is the total number of points
divided by the number of albedo bins. This insures that spectra with a range
of albedo are used in the modeling.
3. Use the arrow toggle button 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, enter an output
filename in the appropriate dialog.
4. Click on the arrow toggle button to apply the calculated gain and offset
values to the input data.
• If you select “No,” the gain and offset values will appear in a plot
window and no other output will be generated.
• If you select “Yes,” enter an output filename.
The gain and offset values will appear in a plot window and an
EFFORT-corrected apparent reflectance output file will be created.
• To write the EFFORT output over the input file, use the “In Place?”
arrow toggle button to select “Yes.”
Warning
The In Place option will overwrite the input file and can not be interrupted without
corrupting the original data file.

5. Click “OK” to start the EFFORT processing.


The processing is done in three steps and three sequential status bars show the
progress. When the process is complete, the output is listed in the Available Bands
List and the gain and offset values appear in a plot window.

ENVI User’s Guide EFFORT Polishing


692 Chapter 9: Spectral Tools

Generating 3-D Image Cubes


Use the Build 3D Cube user function to take a multispectral file or hyperspectral
file (which may be spatially and spectrally subsetted) and create a RGB image
with the spectral slice of the top row and far right column in a perspective view (see
Figure 9-20). 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 the
intermediate processing takes place file to file, or in memory depending on user
selection of the final output file. (Temporary files created are deleted after they are
used). The IDL code for this function “CUBE_3D.PRO” is included in the ENVI
distribution and shows how to combine batch routines and widgets to build a user
function. Programming details are discussed in see Chapter 4, “User Functions” in
the ENVI Programmer’s Guide.
1. Select Spectral > Build 3D Cube.
2. Select an input file and any spatial and/or spectral subsetting.
3. Click “OK.”
4. When the 3D Cube RGB Face Input Bands dialog appears, select the RGB
bands to be placed on the face of the image cube by clicking on the desired
bands.
5. Click “OK” to complete the selection.
6. When the 3D Cube Parameters dialog appears, select the color table for the
side and top of the 3D cube from the list of standard ENVI/IDL color tables
by clicking on the desired choice.
7. Enter a value for the “Spectral Scale” to apply a multiplier to the pixel
dimensions of the side and top.
Tip
A factor greater than 1.0 will exaggerate 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.

8. Enter a border value to modify the number of border (background) pixels


surrounding the output image.

Generating 3-D Image Cubes ENVI User’s Guide


Chapter 9: Spectral Tools 693

Figure 9-20: 3-D Image Cube.

9. Select “File” or “Memory” output.


• To quit, click “Cancel.”
10. Click “OK” to start the processing.
The function creates temporary files that appear in the Available Bands List
during processing. When processing is complete, these files are deleted and
replaced by the processed 3-D image cube.

ENVI User’s Guide Generating 3-D Image Cubes


694 Chapter 9: Spectral Tools

Spectral Tools References


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 Appendix C, “ENVI Spectral Libraries” 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.
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.

Generating 3-D Image Cubes ENVI User’s Guide


Chapter 9: Spectral Tools 695

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.
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.

ENVI User’s Guide Generating 3-D Image Cubes


696 Chapter 9: Spectral Tools

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 9AVIRIS) 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.
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

Generating 3-D Image Cubes ENVI User’s Guide


Chapter 9: Spectral Tools 697

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.

ENVI User’s Guide Generating 3-D Image Cubes


698 Chapter 9: Spectral Tools

Generating 3-D Image Cubes ENVI User’s Guide


Chapter 10:
Map Tools

This chapter covers the following topics:

The Map Menu . . . . . . . . . . . . . . . . . . . . . 700 Georeference AVHRR Data . . . . . . . . . . . 755


Registration . . . . . . . . . . . . . . . . . . . . . . . . 701 Selecting Map Projection Types . . . . . . . . 757
Image-to-Image Ground Control Points . . 702 Building Customized Map Projections . . 758
Image-to-Map Ground Control Points . . . . 710 Converting Map Projections . . . . . . . . . . . 762
Warping and Resampling . . . . . . . . . . . . . . 714 Converting Map Coordinates . . . . . . . . . . 765
Orthorectification . . . . . . . . . . . . . . . . . . . 720 Converting ASCII Coordinates . . . . . . . . 767
Image Mosaicking . . . . . . . . . . . . . . . . . . . 731 Merging Old Projection Files . . . . . . . . . . 769
Georeferencing from Input Geometry . . . . 745 Using GPS-Link . . . . . . . . . . . . . . . . . . . . 770
Georeferencing SeaWiFS Data . . . . . . . . . 752

ENVI User’s Guide 699


700 Chapter 10: 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 used to
convert map coordinates and map projections, to build customized projections, to
convert ASCII coordinates, and to access a GPS-link utility.

Figure 10-1: The Map menu.

The Map Menu ENVI User’s Guide


Chapter 10: Map Tools 701

Registration
Use Registration to reference images to geographic coordinates and/or correct them
to match base image geometry. Select ground control points (GCPs) interactively
from display windows and/or vector windows. Warping is performed 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. For
step-by-step image registration instructions, see the ENVI Tutorial Image
Georeferencing and Registration.

Figure 10-2: Typical Layout of a Registration Session.

ENVI User’s Guide Registration


702 Chapter 10: Map Tools

Image-to-Image Ground Control Points


Use Select GCPs:Image to Image to interactively select ground control points (GCP
or Tie Points) to use 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. Once enough points to define a warp polynomial have been selected,
GCP locations in the warp image can be predicted. GCPs can be saved and restored
to/from files and the color labels and ordering of the GCP markers can be changed.
See “Warping and Resampling” on page 714 for descriptions of the warping
methods.
Single band images or multiband files can be warped. The GCP selection tool allows
prototyping and testing of different GCPs and warp options.
Opening and Displaying Images
Tip
To rotate or flip images prior to registration, use Basic Tools > Rotate/Flip Images
(see “Rotating Images” on page 419).

1. Open the base image and warp image files and display them in two windows
using the Available Bands list (see “Opening Image Files” on page 65 and
“The Available Bands List” on page 176).
2. After the two images are displayed, choose Map > Registration > Select
GCPs:Image to Image.
The Image to Image Registration dialog appears.
3. In the “Base Image” list, click on the base (reference) display.
4. In the “Warp Image” list click on the display containing the image to be
warped.
5. Click “OK.”
The Ground Control Points Selection dialog (Figure 10-3) appears.
Tip
See the ENVI Tutorial Image Georeferencing and Registration for step-by-step
descriptions of image registration.

Registration ENVI User’s Guide


Chapter 10: Map Tools 703

Collecting Ground Control Points (Image-to-Image)


Identify GCPs in the two displayed images by locating the pixels in the Zoom
windows. The pixel information is loaded into the Ground Points Selection dialog.
The upper left of a pixel is the position of the whole number coordinates and the X
and 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 of 4x, the pixels are divided into 4 sub-areas. At a zoom factor of
10x, positioning is possible to 1/10th pixel. The GCP marker is placed showing the
subpixel position in the zoom window. Subpixel locations are supplied to provide
higher accuracy in selecting GCPs.
1. In the Main Image window of each image, position the Zoom box over the
desired GCP area (see “Controlling the Zoom Window from the Main Image
Window” on page 187).
2. In the zoom window, click the left mouse button on a specific pixel to position
the cursor over that pixel or portion of that pixel (see “The Zoom Window” on
page 188).
The coordinates of the selected location (in both images) are displayed in the
Ground Control Points Selection dialog in sample, line order in the fields
labeled “Base X, Y” and “Warp X,Y” respectively. Positioning in the Zoom
window provides subpixel coordinates so floating point coordinate values are
shown in the dialog.
Note
Select Tools > Pixel Locator from the Display menu to select the pixel positions
and provide whole number GCP coordinates by clicking the “Export” button
(see “Using the Pixel Locator” on page 366).

3. Once the desired pixel is selected in both images, click “Add Point” in the
Ground Control Points Selection dialog to add the selected GCPs to the list of
selected X, Y (sample, line) pairs.
• 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 GCP List” on page 705.
When the GCPs have been added to the list, a marker is placed in the image
displays of both the base and warp images. The GCP marker in the image is the
identifying number of the GCP displayed next to an encircled cross-hair.

ENVI User’s Guide Registration


704 Chapter 10: Map Tools

The marker indicates the selected pixel (or subpixel location); the center of the
marker (located under the cross-hair) indicates the actual GCP location.
4. Add additional GCPs following the same procedure.
When four or more GCPs have been selected, the predicted X, Y coordinates
for the selected warp, the X and Y error, and the RMS error are listed in the
GCP List table.
Tip
For the best registration, attempt to minimize the RMS error by refining the
positions of the pixels with the largest errors or by removing them. Using more
points can also give lower errors (see “Minimizing RMS Error” on page 705).

Figure 10-3: The Ground Control Points Selection Dialog (top). The GCP List,
(bottom) which you can display or hide from within the Selection dialog.

Registration ENVI User’s Guide


Chapter 10: Map Tools 705

Minimizing RMS Error


The number of GCPs selected is displayed in the Ground Control Points Selection
dialog. After a number of GCPs sufficient enough to conduct a 1st degree polynomial
warp have been selected, the total RMS error is displayed in the Ground Control
Points Selection dialog and the RMS error for each point is listed in the GCP List
table.
The degree of polynomial used for calculating the error is displayed in the “Degree”
box in the Selection dialog and can be changed when a sufficient number of GCPs
have been selected.
Tip
To see which points have the highest RMS errors, select Options > Order Points by
Error in the Ground Control Points Selection dialog. The points in the CGP List are
reordered so that those with the highest errors appear at the top of the list.

Ignoring GCPs
• To have GCPs selectively ignored during registration, click on the point to be
ignored and click the “On/Off” button.
The RMS error and the spatial transformation are recalculated without using
the selected point(s). The “+” next the GCP number changes into a “-” in the
GCP List and the color of the GCP marker changes.
• To turn the GCP “on” again, click on the point in the list and click the
“On/Off” button again.
Using the GCP List
Use the GCP List to edit and update positions, turn points on and off, delete selected
points, and predict point locations (see Figure 10-3).
Hiding/Showing the GCP List
• To display the GCP list, click “Show List” in the Ground Control Points
Selection dialog.
• To hide the GCP list, click “Hide List” in the Ground Control Points Selection
dialog or select File > Cancel in the GCP List window.
Positioning the Zoom Window
• To center the Zoom window over any of the selected GCPs, click on the
desired GCP in the list and click “Goto,” or click on the GCP number in the
GCP List.

ENVI User’s Guide Registration


706 Chapter 10: Map Tools

The marker outlining the selected GCP is positioned at the center of the Zoom
window for both the base and warp images.
Editing GCP Locations
You can edit the location of a GCP by changing the X and/or Y values in the GCP
List, or by interactively selecting new locations in the Zoom windows.
To change a GCP from the GCP List:
1. In the GCP List, double-click on the value to be edited.
2. Enter the new value and press “Return” or enter a new value and click
“Update.”
The changes are reflected in the GCP list and in the base and warp images.
Note
If several GCPs have already been selected, a significant delay may occur while the
GCPs are redrawn and the error is recalculated.

To interactively move a GCP:


1. In the GCP List, click on the GCP to be moved.
2. Center the Zoom boxes in the base and warp images over the new location.
3. In the GCP list, click the “Update” button.
The location of the selected GCP is replaced with the new pixel positions in the GCP
List and in both images. The Zoom windows of both images are centered over the
new location.
Deleting GCPs
• To permanently remove any single control point from the list in the GCP List,
click on the GCP to be removed and click “Delete.”

GCP Options
Use the Options menu in the Ground Control Points Selection dialog to control the
ground control points’ labels, colors and ordering, to reverse the base and warp
images, and to set other preferences.
Reversing Base/Warp Images
Use this option to warp the base image to match the warp image.
• To reverse the positions of the base and warp GCPs, select Options > Reverse
Base/Warp.

Registration ENVI User’s Guide


Chapter 10: Map Tools 707

Selecting RST Calculation


For 1st order polynomials, you have the option of selecting RST (Rotation, Scaling,
and Translation) calculation of errors:
• In the Ground Control Points Selection dialog, select Options > 1st Degree
(RST Only) Yes or No.
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:
1. In the base Zoom window, position the cross hairs over a pixel.
2. Click “Predict.”
The warp image Zoom Window Indicator and the cross-hairs 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
To have the GCP location in the warp image predicted automatically:
1. Select Options > Auto Predict On.
When you adjust the pixel location using the Zoom window or the Zoom
Window Indicator box of the base image, the Zoom Window Indicator and
cross-hairs of the warp 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 GCPs Off or Label
GCPs On.
Changing Label Colors
1. Select Options > Set Point Colors.
The GCP Colors dialog appears.
2. Select the color of the “On” GCP markers from the “GCPs which are “On”
button menu (initially labeled “Red”).
3. Select the color for the “off” GCP markers from the “GCPs which are “Off”
button menu (initially labeled “Green”).

ENVI User’s Guide Registration


708 Chapter 10: Map Tools

Setting Ordering Preferences


• To select whether the GCP pairs are displayed in the list by their index “ID#”
or by “RMS Error,” select Options > Order Points by Index or Order Points by
Error.
Index ID order is the order in which they were selected. Error order lists those with
the highest error first.
Clearing the GCP List
• To delete all of the GCPs listed in the GCP List, select Options > Clear All
Points.

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 a standard registration, select either Options >
Warp Displayed Band or Warp File.
• To select image-to-map type warping, if the base image is georeferenced,
select Options > Warp Displayed Band (as Image to Map) or Warp File (as
Image to Map).
The Registration Parameters dialog appears. The details of the various warp options
available in ENVI are discussed in “Warping and Resampling” on page 714.

Managing GCPs
Use the File menu in the Ground Control Points Selection dialog to save and restore
ground control points files.
Saving GCPs to ASCII Files
1. In the Ground Control Points Selection dialog or in the GCP List, select File >
Save GCPs to ASCII.
2. Enter an output filename with the .pts extension or use the “Choose” button
to select an output filename.
3. Click “OK” (see “GCP File Format (.pts)” on page 896 for information on the
format).

Registration ENVI User’s Guide


Chapter 10: Map Tools 709

Saving Coefficients to ASCII Files


To save the polynomial coefficients to an ASCII file:
1. In the Ground Control Points Selection dialog, select File > Save Coefficients
to ASCII.
2. In the Output Polynomial Coefficients dialog, enter or choose an output
filename and click “OK.”
The ASCII file contains the polynomial degree and polynomial coefficients P and Q,
where:
N N

x′ = a ( x, y ) = å åP i, j x
j i
y
i = 0j = 0
N N

y′ = b ( x, y ) = å åQ i, j x
jyi

i = 0j = 0

Where x′and y′ are the locations in the base image, x and y are the locations in the
warp 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 would be written in the
following format:
P[0, 0] Q[0, 0]
P[0, 1] Q[0, 1]
P[1, 0] Q[1, 0]
P[1, 1] Q[1, 1]
Restoring Saved GCPs
1. Select File > Restore GCPs from ASCII.
2. Enter the desired GCP .pts filename.
Closing the Dialog
• To exit the Ground Control Points Selection dialog, select File > Cancel.
Note
If the current points have not been saved to a file, a prompt appears.

ENVI User’s Guide Registration


710 Chapter 10: Map Tools

Image-to-Map Ground Control Points


Use Select GCPs:Image-to-Map to select ground control points (GCPs) for Image-to-
Map registration. Use the Zoom window (image-to-map registration requires that at
least one image is displayed) to select GCPs.When selecting GCPs, you can select
subpixel coordinates. You enter corresponding map coordinates manually, from a
vector window, or from GPS link. Once enough points to define a warp polynomial
have been selected, GCP locations in the warp image can be predicted. GCPs can be
saved and restored to/from files and the color labels and ordering of the GCP markers
can be changed. See “Warping and Resampling” on page 714 for descriptions of the
warping methods.

Opening and Displaying Images


1. Open the image file and display the desired band (see “Opening Image Files”
on page 65 and “The Available Bands List” on page 176).
2. Choose Map > Registration > Select GCPs:Image to Map.
The Image to Map Registration dialog appears.
3. Choose the image to register to the map by clicking on the display name in the
dialog.
Note
If only one image is displayed, it is selected automatically.

4. In the “Select Registration Projection” list, select the output projection by


clicking on it, or click “New” to enter a custom project type (see “Selecting
Map Projection Types” on page 757).
5. Click “OK.”
The Ground Control Points Selection dialog appears.
Tip
See the ENVI Tutorial Image Georeferencing and Registration for additional step-
by-step descriptions of image registration.

Registration ENVI User’s Guide


Chapter 10: Map Tools 711

Figure 10-4: The Image to Map Registration Dialog.

Collecting Ground Control Points (Image-to-Map)


The procedure for selecting Ground Control Points (or Tie Points) is similar to that
for image-to-image registration (see “Image-to-Image Ground Control Points” on
page 702).
1. In the Main Image window, position the Zoom box over the desired GCP area
(see “Controlling the Zoom Window from the Main Image Window” on
page 187).
2. In the zoom window, click the left mouse button on a specific pixel to position
the cursor over that pixel or portion of that pixel (see “The Zoom Window” on
page 188).
The coordinates of the selected location appear in the Ground Control Points
Selection dialog in the fields labeled “Image X” and “Image Y.” Subpixel

ENVI User’s Guide Registration


712 Chapter 10: Map Tools

coordinates are supplied to provide higher accuracy in selecting GCPs (see


“Collecting Ground Control Points (Image-to-Image)” on page 703).
Note
Select Tools > Pixel Locator from the image window to select the pixel
positions and provide whole number GCP coordinates by clicking the “Export”
button (see “Using the Pixel Locator” on page 366).

3. Select common reference features in both the map and the image (for example
a road intersection seen in both image and map) and select from the following
options:
• To automatically enter map coordinates from vector data, see “Entering
Map GCPs from Vector Windows” on page 714.
• To automatically enter map coordinates from GPS locations, see “Using
GPS-Link” on page 770.
• To enter the map coordinates from a paper map, enter the easting and
northing (or lat/long) of the selected GCPs into “E” and “N” text boxes,
respectively.
• To enter the map GCP location from a paper map in latitude and
longitude, click the arrow toggle button next to the map projection
name (“UTM” in Figure 10-5) and enter the values into the “Lat” and
“Long” text boxes.
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 on the “DMS< - >DD” button.
• To return to map projection coordinates, click the arrow toggle button.
The corresponding map projection coordinates are calculated
automatically.
4. Once the desired pixel is selected in the image and the map coordinates have
been entered, click “Add Point” in the Ground Control Points Selection dialog
to add the point to the list of GCPs.
• To view GCP List, click “Show List.”
The Image to Map GCP List appears with the GCPs listed in a table. For a
description of the GCP List, see “Using the GCP List” on page 705.

Registration ENVI User’s Guide


Chapter 10: Map Tools 713

When a GCP is added, a marker is placed in the image. The GCP marker in the
image is the identifying number of the GCP displayed next to an encircled
cross-hair. The marker indicates the selected pixel (or subpixel location); the
center of the marker (located under the cross-hair) indicates the actual GCP
location.
Note
When GCPs are selected from a vector window, a marker is also placed in the
vector window. The marker is the identifying number of the GCP displayed with a
“+.”

5. Add additional GCPs using the same procedure.


Once enough points have been entered, the predicted X,Y coordinates for the
selected warp, the X,Y error, and the RMS error are listed in the GCP List.

Figure 10-5: The Image to Map Ground Control Points Selection dialog.

The number of GCPs selected is displayed in the Ground Control Points Selection
dialog. Once a sufficient number of GCPs have been selected to conduct a 1st degree
polynomial warp, the total RMS error is also displayed.
Tip
For the best registration, attempt to minimize the RMS error by refining the
positions of the pixels with the largest errors or by removing them. Using more
points can also give lower errors (see “Minimizing RMS Error” on page 705).

ENVI User’s Guide Registration


714 Chapter 10: Map Tools

For details about editing, predicting, and positioning GCPs, see “GCP Options” on
page 706. For details about managing GCPs, see “Managing GCPs” on page 708.

Entering Map GCPs from Vector Windows


If you have a vector file for the area to be map-registered, 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 711.
2. Load the vectors into a Vector Window and use the vector cursor positioning
capabilities (left mouse button) to locate a feature corresponding to the feature
selected on the image (See “Cursor Functions in Vector Windows” on
page 204).
3. At the bottom of the Vector Window Parameters dialog, click “Export” to
enter the map coordinates of the vector cursor directly into the Ground
Control Points Selection dialog, or right-click on the point and select Export
Location from the shortcut menu.
4. In the Ground Control Points Selection dialog, click “Add Point” to enter the
selected point into the registration.
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.

Warping Options
• To use the GCPs to perform a standard registration, select either Options >
Warp Displayed Band or Warp File in the Ground control points selection
dialog.
The Registration Parameters dialog appears. For details, see “Warping and
Resampling”.

Warping and Resampling


ENVI offers three warping options, RST (rotation, scaling and translation),
polynomial and Delaunay triangulation. RST warping is the simplest method. To
perform RST warping, three or more GCPs are needed. The type of polynomial

Registration ENVI User’s Guide


Chapter 10: Map Tools 715

warping available is 1 st to nth degree. The degree available is dependent upon the
number of GCPs selected where #GCPs > (degree + 1)2. Delaunay triangulation
warping fits triangles to the irregularly spaced GCPs and interpolates values to the
output grid.
The resampling methods available include nearest neighbor, bilinear, and cubic
convolution. Nearest neighbor resampling uses the nearest pixel without any
interpolation to create the warped image. Bilinear resampling does 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. Note that cubic convolution resampling is significantly slower than the other
methods. For more information, see the following reference:
Richards, J. A., 1994, Remote Sensing Digital Image Analysis, Springer-Verlag,
Berlin, p. 340.
1. Select the Ground Control Points (see “Image-to-Image Ground Control
Points” on page 702).
2. In the Ground Control Points Selection dialog, select Options > warping
method.
3. When the Registration Parameters dialog (Figure 10-6) appears, select the
warping method from the “Warp Method” button menu.
The available warping methods are RST (rotation, scaling, and translation),
Polynomial, and Triangulation.
4. Select from the following method-specific options:
• For polynomial warping, enter the desired polynomial degree in the
“Degree” text box. The degree available is dependent on the number of
GCPs defined where #GCPs > (degree + 1)2.
• To select whether you want a one-pixel border of background color at the
edge of triangulation warp data, use the “Zero Edge” arrow toggle button
to select “Yes.”
By selecting this option, you will avoid a “smearing” effect which may
appear at the edges of warped images and which is often seen when using
ENVI’s data-specific georeferencing functions.

ENVI User’s Guide Registration


716 Chapter 10: Map Tools

Figure 10-6: The Registration Parameters Dialog and the Image to Map
Registration dialog.

5. From the “Resampling” button menu, select the resampling method.


6. Set the “Background Value” (the DN value used to fill areas where no image
data appears in the warped image) by entering the DN value in the
“Background Value” text box.
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. Therefore, the upper
left corner values are typically not (0,0) but 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.

Registration ENVI User’s Guide


Chapter 10: Map Tools 717

7. Select from the following options to change the output parameters.


• To override the output dimensions, click “Change Output Parameters” and
enter the desired values into the “Output Image Size” text boxes for image-
to-image registration.
• To change the map coordinate or latitude/longitude information for the
upper left coordinate of the pixel, or to change the pixel or image size,
click the “Change Output Parameters” button and enter the new values into
the Output Image Parameter dialog.
• To change the projection for the upper left coordinate of the pixel, click
the “Change Projection” button in the Output Image Parameters dialog and
enter the new projection in the Projection Selection dialog.
Note
Georeferenced coordinates are in degrees for “Geographic” projection. If your
output projection is “Geographic,” the output pixel and image sizes need to be
scaled to degree units using the “Change Output Parameters” dialog.

The output projection of the image was originally set when ground control points
were selected.

8. Select output to “File” or “Memory.”


A status box appears while the warp is being calculated. When calculation is
complete, the warped image name appears in the Available Bands list.

Assessing Registration Accuracy


1. Use the Available Bands List to load the warped image into a new display
window.
2. Link the display to the base image window (File > Link), and use dynamic
overlays to flicker between the base and the warped images (see “Working
with Multiple Dynamic Overlays” on page 334).

Saving Warped Images to Disk


To save a warped image in memory to disk:
• In the Open Files List, select File > Save Selected File to Disk. For
instructions, see “The Available Files List” on page 173.

ENVI User’s Guide Registration


718 Chapter 10: Map Tools

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. Instead, you use previously selected GCPs to
perform the registration.
1. Select Map > Registration > Warp from GCPs:Image to Image.
Note
The images do not have to be displayed.

2. When the file selection dialog appears, enter the GCP file name or choose the
appropriate GCP input file from the list.
3. When the Input Warp Image dialog appears, select the image to be warped and
any spatial and spectral subsetting using standard ENVI procedures.
4. Click “OK.”
5. When the Input Base Image dialog appears, select the input base image.
6. Click “OK.”
7. When the Registration Parameters dialog appears, follow instruction as
described above (see “Warping and Resampling” on page 714).

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. Instead you use previously selected GCPs to perform
the registration.
1. Select Map > Registration > Warp from GCPs:Image to Map.
2. When the Enter GCP Filename dialog appears, select the .pts file.
3. Click “OK.”
4. Select the projection type used when the ground control points were chosen
and input the X and Y pixel size.
5. When the Input Warp Image dialog appears, select the image to be warped and
any spatial and spectral subsetting using standard ENVI procedures.

Registration ENVI User’s Guide


Chapter 10: Map Tools 719

6. Click “OK.”
In this case, the geographic map coordinates act as the base rather than image
pixel locations.
7. When the Registration Parameters dialog appears, follow instruction as
described above (see “Warping and Resampling” on page 714).

ENVI User’s Guide Registration


720 Chapter 10: Map Tools

Orthorectification
Use Orthorectification to rectify aerial photographs and SPOT data using a digital
elevation model (DEM). The orthorectification uses geometric projections to produce
geometrically correct images for mapping and measurement. For more details, see
the following reference:
Wolf, R., 1974. Elements of Photogrammetry (2nd ed.), McGraw-Hill Inc., New
York.

Aerial Photograph Orthorectification


The aerial photograph orthorectification corrects for distortions introduced by the
camera geometry, look angles, and topography using a single photo resection.
The orthorectification is done in three steps. In the first step, you build the interior
orientation using the camera model, fiducial marks, and image tie points. In the
second step, you build the exterior orientation. The exterior orientation is used to tie
the image to the surface of the earth using ground control points, map coordinates,
and elevations. In the final step, you perform the orthorectification from the interior
and exterior orientations and a DEM file.

Building Interior Orientations


Use Build Air Photo Interior Orientation to build the interior orientation, which
establishes the relationship between the camera model and aerial photograph image.
It uses tie points between the aerial photograph and camera fiducial marks (at least
three) and the camera focal length. The aerial photograph must be displayed in an
image window for selection of the fiducial mark locations.
1. Display the aerial photograph image.
2. Select Map > Orthorectification > Build Air Photo Interior Orientation.
3. If more than one image is displayed, select the display number containing the
aerial photograph.
The Ortho: Build Interior Orientation dialog appears.
4. Select a fiducial mark location by centering the zoom window cross hair over
it and entering the fiducial location in camera units (mm) in the “Fiducial X”
and “Fiducial Y” text boxes (obtain this information from the camera report).
5. Click on “Add Point” to add the location to the list of tie points.

Orthorectification ENVI User’s Guide


Chapter 10: Map Tools 721

Figure 10-7: The Build Interior Orientation Dialog.

The tie points are listed in the Ortho: Interior Orientation GCP List.
• To display the Ortho: Interior Orientation GCP List, click “Show List” in
the Ortho: Build Interior Orientation dialog.
The GCP List appears with the GCPs listed in a table with an identifying
number, fiducial location, pixel location, and error shown. The total RMS error
is shown in the “RMS Error” text box for each point. The errors are calculated
based on a first order polynomial fit to the points and shown to indicate
whether the points were entered correctly (if the error is large you may have a
typo in a fiducial location). For details, of the GCP List, see “Using the GCP
List” on page 705.
6. Continue selecting fiducial mark locations until three or more have been
entered.
7. Select from the following options:
• To go to, edit, delete, update, and turn on and off points, see “Using the
GCP List” on page 705.
• To change the order and color of the labels and to turn point labels on and
off, see “GCP Options” on page 706.
8. Select Options > Build Interior Orientation from the Ortho: Build Interior
Orientation dialog.

ENVI User’s Guide Orthorectification


722 Chapter 10: Map Tools

9. Enter the camera focal length in mm (obtain this information from the camera
report) and enter an output filename with an .ort extension for consistency.
The .ort file contains the fiducial tie point locations, affine transformation
coefficients for both the camera coordinates to image pixels and image pixels
to camera coordinates.
10. Save the points by selecting an option from the File menu as described in
“Managing GCPs” on page 708.
11. Close the Ortho: Build Interior Orientation dialog by selecting File > Cancel.
Building Exterior Orientations
Use Build Air Photo Exterior Orientation to relate points in the aerial photograph to
their known map coordinates and elevations. The exterior orientation is built by
selecting ground control points and entering the corresponding map coordinates
using methods similar to image-to-map registration.
Note
The aerial photograph must be displayed in an image window for selection of the
ground control point locations.

1. Display the aerial photograph image.


2. Select Map > Orthorectification > Build Air Photo Exterior Orientation.
3. If more than one image is displayed, select the display number containing the
aerial photograph.
4. In the Build Exterior Projection dialog, select the desired projection and enter a
zone number if needed. For instructions, see “Selecting Map Projection
Types” on page 757.
The selected projection will be used as the orthorectified output projection and
does not need to be the same projection as the DEM file.
The Ortho: Build Exterior Orientation dialog appears. The dialog is similar to
the image-to-map registration Ground Control Points Selection dialog.
5. Select a ground control point (GCP) by centering the Zoom window cross-hair
over a pixel on the aerial photograph image and entering the corresponding
map coordinates in the appropriate text boxes.
6. In the “Elev” text box, enter an elevation for the selected pixel.

Orthorectification ENVI User’s Guide


Chapter 10: Map Tools 723

7. Click on “Add Point” to add the location to the list of GCPs.


• To display the Ortho: Exterior Orientation GCP List, click “Show List” in
the Ortho: Build Exterior Orientation dialog.
The GCP List appears with the GCPs listed in a table with an identifying
number, fiducial location, pixel location, and error displayed. The total
RMS error is shown in the “RMS Error” text box for each point. The errors
are calculated based on a first order polynomial fit to the points and shown
to indicate whether the points were entered correctly (if the error is large
you may have a typo in a fiducial location). For details, of the GCP List,
see “Using the GCP List” on page 705.
8. Continue selecting ground control points until three or more are entered.
Note
It is recommended that you use as many GCPs as possible spread over the
image, including into all four corners, for best results. Inadequate or inaccurate
GCPs can result in failure of the exterior orientation model to converge or in a bad
orthorectification output.

9. Select from the following options:


• To go to, edit, delete, update and turn on and off points, see “Using the
GCP List” on page 705.
• To change the order and color of the labels and to turn point labels on and
off, see “GCP Options” on page 706.
10. In the Ortho: Build Exterior Orientation dialog, select Options > Build
Exterior Orientation.
11. Select the .ort parameters file created for the interior orientation.
12. Save the points by selecting an option from the File menu as described in
“Managing GCPs” on page 708.
13. Close the Ortho: Build Exterior Orientation dialog by selecting File > Cancel.
The selected .ort file has the ground control points added to it.

ENVI User’s Guide Orthorectification


724 Chapter 10: Map Tools

Orthorectifying Air Photos


Use Orthorectify Air Photo to orthorectify an aerial photograph using a digital
elevation model (DEM) and the orientation file that was generated in “Building
Exterior Orientations” on page 722.
1. Select Map > Orthorectification > Orthorectify Air Photo.
2. Select the input aerial photograph filename and any subsetting.
3. Select the input digital elevation model (DEM) filename.
4. Select the orientation parameters (.ort) filename that was created in the two
previous procedures (“Building Interior Orientations” and “Building Exterior
Orientations”).
5. When the Orthorectification Bounds dialog appears, enter or calculate the
approximate minimum value contained in the DEM file:
• To calculate the minimum value from the DEM file:
A. To skip pixels and speed the statistics calculations, enter a value less than
1.0 in the “Stats X/Y Resize Factor” text boxes.
B. If your DEM has a filler value for missing data, enter that value in the
“DEM Value to Ignore” text box.
C. Click the “Calculate Value From File” button.
The Calculating Data Min/Max and Computing Statistics status dialogs
appear. Once the statistics are calculated, the minimum DEM value is
entered into the “Minimum DEM Value” text box.
This minimum value is used only in determining the output image size
bounding box coordinates. If the default value of 0 is used and your DEM
minimum value is larger, then the output image may have a larger black
border than it would have if the proper value was entered.
6. In the Orthorectification Bounds dialog, click “OK.”
The Orthorectification Parameters dialog appears. Currently, only nearest
neighbor resampling is available.
7. Enter the value to ignore (missing data) in the DEM in the appropriate text
box.
8. Set the “Background Value” (the DN value used to fill areas where no image
data appears in the warped image) by entering the DN value in the
“Background Value” text box.

Orthorectification ENVI User’s Guide


Chapter 10: Map Tools 725

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 may not be the same size as the DEM image. The output size
coordinates are determined in the exterior orientation projection coordinates.

Figure 10-8: The Orthorectification Parameters Dialog.

9. Change the map coordinate or latitude/longitude information for the upper left
coordinate, pixel size, and image size by clicking “Change Output Parameters”
and entering the desired values.
Note
Since only nearest neighbor resampling is currently available, it is recommended
that you set the pixel size to the resolution at which the photo was scanned.

Click the “Change Projection” button to change the projection of the upper left
coordinate only. Use Build Exterior Orientation to set the output projection of the
image.

10. Select output to “File” or “Memory.”


11. Click “OK” to start the orthorectification.

ENVI User’s Guide Orthorectification


726 Chapter 10: Map Tools

SPOT Orthorectification
SPOT orthorectification uses satellite ephemeris information from the SPOT leader
file to generate an initial orbit and view geometry model. SPOT 1A and 1B data can
be orthorectified. Ground control points (GCPs) are used to optimize the orbital
model by performing a non-linear inversion. The satellite position and set of
collinearity equations for every line in the SPOT data are calculated and stored in a
.sot file.
The orthorectification is done in two steps. In the first step, you build the exterior
orientation using ground control points. In the second step, you execute the
orthorectification using the orbit model and a DEM file to correct the SPOT image
pixel by pixel. For details, see the following reference:
Westin, Torbjorn, 1990. Precision rectification of SPOT imagery, Photogrammetric
Engineering & Remote Sensing, Vol. 56, No. 2, pp. 247-253.
Building Exterior Orientations
Use Build SPOT Exterior Orientation to optimize the satellite orbit model by relating
points in the SPOT image to their known map coordinates and elevations. The
orthorectification is built by selecting ground control points and entering the
corresponding map coordinates using methods similar to image-to-map registration.
Note
The SPOT image must be displayed in an image window for selection of the ground
control point locations.

1. Display the SPOT image.


2. Select Map > Orthorectification > Build SPOT Exterior Orientation.
3. If more than one image is displayed, select the display number containing the
SPOT image.
4. Select the desired projection and enter a zone number if needed. For detailed
instructions, see “Selecting Map Projection Types” on page 757.
The selected projection will be used as the orthorectified output projection and
does not need to be the same projection as the DEM file.

Orthorectification ENVI User’s Guide


Chapter 10: Map Tools 727

The Ortho: Build Exterior Orientation dialog appears. This dialog is similar to
the image-to-map registration Ground Control Points Selection dialog.
• To resize the dialog, click on any corner with the left mouse button and
drag to the desired size and/or shape.
5. Select a ground control point (GCP) by centering the zoom window cross-hair
over a pixel on the SPOT image and entering the corresponding map
coordinates in the appropriate text boxes.
6. In the “Elev” text box, enter an elevation for the selected pixel.
7. Click on “Add Point” to add the location to the list of GCPs.
8. Continue selecting ground control points until three or more are entered.
Note
It is recommended that you use as many GCPs as possible (dozens) spread over the
image to stabilize the satellite orbit inversion. Although the orthorectification can
be run with only 3 GCPs, it may produce instability in the satellite orbit inversion.

The GCPs are listed in the dialog with an ID#, map location, pixel location,
and error shown. The total RMS error is shown in the “RMS Error” text box.
The errors are calculated based on a first order polynomial fit to the points.
9. Select from the following options:
• To go to, edit, delete, and turn on and off points, use the buttons at the
bottom of the dialog as described in “Using the GCP List” on page 705.
• To change the order and color of the labels and to turn point labels on and
off, use the pulldown menus as described in “GCP Options” on page 706.
10. Select Options > Build Exterior Orientation from the Ortho: Build Exterior
Orientation dialog.
11. Select the SPOT leader filename, typically lead_xx.dat where xx is the
scene number.
12. Enter an output filename with a .sot extension for consistency.
The .sot file is in binary format and contains the satellite location and collinearity
equations for each line in the SPOT image. This file is needed in the next step.

ENVI User’s Guide Orthorectification


728 Chapter 10: Map Tools

Orthorectifying SPOT Images


Use Orthorectify SPOT Image to orthorectify the SPOT image using a digital
elevation model (DEM) and the .sot parameters file generated from “Building
Exterior Orientations” on page 726.
1. Select Map > Orthorectification > Orthorectify SPOT Image.
2. Select the input SPOT image filename and any subsetting.
3. Select the input digital elevation model (DEM) filename.
4. Select the ortho parameters (.sot) filename created above.
5. Select the SPOT leader filename.
6. When the Orthorectification Bounds dialog appears, enter or calculate the
approximate minimum value contained in the DEM file.
• To calculate the minimum value from the DEM file:
A. To skip pixels and speed the statistics calculations, enter a value less than
1.0 in the “Stats X/Y Resize Factor” text boxes.
B. If your DEM has a filler value for missing data, enter that value in the
“DEM Value to Ignore” text box.
C. Click the “Calculate Value From File” button.
The Calculating Data Min/Max and Computing Statistics status dialogs
appear. Once the statistics are calculated, the minimum DEM value is
entered into the “Minimum DEM Value” text box.
This minimum value is used only in determining the output image size
bounding box coordinates. If the default value of 0 is used and your DEM
minimum value is larger, then the output image may have a larger black border
than it would have if the proper value was entered.
7. Click “OK.”
The Orthorectification Parameters dialog appears. Currently, only nearest
neighbor resampling is available.
8. Enter the value to ignore (missing data) in the DEM in the corresponding text
box.

Orthorectification ENVI User’s Guide


Chapter 10: Map Tools 729

Figure 10-9: The Orthorectification Parameters Dialog.

9. Set the “Background Value” (the DN value used to fill areas where no image
data appears in the warped image) by entering the DN value in the
“Background Value” text box.
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 may not be the same size as the DEM image. The output size
coordinates are determined in the exterior orientation projection coordinates.
10. Change the map coordinate or latitude/longitude information for the upper left
coordinate, pixel size, and image size by clicking “Change Output Parameters”
and entering the desired values.

ENVI User’s Guide Orthorectification


730 Chapter 10: Map Tools

Note
Since only nearest neighbor resampling is currently available, it is recommended
that the pixel size is set to its native format resolution (i.e., 10 or 20 meters for
SPOT).

Use the “Change Projection” button to change the projection of the upper left
coordinate only. Use Build Exterior Orientation to set the output projection of the
image.

11. Select output to “File” or “Memory.”


12. Click “OK” to start the orthorectification.

Orthorectification ENVI User’s Guide


Chapter 10: Map Tools 731

Image Mosaicking
Use Mosaic Images 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). Individual bands, entire
files, and multi-resolution georeferenced images can be mosaicked. 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


1. Select Map > Mosaicking > Pixel Based.
2. When the Pixel Based Image Mosaicking dialog appears, enter the desired size
of the output image (in pixels) into the “X Size” and “Y Size” text boxes.
X represents samples (pixels), and Y represents image lines.
Importing Images
Use the Import menu to choose input bands for the mosaic.
1. In the Pixel Based Image Mosaicking dialog, select either Import > Import file
with feathering or Import file without feathering.
2. When the Mosaic Input File appears, select a file or files and perform any
spatial and spectral subsetting.
Note
Individual bands or entire files can be mosaicked.

• To select individual bands, click the “Select By” arrow toggle button in the
Mosaic Input File dialog to select “Band.”
• If you select Import file with feathering, a Mosaic Entry Input Parameters
dialog appears with feathering options. For instructions, see “Feathering”
on page 742.

ENVI User’s Guide Image Mosaicking


732 Chapter 10: Map Tools

Figure 10-10: The Image Mosaicking Dialog for a pixel-based image mosaic.

Once you select the first input file for the mosaic, a colored graphic
representing the input image size is drawn in the draw widget on the right side
of the dialog.
3. Import other files as needed.
The image name, the color of graphic, and the coordinates for the upper left corner of
the image are listed in the center of the dialog.

Positioning Images
The coordinates for the upper left corner of the input image are listed in parentheses
next to the image name in the center of the Pixel Based Image Mosaicking dialog.
Images with “x start” and “y start” values in their headers are automatically placed in
the mosaic with the defined offset. Select from the following options:
• To initially place each new item in the mosaic at (1, 1,) select Options > Do
Not Use Image Offset.
• To enable editing of the position coordinates, click on any listed image and
enter the desired upper left coordinates in the fields labeled “X0” and “Y0.”
The number of the currently selected image is shown in the text box labeled
“#”. Any changes to the “X0”, and “Y0” fields will be applied to this item.

Image Mosaicking ENVI User’s Guide


Chapter 10: Map Tools 733

• Images can also be positioned within the mosaic by clicking and holding the
left mouse button on the appropriate image outline graphic box and dragging
to the desired location.
• To designate a fixed spacing see “Setting Snap Values” in the next section.
A “Snap” of 1 pixel causes images to be placed without snapping.
Pixel-Based Mosaicking Options
Use the Options menu to select image placement options, edit mosaic parameters,
and delete and clear images.
Setting Snap Values
1. Select Options > Set Snap Value.
2. In the Mosaic Window Snap Value dialog, click the arrow increment buttons
to select a value.
3. Click “OK.”
Note
The snap value refers to pixels in the mosaic window, not actual pixels. Each pixel
in the mosaic window represents many pixels in the output mosaic. If the mosaic
window is 256 x 256 pixels, and the output mosaic area is 1000 x 1000 pixels, a
snap value of 5 would produce a fixed spacing of 19.5312 pixels, rounded to 20, in
the output mosaic.

A “Snap” of 1 pixel causes images to be placed without snapping.


Bringing an Image to the Front
To bring an image to the front of all the other images in the mosaic:
1. In the list of images in the Pixel Based Image Mosaicking dialog, click on the
desired image.
2. Choose one of the following options:
• Select Options > Percolate Entry.
• Click on an image graphic in the draw widget with the middle mouse
button to bring that image to the front.

ENVI User’s Guide Image Mosaicking


734 Chapter 10: Map Tools

Centering Images
• To center all of the currently listed images (as a group) in the output mosaic,
select Options > Center Entries or double-click outside the graphic outlines
with the left mouse button.
Each image is not centered individually but the layout within the open mosaic
area is centered.
Editing Mosaic Parameters
1. Click on an image name and select Options > Edit Entry.
The Mosaic Entry Input Parameters dialog appears.
2. Select from the following options:
• To make pixels with a certain background value transparent so that the
underlying image is visible, enter the pixel value in the “Background Data
Value to Ignore” text box. (Use for mosaicking of images with constant
DN value borders.)
• To change the offset for the selected image, enter the desired values in the
“Image Offset X0/Y0” text boxes.
• To control feathering parameters (see “Feathering” on page 742).
Replacing Images
To replace the current image with a new image of the same size:
1. In the Pixel Based Image Mosaicking dialog, click on an image name and
select Options > Replace Entry.
2. Select the new image filename and click “OK.”
The new image is placed in the same position as the original image.
Setting Mosaic Sizes
To set the size of the mosaic based on pixels in the border of the entries:
1. Select Options > Reset Mosaic Size.

Image Mosaicking ENVI User’s Guide


Chapter 10: Map Tools 735

2. In the Mosaic Reset Size dialog, click the arrow increment buttons to select a
value for the reset border.
The border value is the number of pixels that will be added around the edges of
the mosaic.
3. Click “OK.”
Locking Groups
• To group all of your entries and lock them together, select Options > Lock All
Entries: On.
Locked entries can be moved together as a unit.
• To ungroup and unlock entries, select Options > Lock All Entries: Off.
Tip
To toggle the lock feature on and off, click anywhere within the graphic area with
the right mouse button.

Deleting Images
• To delete that image from the mosaic, click on an image name in the list and
select Options > Delete Entry.
• To remove all the images from the mosaic dialog, select Options > Clear All
Entries.
Setting Image Placement Preferences
Images with “x start” and “y start” values in their headers are automatically
placed in the mosaic with the defined offset.
• To initially place the images at the top right corner, select Options > Do
Not Use Image Offset.
• To place images using the header offsets, select Options > Use Image
Offset.
Creating Virtual Mosaics
It is not necessary to save the mosaic to an output file unless feathering was used.
Instead, you can save the mosaic to a Virtual Mosaicä. ENVI uses a virtual mosaic
file (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 on-the-fly, however. The
mosaic template file can be displayed in ENVI and annotated, stretched, etc., like any

ENVI User’s Guide Image Mosaicking


736 Chapter 10: Map Tools

other image. Using a virtual mosaic prevents having multiple files containing the
same images and therefore saves disk space.
1. In the Pixel Based Image Mosaicking dialog, select File > Save Template.
2. In the Output Mosaic Template dialog, enter an output filename with the
extension .mos for consistency.
The template file is a virtual mosaic file in ASCII format. It contains the mosaic size,
file names, bands used, data dimensions, and mosaic information. The “Info” field
has the X and Y offsets, edge feathering distance, cutline feathering distance, and
data value to ignore.
The mosaic template file appears in the Available Bands List and can be used as input
for processing with other functions.
Note
The template file can be edited, using any text editor, to change the file or the bands
used in the mosaic.

Restoring Saved Templates


1. Select File > Restore Template.
2. When an ENVI file selection dialog appears, select the desired .mos filename
to load into the mosaic.
• Replace the files with new images by using Options > Replace Entry or
edit the filenames in the ASCII .mos file (see “Creating Virtual Mosaics”
on page 735).
Opening Virtual Mosaics
To open a virtual mosaic (saved template):
1. From the ENVI main menu, select File > Open Image File.
2. In the file selection dialog, select the .mos file.
The virtual mosaic file and the files that make up the virtual mosaic are listed in the
Available Bands List.

Image Mosaicking ENVI User’s Guide


Chapter 10: Map Tools 737

Building Mosaics
Use Apply to build a mosaic after all of the images for the mosaic have been
positioned. Building the mosaic outputs the mosaic to a file.
Note
It is not necessary to build the mosaic to an output file unless feathering was
used. The mosaic can be saved as a virtual mosaic to save time and disk space
(see “Creating Virtual Mosaics” on page 735).

1. Select File > Apply.


The Mosaic Parameters dialog appears:
2. Select output to “File” or “Memory.”
3. Select the desired background DN value (DN value for areas without image)
for the output mosaic.
4. Click “OK.”
A status window displays the percent complete while the mosaic is being built. The
mosaic name appears in the Available Bands List upon completion.
Closing the Dialog
• To close the Pixel Based Image Mosaicking dialog, select File > Cancel.

Building Georeferenced Mosaics


Use Georeferenced Mosaicking to automatically overlay multiple georeferenced
images. You can mosaic multi-resolution georeferenced images, apply feathering to
the images, and import georeferenced images and non-georeferenced images into the
same mosaic.
• To build mosaics using georeferenced images, select Map > Mosaicking >
Georeferenced.
The Georeferenced Image Mosaicking dialog appears. Use the dialog to set the
output mosaic parameters and to select images to mosaic.

ENVI User’s Guide Image Mosaicking


738 Chapter 10: Map Tools

Figure 10-11: The Image Mosaicking Dialog for a georeferenced image mosaic.

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. In the Georeferenced Image Mosaicking dialog, select Import > Import file
with feathering or Import file without feathering.
2. When the Mosaic Input File appears, select a file or files and perform any
spatial and spectral subsetting.
Note
Individual bands or entire files can be mosaicked.

• If you select Import file with feathering, a Mosaic Entry Input Parameters
dialog appears with feathering options. For instructions, see “Feathering”
on page 742.
Once you select the first input file for the mosaic, a colored graphic
representing the input image size is drawn in the draw widget on the right side
of the dialog and the mosaic size is set.
3. Import additional georeferenced images to the mosaic as needed.

Image Mosaicking ENVI User’s Guide


Chapter 10: Map Tools 739

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.
Note
No editing or shifting of map coordinates is permitted.

For multi-resolution mosaicking, the output pixel size is entered on output and
ENVI automatically resamples the lower resolution images to match.
4. Import additional non-georeferenced images to the mosaic as needed.
When importing non-georeferenced images, the Mosaic Entry Input
Parameters dialog appears.
• Enter a background value to ignore, if needed, and an image offset in
pixels from the upper left corner.
Each image is listed in the center of the dialog with the color of the graphic box and
the feathering parameters.
Note
You cannot adjust the image positions with the graphic boxes like you can in pixel-
based mosaics.

Georeferenced Image Mosaicking Options


Use the Options menu in the Georeferenced Image Mosaicking dialog to edit mosaic
parameters and to delete and clear images from the mosaic.
Editing Mosaic Parameters
1. Click on an image name and select Options > Edit Entry.
The Mosaic Entry Input Parameters dialog appears.
2. To make pixels with a certain background value transparent so that the
underlying image is visible, enter the pixel value in the “Background Data
Value to Ignore” text box. (Use for mosaicking of images with constant DN
value borders.)

ENVI User’s Guide Image Mosaicking


740 Chapter 10: Map Tools

3. For non-georeferenced images, enter an X and Y image offset in the


geographic units (i.e. meters).
• To control feathering parameters (see “Feathering” on page 742).
Replacing Images
To replace the current image with a new image of the same size:
1. In the Georeferenced Image Mosaicking dialog, click on an image name in the
list and select Options > Replace Entry.
2. Select a new image filename and click “OK.”
The new image is placed in the same position as the original image.
Deleting Images
• To delete that image from the mosaic, click on an image name in the list and
select Options > Delete Entry.
• To remove all the images from the mosaic dialog, select Options > Clear All
Entries.

Creating Virtual Mosaics


It is not necessary to save the mosaic to an output file unless feathering or multi-
resolution data were used. Instead, you can save the mosaic to a Virtual Mosaicä.
ENVI uses a virtual mosaic file (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
multi-resolution resampling on-the-fly, however. The mosaic template file can be
displayed in ENVI and annotated, stretched, etc., like any other image. Using a
virtual mosaic prevents having multiple files containing the same images and
therefore saves disk space.
1. In the Georeferenced Image Mosaicking dialog, select File > Save Template
2. In the Output Mosaic Template dialog, enter an output filename with the
extension .mos for consistency.
The template file is a virtual mosaic file in ASCII format. It contains the mosaic size,
file names, bands used, data dimensions, and mosaic information. The “Info” field
has the X and Y offsets, edge feathering distance, cutline feathering distance, and
data value to ignore.
The Virtual Mosaic appears in the Available Bands List and can be used as input for
processing with other functions.

Image Mosaicking ENVI User’s Guide


Chapter 10: Map Tools 741

Restoring Saved Templates


1. Select File > Restore Template.
2. When an ENVI file selection dialog appears with all the .mos files listed by
default, select the desired filename to load that template into the mosaic.
• Replace the files with new images by using Options > Replace Entry or
edit the filenames in the ASCII .mos file (see “Creating Virtual Mosaics”
on page 740).
Opening Virtual Mosaics
To open a virtual mosaic (saved template):
1. From the ENVI main menu, select File > Open Image File.
2. In the file selection dialog, select the .mos file.
The virtual mosaic file and the files that make up the virtual mosaic are listed in the
Available Bands List.
Building Mosaics
Use Apply to build a mosaic after all of the images for the mosaic have been
positioned. Building the mosaic outputs the mosaic to a file.
Note
It is not necessary to save the mosaic to an output file unless feathering or
multiresolution data were used. The mosaic can be saved as a virtual mosaic file to
save time and disk space (see “Creating Virtual Mosaics” on page 735).

1. Select File > Apply.


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.
• To change the output pixel size, enter the desired size in map units (i.e.
meters, degrees, etc.) in the appropriate text boxes.
2. Select the type of multi-resolution resampling (nearest neighbor, bilinear, or
cubic convolution) from the “Resampling” menu.
Tip
Nearest neighbor resampling is recommended.

ENVI User’s Guide Image Mosaicking


742 Chapter 10: Map Tools

3. Select output to “File” or “Memory.”


4. Enter desired background DN value for the output mosaic.
5. Click “OK” to start the mosaicking operation.
A status window showing the percent complete appears while the mosaic is being
built. The mosaic name will appear in the Available Bands List when completed.
Closing the Dialog
• To exit the Georeferenced Image Mosaicking dialog, select File > Cancel.

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 10-12). The distance specified is used to
create 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 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.

Image Mosaicking ENVI User’s Guide


Chapter 10: Map Tools 743

Figure 10-12: Example of edge feathering.

1. In the Image Mosaicking dialog, select Import > Import file with feathering or
Options > Edit Entry.
The Mosaic Entry Input Parameters dialog appears.
2. In the “Edge feathering distance (pixels)” text box, enter the distance 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 10-13).
Note
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” on page 222).

ENVI User’s Guide Image Mosaicking


744 Chapter 10: 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. In the Image Mosaicking dialog, select Import > Import file with feathering or
Options > Edit Entry.
2. When the Mosaic Entry Input Parameters dialog appears, click the “Ann File”
button and select an annotation file.
3. In the “Cutline feathering distance (pixels)” text box, specify the distance used
to blend the image boundaries.

Figure 10-13: Example of cutline feathering.

Image Mosaicking ENVI User’s Guide


Chapter 10: Map Tools 745

Georeferencing from Input Geometry


Use Georeference from Input Geometry to georeference data that has an associated
file containing map locations for every pixel. This is a very accurate method of
georeferencing data because it places every pixel at its exact map location, avoiding
using GCPs and polynomial warping. The map information, contained in an Input
Geometry (IGM) file(s), is stored in two bands, one for X coordinates (e.g.,
longitude or northing) and one for Y coordinates (e.g., latitude or easting).
Many data sets include IGM files in their distribution and ENVI generates IGM files
for various sensors such as SeaWiFS and AVHRR (see “Building SeaWiFS
Geometry Files” on page 752 and “Building AVHRR Geometry Files” on page 755).
The input geometry (IGM) file itself is not geocorrected, but does contain the
geolocation information for each original raw pixel. The IGM file is used to create a
geographic look-up table (GLT) file that contains the information about which
original pixel occupies which output pixel in the final product. The GLT file can be
used to geocorrect any band or derived product through a simple lookup table
procedure. The GLT file contains integer pixel location values which are sign-coded
to indicate if a certain output pixel is “real” or a nearest-neighbor infill pixel. Positive
GLT values indicate that an exact pixel location is used and negative GLT values
indicate that the nearest neighbor pixel is used. The GLT file is a geocorrected
product, with a fixed pixel size projected into a rotated UTM system. It uses 1-based
coordinates (upper left pixel is located at 1,1).
You can georeference your data directly from an IGM file or from a GLT file. When
you georeference from an IGM file, the GLT file is built on-the-fly.
Note
Because the georeferenced images have null values around their edges that must be
masked in processing and are often inflated in size by replicated pixels, it is
suggested that you do all the data processing first, then apply the geocorrection to
the derived final products.

Building GLT Files


Use Build GLT to build a Geographic Lookup Table (GLT) file from input geometry.
The two bands of the GLT file refer to the original sample number and the original
line number, respectively. The sign of the value indicates whether the pixel is an
actual image pixel, located at its proper position (indicated by a positive value) or a
nearest-neighbor infill pixel placed to fill an undersampled image gap (indicated by a

ENVI User’s Guide Georeferencing from Input Geometry


746 Chapter 10: Map Tools

negative value). A zero value signifies that no input pixel corresponds to the output
pixel.
1. Select Map > Georeference from Input Geometry > Build GLT.
2. When the Input X Geometry Band selection dialog appears, select the band
that contains the X geometry coordinates. Click “OK.”
3. When the Input Y Geometry Band selection dialog appears, select the band
that contains the Y geometry coordinates. Click “OK.”
The Geometry Projection Information dialog appears.
4. In the “Input Projection of Geometry Bands” list, click on the projection type.
5. In the “Output Projection for Georeferencing” list, click on the projection for
the georeferencing.
For instructions on selecting input and output projections, see “Selecting Map
Projection Types” on page 757.
6. 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 will appear at an angle.
• To change the output pixel size, replace the value in the “Output Pixel
Size” text box.
• To change the output rotation angle, replace the value in the “Output
Rotation” text box.
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 and the output GLT filename appears in the Available
Bands List.

Georeferencing from Input Geometry ENVI User’s Guide


Chapter 10: Map Tools 747

Georeferencing from GLT Files


Use Georeference from GLT to georeference image data or results using a
Geographic Lookup Table GLT file.
1. Select Map > Georeference from Input Geometry > Georeference from GLT.
2. Select the geometry lookup table (GLT) file.
3. Select the data file to georeference and any spectral subsetting.
4. If you used a subset of the original data as the input file, select whether to
output only the warped subset region or whether to output that subset warped
within the entire output boundary by clicking the “Subset to Output Image
Boundary” arrow toggle button to select “Yes” or “No.”
5. 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 image data or results using an Input
Geometry IGM file. Optionally, a GLT file can be output.
1. Select Map > Georeference from Input Geometry > Georeference from IGM.
2. Select the input file to georeference and any spectral subsetting.
3. Select the band that contains the X geometry coordinates.
4. Select the band that contains the Y geometry coordinates.
The Geometry Projection Information dialog appears.
5. Select the input projection of the geometry coordinates.
6. Select the output projection for the georeferencing.
For instructions on selecting input and output projections, see “Selecting Map
Projection Types” on page 757.
7. Click “OK.”
A default output pixel size and rotation angle are calculated and appear in the
Build Geometry Lookup File Parameters dialog.

ENVI User’s Guide Georeferencing from Input Geometry


748 Chapter 10: Map Tools

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 will appear at an angle.
• To change the output pixel size, replace the value in the “Output Pixel
Size” text box.
• To change the output rotation angle, replace the value in the “Output
Rotation” text box.
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. Enter the DN value to use as the background value around the edges of the
warped data.
9. Enter an output filename.
10. Click “OK.”

Building Super GLT Files


Use Build Super GLT to build super GLT files from input geometry (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. Using a super GLT file for
georeferencing provides a more robust resampling method—a radial resampling
method—but is a much slower process than regular GLT functions.
You’ll notice that the steps involved are basically the same as those for building
regular GLT files, but the entire processing time is significantly longer. An outline of
the procedure for building super GLT files follows.
Note
You can use Super Georeferencing from IGM to combine two steps—building the
super GLT and georeferencing from it—into one step. For details, see “Super
Georeferencing from IGM Files” on page 750.

1. From the ENVI main menu, select Map > Georeference from Input Geometry
> Build Super GLT.

Georeferencing from Input Geometry ENVI User’s Guide


Chapter 10: Map Tools 749

2. Select the input X and Y geometry bands, then select the input and output
projections.
The process runs in two parts. The regular GLT filename appears in the Available
Bands List, but the Super GLT filename does not.

Georeferencing from Super GLT Files


Use Georeference from Super GLT to georeference image data or results 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.
Warning
Because “super” GLT functions are exceptionally slow, expect a significant amount
of time for processing.

1. Select Map > Georeference from Input Geometry > Georeference from Super
GLT.
2. In the input file selection dialog, select the data file to georeference and
perform any spectral subsetting.
3. In the next file selection dialog, select the super GLT file.
The Georeference from SGL Parameters dialog appears.

Figure 10-14: The Georeference from SGL Parameters dialog.

ENVI User’s Guide Georeferencing from Input Geometry


750 Chapter 10: Map Tools

4. In the “Background Pixel Value” text box, 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” text boxes, enter a minimum and
maximum kernel size to use, or click the arrow buttons to set the values.
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 the minimum number of pixels to resample, or click the arrow buttons to
set a value.
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 “File” or “Memory” output.
8. Click “OK.”
The results appear in the Available Bands List.

Super Georeferencing from IGM Files


The Super Georeference from IGM function combines building a super GLT file and
georeferencing from it into a single process. The process georeferences an image
using an Input Geometry (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.
You’ll notice that 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 and outputting the super GLT file.
1. Select Map > Georeference from Input Geometry > Super Georeference from
IGM.
2. In the input file selection dialog, select the input file to georeference and
perform any spectral subsetting.
3. In the subsequent dialogs, select the X and Y input geometry bands.
The Geometry Projection Information dialog appears.
4. Select the input and output projections and click “OK.”

Georeferencing from Input Geometry ENVI User’s Guide


Chapter 10: Map Tools 751

A default output pixel size and rotation angle are calculated and appear in the
Build Geometry Lookup File Parameters dialog.
5. In the “Kernel Size Min” and “Max” text boxes, enter a minimum and
maximum kernel size to use, or click the arrow buttons to set the values.
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 the minimum number of pixels to resample, or click the arrow buttons to
set a value.
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. Enter an output filename for the super GLT file, if desired.
8. In the “Background Pixel Value” text box, enter the DN value to use as the
background value around the edges of the warped data.
9. Select “File” or “Memory” output.
• For “File” output, click the “Compress” check box if you want to
compress the output file.
10. Click “OK.”
The results appear in the Available Bands List.

ENVI User’s Guide Georeferencing from Input Geometry


752 Chapter 10: 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 function produces a full precision geocoding based on a complete
geometry model of the earth and satellite orbit.

Building SeaWiFS Geometry Files


Use Build Geometry File to calculate the geometry for HDF and CEOS format
SeaWiFS data. When you select this function, 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 is the angle measured vertically from each
pixel to the sensor or sun (straight above the pixel = 0 degrees) and the azimuth is the
directional angle measured from each pixel to the sensor or sun with north = 0
degrees, and angles increasing clockwise (i.e., 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 747).

1. Select from the following options:


• Select Utilities > Data-Specific Utilities > SeaWiFS Utilities > HDF Build
Geometry File or CEOS Build Geometry File.
• Select Map > Georeference SeaWiFS > HDF Build Geometry File or
CEOS Build Geometry File.
2. When the SeaWiFS Input File dialog appears, select an image file and perform
any spatial or spectral subsetting.
Note
Your input file may be an ENVI file.

3. 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.
4. When the SeaWiFS Geometry Parameters dialog appears, select the values to
be computed by selecting one of the options below:

Georeferencing SeaWiFS Data ENVI User’s Guide


Chapter 10: Map Tools 753

• To select individual values, click in the check boxes next to the desired
value.
• To select a range of values, enter the beginning and ending numbers into
the two text boxes 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.”
5. Select “File” or “Memory” output.
6. From the “Output Data Type” button menu, select “Double” or “Floating
Point.”
7. 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 745), instead of
CEOS or HDF Georeference Data.

1. Select Utilities > Data-Specific Utilities > SeaWiFS Utilities > HDF
Georeference Data or CEOS Georeference Data or Map > Georeference
SeaWiFS > HDF Georeference Data or CEOS Georeference Data
2. When the SeaWiFS Input File dialog appears, select an image file and perform
any spatial or spectral subsetting.
3. 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.
4. When the Georeference SeaWiFS Parameters dialog appears, select the desired
output map projection from the list (see “Selecting Map Projection Types” on
page 757).
5. Enter the number of X and Y warp points to use in the corresponding “X” and
“Y” text boxes.

ENVI User’s Guide Georeferencing SeaWiFS Data


754 Chapter 10: Map Tools

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.

6. Click “OK.”
7. When the standard Registration Parameters dialog appears, select the
warping and resampling methods and change the output dimensions, if
desired (see “Warping and Resampling” on page 714 for details).
Tip
We recommend that you use the triangulation method to produce the most accurate
results. Note, however, that it will be much slower than polynomial warping.

8. Select either “File” or “Memory” output and click “OK.”

Georeferencing SeaWiFS Data ENVI User’s Guide


Chapter 10: Map Tools 755

Georeference AVHRR Data


Use Georeference AVHRR Data 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.
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 747).

1. Select Map > Georeference AVHRR Data > Build Geometry File or Basic
Tools > Data-Specific Utilities > AVHRR Utilities > Build Geometry File.
2. Select the original AVHRR file.
The AVHRR Image Geometry Parameters dialog appears.
3. Select which values to compute by clicking on them in the list.
4. Select whether to output the zenith angles in degrees or radians by selecting
the corresponding toggle button.
The zenith is the angle measured vertically from each pixel to the sensor or sun
(straight above the pixel = 0 degrees).
5. Enter an output filename.
6. Select “Double” or “Floating Point” output data type from the “Output Data
Type” button menu.
7. Click “OK.”
ENVI extracts the header information and calculates the geometry values for each
pixel.

Georeferencing AVHRR Data


Use Georeference Data to georeference the AVHRR data, calibration results, and sea
surface temperature image using information from original AVHRR data. Each line
of data has 51 latitude and longitude values that can be used in the georeferencing.

ENVI User’s Guide Georeference AVHRR Data


756 Chapter 10: Map Tools

Note
After the original AVHRR data are georeferenced, the header information needed
to calculate the calibration and sea surface temperatures is not in the new ENVI
header. Therefore, georeferencing should not be done until the AVHRR data is
calibrated and the sea surface temperatures are calculated (see “Calibrating
AVHRR Data” on page 472 and “Computing Sea Surface Temperature” on
page 473).

Tip
We recommend that you use the more accurate technique, (AVHRR) Build
Geometry File and Georeference from Input Geometry (see “Georeferencing from
Input Geometry” on page 745), instead of Georeference AVHRR Data.

1. Select Map > Georeference AVHRR Data > Georeference or Basic Tools >
Data Specific Utilities > AVHRR Utilities > Georeference Data.
2. Select the input data file and perform any spatial and/or spectral subsetting.
• If the input data file is not the original AVHRR format file, another input
file dialog appears for selection of the original AVHRR file.
The georeferencing information is extracted from the original AVHRR file.
3. When the Georeference AVHRR Parameters dialog appears, select the
desired output map projection from the list and enter any necessary
parameters (see “Selecting Map Projection Types” on page 757).
4. Enter the number of X and Y warp points to use in the corresponding “X” and
“Y” text boxes.
Up to 51 points in the X direction and up to the number of lines in the Y
direction can be used in the georeferencing. If fewer warp points are entered,
they are evenly spaced throughout the image.
Note
Using many warp points increases the warping time considerably, but can
significantly increase the accuracy of the georeferencing.

5. Click “OK.”
The standard 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 714 for details).
6. Select either “File” or “Memory” output and click “OK.”

Georeference AVHRR Data ENVI User’s Guide


Chapter 10: Map Tools 757

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.
Note
For detailed information about map projections, see “Map Projections” on
page 913.

1. In the list of projection types, click on the name of the projection to select it.
• To build a customized map projection, click “New” and follow the
instructions under “Building Customized Map Projections” on page 758.
Different parameters are available depending on the selected projection type.
2. Enter or 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 arrow toggle button next to the “Coordinates” label.
Pixel-based uses the upper left corner as the origin and map-based uses the
lower left corner as the origin. Either selection only affects the “y”
coordinates.
• To change the datum for a projection type, click the “Datum” button 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/).
• 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 the “Set Zone” button and enter the latitude and longitude values to
automatically calculate the zone.
• If you select a “State Plane...” projection, enter the zone or click the “Set
Zone” button 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 the “Units” button and
select a unit type. Enter a pixel size (in the selected unit), if needed.

ENVI User’s Guide Selecting Map Projection Types


758 Chapter 10: Map Tools

Building Customized Map Projections


ENVI includes several “standard” map projections such as Universal Transverse
Mercator (UTM) and Gauss-Kruger. For more information about ENVI’s supported
map projections, see Appendix D, “ENVI Map Projections”. Use Build Customized
Map Projection 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
projection type (Transverse Mercator, Lamberts Conformal Conic, Lambert
Azimuthal Equal Area, Oblique Mercator (A and B), Stereographic, Albers Equal
Area, and Polyconic), Ellipsoid, Datum, False Easting and Northing. Details of
specific map projections can be found in Snyder, 1982, USGS Bulletin 1532, “Map
Projections Used by the U. S. Geological Survey.” Details on datums can be found on
the following internet web pages.
http://www.utexas.edu/depts/grg/gcraft/notes/datum/datum.html and
http://www.connect.net/jbanta/.
Note
ENVI’s UTM projection uses the North American 1927 datum and Clarke 1866
ellipsoid.

1. Select Map > Build Customized Map Projection, or click the “New” button in
any dialog where map projection selection is available.
2. When the Customized Map Projection Definition dialog appears, either enter a
new projection name and parameters, or select Projection > Load Existing
Projection 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 886).
Once loaded, all of the parameters can be edited.
3. Enter or modify the projection name in the “Projection Name:” text box.
4. Select the “Projection Type” from the list of supported projections (see “Map
Projections” on page 913).

Building Customized Map Projections ENVI User’s Guide


Chapter 10: Map Tools 759

5. Click the arrow toggle button to select “Projection Ellipsoid:” or “Projection


Datum” and select from the following options:
• If a different ellipsoid is desired:
A. Select “User Defined” from the list.
B. Enter the desired “A” and “B” values to define the ellipsoid (See Snyder,
1982).
• To change the datum:
A. Select the desired datum from the scrolling list.
The ellipsoid that corresponds with the selected datum is shown next to the
“Ellipsoid” label.
B. Toggle back to the “Projection Ellipsoid” list and select this ellipsoid.
6. If a false easting and northing is desired (usually used to keep map coordinates
from being negative), enter the values in the corresponding text boxes.
7. Enter the “Projection Origin” latitude and longitude in degrees, minutes, and
seconds or select Options > DMS< - >DD and enter latitude and longitude in
decimal-degrees.

ENVI User’s Guide Building Customized Map Projections


760 Chapter 10: Map Tools

Figure 10-15: The Customized Map Projection Definition dialog. Options on the
right side of the dialog vary depending on the map projection.

8. Enter the projection-type-specific parameters in the available text boxes 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 nearly correct). Polyconic
requires the projection origin. Lamberts Conformal Conic and Albers Equal
Area projections require the projection origin and two standard parallels.
See Snyder, 1982 for details.
9. Select Projection > Add New Projection 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” on page 886).

Building Customized Map Projections ENVI User’s Guide


Chapter 10: Map Tools 761

• To save the new or modified projection information, select File > Save
Projections.
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 alternate to the interactive definition above.
10. Select File > Cancel to exit the function.

ENVI User’s Guide Building Customized Map Projections


762 Chapter 10: Map Tools

Converting Map Projections


Use Convert Map Projection to convert your georeferenced files to another map
projection. The conversion is done by warping the file using the registration function
automatically.
1. Select Map > Convert Map Projection.
2. Select the input georeferenced file and click “OK.”
The Convert Map Projection Parameters dialog appears with the input
projection shown at the top of the dialog. The available output projections,
from the map_proj.txt file are displayed in the “Select Output Map Projection”
list (see “ENVI Map Projections File” on page 886).
3. In the “Select Output Map Projection” list, select the output projection by
clicking on the desired type and entering the necessary parameters (see
“Selecting Map Projection Types” on page 757).
4. Click “OK.”
The map projection is converted by warping the file using a grid of control
points.
5. In the “Number of Warp Points X/Y” text boxes, define the number of control
points to be used in the X and Y directions.
Note
Using many warp points increases the warping time considerably, but can
significantly increase the accuracy of the georeferencing.

6. Click “OK.”
The Convert Map Projection function uses the standard registration
parameters dialog to perform the warping of the image to the new
projection (see “Warping and Resampling” on page 714).
7. When the Registration Parameters dialog appears, select the warp method:
RST, Polynomial, or Triangulation.
8. Select the resampling method: Nearest Neighbor, Bilinear, or Cubic
Convolution.
9. Enter the output filename.

Converting Map Projections ENVI User’s Guide


Chapter 10: Map Tools 763

Figure 10-16: The Convert Map Projection dialog.

10. Click “OK” to convert your data to the new projection.

ENVI User’s Guide Converting Map Projections


764 Chapter 10: 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 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.
For detailed instructions, see “Layer Stacking” on page 421.

Layer Stacking ENVI User’s Guide


Chapter 10: Map Tools 765

Converting Map Coordinates


Use Map Coordinate Converter as a “calculator” to convert between latitude and
longitude and corresponding map projection coordinates.
1. 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 text boxes.
• To enter latitude and longitude in degrees, minutes, seconds (DMS) or in
decimal degrees (DDEG), click on the appropriate button.
• If the known point is in another projection, click on the arrow toggle
button next to the “Proj: Geographic Lat/Lon” label and follow these steps.
A. Click “Change Proj.”
B. When the Projection Selection dialog appears, select the desired projection
name by clicking on it.
C. Select from the following options depending on the projection type.
• To change the projection units, click the “Units” button and select the
desired units.
• To change the datum, click the “Datum” button and select the desired
datum.
• To calculate the zone number for a UTM projection, select the “N” or “S”
toggle button and click the “Set Zone” button. Enter the latitude and
longitude values.
• To select a zone number for a State Plane projection, click the “Set Zone”
button and select the desired zone name. Both NOS and USGS zone
numbers are shown next to the zone name.
D. Click “OK.”
3. In the “Second Coordinate” part of the dialog, click on the “Change Proj”
button to select the output projection.
4. Select the projection parameters as described for the known point projection
type.

ENVI User’s Guide Converting Map Coordinates


766 Chapter 10: Map Tools

5. Select one of the following options:


• To convert the point in the First Coordinate projection into the Second
Coordinate projection type, click the “Forward” button.
• To convert the point in the Second Coordinate projection into the First
Coordinate projection type, click the “Reverse” button.
• To clear the coordinates, click the “Reset” button.
6. Click “Cancel” to close the function.

Figure 10-17: The Map Coordinate Converter and Projection Selection dialogs.

Converting Map Coordinates ENVI User’s Guide


Chapter 10: Map Tools 767

Converting ASCII Coordinates


Use ASCII Coordinate Conversions to convert ASCII coordinates of 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 elevation values of 0 meters are assumed. 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. Select Map > ASCII Coordinate Conversion.
2. Select the input ASCII coordinates file.
• To add a file to the “Selected Input Files” list, click “Input Additional
File.”
• To remove the file from the list, click on a filename in the “Selected Input
Files” list and click “Delete.”
3. Enter an output filename or use the “Choose” button to select an output
filename.
4. Click “OK” to continue.
5. When the ASCII Coordinate Conversion dialog appears, select the input
projection type by clicking on the appropriate projection name from the
“Select Input Projection” list (see “Selecting Map Projection Types” on
page 757).
6. Select the desired output projection type by clicking on the projection name in
the “Select Output Projection” list and choose the “Coordinates,” “Datum,”
and “Zone” as appropriate for your selection (see “Selecting Map Projection
Types” on page 757).
7. Enter the column numbers of the columns that contain the map information, Z
elevation values (if any), and image values (if your input file is in ENVI GCP
format) by entering a number or by using the arrow increment buttons next to
the appropriate labels.
8. Select the numeric precision of the output data by using the arrow increment
buttons or by entering a number next to the “Precision” label.

ENVI User’s Guide Converting ASCII Coordinates


768 Chapter 10: Map Tools

9. Select one of the following output options:


• To output your converted coordinates and all other unchanged input
columns of data, use the arrow toggle button next to the “Output” label to
select “All Input Columns.”
• To output the converted coordinates and image values to an ENVI GCP
(ground control points) file, use the arrow toggle button to select “ENVI
GCP File.”
10. Click “OK” to convert the coordinates and write a new ASCII file containing
the converted coordinates.

Converting ASCII Coordinates ENVI User’s Guide


Chapter 10: Map Tools 769

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 projections database.
1. Select Map > Merge Old “map_proj.txt” File.
2. When the Enter Old “map_proj.txt” Filename selection dialog appears, select
the input .txt file.
A prompt appears, telling you that the projection was added to the database.
3. Click “Yes” to save the changes to the “map_proj.txt” file.
4. Enter or choose a new output filename, if desired, and click “OK.”

ENVI User’s Guide Merging Old Projection Files


770 Chapter 10: Map Tools

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 95,
Windows 98, Windows NT, or Windows 2000.

Collecting GPS Locations


ENVI can automatically collect GPS locations at a user-set time interval, collect
single locations, and automatically follow the locations on a displayed image. The
GPS points can be saved to an ASCII file, ENVI vector file (.evf), or exported to the
registration Ground Control Points Selection dialog.
1. Select Map > GPS-Link.
The GPS-Link Serial Parameters dialog appears.
2. From the “Serial Port” button menu, select the serial port that the GPS receiver
is plugged into.
3. Select the appropriate GPS baud rate, data bits, stop bits, parity type, and
parity enable from the corresponding button menus.
4. Click “Select GPS Datum.”
5. In the Select Datum dialog, select the datum type that your GPS unit is using to
collect data. Click “OK.”
6. In the GPS-Link Serial Parameters dialog, click “OK.”
The ENVI GPS-Link dialog appears.
7. Click “Get Location” to collect the current location.
The latitude, longitude, and time of collection appear in the dialog.
8. Click on the “Get Location” button again to collect another location.
The location appears in the dialog list.

Using GPS-Link ENVI User’s Guide


Chapter 10: Map Tools 771

9. Select from the following options:


• To enter text about a location point:
A. In the list of locations, click on a location. Click “Edit.”
B. In the dialog that appears, enter the information. Click “OK.”
This text is output along with the point when it is saved to an ASCII file.
• To go to the location of a specific point in the associated displayed image,
click on the desired location point in the list. Click “Goto.”
• To export a location point to an open Image-to-map registration Ground
Control Points Selection dialog, click on the desired location point in the
list. Click “Export.”
The location appears in the registration dialog (see “Image-to-Map Ground
Control Points” on page 710).
• To delete a location point from the list, click on the location point and
click “Delete.”
Attaching GPS Links to Displays
You can attach the GPS-Link to a display window that contains a georeferenced
image. The position of the cursor in the display window follows the GPS locations.
Note
The displayed image must be a georeferenced image.

1. Select Options > Attach to display.


The Attach GPS-Link to Display dialog appears.
2. Select the desired display number and 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,
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.

ENVI User’s Guide Using GPS-Link


772 Chapter 10: Map Tools

• To set the time interval between automatic point collection,


select Options > Set Retrieval Rate. Enter the desired time interval in seconds.
• 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 “File” or “Memory” output.
5. Click “OK.”
Closing the Dialog
• To exit the ENVI GPS-Link dialog, select File > Cancel.

Using GPS-Link ENVI User’s Guide


Chapter 11:
Vector Tools

This chapter covers the following topics:

The Vector Menu . . . . . . . . . . . . . . . . . . . . 774 Converting Classification Images . . . . . . 781


Opening Vector Files . . . . . . . . . . . . . . . . . 775 Rasterizing Point Data . . . . . . . . . . . . . . . 782
The Available Vectors List . . . . . . . . . . . . 776 Converting ROIs to DXF Files . . . . . . . . . 784
Creating Vector Layers . . . . . . . . . . . . . . . 777 Converting Annotation Files to DXF Files 785
Creating World Boundary Layers . . . . . . . 779 Converting EVFs to DXF Files . . . . . . . . 786
Converting Raster Images . . . . . . . . . . . . . 780

ENVI User’s Guide 773


774 Chapter 11: Vector Tools

The Vector Menu


Use the Vector menu to open vector files, create vector files, 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
regions of interest (ROI) to DXF format.
Note
You can also access ENVI’s interactive vector tools from the Display menu. For
additional information about additional vector functions and detailed instructions,
see “Overlaying Vectors” on page 295.

Figure 11-1: The Vector menu.

The Vector Menu ENVI User’s Guide


Chapter 11: Vector Tools 775

Opening Vector Files


Use Open Vector File to open ARCView Shape files, ARC/INFO 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.
1. Select File > Open Vector File > the desired format.
2. When the standard file selection dialog appears, select a filename and click
“Open” (see “Selecting Files in ENVI” on page 42).
For detailed instructions for each vector format, see the descriptions under “Opening
Vector Files” on page 89.

ENVI User’s Guide Opening Vector Files


776 Chapter 11: 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 have been opened during the current session. When you load a
vector file into memory for the first time during an ENVI session, ENVI places the
vector layers into the Available Vectors List automatically. Use the Available Vectors
List to load the vector layers into a vector display window or overlay them on a
displayed image. For a full description and instructions, see “The Available Vectors
List” on page 196.

The Available Vectors List ENVI User’s Guide


Chapter 11: Vector Tools 777

Creating Vector Layers


Use Create New Vector Layer to create a new vector window using the projection
and boundaries from a variety of sources. A new empty vector layer can be created so
you can enter your own vector layers of 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 can be based on user-defined
input. An empty vector layer can also be created from non-georeferenced raster
images for drawing vectors over those images. After a new empty vector layer has
been created, vector records can be added to the file using the Mode menu in the
Vector Parameters dialog (see “Controlling Cursor Modes” on page 301).
Tip
You can also create vector layers by selecting Options > Create Vector New Layer
in the Available Vectors List (see “Creating New Layers” on page 201).

Creating Layers from Existing Vector Layers


1. Select Vector > Create New Layer > Using Existing Vector 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 and select output to “File” or “Memory.”
3. Click “OK.”
The layer name appears in the Available Vector Layers list.

Creating Layers from Raster Image Files


1. Select Vector > Create New Layer > Using Raster Image File.
2. When the file selection dialog appears, select the input image file and click
“OK.”
3. When the New Vector Layer Parameters dialog appears, enter an output layer
name and select output to “File” or “Memory.”
4. Click “OK.”
The layer name appears in the Available Vector Layers list.

ENVI User’s Guide Creating Vector Layers


778 Chapter 11: Vector Tools

Creating Layers from User-Defined Parameters


1. Select Vector > Create New Layer > Using User Defined Parameters.
The New Vector Layer Parameters dialog appears.
2. Select a projection type and enter a Zone number if needed (see “Selecting
Map Projection Types” on page 757).
3. Enter the bounding box coordinates in the selected projection units in the
“X/Ymin” and “X/Ymax” text boxes.
4. Enter an output layer name and select output to “File” or “Memory.”
5. Click “OK.”
The layer name appears in the Available Vector Layers list.

Creating Vector Layers ENVI User’s Guide


Chapter 11: Vector Tools 779

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 Vector > Create World Boundaries.
Tip
You can also create world boundaries from within the Available Vectors List by
selecting Options > Create World Boundaries.

The Create Boundaries dialog appears.


2. Select the layers by clicking the check box next to their names.
• 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 text boxes.
• To create world boundary layers for the entire world, do not enter latitude
and longitude coordinates.
4. Select output to “File” or “Memory.”
One output .evf file is created for every selected layer and named with a
layer abbreviation appended 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. The low resolution layers are named
similarly but with an “_lp”, etc. The USA States layer have “_usa” appended
to the root name.
Warning
Building vector layers from the high resolution database creates very large output
files (~20 MB each).

5. Click “OK” to build the vector layers.


The selected layers appear in the Available Vectors List.

ENVI User’s Guide Creating World Boundary Layers


780 Chapter 11: 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. Select Vector > Raster to Vector.
2. When the Raster to Vector Input Band dialog appears, select the desired input
file and perform any subsetting.
3. When the Raster to Vector Parameters dialog appears, enter the desired DN
value to use as a contour value in the “Contour Value” text box.
4. Enter an ENVI vector file layer name in the appropriate text box.
5. Select output to “File” or “Memory.”
6. Click “OK.”
ENVI makes a polygon vector layer using the entered contour value, and a vector
attribute file (.dbf) containing the class ID, polygon length, and area information for
the resulting ENVI vector file. The vector layer is listed in the Available Vectors List.

Converting Raster Images ENVI User’s Guide


Chapter 11: Vector Tools 781

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. Select Vector > Classification to Vector.
2. When the Raster to Vector Input Band dialog appears, select the desired input
classification file and perform any subsetting.
3. When the Raster to Vector Parameters dialog appears, select the desired class
names to convert to vector polygons by clicking on 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” arrow toggle button.
5. Select output to “File” or “Memory.”
6. Click “OK.”
If a separate layer for each class is output, each selected class is saved to a separate
vector file with an “_1,” “_2,” etc., appended to the root name.

ENVI User’s Guide Converting Classification Images


782 Chapter 11: 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 have been 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. The grid
points are read from an ASCII file and different input and output projections are
supported.
1. Select Vector > Rasterize Point Data or Topographic > Rasterize Point Data.
2. When the Enter ASCII Grid Points Filename dialog appears, select the desired
input ASCII file.
The Input Irregular Grid Points dialog appears.
3. Use the arrow increment buttons to 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 if
needed.
• To enter a custom projection type, click the “New” button and enter the
customized map projection information (see “Building Customized Map
Projections” on page 758).
5. Click “OK.”
The Gridding Output Parameters dialog appears.
6. Select the output image projection type and enter a Zone number if needed.
• To enter a custom projection type, click the “New” button and enter the
customized map projection information (see “Building Customized Map
Projections” on page 758).
7. Select the type of interpolation using the arrow toggle button.
8. Select whether or not to extrapolate edges by using the “Yes/No” arrow toggle
button.
Note
If extrapolation is selected, quintic extrapolation is used.

9. Enter X and Y output pixel sizes in the units that correspond to your projection
type and select the output data type from the button menu.

Rasterizing Point Data ENVI User’s Guide


Chapter 11: Vector Tools 783

10. Click “OK.”


A second Gridding Output Parameters dialog appears.

Setting Output Parameters


1. In the second Gridding Output Parameters dialog, select from the following
options:
• To change the map coordinate or latitude/longitude information for the
upper left coordinate of the pixel, or to change the pixel or image size,
click the “Change Output Parameters” button and enter the desired values
in the Output Image Parameter dialog.
• To change the projection for the upper left coordinate of the pixel, click
the “Change Projection” button in the Output Image Parameters dialog and
enter the new projection in the Projection Selection dialog.
Note
If your output projection is “Geographic,” the output pixel and image sizes need to
be defined in degree units in the Output Image Parameter dialog.

2. In the Gridding Output Parameters dialog, select output to “File” or


“Memory.”
3. Click “OK” to start the gridding.
A status window displays the progress of the operation and the resulting image
filename is listed in the Available Bands List.

ENVI User’s Guide Rasterizing Point Data


784 Chapter 11: Vector Tools

Converting ROIs to DXF Files


To convert ENVI Region of Interest files to DXF format:
1. Select Vector > Convert ROI to DXF.
2. When the Enter Input ROI Filename dialog appears, select an input ROI file.
3. Click “OK.”
The Convert Region of Interest Files to DXF Files dialog appears. The
filename appears in the “Selected Input Files” list.
4. Select from the following options.
• To add additional files to the list of selected files, click “Input Additional
File” and select the desired ROI file.
• To remove a file from the list, click on the file name and click “Delete.”
• If output to Map Coordinates is desired, select “Map Coordinates” using
the arrow toggle button.
• If output to Pixel Coordinates is desired, select “Pixel Coordinates.”
5. Enter an output filename or use the “Choose” button to select an output
filename.
6. Click “OK” to convert the ROI file(s) to DXF format.
• If you selected output to map coordinates, the Select File Containing Map
Coordinates dialog appears. Select a file that contains the desired output
map coordinates and click “OK.”

Converting ROIs to DXF Files ENVI User’s Guide


Chapter 11: Vector Tools 785

Converting Annotation Files to DXF Files


To convert ENVI Annotation files (.ann) to DXF format:
1. Select Vector > Convert ANN to DXF.
Only rectangles, ellipses, polygons, and polylines will be converted. All other
annotation items are ignored.
2. When the Enter Input ANN Filename dialog appears, select a filename.
3. Click “OK.”
The Convert Annotation Files to DXF Files dialog appears. The filename
appears in the “Selected Input Files” list.
4. Select from the following options.
• To add additional annotation files to the list of selected files, click on
“Input Additional File” and select the desired annotation file.
• To remove a file from the list, click on the file name and click “Delete.”
• If output to Map Coordinates is desired, select “Map Coordinates” using
the arrow toggle button.
• If output to Pixel Coordinates is desired, select “Pixel Coordinates.”
5. Enter an output filename or use the “Choose” button to select an output
filename.
6. Click “OK” to convert the annotation file(s) to DXF format.
• If you selected output to map coordinates, the Select File Containing Map
Coordinates dialog appears. Select a file that contains the desired output
map coordinates and click “OK.”

ENVI User’s Guide Converting Annotation Files to DXF Files


786 Chapter 11: Vector Tools

Converting EVFs to DXF Files


To convert ENVI Vector files to DXF format:
1. Select Vector > Convert EVF to DXF.
2. When the Enter Input EVF Filename dialog appears, select a filename.
3. Click “OK.”
The Convert ENVI Vector Files to DXF Files dialog appears. The filename
appears in the “Selected Input Files” list.
4. Select from the following options.
• To add additional files to the list of selected files, click “Input Additional
File” and select the desired EVF file.
• To remove a file from the list, click on the file name and click “Delete.”
5. Enter an output filename or use the “Choose” button to select an output
filename.
6. Click “OK” to convert the EVF file(s) to DXF format.

Converting EVFs to DXF Files ENVI User’s Guide


Chapter 12:
Topographic Tools

The chapter covers the following topics:

The Topographic Menu . . . . . . . . . . . . . . . 788 Creating Hill Shade Images . . . . . . . . . . . 797


Opening Topographic Files . . . . . . . . . . . . 789 Replacing Bad Values . . . . . . . . . . . . . . . . 800
Using Topographic Modeling . . . . . . . . . . 790 Rasterizing Point Data . . . . . . . . . . . . . . . 801
Extracting Topographic Features . . . . . . . . 794 Using 3-D SurfaceView . . . . . . . . . . . . . . 802

ENVI User’s Guide 787


788 Chapter 12: Topographic Tools

The Topographic Menu


Use Topographic to open, analyze, and output results from your topographic digital
elevation data. Use Topographic Modeling to calculate a shaded relief image, slope,
aspect, and various curvature values from your topographic data. Use Topographic
Features to generate a classification image showing channels, ridges, peaks, pits,
passes, and planes. Use 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 3-D
SurfaceView to “fly through” your topographic data with vectors or a color image
draped over it.

Figure 12-1: The Topographic menu.

The Topographic Menu ENVI User’s Guide


Chapter 12: Topographic Tools 789

Opening Topographic Files


Use Open Topographic File to read United States Geological Survey Digital
Elevation Model (USGS DEM) data, Defense Mapping Agency Digital Terrain
Elevation Data (DMA DTED), and Spatial Data Transfer Standard (SDTS DEM)
formats directly into ENVI. Elevations are retained at full precision in the converted
files. 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 710).
For detailed instructions, see “Opening Digital Elevation Files” on page 80.

ENVI User’s Guide Opening Topographic Files


790 Chapter 12: Topographic Tools

Using Topographic Modeling


Use Topographic Modeling on your 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 multi-scale topographic information can be
extracted.
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 XY 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. Finally, a root mean square (RMS) error
image is also generated, which indicates how well the quadratic surface fits the actual
digital elevation data.
For more information, see the following reference on the World Wide Web at
www.geog.le.ac.uk/jwo/research.
Wood, Joseph The Geomorphological Characterization of Digital Elevation Models,
Ph. D. Thesis, University of Leicester, Department of Geography, Leicester, UK,
1996.
Note
The Topographic Modeling Tools operate on image-format data, not on raw USGS-
format DEM data. If your topographic data is in profile format, use ENVI’s input
file routines to convert the data to image format (see “Opening USGS DEM Files”
on page 81 or “Reading Known Tape Formats” on page 130).

1. Select Topographic > Topographic Modeling.

Using Topographic Modeling ENVI User’s Guide


Chapter 12: Topographic Tools 791

2. When the Topo Model Input DEM dialog appears (see Figure 12-2), select a
DEM image to process from the file list and perform any spatial subsetting.
• To open a new DEM image, select File > Open New File.
3. Click “OK.”
The Topo Model Parameters dialog appears.
4. Enter the desired kernel size.
Tip
Use various kernel sizes to extract multi-scale topographic information. Larger
kernel sizes run slower.

Figure 12-2: The Topo Model Parameters Dialog (left) and the Compute Sun
Elevation and Azimuth dialog (right).

5. Select the topographic measures to compute by clicking on them in the “Select


Topographic Measures to Compute” list.

ENVI User’s Guide Using Topographic Modeling


792 Chapter 12: Topographic Tools

Each topographic measure will be output as a band.


• If you select “Shaded Relief,” enter or compute the sun elevation and
azimuth:
A. In the Topo Model Parameters dialog, click “Compute Sun Elevation and
Azimuth.”
The Compute Sun Elevation and Azimuth dialog appears
(see Figure 12-2).
B. Select the month and day from the button menus, and enter the year and
time of day (GMT) by clicking the arrow increment buttons or by typing in
the corresponding text boxes.
C. Enter the latitude and longitude coordinates in the “Lat” and “Lon” text
boxes.
D. Click “OK” to perform the calculations.
The calculated elevation and azimuth are automatically entered into the
Topo Model Parameters dialog.
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” to start the calculations.
When the processing is complete, the selected images appear in the Available Bands
list. Examples of Topographic Modeling output are shown in Figure 12-3.

Using Topographic Modeling ENVI User’s Guide


Chapter 12: Topographic Tools 793

Figure 12-3: Example of Topo Modeling for a simulated “Pyramid” DEM


illuminated with an aspect of 135 degrees and elevation of 45 degrees.

ENVI User’s Guide Using Topographic Modeling


794 Chapter 12: 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 790). You can change the
kernel size so that multi-scale topographic information can be extracted.
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 12-4: An example of a Topographic Features image result.

For more information, see the following reference on the World Wide Web at
www.geog.le.ac.uk/jwo/research.

Extracting Topographic Features ENVI User’s Guide


Chapter 12: Topographic Tools 795

Wood, Joseph The Geomorphological Characterization of Digital Elevation Models,


Ph. D. Thesis, University of Leicester, Department of Geography, Leicester, UK,
1996.
Note
If your DEM is noisy, striped, or stepped, you should smooth it before using this
function. See “Topographic Modeling” section of the ENVI Topographic Tools
Tutorial for examples

1. Select Topographic > Topographic Features.


2. When the file selection dialog appears, select the input DEM file and any
subsetting.
The Topographic Features Parameters dialog appears.
3. Enter the slope tolerance and curvature tolerance values.
The slope (in degrees) and curvature tolerance values are used 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 desired kernel size in the corresponding text box or use the arrow
increment buttons to set the value.
Tip
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 text boxes.
5. In the “Select Features to Classify” list, click on the features to be included in
the output classification image.
If a feature type(s) is not selected, those pixels will be unclassified.
• To select all of the features, click “Select All Items.”
• To deselect all of the selected features, click “Clear All Items.”
6. Select output to “File” or “Memory.”

ENVI User’s Guide Extracting Topographic Features


796 Chapter 12: Topographic Tools

7. Click “OK.”
A status window displays the progress of the operation. The output classification
image file can be displayed from the Available Bands List: green represents plane,
blue represents channel, orange represents ridge, red represents pass, yellow
represents peak, and magenta represents pit. An example of a topographic features
result is shown in Figure 12-4.
Tip
You can change the class colors by selecting Tools > Color Mapping > Class Color
Mapping (see “Mapping Class Colors” on page 364).

Extracting Topographic Features ENVI User’s Guide


Chapter 12: Topographic Tools 797

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.
Note
The color image must be co-registered with the DEM file, displayed, and contrast
stretched before you can create the Hill Shade image.

1. Select Topographic > Create Hill Shade Image.


2. When the Hill Shade Blend Input dialog appears, click on the display number
of the color image.
3. When the file selection dialog appears, select the input DEM file and perform
any subsetting.
4. Click “OK.”
The Hill Shade Image Parameters dialog appears.
5. Specify the sun elevation and azimuth for the shaded relief image by entering
the values into the “Sun Elevation Angle” and “Sun Azimuth Angle” text
boxes. (To compute sun elevation values, see “Computing Sun Elevation
Values” on page 799.)
6. Select “File” or “Memory” output.
7. Click “OK.”
The resulting Hill Shade image is available for display from the Available Bands list.

ENVI User’s Guide Creating Hill Shade Images


798 Chapter 12: Topographic Tools

Figure 12-5: An example of a Hill Shade image.

Creating Hill Shade Images from Color Tables


Use this procedure 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. Select Topographic > Create Hill Shade Image.
• If the Hill Shade Blend Input dialog appears, click “Color Table Lookup.”
2. When the file selection dialog appears, select the input DEM file and perform
any subsetting.
3. Specify the sun elevation and azimuth for the shaded relief image by
entering the values into the “Sun Elevation Angle” and “Sun Azimuth Angle”
text boxes.

Creating Hill Shade Images ENVI User’s Guide


Chapter 12: Topographic Tools 799

(To compute sun elevation values, see “Computing Sun Elevation Values” on
page 799.)
4. Click on the name of a color table to select it from the list.
5. From the “Stretch” button menu, 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 “File” or “Memory” output.
7. Click “OK.”
The Hill Shade image is available for display from the Available Bands List.
Computing Sun Elevation Values
1. In the Hill Shade Image Parameters dialog, click “Compute Elevation and
Azimuth.”
The Compute Sun Angle dialog appears.
2. Select the month from the “Month” button menu, and enter the day, year, and
time (GMT) in the appropriate text boxes.
3. Enter the desired latitude and longitude coordinates in the appropriate text
boxes.
4. Click “OK” to perform the calculations.
The calculated elevation and azimuth are automatically entered into the Hill Shade
Image Parameters dialog.

ENVI User’s Guide Creating Hill Shade Images


800 Chapter 12: Topographic Tools

Replacing Bad Values


Use Replace Bad Values to 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 “Masking” on page 458). The surface fitting
uses Delaunay triangulation to fill the bad pixels with triangles calculated from the
surrounding good elevation values.
Note
If there are large holes in your data set, you may see the triangles used to fill them.

1. Select Topographic > Replace Bad Values or Radar > TOPSAR Tools > DEM
Replace Bad Values.
2. When the DEM Input File dialog appears, select the DEM file and perform any
subsetting or masking.
The Replace Bad Data Parameters dialog appears.
3. Enter a bad pixel value or a range of bad pixel values in the appropriate text
boxes.
Note
No values are needed if you selected a mask band that contains the locations of the
bad pixels.

4. Select “File” or “Memory” output.


5. Click “OK.”
The output appears in the Available Bands List.

Replacing Bad Values ENVI User’s Guide


Chapter 12: Topographic Tools 801

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
have been triangulated, they are interpolated to a regular grid. Linear or smooth
quintic polynomial interpolation can be selected. Extrapolation for grid points outside
of the triangulation area is also an option. The grid points are read from an ASCII file
and input and output projections are supported.
For detailed instructions, see “Rasterizing Point Data” on page 782.

ENVI User’s Guide Rasterizing Point Data


802 Chapter 12: Topographic Tools

Using 3-D SurfaceView


Use ENVI’s 3-D SurfaceViewTM to “fly through” your 3-dimensional data sets. The
data can be displayed with a vectors or a grayscale or color image draped over it,
as a wire frame, ruled grid, or points. You can rotate, translate, and zoom in and
out of the 3-D surface in real-time using the mouse cursor. A flight path can be
interactively defined or drawn using ENVI’s annotation. The flight path can be
animated to produce 3-D fly-throughs of your data. The vertical and horizontal
view angles can be controlled and you can fly through your data at a constant
height above the surface or at a constant altitude. The cursor is also linked to your
draped image allowing profiles and cursor locations and values to be viewed from
the 3-D projection.

Displaying 3-D Files


Note
If you are running ENVI on a Windows system, you must be in 16 bit or 24 bit color
display mode.

1. Display the grayscale or color image you want to be draped over your DEM
(or other 3-D data set).
The entire image is used as the overlay image on the DEM unless both your
image and DEM files are georeferenced. If both the files are georeferenced,
then only the part of the image that overlaps with your DEM is used. If the
DEM is subset, then the georeferenced image is also subset to match. The
spatial resolutions of the two files do not need to be the same.
2. Select one of the following options:
• From the ENVI main menu, select Topographic > 3-D SurfaceView.
• From the Display menu, select Tools > 3-D SurfaceView.
3. If more than one display window is open, select the display window that
contains the desired image.
4. Select the associated digital elevation model (DEM) input file (or other 3-D
data set) and perform any spatial subsetting.

Using 3-D SurfaceView ENVI User’s Guide


Chapter 12: Topographic Tools 803

The 3-D SurfaceView Input Parameters dialog appears.

Figure 12-6: The 3-D SurfaceView Input Parameters dialog.

5. Select the desired DEM Resolution (number of pixels) check box(es) to use for
the 3-D plot.
6. Click the “Nearest Neighbor” or “Aggregate” buttons to select a resampling
method.
Nearest neighbor resampling uses the nearest DEM value when resampling
and pixel aggregate averages 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, the nearest neighbor resampling will use
every other pixel and every other line to create the DEM in the 3-D window
and the pixel aggregate option will average four pixels to create the output
DEM.
Warning
Using higher DEM resolutions will significantly slow the display and should only
be used on powerful platforms.

ENVI User’s Guide Using 3-D SurfaceView


804 Chapter 12: Topographic Tools

More than one resolution can be selected. Typically you will want to use the
lowest resolution (64) while you are determining the best flight path. Then a
higher resolution can be used to display your final fly-through sequence.
7. Enter DEM minimum and maximum plot values if desired.
DEM values lower than the minimum value and higher than the maximum
value will not be plotted in the 3-D views.
8. Enter the vertical exaggeration.
The value entered produces a true scale vertical exaggeration applied to the Z
axis where higher values correspond to greater exaggeration.
9. Select either “Full” or “Other” image resolution.
If you select “Other,” click the “Nearest Neighbor” or “Aggregate” buttons to
select a resampling method.
10. Set the “High Resolution Texture Mapping” parameter to “Off” or “On” by
clicking the arrow button.
When this parameter is “On”, which is the default, a higher resolution image is
used, if it is available, when you zoom into your the 3-D SurfaceView. The
input image needs to be at least 1024 x 1024 pixels in order for the “High
Resolution Texture Mapping” parameter to have a noticeable effect in the 3-D
SurfaceView.
• To set a higher image resolution, set it under “Image Resolution” as
described in step 9. “Full” resolution is the highest possible resolution, but
if you have a large image, full resolution may cause you to run out of
memory.
Note
Using the “High Resolution Texture Mapping” option may make zooming and
flying through the 3-D SurfaceView slow.

11. Click on the “Spatial Subset” button and select a spatial subset of the image, if
desired.
The spatial dimensions of the DEM and image do not need to be same. The full
dimensions (or selected subsets) of both data sets will be displayed.
12. Enter the X and Y pixel sizes of the image.
The pixel sizes are used to determine the correct vertical exaggeration factor
and they need to be in the same units as the DEM.

Using 3-D SurfaceView ENVI User’s Guide


Chapter 12: Topographic Tools 805

13. Click “OK.”


• The 3-D SurfaceView plot window appears (see Figure 12-7).

Figure 12-7: A “Texture” type 3-D plot displayed in the 3-D SurfaceView
plot window.

Cursor Functions in the 3-D SurfaceView Plot


Use the mouse cursor and buttons to interactively rotate, translate, and scale the
surface. Select from the following options:
• To rotate the surface around the Z axis, click and drag with the left mouse
button in a horizontal direction.
• To rotate the surface around the Y axis, click and drag with the left mouse
button in a vertical direction.
• To translate (move the image) in any direction, click and drag with the middle
mouse button in the desired direction.
• To increase the zoom, click and drag to the right with the right mouse button.
• To decrease the zoom, click and drag to the left with the right mouse button.

ENVI User’s Guide Using 3-D SurfaceView


806 Chapter 12: Topographic Tools

• To reset the surface plot to its original position, select Options > Reset View in
the 3-D SurfaceView plot window.
The mouse button functions are listed in Table 12-1. You can also control the
rotation, translation, and zoom by using the Options menu in the 3-D SurfaceView
plot window.

Mouse Button Action

Left Click and drag to rotate X/Y plane


Or:
Double-click to go to pixel in display
window
Middle Click and drag to translate image
Right Click and drag to right to zoom in
Click and drag to left to zoom out

Table 12-1: Cursor functions in the 3-D SurfaceView plot window.

Displaying Cursor Location and Value


The cursor location and value can also be read from the 3-D plot when the Cursor
Location/Value function is active. The X, Y, and Z (elevation) values are read from
the 3-D model and are approximate. If your draped image is georeferenced, the map
locations are also reported.
• To move the zoom window to a specific pixel in the display window
containing the draped image, double-click with the left mouse button on the
pixel in the
3-D plot.
• To link plots of profiles to the pixel at the 3-D cursor location (if X, Y, or Z
[spectral] profile plots are active in the display window) double-click with the
left mouse button on the pixel in the 3-D plot.

Selecting Surface Types


Use the Surface menu to control the type and resolution of the surface plot. Plot the 3-
D surface with a grayscale or RGB image draped over it, as a wire mesh, ruled XZ,
ruled YZ, or as points.

Using 3-D SurfaceView ENVI User’s Guide


Chapter 12: Topographic Tools 807

• To display the desired surface plot type, select Surface > Texture, Wire, Ruled
XZ, Ruled YZ, or Point.
The display changes automatically.
• To see through the wire mesh lines when a wire or ruled surface is
displayed, select Options > Wire Lines:See Through.
• To use hidden wire mesh lines when a wire or ruled surface is displayed,
select Options > Wire Lines:Hidden.
Note
This option is much slower than using the Wire Lines:See Through option.

Selecting DEM Resolution


If you selected more than one DEM resolution in the SurfaceView Input Parameters
dialog, you can select which resolution to use in the plot:
• To change the resolution of the plot, select Surface > the desired resolution.

Defining Flight Paths and Working in Modes


When working with 3-D 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 in the 3-D
SurfaceView plot window.
2. When the SurfaceView Motion Controls dialog appears, select the desired
mode from the Options menu.

ENVI User’s Guide Using 3-D SurfaceView


808 Chapter 12: Topographic Tools

See the following sections for details about working in the two different modes.

Figure 12-8: The Surface View Motion Controls dialog in User Defined mode
(left) and in 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. Select Options > Motion: User Defined in the SurfaceView Motion Controls
dialog.
2. Use the mouse to select the starting projection (view) for the fly-through.
For instructions and mouse button function descriptions, see “Cursor
Functions in the 3-D SurfaceView Plot” on page 805.
3. In the SurfaceView Motion controls dialog, click the “Add” button to add the
selected projection to the flight path.
4. Use the mouse select another projection and click the “Add” button.
The flight path will be smoothly interpolated between the two projections.
5. Repeat step 4 until you have selected as many projection steps as desired (only
2 are required).
• To replace a projection in the flight path list, click on the path view
number and click “Replace.”

Using 3-D SurfaceView ENVI User’s Guide


Chapter 12: Topographic Tools 809

• To delete a projection in the flight path list, click on the path view number
and click “Delete.”
• To clear the flight path list, click “Clear.”
6. Enter the number of frames to be used in the “fly-through” animation.
The flight path will be smoothly interpolated between the projections.
7. Click the “Play Sequence” button 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 812).
Defining a Flight Path in Annotation Mode
Use “Annotation” mode to define a flight path based on annotation drawn on the
image in the display window from which the 3-D SurfaceView was created, or based
on an imported annotation object. Use a polyline, polygon, rectangle, or ellipse
annotation object to define the flight path (see “Annotating Images” on page 222 for
annotation 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.
Note
To use Annotation mode, you must have annotation drawn on the display window
from which the 3-D SurfaceView was created, or have the desired annotation object
saved in an annotation file (.ann).

1. In the Surface SurfaceView Motion Controls dialog, select Options > Motion:
Annotation.
2. When the Input Annotation Flight Path dialog appears, select whether to
import annotation from the display or from a file by clicking the corresponding
button.
• If you select the option to input the annotation object from a display
window, select the desired annotation object.
• If you select the option to import the annotation object from a saved
annotation file, select the desired annotation (.ann) file and object.
The selected annotation object, number of nodes, and the number of points are
displayed in the middle of the SurfaceView Motion Controls dialog and the
flight path is plotted on the 3-D SurfaceView plot.

ENVI User’s Guide Using 3-D SurfaceView


810 Chapter 12: Topographic Tools

Tip
If you are already in Annotation mode and want to input annotation, select File >
Input Annotation from Display or Input Annotation from File in the SurfaceView
Motion Controls dialog.

3. Select from the following options:


• To smooth the flight path by using a running average of points along the
line, enter the desired number of points to use in the average in the “Flight
Smooth Factor” text box.
• To fly over the surface at a constant height above the DEM terrain, click
the arrow toggle button until “Flight Clearance” appears and enter the
desired height (in the same units as the DEM).
• To fly over the surface at a constant elevation, click the arrow toggle
button until “Flight Elevation” appears and enter the desired elevation
above sea level (in the same units as the DEM).
• To adjust the vertical look angle, enter the desired angle, in degrees, in the
“Up/Down” text box.
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 desired angle, in degrees, in
the “Left/Right” text box.
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.
• To turn the annotation flight line trace off and on, select Options >
Annotation Trace:Off or Annotation Trace:On in either the SurfaceView
Motion Controls dialog or the 3-D SurfaceView plot window.
4. Enter the desired number of frames to use when animating the data fly-through
in the “Frames” text box.
5. Click on the “Play Sequence” button to animate the fly-through.
• To have the sequence repeatedly restart when it reaches the end, select
Options > Loop Play Sequence: Yes.
To control the speed and direction of the fly-through, select Options > Animate
Sequence (see “Animating Flight Paths” on page 812).

Using 3-D SurfaceView ENVI User’s Guide


Chapter 12: Topographic Tools 811

3-D SurfaceView Options


Use the 3-D SurfaceView plot’s Options menu to access options for rotating, moving,
and zooming into the 3-D SurfaceView; defining flight paths and playing flight
sequences; viewing panaramically; changing vertical exaggeration and background
color; importing vectors; smoothing; and resetting the 3-D SurfaceView display.

Rotating, Moving, and Zooming


In addition to using cursor functions (see “Cursor Functions in the 3-D SurfaceView
Plot” on page 805) to zoom into, rotate, and move the 3-D SurfaceView plot, you can
use a set of buttons and increment settings.
• Select Options > Rotate/Scale/Trans Controls in the 3-D SurfaceView plot
window.
When the SurfaceView RST dialog appears, use the buttons as described in the
following sections

Figure 12-9: Use the RST Controls dialog to control rotation, scaling (zoom), and
translation of the 3-D SurfaceView plot.

Changing Rotation
1. In the Rotation section of the SurfaceView RST dialog, click on the arrow
buttons to change the rotation of the surface plot.
2. In the “Inc” text box, enter a value in degrees, to change the rotation
increment.

ENVI User’s Guide Using 3-D SurfaceView


812 Chapter 12: Topographic Tools

Zooming
1. In the Scaling section of the SurfaceView RST dialog, click the “+” or “-”
buttons to zoom in or out of the surface plot.
2. In the “Inc” text box, enter a value to change the zoom increment.
Moving the Image
1. In the Translation section of the SurfaceView RST dialog, click on the arrow
buttons to move the surface plot.
2. In the “Inc” text box, enter a value to change the translation increment.
Animating Flight Paths
Use Animate Sequence (in either User Defined or Animation modes) to display and
“fly through” your 3-D SurfaceView in an animation window. In the animation
window, you can control the characteristics of your “fly-through” with more
precision than in the SurfaceView Motion Controls dialog:
1. Select Options > Animate Sequence.
The SurfaceView is displayed in the standard ENVI animation window.
2. See “Controlling Animation Characteristics” on page 379 for details about
using animation controls.
Note
The first few times through the frame sequence may be slow until the frames are put
in memory.

3. Select from the following options:


• To cancel the animation window, select File > Cancel.
• To save the animation to a MPEG (Moving Picture Experts Group) file,
select File > Save as MPEG (see “Saving Animations” on page 380 for
details).

Viewing Panoramically
To view the surface view panoramically as if you were “standing” in the image:
1. Select Options > Position Controls.

Using 3-D SurfaceView ENVI User’s Guide


Chapter 12: Topographic Tools 813

The SurfaceView Position Controls dialog appears.

Figure 12-10: The SurfaceView Position Controls dialog.

2. Click the arrow buttons to select “Map Coord” for georeferenced images, or
“Pixel Coord” for non-georeferenced images.
• If you select “Pixel Coord,” enter the sample and line coordinates of where
you want to “stand” in the image or use the arrow increment buttons to
select the coordinates.
Note
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 arrow toggle button next to the “Use Offset”
label to select “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. Set whether changes will be automatically applied by clicking the “Yes” or
“No” toggle button next to the “Auto Apply” label.
4. Select from the following options to change your position and viewing angle in
the surface view image.

ENVI User’s Guide Using 3-D SurfaceView


814 Chapter 12: Topographic Tools

• To change the location where you are standing, double-click on a spot in


the image to automatically move to that location.
The location change is reflected in both the Main Image display and the 3-
D SurfaceView plot.
• To change the azimuth look direction (north = 0 and angles increase
clockwise), use the slider bar next to the “Azimuth” label, or click on the
arrow increment buttons to look around panoramically (to change the
angle in increments of five degree, click on the arrows with the middle
mouse button).
• To change the elevation angle from which you are looking, use the slider
bar next to the “Elevation” label (to change the angle in increments of five
degree, click on the arrows with the middle mouse button).
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” text box or use the arrow
increment buttons to change the height.
The units you use need to be the same as the DEM.
Changing Vertical Exaggeration
1. In the 3-D SurfaceView plot, select Options > Change Vertical Exaggeration
2. Enter the desired value in the text box or use the arrow increment buttons.
The value entered will produce a true scale vertical exaggeration applied to the Z axis
where higher values correspond to greater exaggeration.
Changing Background Color
1. To change the background color of the 3-D SurfaceView plot, select Options >
Change Background Color in the plot window.
The SurfaceView Background Color dialog appears.
2. From the “System” button menu, select “RGB,” “HLS,” or “HSV.”
3. Select a color from the “V” menu, or set color values by using the
corresponding slider bars and text boxes.
Importing Vectors
Use Import Vectors to overlay vector layers on the 3-D SurfaceView plot.

Using 3-D SurfaceView ENVI User’s Guide


Chapter 12: Topographic Tools 815

Note
You must have vectors displayed in the Main Image window from which the 3-D
SurfaceView was created. For information about overlaying vectors on an image,
see “Overlaying Vectors” on page 295.

1. In the 3-D SurfaceView window, select Options > Import Vectors.


All of the vectors from the image will be overlaid on the 3-D SurfaceView
plot.
2. When vectors are overlaid, select from the following options:
• To remove a layer or layers, select Options > Remove Layers and select
the layers to be removed.
• To turn the display of vector layers on or off, select Options > Vector
Layers:On or Vector Layers:Off.
Note
Turning layers off does not remove them from the 3-D SurfaceView plot, it only
“hides” them.

• To avoid slow interactive repositioning when many vectors are overlaid,


select Options > Plot Vectors on Move:No.
• To display the vectors while interactively positioning and moving the 3-D
SurfaceView image, select Options > Plot Vectors on Move:Yes.
• To change the appearance (e.g., line thickness, color) of vectors in the 3-D
SurfaceView image, first make the changes to the vectors in the original
image, then re-import the vectors from the image into the 3-D
SurfaceView.
Note
For details about working with vectors, see “Overlaying Vectors” on page 295.

Smoothing 3-D Images


• To “smooth” 3-D Surface View Images that appear “pixelated” when zoomed
into, select Options > Interpolation:Bilinear.
• To turn off the smoothing effect, select Options > Interpolation:None.
Resetting Surface Views
• To reset the surface view to the default view, select Options > Reset View.

ENVI User’s Guide Using 3-D SurfaceView


816 Chapter 12: Topographic Tools

Managing Flight Sequences and Surface View Files


Use the File menu in the 3-D SurfaceView plot window and in the SurfaceView
Motion Controls dialog to save flight sequences, annotation objects, and 3-D
SurfaceViews; to restore flight sequences and annotation from files; and to print 3-D
SurfaceView plots.

Saving Flight Path Sequences to Files


To save the current flight path to a file:
1. In the SurfaceView Motion Controls dialog, 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 and select the desired .pat filename.
Note
Restoring is only available in “User Defined” mode.

Inputting Annotation Files


To input annotation from the image display or from a file, see the instructions under
“Defining a Flight Path in Annotation Mode” on page 809.

Outputting Flight Path Sequences to MPEG Files


To output a flight sequence to a MPEG (Movie Picture Experts Group) file:
1. In the SurfaceView Motion Controls dialog, select File > Save Sequence as
MPEG.
The Output Sequence to MPEG Parameters dialog appears.
Note
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” text boxes.
2. In the “Number of Frames” text box, enter the number of frames (individual
views) to be included in the output flight sequence (movie).
More frames will make a longer sequence, but will also make a larger output
file.

Using 3-D SurfaceView ENVI User’s Guide


Chapter 12: Topographic Tools 817

3. From the “MPEG Frame Rate” button menu, select a rate in frames/second.
4. Enter the desired MPEG compression quality.
5. Enter a duplication factor, if desired.
This 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.
6. Enter an output filename and click “OK.”
Note
The writing of the output MPEG file is done in two steps and the second step cannot
be cancelled and can 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.

Outputting Surface Views


Use the File menu in the 3-D SurfaceView plot window to output the plot to an image
file, a Virtual Reality Modeling (VRML) file, or to a printer.
• 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.
• To print a 3-D SurfaceView plot, select File > Print.
For more information and instructions, see “Display Output Options” on page 398.

Closing the Dialog


• To quit the 3-D SurfaceView function, select File > Cancel in the 3-D
SurfaceView plot window.

ENVI User’s Guide Using 3-D SurfaceView


818 Chapter 12: Topographic Tools

Using 3-D SurfaceView ENVI User’s Guide


Chapter 13:
Radar Tools

This chapter covers the following topics:

The Radar Menu . . . . . . . . . . . . . . . . . . . . 820 Adaptive Filters . . . . . . . . . . . . . . . . . . . . 829


Opening Radar Files . . . . . . . . . . . . . . . . . 821 Texture Filters . . . . . . . . . . . . . . . . . . . . . 830
Removing Antenna Gain Variations . . . . . 824 Creating Synthetic Color Images . . . . . . . 831
Resampling to Ground Ranges . . . . . . . . . 826 Using Polarimetric Tools . . . . . . . . . . . . . 832
Generating Incidence Angle Images . . . . . 828 Using TOPSAR Tools . . . . . . . . . . . . . . . 857

ENVI User’s Guide 819


820 Chapter 13: 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 data set. In addition, ENVI is
designed to 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, etc. Additional specialized tools are provided for
analyzing polarimetric radar data. For examples of using some of the radar functions,
see the ENVI SAR Tutorials.

Figure 13-1: The Radar Pulldown Menu.

The Radar Menu ENVI User’s Guide


Chapter 13: Radar Tools 821

Opening 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 the following
sections.
Note
You can also use the File > Open External File > Radar to open these files. For
detailed information, see “Opening Radar Files” on page 77.

Opening ERS Files


To read ERS-1 and ERS-2 format data:
1. Select Radar > Open/Prepare Radar File > ERS.
2. When the file selection dialog appears, select the image file to be read.
ENVI automatically extracts the header information and places the image band in the
Available Bands List.

Opening JERS Files


To read JERS format data:
1. Select Radar > Open/Prepare Radar File > JERS.
2. When the file selection dialog appears, select the image file to be read.
ENVI automatically extracts the header information and places the image band in the
Available Bands List.

Opening RADARSAT Files


To read RADARSAT data files into ENVI:
1. Select Radar > Open/Prepare Radar File > RADARSAT.
2. When the file selection dialog appears, select the input data file.
ENVI automatically extracts the needed header information (including UTM
georeferencing information) from the data file, leader file, and/or trailer file.
The image band is entered into the Available Bands List.
3. Click “OK” to start the data reading.

ENVI User’s Guide Opening Radar Files


822 Chapter 13: Radar Tools

Opening Integer Format RADARSAT Data


• When the RADARSAT File Import dialog appears, select Import Data Type >
Unsigned Integer.
The image bandname is entered into 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.”
The image bandname is entered into the Available Bands List.

Opening TOPSAR Files


To read the raw TOPSAR (AIRSAR Integrated Processor Data) format data files
(Cvv, Incidence Angle, Correlation Image, or the DEM):
1. Select Radar > Open/Prepare Radar File > TOPSAR.
2. When the file selection dialog appears, select the file to be read.
ENVI automatically extracts the needed header information and places the image
band into the Available Bands List.
Note
To read all of the TOPSAR files and automatically convert them to physical units,
see “Converting TOPSAR Data” on page 857. To synthesize AIRSAR images, see
“Synthesizing JPL AIRSAR Data” on page 832.

Viewing CEOS Headers


Use View Generic CEOS Header to produce a report of CEOS header information
from generic CEOS data types (i.e. ERS-1, JERS-1, SIR-C, X-SAR) or from
RADARSAT headers.
1. Select Radar > Open/Prepare Radar File > View Generic CEOS Header.

Opening Radar Files ENVI User’s Guide


Chapter 13: Radar Tools 823

2. When a standard ENVI file selection dialog appears, select the file from which
the header will be read.
A report of the header information is printed on the screen.
• To save the report to an output file, select File > Save Text to ASCII and enter
an output filename.

Viewing RADARSAT Headers


1. Select Radar > Open/Prepare Radar File > View RADARSAT Header.
2. When a standard ENVI file selection dialog appears, select the file from which
the header will be read.
A report of the header information is printed on the screen.
• To save the report to an output file, select File > Save Text to ASCII and enter
an output filename.

Viewing AIRSAR/TOPSAR Headers


To view the ASCII headers for the AIRSAR and TOPSAR data files:
1. Select Radar > Open/Prepare Radar File > View AIRSAR/TOPSAR Header
2. Select the data file.
The header information is displayed in a report window.
Saving Header Information to ASCII Files
• To save the AIRSAR/TOPSAR header information to an ASCII file, select
File > Save Text to ASCII and enter an output filename.

Synthesizing AIRSAR Data


AIRSAR images must be synthesized before they can be used in standard ENVI
processing routines. For detailed instructions, see “Synthesizing JPL AIRSAR Data”
on page 832.

Synthesizing SIR-C Data


SIR-C Single Look Complex (SLC) and Multi-Look Complex (MLC) images must
be synthesized before they can be used in standard ENVI processing routines. For
detailed instructions, see “Synthesizing SIR-C Data” on page 837.

ENVI User’s Guide Opening Radar Files


824 Chapter 13: Radar Tools

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. Azimuth mean values are calculated and can be plotted 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. Either an
additive or multiplicative correction can be selected. For more information, see the
following 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. Select Radar > Antenna Pattern Correction.
2. When the Antenna Pattern Input File dialog appears, select the input file and
perform any spatial subsetting, spectral subsetting, or masking.
The Antenna Pattern Correction Parameters dialog appears.
3. Designate the range direction by clicking the “Samples” or “Lines” check box.
4. Select either an “Additive” or “Multiplicative” correction method.
Typically, a multiplicative correction is used for radar antenna pattern
variations.

Figure 13-2: The Antenna Pattern Correction plot showing a first order
polynomial fit in white.

Removing Antenna Gain Variations ENVI User’s Guide


Chapter 13: Radar Tools 825

5. Enter the desired polynomial order and click “Plot Polynomial” to show a plot
of the mean data values in red with the selected polynomial fit overlaid in
white.
• The polynomial order can be changed and plotted again.
It is best to use a low order polynomial so as not to remove the local variation
in backscatter signal.
Note
The Antenna Pattern Correction plot pulldown menus will not be active until you
close the Antenna Pattern Correction Parameters dialog.

6. Select output to “Memory” or “File.”


7. Click “OK” to start the processing.

ENVI User’s Guide Removing Antenna Gain Variations


826 Chapter 13: Radar Tools

Resampling to Ground Ranges


Radar instruments measure distance to the side of the platform (slant range) which
causes distortions in the true ground mapping (ground range). Use Slant to Ground
Range to resample slant range radar images to ground range pixel sizes assuming flat
terrain.

Using AIRSAR, RADARSAT, and SIR-C Data


The Slant-to-Ground Range function uses header information for AIRSAR, SIR-C,
and RADARSAT data types. You can use other radar data sets by entering a few
needed parameters (see “Using Generic Data”, next).
1. Select Radar > Slant to Ground Range > AIRSAR, RADARSAT, or SIR-C.
2. Select the radar header file that contains the data acquisition parameters.
Note
For AIRSAR and SIRC select the compressed data file; for Radarsat select the
image file.

Necessary parameters will be automatically read from the selected input file
and entered into the Slant to Ground Range Parameters dialog.
• To manually enter the necessary parameters, click “Cancel” and enter
the parameters in the Slant to Ground Range Parameters dialog.
3. When a standard ENVI input file dialog appears, select the input file and any
spatial and/or spectral subsetting.
4. Click “OK.”
The Slant to Ground Range Parameters dialog appears.
5. Enter the desired output pixel size, select the desired resampling method, and
select memory or file output.
6. From the “Near Range” button menu, select the location of the near range in
the image: “Top,” “Bottom,” “Left,” or “Right.”
7. Click “OK” to start the processing.

Using Generic Data


To compute ground range images from other data types:
1. Select Radar > Slant to Ground Range > Generic.

Resampling to Ground Ranges ENVI User’s Guide


Chapter 13: Radar Tools 827

2. When a standard ENVI input file dialog appears, select the input file and
spatial and/or spectral subsetting.
3. Click “OK.”
The Slant to Ground Range Parameters dialog appears.
4. Enter the instrument height, near range distance, slant range pixel size, and
desired output pixel size.
5. From the “Near Range” button menu, select the location of the near range in
the image: “Top,” “Bottom,” “Left,” or “Right.”
Please see “Warping and Resampling” on page 714 for details about
resampling methods.
6. Select output to “Memory” or “File.”
7. Click “OK” to start the processing.

ENVI User’s Guide Resampling to Ground Ranges


828 Chapter 13: Radar Tools

Generating Incidence Angle Images


Use Incidence Angle Image to generate incidence angle images from AIRSAR
(excluding AIRSAR data associated with TOPSAR data sets), 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.

Using AIRSAR, RADARSAT, and SIR-C Data


To generate an incidence angle image from AIRSAR (excluding AIRSAR data
associated with TOPSAR data sets), RADARSAT or SIR-C:
1. Select Radar > Incidence Angle Image > AIRSAR, RADARSAT, or SIR-C.
2. Select the input file and click “OK.”
The necessary information is read automatically from the header files.
• If all of the needed parameters are not found, enter the missing values in
the corresponding text boxes.
3. When the Incidence Angle Parameters dialog appears, select incidence angle
output in radians or degrees.
4. Select output to “File” or “Memory.”
5. Click “OK” to start the processing.

Using Generic Data


To generate an incidence angle image from other data types:
1. Select Radar > Incidence Angle Image > Generic.
2. When the Incidence Angle Information dialog appears, enter the number of
output samples and lines and the near and far range angles, in degrees, in the
corresponding text boxes.
3. From the “Near Range” button menu, select the location of the near range in
the image: “Top,” “Bottom,” “Left,” or “Right.”
4. Click “OK.”
5. When the Incidence Angle Parameters dialog appears, select incidence angle
output in radians or degrees.
6. Select output to “File” or “Memory” and click “OK.”

Generating Incidence Angle Images ENVI User’s Guide


Chapter 13: Radar Tools 829

Adaptive Filters
ENVI includes several adaptive filters to use for SAR processing. The filters include
Lee, Frost, Gamma, Kuan, and Local Sigma to reduce image speckle and a Bit Errors
filter to remove bad pixels.
• To select a filter, select Radar > Adaptive Filters > Filters.
The filters can also be accessed from the Filters menu on the ENVI main menu and
are described in detail in “Using Adaptive Filters” on page 604.

ENVI User’s Guide Adaptive Filters


830 Chapter 13: Radar Tools

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.
• To select a filter, select Radar > Texture > the desired filter.
The filters can also be accessed from the Filters menu on the ENVI main menu and
are described in detail in “Using Texture Filters” on page 599.

Texture Filters ENVI User’s Guide


Chapter 13: Radar Tools 831

Creating Synthetic Color Images


Use Synthetic Color Image to transform a grayscale 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.
• Select Radar > Synthetic Color Image.
For detailed instructions, see “Creating Synthetic Color Images” on page 582.

ENVI User’s Guide Creating Synthetic Color Images


832 Chapter 13: Radar Tools

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 they can be used in standard 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).
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.
Note
You can generate byte images to conserve disk space when quantitative analysis is
not an issue.

Tip
To transfer the JPL AIRSAR files to your local disk, use standard system-level tape
utilities or the ENVI “Dump Tape” routine (see “Dumping Tape Data” on
page 151). You can use AIRSAR data with missing or non-standard headers, but
you have to enter the data parameters as described in “Entering Missing AIRSAR
Parameters” on page 834).

For easier processing, name the three files with the following convention:
filename_p.stk, filename_l.stk, and filename_c.stk.

1. Select Radar > Polarimetric Tools > Synthesize AIRSAR Data.

Using Polarimetric Tools ENVI User’s Guide


Chapter 13: Radar Tools 833

The Input Stokes Matrix Files dialog appears. Use this dialog to read the
compressed Stokes matrix files.
Warning
Do not open the Stokes matrix files using the standard ENVI File menu selection.

2. Click “Open File.”


3. In the file selection dialog, select one of the Stokes matrix filenames.
Note
If your radar data filenames do not appear in your directory, set the filename filter
to *.* using the “Files of Type” pulldown list.

• To clear the names in the Stokes Matrix Input File dialog at any time, click
“Reset” or click “Cancel” to quit without processing.
If the file has a valid AIRSAR header with all of the required parameters, the
filename is listed in one of the “Selected Files” text boxes 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 above, correct
file names for the other two files are automatically entered into the appropriate
text boxes. Otherwise, the file selection process must be repeated for each of
the bands.
Note
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”.

4. Click “OK” to accept the filenames.


The Synthesize Parameters Dialog appears.
5. Enter the parameters as described in “Selecting Synthesizing Parameters” on
page 834.
6. Select output to “File” or “Memory.”
7. Click “OK” to start the processing.

ENVI User’s Guide Using Polarimetric Tools


834 Chapter 13: Radar Tools

All of the synthesized bands are placed in a single file. The synthesized images are
added to the Available Bands List and can be processed further using standard ENVI
image processing functions.

Figure 13-3: The Input Stokes Matrix Files Dialog.

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.
Note
A COMP scale factor of 1.0 seems to work in most cases.

1. In the AIRSAR Header Parameters dialog, verify the parameters and change
values as required.
2. Enter any missing values.
3. Click “OK” to return to the Stokes Matrix Input File dialog.
Selecting Synthesizing Parameters
Use the Synthesize Parameters dialog to select specific send and receive polarization
combinations to be synthesized into ENVI images. The “standard” polarizations
(H=horizontal, V=vertical) “HH,” “VV,” “HV,” 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.

Using Polarimetric Tools ENVI User’s Guide


Chapter 13: Radar Tools 835

Turning Bands On/Off


• To toggle the standard bands on or off, click in the box to the left of the band
name.
Spatially Subsetting Images
• To perform spatial subsetting of the image to be synthesized directly from the
Stokes matrix data, click “Spatial Subset” and use standard ENVI spatial
subsetting procedures (see “Selecting a Spatial Subset” on page 45).
Note
The “Image” subsetting option is not available because it requires image format
data rather than compressed data.

Figure 13-4: The Synthesize Parameters Dialog.

ENVI User’s Guide Using Polarimetric Tools


836 Chapter 13: Radar Tools

Selecting Additional Send and Receive Polarizations


1. In the Synthesize Parameters dialog, enter the desired transmit and receive
ellipticity and orientation angles in the “Transmit Ellip/Orien” and “Receive
Ellip/Orien” text boxes.
2. Click on the “Add Combination” button.
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.
3. Select the desired bands, C, L, and /or P by clicking in the box to the left of the
band name.
4. Click “Add Combination.”
The selected images are listed in the “Additional Images:” text box.
Outputting in Decibels
• To output images converted into dB (decibels):
1. Ensure that the “Output Data Type” button menu is set to “Floating Point.”
2. Select the “Yes” toggle button.
Note
If you select “No,” the images will be output as intensity values.

Outputting in Byte Format


When quantitative analysis is not required, you can select byte output:
1. From the “Output Data Type” button menu, select “Byte.”
The “Std Multiplier” text box appears.
2. In the “Std Multiplier” text box, enter the standard deviation multiplier used to
calculate a minimum and maximum for scaling.
Note
The default value of 1.5 works for most AIRSAR and SIR-C scenes. Selecting byte
output automatically disables dB output.

Masking Bad Data Values


If you are outputting to a floating point data type:

Using Polarimetric Tools ENVI User’s Guide


Chapter 13: Radar Tools 837

• To mask bad data values, enter the minimum and maximum data values to use,
in units of intensity, in the “Intensity Min” and “Max” text boxes.
When outputting images in dB, the minimum and maximum values are still entered in
units of intensity as the output is bounded by these values prior to computing dB
(e.g., 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 minimum will be set to zero (0) and values greater
than the maximum will be replaced by the value one (1).

Synthesizing SIR-C Data


SIR-C Single Look Complex (SLC) and Multi-Look Complex (MLC) images must
be synthesized before they can be used in standard 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 832.
Tip
To ensure that the SIR-C data are in the proper compressed data product format, use
ENVI SIR-C tape routines (see “Reading SIR-C CEOS Tapes” on page 139). You
can use SIR-C data on disk that weren’t read from tape, but you have to enter the
data parameters as described “Entering Missing SIR-C Parameters” on page 840.

For easier processing, name the files with the following convention: filename_c.cdp
and filename_l.cdp.

1. Select Radar > Polarimetric Tools > Decompress-Synthesize Images >


Synthesize SIR-C Images.
The Input Data Products Files dialog appears. Use this dialog to read the SIR-
C compressed scattering matrix files.
Warning
Do not open Scattering matrix files using the standard ENVI File menu selection.

ENVI User’s Guide Using Polarimetric Tools


838 Chapter 13: Radar Tools

Figure 13-5: The Data Products Files Dialog.

2. Click “Open File.”


3. In the file selection dialog, select one of the SIR-C scattering matrix (.cdp)
filenames from the list.
If the file is a valid ENVI compressed data file with all of the required
parameters, the filename is listed in the one of the “Selected Files” text boxes
in the Input Data Product Files dialog (depending on whether the file is L-, or
C-band data). If you followed the suggested file naming convention described
above, the correct file name for the other file is automatically entered into the
corresponding text box. Otherwise, the file selection process must be repeated
for each of the bands.
Note
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 840.

• To clear the file names in the Data Products Input File dialog at any time, click
“Reset” or click “Cancel” to quit the process without processing.
4. Click “OK” to accept the filenames.
The Synthesize Parameters Dialog appears.

Using Polarimetric Tools ENVI User’s Guide


Chapter 13: Radar Tools 839

Figure 13-6: The Synthesize Parameters Dialog.

5. Set the parameters as described in “Selecting Synthesizing Parameters” on


page 834.
6. In the Synthesize Parameters dialog, select output to “File” or “Memory.”
7. Click “OK” to start the processing.
All synthesized bands are placed in a single output file. The images are added to the
Available Bands List and can be processed further using standard ENVI image
processing functions.

ENVI User’s Guide Using Polarimetric Tools


840 Chapter 13: Radar Tools

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.
Tip
You can 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.

• Enter the number of samples and lines in the corresponding text boxes.
• Enter the image size in the range direction (in kilometers) in the “Width
(km)” text box.
• Enter the scene size in the azimuth direction (in kilometers) in the “Length
(km)” text box.
• To skip any imbedded header and get to the beginning of the SIR-C data,
enter the byte offset in the “Offset” text box.
• Click the “C” or “L” band toggle button.
• Select “SAR Channel Type” by clicking on a SIR-C data type toggle
button.
• To strip line headers from the input data and exclude them from output
image, click the “Yes” toggle button.
If the data have been dumped directly from tape in CEOS format, they
may have an extra 12 bytes at the beginning of every line.
• Click “OK” to return to the Data Products Input File dialog.

Using Polarimetric Tools ENVI User’s Guide


Chapter 13: Radar Tools 841

Figure 13-7: The SIR-C Header Parameters dialog.

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 standardized ROI
definition procedures. Both co- and cross-polarization signatures are extracted and
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 845). For more information about polarization signatures, see the following
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.
van Zyl, J. J., 1989, Unsupervised classification of scattering behavior using radar
polarimetry data, IEEE Trans. Geosci. Remote Sensing, vol. 27, no. 1, pp. 36-45.
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.

ENVI User’s Guide Using Polarimetric Tools


842 Chapter 13: Radar Tools

Note
You can also extract polarization signatures using the Display Tools menu (see
“Extracting Polarization Signatures” on page 356).

Extracting Polarization Signatures from Single Pixels


Use the following procedure to extract polarization signatures for single pixels in a
display window 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 co-registered image.
2. Interactively set the pixel to be extracted in the displayed image by clicking the
middle mouse button on the desired pixel in the Zoom window (see “The
Zoom Window” on page 188).
3. From the Display menu, select Tools > Polarization Signatures > AIRSAR or
SIR-C.
Depending on whether AIRSAR or SIR-C data is selected, the Input Stokes
Matrix Files or the Input Data Products dialog appears.
4. Enter the Stokes Matrix or Scattering Matrix file names as described in
“Synthesizing JPL AIRSAR Data” on page 832.
The polarization signature for the currently selected pixel is automatically
loaded into the #n Current Pixel Polarization Signature Viewer.
• To change the polarization signature being plotted, select Options >
Extract Current Pixel to extract and plot a polarization signature for the
pixel currently under the cross-hair in the Zoom window.
You can set or control specific parameters. For details, see the “Using the
Polarization Signature Viewer” on page 845.

Using Polarimetric Tools ENVI User’s Guide


Chapter 13: Radar Tools 843

Extracting Polarization Signatures from ROIs


Use the following procedure to calculate polarization signatures for Regions of
Interest (ROI). The signatures are extracted directly from the AIRSAR Compressed
Stokes Matrix files or SIR-C scattering matrix files, and will be available for display
either in polarization signature viewers or as images in standard ENVI displays. Both
co- and cross-polarized signatures are extracted and saved 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. Before selecting this option, display a synthesized image or other co-registered
dataset and define Regions of Interest (see “Defining Regions of Interest” on
page 261).
2. From the ENVI main menu, select Radar > Polarimetric Tools > Extract
Polarization Signatures > AIRSAR or SIR-C.
Either the Input Stokes Matrix Files or the Input Data Products dialog appears,
depending on whether AIRSAR or SIR-C data are selected.
3. Enter the Stokes Matrix or Scattering Matrix file names as described in
“Synthesizing JPL AIRSAR Data” on page 832.
4. Click “OK.”
The Polsig Parameters dialog appears.
5. Set the parameters as described in the following section.
Setting Polsig Parameters
In the Polsig Parameters dialog, the ROIs appear in the “Select Polsig Images” text
box. One entry is listed for each of the P-, L-, and C-band images (AIRSAR) or L-
and C-band images (SIR-C).
1. Click on the ROI name(s) to select the polarization signatures. (To select
multiple ROI names, see “Selecting Multiple Items in Lists” on page 52.)
2. Select calculating the polarization signatures as floating-point intensity,
normalized intensity (normalized using the maximum image value), or in dB
(decibels).
The normalized intensity from 0 to 1 is calculated by dividing the signature by
its maximum value.

ENVI User’s Guide Using Polarimetric Tools


844 Chapter 13: Radar Tools

Figure 13-8: The Polsig Parameters Dialog.

Note
The z axis units you select will be used for the polarization signature images; all
three axis units will be available when the data are visualized in the Polarization
Signature Viewer.

3. Select the “Output” type by clicking the corresponding toggle button.


4. Select standard “File” or “Memory” output.
The polarization signatures (co- or cross-polarized) are saved 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).

Using Polarimetric Tools ENVI User’s Guide


Chapter 13: Radar Tools 845

5. Select whether or not to load each signature into its own Polarization Signature
Viewer after it is extracted by clicking the “Yes” or “No” toggle button.
Tip
Selecting “Yes” may create numerous windows and use significant amounts 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).

6. Click “OK.”
Both co-polarized and cross-polarized signatures are calculated for each selected
ROI. When completed, the signatures are listed in the Available Bands list. They
can also be analyzed in their own 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 are
displayed as floating-point, 2-D images and 3-D 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 be plotted 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 are displayed for the signatures and you can save them to ASCII files. You
can change the color tables applied to the plots, and save the plots to image files or
print them.

Automatically Starting the Viewer


• The Polarization Signature Viewer starts automatically when a polarization
signature is extracted from the current pixel (see “Extracting Polarization
Signatures from Single Pixels” on page 842).
• It also starts automatically when polarization signatures are extracted from
ROIs (see “Extracting Polarization Signatures from ROIs” on page 843).
• To load a previously extracted polarization signature, select Radar >
Polarimetric Tools > Extract Polarization Signatures > View Saved
Signatures.

ENVI User’s Guide Using Polarimetric Tools


846 Chapter 13: Radar Tools

When the Polarization Signature Viewer appears, a 3-D wire mesh surface is
displayed on the left and a 2-D gray scale image of the signature is displayed on the
right (see Figure 13-9). The statistics for the current signature are listed below the
plot.

Figure 13-9: The 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 being viewed,
display the 3-D plot as a surface or as a wire frame, apply color tables to 3-D plot and
the 2-D image, and rotate and move the 3-D plot.
Displaying Signature Details
An interactive cursor in the 2-D polarization signature drives a 3-D cursor on the 3-D
plot and vice versa. Orientation and ellipticity angles and pixel values representing
the radar backscatter at each pixel track the 3-D cursor. These values are listed in the
lower left corner of the 3-D plot in ellipticity, orientation angle, Z-value order.
• To plot cross-hairs on both the 2-D and 3-D plots, click and drag the cursor
with the left mouse button in the 2-D signature or in the 3-D plot.

Using Polarimetric Tools ENVI User’s Guide


Chapter 13: Radar Tools 847

Setting Displayed Axes


• 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 > the desired option.
Setting Z-Axis Ranges
To change the default range of the z-axis:
1. Select one of the following options:
• With the left mouse button, double-click on the z-axis.
• Select Options > Edit Z-Axis Ranges.
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” arrow toggle button and
selecting “Yes” or “No.”
• If you select “No,” enter the desired 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 3-D plot and the 2-D image:
1. Select Options > Color Tables.
2. Select a color table from the list in the Polsig Color Tables dialog.

ENVI User’s Guide Using Polarimetric Tools


848 Chapter 13: Radar Tools

The color table is applied to all displayed Polarization Signature Viewers. For more
information about color tables, see“Applying ENVI Color Tables and Density Slices”
on page 358.
Note
The color table only applies to the 3-D plot if it is a shaded surface.

Figure 13-10: The Polsig Color Tables dialog.

Plotting Band Polarization Signatures


When the Polarization Viewer is started by extracting from the current pixel, a
Frequency pulldown menu with the band names (P, L, and C for AIRSAR, or L and
C for SIR-C) is available.
• To plot the polarization signature for a band, select that band name from the
Frequency menu.
Only frequencies (bands) that correspond to the currently opened compressed data
files are available.

Using Polarimetric Tools ENVI User’s Guide


Chapter 13: Radar Tools 849

Displaying Shaded Surfaces


• To display the signature as a 3-D shaded surface, select Options >
Surface:Shaded.
• To return to the original 3-D wire frame image, select Options > Surface:Wire
Frame.
Any color table changes are retained.
Changing Plot Colors
• To change the background/foreground color scheme of the 3-D plot, select
Options > Background:Black or White.
Rotating and Panning the 3-D Plot
• To rotate the 3-D surface or 3-D wire frame image, click with the left mouse
button outside the signature surface and drag the signature to the desired
orientation.
• To move the 3-D surface or 3-D wire frame image around on the screen, click
with the middle mouse button and drag it to the desired location.
• To zoom in and out of the 3-D plot, click with the right mouse button 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 click with the left button.
Changing the Default Position
• To change the default position, set the 3-D plot to the desired position and
select Options > Save Current View as Default.
The next time you double-click to reset the image, it will appear in the new default
position.
Polarization Signature Options
In addition to setting the display parameters, you can load new polarization
signatures, display previously saved signatures, and copy signatures to another
Signature Viewer.

ENVI User’s Guide Using Polarimetric Tools


850 Chapter 13: Radar Tools

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.
Displaying Previously Saved Signatures
To display a previously saved signature:
1. Select Options > Load New Polsig.
2. From the New Polsig Bandname dialog, select the desired input signature from
the list.
3. Click “Apply” to apply the changes to the 3-D plot.
Copying Signatures
• To copy the current polarization signature to a new Polarization Signature
Viewer, select Options > New Polsig Window.

Restoring Saved Polarization Signatures


1. Select Radar > Polarimetric Tools > Extract Polarization Signatures > View
Saved Signatures.
A polarization signatures window appears.
2. Select Options > Load New Polsig and select the desired 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.
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 and select a new input file.
Note
This option is only available in the Current Pixel Polarization Viewer windows.

Using Polarimetric Tools ENVI User’s Guide


Chapter 13: Radar Tools 851

Outputting Signatures
• To save the 3-D signature as an image file, select File > Save Plot As > Image
File.
• To save the 3-D signature as a VRML 2.0 file, select File > Save Plot As >
VRML.
• To print the 3-D signature, select File > Print.
For detailed instructions, see “Display Output Options” on page 398.
Outputting Statistics to ASCII Files
To save the current polarization signature statistics to an ASCII file:
1. Select File > Save Stats as ASCII.
2. Enter an output filename and 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.
Closing Polarization Signature Viewers
• To close the Polarization Signature Viewer, select File > Cancel.
• To close all open Polarization Signature Viewers, select Options > Close all
Polsig Windows.

Displaying Polarization Signatures as Images


Polarization signatures that have been saved as images can be displayed and
manipulated using standard ENVI image processing functions.
• To load the desired signatures into a display, use the Available Bands List (see
“The Available Bands List” on page 176).
The signatures are displayed with an orientation angle of 180 degrees and an
ellipticity of -45 degrees in the upper left image corner

ENVI User’s Guide Using Polarimetric Tools


852 Chapter 13: Radar Tools

Figure 13-11 shows polarization signatures and surface plots that have been
annotated to clarify the relation between the images and the default orientation 3-D
polarization signatures.

Figure 13-11: Examples of 2D and 3D (wire frame) polarization


signatures displayed as images and annotated to clarify relations
between 2-D and 3-D plots.

Multilooking SIR-C Compressed Data


Use “multilooking” 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.
Note
The data to be multilooked must be compressed data.

1. Select Radar > Polarimetric Tools > Multilook Compressed Data > SIR-C
Multilook.

Using Polarimetric Tools ENVI User’s Guide


Chapter 13: Radar Tools 853

2. When the Input Data Product File dialog appears (see Figure 13-3), select a
compressed input file using the procedures described in “Synthesizing JPL
AIRSAR Data” on page 832.
3. When the SIR-C Multi-look Parameters dialog appears, choose the files to
multilook by clicking on the file name in the “Select Files to Multilook” list.

Figure 13-12: The SIR-C Multi-Look Parameters Dialog.

4. Enter the desired number of looks in the “Samples (Range)” and “Lines
(azimuth)” directions or select from the following options:
• To specify the number of pixels desired in the output image, enter the
values in the “Pixels” text boxes for the samples and lines.
• To specify the desired output pixel size in meters, enter the values in the
“Pixel Size (m)” text boxes for samples and lines.
When one of these parameters is entered, the others are automatically
calculated to match. For example, if you enter the Pixel Size as 30 m, then
the corresponding number of pixels and the looks are calculated and
change in the corresponding text boxes.

ENVI User’s Guide Using Polarimetric Tools


854 Chapter 13: Radar Tools

Note
Both integer and floating point number of looks are supported.

5. Click “Spatial Subset” to use standard ENVI Procedures to subset the data.
6. Enter a base name in the “Enter Base Name” text box.
This name will be used as the basis for multiple file names, 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 two output files will be
created with the names “sirc_c.cdp” and “sirc_l.cdp”
7. Click “OK” to multilook the data.
Use the synthesize function to generate image data from the output multilooked
compressed data files (see “Synthesizing SIR-C Data” on page 837).

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.
Band math could also be used to calculate the absolute value of the result (using
abs(b1)) (see “Band Math” on page 441).
1. Select Radar > Polarimetric Tools > Phase Image > AIRSAR or SIR-C.
2. In the file selection dialog, click “Open File” and select the desired input
compressed data file.
3. Click “OK.”
The Phase Image Parameters dialog appears.
4. Click the check boxes to select the bands to use for the phase image
calculation.
5. Select radians or degrees and perform any spatial subsetting.
6. Choose “Memory” or “File” output.
7. Click “OK” to start the processing.

Using Polarimetric Tools ENVI User’s Guide


Chapter 13: Radar Tools 855

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. See the
references in “Extracting Polarization Signatures” on page 841 for more information
about pedestal height.
1. Select Radar > Polarimetric Tools > Pedestal Height Image >
AIRSAR or SIR-C.
2. Select the input compressed data file and click “OK.”
The Pedestal Height Image Parameters dialog appears.
3. Click the check boxes to select the bands to use for the pedestal height image
generation.
4. Select any spatial subsetting.
5. Choose “Memory” or “File” output.
6. Click “OK” to start the processing.

Generating 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. Individual scattering mechanism
images (odd bounce, double bounce, volume scattering) are also generated.
The classification routine uses fully polarimetric AIRSAR data to determine the
nature of radar scattering mechanisms for each pixel within the scene. Particular
attention is paid 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.)
Note
All three (P, L, and C-band) stokes matrix files are required as input for this
classification.

1. Choose Radar > Polarimetric Tools > AIRSAR Scattering Classification.

ENVI User’s Guide Using Polarimetric Tools


856 Chapter 13: Radar Tools

The Input Stokes Matrix Files dialog appears.


2. Click “Open File.”
3. Select the AIRSAR compressed Stokes matrix files to use for the
classification.
• To clear the file names in the Input Stokes Matrix Files dialog at any time,
click “Reset” or click “Cancel” to quit the process without processing.
If the file has a valid AIRSAR header with all of the required parameters, the
filename is listed in one of the “Selected Files” text boxes 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
file names for the other two files are automatically entered into the appropriate
text boxes. If not, you must repeat the file selection process for each band.
Note
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 834.

4. In the Input Stokes Matrix Files dialog, click “OK.”


The AIRSAR Scatter Classification dialog appears.
5. Enter the kernel size to use to determine the average values used in the
scattering mechanism determination.
6. Select any spatial subsettting.
7. Select “File” or “Memory” output for both the classification and the rule
images (the scattering mechanism images).
8. Click “OK” to start the classification.
A status window appears during processing and the classification and rule images
appear in the Available Bands List when the process is complete. You can display
and analyze the classification image and the scattering mechanism images using
standard ENVI display and analysis routines.

Using Polarimetric Tools ENVI User’s Guide


Chapter 13: Radar Tools 857

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 832 for additional analysis tools. For more information
about the integrated TOPSAR data, see the following reference:
AIRSAR Integrated Processor Documentation, Data Formats, Version 0.01, May 3,
1995, JPL Publication, Jet Propulsion Laboratory, Pasadena, CA.

Opening TOPSAR Files


To read the raw TOPSAR format data files (Cvv, Incidence Angle, Correlation
Image, or the DEM):
1. Select Radar > TOPSAR Tools > Open TOPSAR File.
2. When the file selection dialog appears, select the file to be read.
ENVI automatically extracts the needed header information and places the image
band into the Available Bands List.
Note
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 832.

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. Select Radar > TOPSAR Tools > Convert TOPSAR Data.
2. When the file selection dialog appears, select one of the data files.
3. When the TOPSAR Conversion Parameters dialog appears, select which files
to convert by clicking in the check boxes next to the file names.
4. Select a spatial subset, if desired, by clicking on the “Spatial Subset” button
and using the standard ENVI subsetting.

ENVI User’s Guide Using TOPSAR Tools


858 Chapter 13: Radar Tools

5. Select output to “File” or “Memory.”


ENVI places all of the converted files into a single output file with a band for each
input file.

Replacing Bad DEM Values


Use Replace Bad Values or DEM Replace Bad Values to replace 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 when you
enter 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
“Masking” on page 458). The surface fitting uses Delaunay triangulation to fill the
bad pixels with triangles calculated from the surrounding good elevation values.
Note
If there are large holes in the data set, you may see the triangles used to fill them.

1. Select Topographic > Replace Bad Value or Radar > TOPSAR Tools > DEM
Replace Bad Values.
2. When the DEM Input File dialog appears, select the DEM file and perform any
subsetting or masking.
The Replace Bad Data Parameters dialog appears.
3. Enter a bad pixel value or a range of bad pixel values in the appropriate text
boxes.
Note
No values are needed if you selected a mask band that contains the locations of the
bad pixels.

4. Select “File” or “Memory” output.


5. Click “OK.”
The output appears in the Available Bands List.

Using TOPSAR Tools ENVI User’s Guide


Appendix A:

Installing and
Customizing ENVI
Appendix A describes ENVI hardware and software requirements and some details about
installing and customizing ENVI. This appendix covers the following topics:

ENVI Hardware Requirements . . . . . . . . . 860 The ENVI Configuration File . . . . . . . . . 867


Installing and Starting ENVI . . . . . . . . . . . 861 The ENVI Main Menu Definition File . . . 873
Platform Dependencies . . . . . . . . . . . . . . . 862 The ENVI Display Menu Definition File . 874
ENVI Items to be Aware of . . . . . . . . . . . . 864 ENVI Startup Script . . . . . . . . . . . . . . . . . 875
Customizing ENVI . . . . . . . . . . . . . . . . . . 865 Additional Caching Information . . . . . . . 876

ENVI User’s Guide 859


860 Appendix A: Installing and Customizing ENVI

ENVI Hardware Requirements


ENVI hardware requirements and recommendations are as follows:

Memory
32 Mb recommended

Mouse
UNIX - 3-Button Mouse
Windows - Three-button mouse with device driver for all three buttons is
recommended. Microsoft 2-button mouse or equivalent 2-button mice are supported
through emulation. The middle button is simulated using the left mouse button and
the control key pressed simultaneously.

Display
1024 x 768, 8 bit or 24 bit color display minimum.

Storage
Approximately 60 Mb for program and supporting files (300 Mb+ for data).

ENVI Hardware Requirements ENVI User’s Guide


Appendix A: Installing and Customizing ENVI 861

Installing and Starting ENVI


Specific instructions for installation of ENVI are provided in the ENVI installation
instructions and release notes.
To start ENVI:
• To start ENVI in UNIX, enter “envi” at the UNIX command line.
• To start ENVI RT in UNIX, enter “envi_rt” at the UNIX command line.
• To start ENVI (or ENVI RT) from a Macintosh system, drag the ENVI or
ENVI RT icon onto the IDL 5.4 icon.
• To start ENVI from a Windows system, select from the Windows Task Bar:
Start > Programs > ENVI 3.4 > ENVI or ENVI Runtime.
The ENVI main menu appears when the program has successfully loaded and
executed.

General Runtime Considerations


System memory configuration information has been set to the minimum
requirements for ENVI in the file envi.cfg. To optimize performance on systems
with more available RAM, edit this file and change the system memory and caching
parameters. This and other considerations for optimizing ENVI at runtime are
explained in the following sections.

ENVI User’s Guide Installing and Starting ENVI


862 Appendix A: Installing and Customizing ENVI

Platform Dependencies
SCSI Tape Support for PCs
ENVI includes tape support for PCs running Microsoft Windows 95, Windows 98,
Windows 2000, and Windows NT versions 3.51 and 4.0. The tape drivers are
installed automatically. Please see the install instructions for additional information.
The file “envitape.txt” file also gives more specific information on how to use these
drivers from within ENVI. Once installed, this routine provides transparent access to
ENVI tape tools using the ASPI32 interface provided with Windows. All ENVI tape
functions work the same as their UNIX counterparts on any SCSI tape device that
runs under ASPI32. Tape32 for ENVI supports reading of many known tape formats
including Landsat MSS, Landsat TM, AVHRR, AVIRIS, SPOT, etc. See the ENVI
Tape Utilities menu for a complete list. Other formats that are not directly supported
can be read using ENVI’s “Scan Tape” and “Dump Tape” functions.
• Select File > Tape Utilities > the appropriate tape function.
Setting the Window Drag in Windows NT
ENVI has problems resizing windows in Windows NT if “Full Drag” is on for
window resizing.
Turning off “Full Drag” in Window NT 4.0
1. Click the right mouse button in the display background.
2. Select “Properties” and click on the Plus! tab.
3. Make sure that “Show Window Contents While Dragging” is deselected.

Setting the Hypertext Color on UNIX Platforms


When the ENVI Online Help is activated from ENVI on some 8-bit displays there are
not enough reserved system colors for the links in the text to use a separate color
from the regular text. In general this is not a problem since the links in the text are
also underlined, however if the text is the same color you can try to change the
default hyperlink color to an existing reserved system color.
• For example, the following line placed in your .Xdefaults file will attempt to
make the hypertext links red (usually a reserved system color on most
machines).
HyperHelp*LinkColor: red

Platform Dependencies ENVI User’s Guide


Appendix A: Installing and Customizing ENVI 863

Window Auto-Placement on UNIX


On some UNIX platforms, new windows may require your interaction for screen
placement. We recommend that you disable this function.
• For example, on SGI systems using 4Dwm, the following two lines placed in
the .Xdefaults file will allow auto-placement of windows. See your system
documentation for other options.
4Dwm*InteractivePlacement: false
4Dwm*ClientAutoPlace: false
Setting the Font on UNIX Platforms
You can select any font available to the X server for your IDL and ENVI session. The
X windows command “xlsfonts” lists all the available fonts. The recommended font
for ENVI is either a 12 or 14 point courier (fixed width), or a 12 or 14 point Times-
Bold (proportional). For more information see the IDL User’s Guide.
• To enable a particular font for your IDL session, include the following line in
your .Xdefaults file with your selected font replacing the example.
Idl*fontList: -adobe-times-bold-r-normal--12-120-75-75-p-67-iso8859-1

Color Flashing on 24-Bit UNIX Machines


ENVI displays sometimes “flash” on 24-bit displays when other programs or the
windowing system requires some of the colors.
• You may be able to stop this flashing by entering the following into your
.Xdefaults file.
Idl.gr_visual: TrueColor
Idl.gr_depth: 24

Pseudocolor on 24-Bit UNIX Machines


ENVI automatically configures for both 8-bit and 24-bit displays. For more
information see the IDL User’s Guide.
• To run ENVI in an 8-bit mode on a 24-bit display, enter the following line in
your .Xdefaults file to force your system to operate in 8-bit mode whenever
IDL is started.
Idl.gr_visual: PseudoColor
Idl.gr_depth: 8

ENVI User’s Guide Platform Dependencies


864 Appendix A: Installing and Customizing ENVI

ENVI Items to be Aware of


Checking Disk Space
ENVI doesn’t check for available disk space before creating output files and may fail
during the file write if insufficient space is available. A work around is to ensure that
adequate disk resources are available prior to outputting a large file to disk.

Choosing an Output Directory Name Interactively


On the Windows and Macintosh platforms, you cannot select an output directory on
its own. Only files within a directory may be chosen. For dialogs which request an
output directory name, you can either select a file in the chosen directory
interactively, or simply enter a valid directory name in the text box.
Choosing a Tape Device Name Interactively
On the UNIX platform, tape device names do not appear in the interactive file
selection widget. A valid device name, however, may be entered into the given text
widget without interactive selection.

No Horizontal Slider for Long List Items in List Widgets


On the Windows and Macintosh platforms, long strings in various lists may run off
the right hand side of the widget without a scroll bar to view the right hand portion of
the string. Many of these widgets can be resized to show the strings by clicking on a
corner and dragging to the desired size.
Tip
In the case of band names in the Available Bands List, you can resize the widget, or
you can display shortened versions of the bands names by selecting Options >
Display: Short Band Names.

ENVI Items to be Aware of ENVI User’s Guide


Appendix A: Installing and Customizing ENVI 865

Customizing ENVI
You can setup custom menus, system configuration variables, and even add your own
ENVI routines to the ENVI menu. Several files are used for custom configurations
(located in the /menu and /map_proj subdirectories):
colors.txt - ENVI graphics colors rgb file (see “ENVI Graphic Colors File” on
page 883).
display.men - display menu file (see page “The ENVI Display Menu Definition File”
on page 874).
e_locate.pro - ENVI directory locator file.
envi.cfg - system configuration file (see “The ENVI Configuration File” on
page 867).
envi.men - main menu file (see “The ENVI Main Menu Definition File” on
page 873).
filetype.txt - contains a list of ENVI file types and the routine name used to read the
files that need specialized spatial and spectral readers.
map_proj.txt - user-defined map projections file (see “ENVI Map Projections File”
on page 886).
sensor.txt - list of sensor types that appears in the ENVI header (see “ENVI Sensor
File (sensor.txt)” on page 885).
useradd.txt - used to define parameters for user-defined plot routines, Spectral
Analyst routines, user-defined map projection routines and/or user-defined map
projection units (see page 868 for details).
usersym.txt - contains user-defined symbols.
For example, if you want to setup your own private ENVI configuration in a
directory, copy the above files from the installation directory to your personal
directory. ENVI first searches for the file envi.cfg using the IDL !PATH variable,
so the directory where you place the local copy of envi.cfg must be included in
your IDL_PATH variable *BEFORE* the standard $IDL_DIR/lib entry. There
must also be a file with a “.pro” or “.sav” extension in this directory as well, which is
why the e_locate.pro dummy file is included. Once the envi.cfg file is located,
ENVI uses this file to locate the other user definable files; envi.men,
display.men, map_proj.txt, and colors.txt.

ENVI User’s Guide Customizing ENVI


866 Appendix A: Installing and Customizing ENVI

The configuration items “default envi menu file,” “default display menu file,”
“default graphic colors file,” and “default map projection file” in “envi.cfg” can be
used to tell ENVI where local copies of these files may be found. If any of these
entries are left blank or are invalid, ENVI searches for the files in the default ENVI
installation directories.
Once ENVI successfully locates your private copies of these files, they may be edited
for your own configuration and menu setups. See the following section for details
about the ENVI configuration and menu files.

Customizing ENVI ENVI User’s Guide


Appendix A: Installing and Customizing ENVI 867

The ENVI Configuration File


Use the ENVI configuration file (envi.cfg) to customize ENVI and to optimize
specific hardware configurations to suit your preferences. The file is an ASCII text
file containing keywords and associated values. The way that ENVI uses memory,
handles color, and other setup parameters can be changed by editing this file and
entering new values.
• Edit the file using a text editor or word processor, or change the file from
within ENVI by selecting File > Preferences on the ENVI main menu.
Note
The envi.cfg file must be in a directory that is on the IDL search path.

Configuration File Details


The ENVI configuration file must have the keywords “ENVI CONFIGURATION
FILE” at the top of the ASCII file. Keywords determine the ENVI startup
configuration. Each keyword option of the envi.cfg configuration file is described
below.
alternate header directory - this directory is used primarily for storage of headers
for files on read-only devices such as CD-ROM. If ENVI is unable to write a header,
it writes into the alternate header directory. If ENVI is unable to locate a header file,
it will look in the alternate header directory.
annotation scale bar titles - used to change the spelling of the annotation scale bar
units, (e.g., changing “kilometers” to “kilometres”).
auto append output filename extensions - use to set whether or not to append the
default extensions to the entered filename.
command line blocking - determines if you have access to IDL command line
programming during an ENVI session.
configuration name - a unique name assigned to this particular configuration.
default color table file - specifies a user file to define the color tables (optional).
default data directory - this is the specified directory for input images and will be
the default directory when ENVI is started.
default display menu file - specifies a user file that defines the display menu
(optional).

ENVI User’s Guide The ENVI Configuration File


868 Appendix A: Installing and Customizing ENVI

default envi menu file - specifies a user file that defines the ENVI main menu
(optional).
default graphic colors file - specifies a user file to define the graphic colors
(optional).
default map projection file - specifies a user file that defines map projections
(optional).
default output directory - this is the specified directory for output files and will be
the default directory every time ENVI output files are written unless another specific
path is specified.
default output page offset - specifies the default x and y page offset for multiple
page postscript output in inches or centimeters.
default output page size - specifies the default page size for postscript output in
either cm or inches.
default previous files file - (optional) specifies a file name used to store the names of
the 20 previous files opened in ENVI using the Open Image File menu item.
default save_add directory - (optional) if you place your custom IDL routines in
this directory they will automatically be restored or compiled when ENVI is started.
default spectral library directory - this is the default directory every time ENVI
spectral library file selection functions are started.
default startup script file - (optional) specifies a file name that contains the script
that executes upon startup of ENVI.
default tmp directory - used to store ENVI temporary files.
default useradd text file - (optional) contains button name, event handler, etc., for
user-defined plot routines, spectral analyst routines, user-defined map projection
routines and/or user-defined map projection units (see User Defined Units in the
ENVI Programmer’s Guide).
display default stretch - designates the default stretch that will be used for images
loaded into ENVI display windows. Options are “n% linear” (where “n” is a specific
value for example 0% linear, 2% linear, etc.), “m n linear” (where m is data minimum
and n is data maximum), “n gaussian” (where “n” is the number of standard
deviations about the mean), “equalize” (for histogram equalization), and “square
root” (for square root stretch).

The ENVI Configuration File ENVI User’s Guide


Appendix A: Installing and Customizing ENVI 869

display retain value - sets the control of the backing store. A retain 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.
exit idl on exit from envi - determines if IDL is automatically exited when exiting
from ENVI or if the IDL session remains open.
image tile size (Mb) - designates the tile size that will be used by ENVI for
processing. Tiling is an internal ENVI image segmentation technique that allows the
system to work on images larger than available RAM. This value should be set to
about 1/10th the total cache size described on page 871. Images of any size can be
viewed in ENVI, but this field determines how much of that image is kept in memory
at any given time.
image window default xsize and image window default ysize - sets the initial size
of the full resolution image windows in pixels.
image window scroll bars - determines whether the main image display has scroll
bars.
interactive stretch auto apply - sets whether on not to automatically apply changes
to the stretch in Interactive Stretching. This can also be toggled on/off from the
Interactive Stretching dialog.
main menu orientation - controls whether the ENVI main menu is displayed in a
horizontal or vertical orientation.
max number of histogram bins - indicates the maximum number of bins to use
during histogram calculation.
max number of items for multilist - indicates the maximum number of items to be
listed in a widget. If the number of items listed is greater than the specified number,
ENVI uses an alternate check box mode to speed up scrolling of the list.
max number of items in pulldown menus - indicates the maximum number of
items listed in a pulldown menu. If the number of items is greater than this maximum
value then the pulldown menu breaks the items into sub-menus each containing only
this max number of items or fewer. This keeps long lists of items from running off the
display.
max number of vertices for memory - indicates maximum number of polygon
vertices for vector files loaded into ENVI. If the number of vertices is greater than the
specified number, ENVI will not load the polygons into memory, but will create an
ENVI vector (.evf) file.

ENVI User’s Guide The ENVI Configuration File


870 Appendix A: Installing and Customizing ENVI

menu border size and edge border size - sets the window border sizes according to
system specific parameters to allow consistent spacing of window.
number of colors per rgb image and number of colors per gray scale image -
ENVI runs on 8- or 24-bit color workstations. These settings are for 8-bit mode. Each
display window occupies a certain range of entries in the color table. These two
parameters determine how many colors from the 256 colors in the color table are
used for each RGB “color quantized” image display and for each gray scale display.
open applicable formats automatically to memory - sets whether or not to open
BMP, HDF, JPEG, PICT, SRF, and XWD external files directly to memory instead
of prompting for file or memory output.
plot window default axis thickness - sets the thickness of the X and Y axis lines (1
is normal).
plot window default background color - sets the plot background color.
plot window default charsize - sets the default character size.
plot window default font - sets the default font for the axis labels and title.
plot window default foreground color - sets the plot foreground color.
plot window default key margin - sets the size of the margin when the key or data
labels are turned on.
plot window default minor ticks - sets the number of minor tick marks.
plot window default tick length - sets the length of the major tick marks, measured
as a ratio of the axis length normalized to 1.0, (e.g., a length of .02 results in ticks that
are 2% of the length of the entire axis).
plot window default xmargin - two values used to set the size (in characters) of the
margins around the plot axes. The first value is the left margin and the second value is
the right margin.
plot window default xsize/ysize - sets the initial size of a plot window in pixels.
plot window default ymargin - two values used to set the size (in characters) of the
margins around the plot axes. The first value is the bottom margin and the second
value is the top margin.
scroll and zoom window default position - allows selection of the initial position
(left, right, above, below, within, off) of the zoom and scroll windows relative to the
main image window.
scroll window default xsize and scroll window default ysize - sets the initial size of
the scroll windows

The ENVI Configuration File ENVI User’s Guide


Appendix A: Installing and Customizing ENVI 871

status window for input data reading - specifies whether a status window will
appear during input of data files.
status window for input data reading - sets whether or not to show a status window
when loading data of BIL or BIP format to a display window.
tape device name - default system device name for tape 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.
thread pool maximum elements - The maximum number of elements in a
computation that will be processed using the thread pool. Computations with more
than this number of elements will 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.
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 will use the thread pool. If the number of elements is less than the number
you specify, ENVI will perform 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 number of processors - The number of threads that IDL will use in
thread pool computations. The default value is equal to the value of the number of
CPUs on your system, so that each thread will have the potential to run in parallel
with the others. Note that 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.
total cache size (Mb) - designates a soft limit for the amount of system RAM the
program will expect to use. ENVI has an internal memory management/cache
scheme that attempts to limit the amount of memory used. This 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. This type of error results when the
program attempts to use more memory than is available. Higher values for the cache
size will speed up spatial processing functions. Set this value to slightly less than the
amount of available system RAM (less on multi-user systems) (see “Additional
Caching Information” on page 876).
user defined motion routine - specifies a user procedure that is called when the
mouse is moved within a display window (optional; see the ENVI Programmer’s
Guide).

ENVI User’s Guide The ENVI Configuration File


872 Appendix A: Installing and Customizing ENVI

user defined move routine - specifies a user procedure that is called when the zoom
location is moved within a display window (optional; see User Move Routines in the
ENVI Programmer’s Guide).
zoom window default xsize and zoom window default ysize - sets the initial size of
the zoom windows in pixels.
zoom window zoom increment - sets the integer zoom factor for each subsequent
zoom event.

The ENVI Configuration File ENVI User’s Guide


Appendix A: Installing and Customizing ENVI 873

The ENVI Main Menu Definition File


The ENVI Main Menu Definition File is named envi.men. The entire menu is user-
configurable. Existing items can be repositioned to suit your needs and new items can
be added. ENVI does not distinguish between ENVI and user event handlers, thus
allowing easy integration of user events (see User Functions are Widget Event
Handlers in the ENVI Programmer’s Guide). One of ENVI’s most powerful features
is this potential for customization. You should take the time to customize the menu to
your liking. The specifics of how to configure the menu are included in the menu file
text.
• To use your created main menu file as the default menu, enter the complete
filename in the envi.cfg file or enter it using File > Preferences.

ENVI User’s Guide The ENVI Main Menu Definition File


874 Appendix A: Installing and Customizing ENVI

The ENVI Display Menu Definition File


The ENVI Display Menu Definition File is named display.men . The entire menu is
user-configurable. Existing items can be repositioned to suit your needs and new
items can be added. Instructions for customizing the menu are included in the menu
file text.
• To use your own display menu file as the default menu, enter the complete
filename in the envi.cfg file or enter it using File > Preferences.

The ENVI Display Menu Definition File ENVI User’s Guide


Appendix A: Installing and Customizing ENVI 875

ENVI Startup Script


The ENVI startup script is used to open files, load bands into displays, open ENVI
vector files, and open region of interest files. This script is automatically executed
when ENVI is started if a filename is set in the envi.cfg file.
• To execute an ENVI startup file at any time during a session, select File >
Execute Startup Script function.
The startup script consists of ASCII commands that can be entered using a text editor.
An example of a startup file:
open file = e:\data\canyon\canyon.tm
load bands = 4,3,2
open file = e:\data\canyon.tif
load band = 1
open roi = e:\data\canyon\canyon.roi

The available startup commands and their formats are described here with the
keywords shown in italics.
Opening an Image File
Open File = filename
Loading a Gray Scale Image into a New Display
Load Band = band number
The band number refers to the file opened in the line above the load band command.
Loading an RGB Color Image into a New Display
Load Bands = R band number, G band number, B band number
The band numbers refer to the file opened in the line above the load band command.
Opening an ENVI Vector File
Open evf = filename
Opening a Region of Interest file
Open ROI = filename
Opening a Saved Display Group
Open Display Group = display group filename

ENVI User’s Guide ENVI Startup Script


876 Appendix A: Installing and Customizing ENVI

Additional Caching Information


Total Cache Size
ENVI uses an internal caching method to monitor memory management and optimize
memory usage. None of this memory management impacts you unless memory-only
items need to be stored to a disk file. All caching of raw data and display data is
hidden and does not effect any open windows or processing functions.
You set the “total cache size” for ENVI to use as described in “The ENVI
Configuration File” on page 867. This number should be a function of a machine’s
physical RAM, number of users, and other applications used while ENVI is active. If
no other users are using the machine, set the total cache size to 50% to 75% of the
total RAM. For example, for a machine with 32 Mbytes of RAM, use something less
than 23 Mbytes and for a machine with 100 Mbytes of RAM use something less than
75 Mbytes for the “total cache size.”
Note
These are only suggestions; ENVI will work with any numbers you supply.

The cache system tracks the total memory used by all data in the system. If the size of
a new process or display request exceeds the available memory, ENVI will remove
some items from cache until there is enough memory to store the result. The first
items removed are the raw data read from disk files, (oldest-by-use first), then the
byte-scaled display images are removed (oldest-by-use first), and finally, if enough
memory has not been freed, the memory-only items will be removed after requesting
you to save/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.
Tip
You should, however, periodically store memory images to disk to avoid cases
where the “in memory” request is greater than the total cache size.

Image Tile Size


ENVI uses the “image tile size” keyword to segment the processing of large images.
It specifies the amount of data processed in each segment (see “Tiling Operations” on
page 41). A recommended tile size is 1/10 of the total cache size. Image tile size only
affects the processing of data, not the displaying of images.

Additional Caching Information ENVI User’s Guide


Appendix B:

ENVI File Formats

This appendix covers the following topics:

ENVI Header Format . . . . . . . . . . . . . . . . 879 ENVI Datum File (datum.txt) . . . . . . . . . 888


ENVI Graphic Colors File . . . . . . . . . . . . . 883 ENVI State Plane Projection Files . . . . . . 889
ENVI File Type File (filetype.txt) . . . . . . . 884 ENVI Spectral Library Files . . . . . . . . . . 890
ENVI Sensor File (sensor.txt) . . . . . . . . . . 885 ENVI Previous Files List . . . . . . . . . . . . . 891
ENVI Map Projections File . . . . . . . . . . . . 886 Other ENVI ASCII Files . . . . . . . . . . . . . 892
ENVI Ellipsoid File (ellipse.txt) . . . . . . . . 887

ENVI User’s Guide 877


878 Appendix B: ENVI File Formats

ENVI uses a generalized raster data format consisting of a simple “flat binary file”
and a small associated ASCII (text) header file. This approach permits ENVI’s
flexible use of nearly any image format, including those with embedded header
information. The text header provides ENVI with information about the dimensions
of the image, the internal header if present, the data format, and other pertinent
information.
The generalized raster data is stored as a binary stream of bytes either in band
sequential (BSQ), band interleaved by pixel (BIP), or band interleaved by line (BIL)
format. In its simplest form, the data is in BSQ format, with each line of the data
followed immediately by the next line in the same spectral band. This format is
optimal for spatial (X, Y) access of any part of a single spectral band. Images stored
in BIP format have the first pixel for all bands in sequential order, followed by the
second pixel for all bands, followed by the third pixel for all bands, etc., interleaved
up to the number of pixels. This format provides optimum performance for spectral
(Z) access of the image data. Images stored in BIL format have the first line of the
first band followed by the first line of the second band, followed by the first line of
the third band, interleaved up to the number of bands. Subsequent lines for each band
are interleaved in similar fashion. This format provides a compromise in performance
between spatial and spectral processing.
Because ENVI uses ASCII header files that are built “on-the-fly” if required, you
typically do not need to convert your image file formats. Additionally, the flexible
file format allows direct utilization of generic BSQ, BIL, or BIP files. ENVI has been
tested on numerous data types including MSS, TM, SPOT, ERS-1, AVHRR,
AVIRIS, GERIS, GEOSCAN, TIMS, digitized aerial photographs, DEM data,
AIRSAR, RADARSAT, and SIR-C data. All of these data types are supported in
their native formats (byte, integer, floating-point, etc.).

ENVI User’s Guide


Appendix B: ENVI File Formats 879

ENVI Header Format


The ENVI header file contains information used to read an image data file. It is
normally created the first time a data file is accessed by ENVI. The required
information is entered into the Header Info dialog, which appears when the file is
opened and can be edited and changed later using the “ENVI Edit Header” function.
You can generate an ENVI header outside ENVI using a text editor. A description of
the required characteristics for an ENVI header file follows.
The file must start with the text string “ENVI” to be recognized by ENVI as a native
file header. Keywords within the file are used to indicate critical file information. The
following are valid keywords:
description - a character string describing the image or processing performed.
samples - number of samples (pixels) per image line for each band.
lines - number of lines per image for each band.
bands - number of bands per image file.
header offset - refers to the number of bytes of imbedded header information present
in the file (for example 128 bytes for ERDAS 7.5 .lan files). These bytes are
skipped when the ENVI file is read.
file type - refers to specific ENVI defined file types such as certain data formats and
processing results. The available file types are listed in the filetype.txt file
described on page 884. The file type ASCII string must match an entry in the
filetype.txt file verbatim, including case.
data type - parameter identifying the type of data representation, where 1=8 bit byte;
2=16-bit signed integer; 3=32-bit signed long integer; 4=32-bit floating point; 5=64-
bit double precision floating point; 6=2x32-bit complex, real-imaginary pair of
double precision; 9=2x64-bit double precision complex, real-imaginary pair of
double precision; 12=16-bit unsigned integer; 13=32-bit unsigned long integer;
14=64-bit signed long integer; and 15=64-bit unsigned long integer.
interleave - refers to whether the data are band sequential (BSQ), band interleaved
by pixel (BIP), or band interleaved by line (BIL).
sensor type - refers to specific instruments such as Landsat TM, SPOT, RadarSat,
etc. The available sensor types are listed in the sensor.txt file described on page
885. The sensor type ASCII string defined here must match one of the entries in the
sensor.txt file verbatim., including case.

ENVI User’s Guide ENVI Header Format


880 Appendix B: ENVI File Formats

byte order -describes the order of the bytes in integer, long integer, 64-bit integer,
unsigned 64-bit integer, floating point, double precision, and complex data types;
Byte order=0 is Least Significant Byte First (LSF) data (DEC and MS-DOS systems)
and byte order=1 is Most Significant Byte First (MSF) data (all others - SUN, SGI,
IBM, HP, DG).
x-start and y-start - parameters define the image coordinates for the upper left hand
pixel in the image. The values in the header file are specified in “file coordinates,”
which is a zero-based number.
map info - lists geographic coordinates information in the order of projection name
(UTM), reference pixel x location in file coordinates, pixel y, pixel easting, pixel
northing, x pixel size, y pixel size, Projection Zone, “North” or “South” for UTM
only.
Note
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
entered “magic pixel” coordinates in the ENVI header, the map coordinates would
refer to the x,y coordinates entered (e.g., x=1.5, y=1.5 would make the map
coordinates refer to the center of the pixel).

projection info - parameters that describe user-defined projection information. This


keyword is added to the ENVI header file if a user-defined projection is used instead
of a standard projection. This information can be used to read this file in installations
of ENVI that do not contain this user-defined projection in its map_proj.txt file.
default bands - if set, indicates which band numbers to automatically load into the
Available Bands List’s gray scale or R, G, and B text boxes every time the file is
opened. By default, a new image is automatically loaded when a file that has default
bands defined in its header is opened. If only 1 band number is used, then a grayscale
image is loaded.
z plot range - values indicating the default minimum and maximum values for Z
plots.
z plot average - values indicate the number of pixels in the X and Y directions to
average for Z plots.
z plot titles - allows entry of specific X and Y axis titles for Z plots.
pixel size - indicates X and Y pixel size in meters for non-georeferenced files.
default stretch - determines what type of stretch (% linear, linear range, gaussian,
equalize, square root) is used when the image is displayed.

ENVI Header Format ENVI User’s Guide


Appendix B: ENVI File Formats 881

band names - allows entry of specific names for each band of an image.
wavelength - lists the center wavelength values of each band in an image. Units
should be the same as those used for the FWHM.
fwhm - lists full-width-half-max values of each band in an image. Units should be the
same as those used for wavelength
bbl - lists the bad band multiplier values of each band in an image, typically zero for
bad bands and one for good bands.

Example ENVI Header File


A typical ENVI Header File is shown below:
ENVI
description = {
Registration Result. Method: 1st degree Polynomial w/ nearest
neighbor [Wed Dec 20 23:59:19 1995] }
samples = 709
lines = 946
bands = 7
header offset = 0
file type = ENVI Standard
data type = 1
interleave = bsq
sensor type = Landsat TM
byte order = 0
map info = {UTM, 1, 1, 295380.000, 4763640.000, 30.000000,
30.000000, 13, North}
z plot range = {0.00, 255.00}
z plot titles = {Wavelength, Reflectance}
pixel size = {30.000000, 30.000000}
default stretch = 5.0% linear
band names = {
Warp (Band 1:rs_tm.img), Warp (Band 2:rs_tm.img), Warp (Band
3:rs_tm.img), Warp (Band 4:rs_tm.img), Warp (Band 5:rs_tm.img),
Warp (Band 6:rs_tm.img), Warp (Band 7:rs_tm.img)}
wavelength = {
0.485000, 0.560000, 0.660000, 0.830000, 1.650000, 11.400000,
2.215000}
fwhm = {
0.070000, 0.080000, 0.060000, 0.140000, 0.200000, 2.100000,
0.270000}

ENVI User’s Guide ENVI Header Format


882 Appendix B: ENVI File Formats

Class Keywords for Header Files


Some types of files may have additional keywords for specific required information.
For example, classification results files will contain the additional keywords:
“classes,” which defines the number of classes, including the “unclassified,” class
lookup,” which lists RGB color definitions for each respective class, and “class
names.” These additional keywords with values assigned typically would consist of
the following additional lines added to the .hdr file:
classes = 4
class lookup = { 0, 0, 0,255, 0, 0, 0,255, 0,255,255, 0}
class names = {
Unclassified,
region 1,
region 2,
region 3}

Spectra Keywords for Header Files


Spectral library files will contain the additional keyword: “spectra names.” This
additional keyword contains a comma-separated list of ASCII names enclosed in
curly brackets. For example,
spectra names = {
ACTINOLITE IN-4A, ALBITE TS-6A, ALMANDINE GARNET NS-4A, ALUNITE
SO-4A,
AMBLYGONITE P-3A, ANALCIME TS-18A, ANATASE SYNTHETIC O-12A,
ANDESINE TS-4A, ANGLESITE SO-10A, ANHYDRITE SO-1A, ANORTHITE TS-
5A,
ANTHOPHYLLITE IN-8A, ANTLERITE SO-11A, APATITE P-1A, APHTHITALITE
SO-9A}

ENVI Header Format ENVI User’s Guide


Appendix B: ENVI File Formats 883

ENVI Graphic Colors File


This 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.
Colors can be added to this file using a text editor or colors can be changed by
selecting File > Preferences and clicking the “System Graphics Colors” button to
open the editing window (see “Editing System Graphic Colors” on page 162). 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

ENVI User’s Guide ENVI Graphic Colors File


884 Appendix B: ENVI File Formats

ENVI File Type File (filetype.txt)


This file is an ASCII file that lists the specific file types that are used in the ENVI
header to identify special files. These file types include ENVI specific files such as
meta files, classification results, virtual mosaics, spectral libraries, and fft results. The
file types also include data specific formats such as ADRG and AVHRR. Files such
as TIFF and BMP are also recognized as well as ERDAS 8.x and PCI files. The file
type field allows these files to have an ENVI header but still exist in their native
formats. The “filetype.txt” file contains the list of the recognized file types. You can
edit this file and add your own (user-defined) file types. The first column in the file
contains the full file type name, the second column contains a shorter abbreviated
name which is used in the Header Info dialog (so the widget is not too big), and the
third column contains the name of the routine used to read the data (see Chapter 7,
“Custom File Input” of the ENVI Programmer’s Guide).
{ADRG} {ADRG} {envi_read_adrg}
{AVHRR CD} {AVHRR CD} {envi_read_avhrr}
{HDF Scientific Data} {HDF SD} {envi_read_hdf_sd}
{HDF Modis Simulator} {HDF MAS-50} {envi_read_modis}
{NOAA DMSP} {NOAA DMSP} {envi_read_dmsp}
{NLAPS CD} {NLAPS CD} {envi_read_nlaps}
{PDS Image} {PDS Image} {envi_read_pds}
{RADARSAT} {RADARSAT} {envi_read_radarsat}
{Spot CD} {Spot CD} {envi_read_spot}
{BMP} {BMP} {envi_read_bmp}
{TIFF} {TIFF} {envi_read_tiff}
{ERDAS 8.X} {ERDAS 8.X} {envi_read_erdas}
{PCI} {PCI} {envi_read_pci}

ENVI File Type File (filetype.txt) ENVI User’s Guide


Appendix B: ENVI File Formats 885

ENVI Sensor File (sensor.txt)


This file is an ASCII file that lists sensor types that can be selected in the sensor
parameter in an ENVI header. You can modify or add new sensors to the list using
any text editor. A portion of the sensor list is shown here:
ADAR
ADEOS
ADRG
Air Photo
AIRSAR
ASTER
AVHRR
AVIRIS
CASI
DEM
DMSP
EARTHWATCH

Sensor types specified in the ENVI header file must match an entry in this list
verbatim, including case.

ENVI User’s Guide ENVI Sensor File (sensor.txt)


886 Appendix B: ENVI File Formats

ENVI Map Projections File


This file is an ASCII file that defines the map projections used in ENVI. Use Build
Customized Map Projection to build customized map projections (see “Building
Customized Map Projections” on page 758). 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
;
; 5 - Hotin Oblique Mercator A
; a, b, lat0, lat1, lon1, lat2, lon2, x0, y0, k0, [datum], name
;
; 6 - Hotin Oblique Mercator B
; a, b, lat0, lon0, azimuth, x0, y0, k0, [datum], name
; azimuth:azimuth of central line (degrees east of north)
;
; 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 Map Projections File ENVI User’s Guide


Appendix B: ENVI File Formats 887

ENVI Ellipsoid File (ellipse.txt)


This 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). You can modify or add new data to the file
using any text editor. 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

ENVI User’s Guide ENVI Ellipsoid File (ellipse.txt)


888 Appendix B: ENVI File Formats

ENVI Datum File (datum.txt)


This 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. You can edit this file using any text editor. A
portion of the ENVI datum.txt file is shown here:
Adindan, Clarke 1880, -166, -15, 204
AFG, Krassovsky, -43, -163, 45
Ain El Abd 1970, International, -150, -251, -2
Alaska (NAD-27), Clarke 1866, -5, 135, 172
Alaska/Canada NAD-27, Clarke 1866, -9, 151, 185
Anna 1 Astro 1965, Australian National, -491, -22, 435
ARC-1950 mean, Clarke 1880, -143, -90, -294

ENVI Datum File (datum.txt) ENVI User’s Guide


Appendix B: ENVI File Formats 889

ENVI State Plane Projection Files


The sp_nad27.txt and sp_nad 83.txt files contain a list of the state plane projections
available for use in ENVI. The sp_nad27.txt file uses the North American 1927
datum to define the projections. The sp_nad83.txt file uses the North American 1983
datum to define the projections. These files are ASCII files with the first column
containing the NOS zone #, the second column containing the USGS zone #, and the
last column has the projection name in alphabetical order. These files can be used to
find state plane zone #s. A portion of the ENVI sp_nad27.txt file is shown here:
101, 3101, 3, 6378206.4, 6356583.8, 30.500000, -85.833333,
152400.0, 0.0, 0.999960, Alabama East
102, 3126, 3, 6378206.4, 6356583.8, 30.000000, -87.500000,
152400.0, 0.0, 0.999933, Alabama West
201, 3151, 3, 6378206.4, 6356583.8, 31.000000, -110.166667,
152400.0, 0.0, 0.999900, Arizona East
202, 3176, 3, 6378206.4, 6356583.8, 31.000000, -111.916667,
152400.0, 0.0, 0.999900, Arizona Central
203, 3201, 3, 6378206.4, 6356583.8, 31.000000, -113.750000,
152400.0, 0.0, 0.999933, Arizona West

ENVI User’s Guide ENVI State Plane Projection Files


890 Appendix B: ENVI File Formats

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. The ENVI spectral libraries can be displayed and
enhanced using the standard ENVI image display and analysis routines (see “Spectral
Libraries” on page 619 and Appendix C, “ENVI Spectral Libraries”).

ENVI Spectral Library Files ENVI User’s Guide


Appendix B: ENVI File Formats 891

ENVI Previous Files List


The ENVI Previous Files List contains a list of the last 20 files opened in ENVI. The
complete path and file name of the listed files are stored in a file named in the
envi.cfg file. In front of each file name 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 “-” will move down the list as new files are opened, and eventually
fall off the list. A portion of a previous file list is shown below.
+E:\data\canyocanyon.tm
-E:\data\topsar\top_l.cub
-D:\rsi\envi30\spec_lib\usgs_sli.dat
-E:\data\canyon\tm800.img
-E:\data\dem\denver-e.img

You can edit the Previous Files List by selecting File > Preferences and clicking the
“Previous Files List” button to open the editing window (see “Setting ENVI
Preferences” on page 160).

ENVI User’s Guide ENVI Previous Files List


892 Appendix B: ENVI File Formats

Other ENVI ASCII Files


Other ENVI ASCII file formats are described in the following sections. Files that are
not described below (e.g., .ann, .roi, etc.) are files that are in a binary format.

Bad Lines List (.bll)


The ENVI Bad Line Removal files are 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
can be used 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

Other ENVI ASCII Files ENVI User’s Guide


Appendix B: ENVI File Formats 893

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. They
can be recalled 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
can be loaded 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 Other ENVI ASCII Files


894 Appendix B: ENVI 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

Other ENVI ASCII Files ENVI User’s Guide


Appendix B: ENVI File Formats 895

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

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 User’s Guide Other ENVI ASCII Files


896 Appendix B: ENVI File Formats

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

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

Other ENVI ASCII Files ENVI User’s Guide


Appendix B: ENVI File Formats 897

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 Other ENVI ASCII Files


898 Appendix B: ENVI File Formats

Other ENVI ASCII Files ENVI User’s Guide


Appendix C:

ENVI Spectral
Libraries
This appendix covers the following topics:

General Information . . . . . . . . . . . . . . . . . 900 JPL Spectral Library . . . . . . . . . . . . . . . . . 904


USGS Spectral Library (Minerals) . . . . . . 901 IGCP264 Spectral Library . . . . . . . . . . . . 905
USGS Spectral Library (Vegetation) . . . . . 902 JHU Spectral Library . . . . . . . . . . . . . . . . 907
Additional Vegetation Libraries . . . . . . . . 903

ENVI User’s Guide 899


900 Appendix C: ENVI Spectral Libraries

General Information
This appendix describes the ENVI spectral libraries that are provided with the ENVI
distribution. The spectral libraries are contained in the SPEC_LIB directory in the
ENVI installation tree. They are also provided in the ENVIDATA/SPEC_LIB
directory on the ENVI Data and Tutorials CD.

General Information ENVI User’s Guide


Appendix C: ENVI Spectral Libraries 901

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 Above

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)


902 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 Above

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 903

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


VEG_1DRY.HDR ENVI Header for Above

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 can be found 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 Above

ENVI User’s Guide Additional Vegetation Libraries


904 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 Above
JPL2.SLI JPL Mineral Spectral library with 45-125 micrometers
grainsize
JPL2.HDR ENVI Header for Above
JPL3.SLI JPL Mineral Spectral library with 125-500 micrometers
grainsize
JPL3.HDR ENVI Header for Above

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 utilizing 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 via anonymous FTP from the ASTER homepage:
http://asterweb.jpl.nasa.gov/speclib/

JPL Spectral Library ENVI User’s Guide


Appendix C: ENVI Spectral Libraries 905

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 Above

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 Above

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.

ENVI User’s Guide IGCP264 Spectral Library


906 Appendix C: ENVI Spectral Libraries

IGCP-3.SLI IGCP-264 Library - CSES SIRIS (GER) Spectrometer


IGCP-3.HDR ENVI Header for Above

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 Above

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 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 Above

These spectra were measured on a PIMA II field spectrometer under laboratory


conditions. PIMA, manufactured by Integrated Spectronics, Sydney, Australia,
utilizes internal illumination and an integrating sphere to provide approximately 2.5
nm resolution.

IGCP264 Spectral Library ENVI User’s Guide


Appendix C: ENVI Spectral Libraries 907

JHU Spectral Library


The Johns Hopkins University Spectral Library was provided by Jack Salisbury at
JHU. These data are also available on-line from JHU via anonymous ftp at
rocky.eps.jhu.edu. Also see the data on the ASTER homepage at:
http://asterweb.jpl.nasa.gov/speclib/
The following files are provided:

ign_crs.sli Igneous Rocks - Coarse (0.4 - 14 µm)


ign_crs.hdr ENVI Header for Above
ign_fn.sli Igneous Rocks - Fine (0.4 - 14 µm)
igne_fn.hdr ENVI Header for Above
lunar.sli Lunar Materials (2.08 - 14 µm)
lunar.hdr ENVI Header for Above
manmade1.sli Man Made Materials (0.42 - 14 µm)
manmade1.hdr ENVI Header for Above
manmade2.sli Man Made Materials (0.3 - 12.5 µm)
manmade2.hdr ENVI Header for Above
meta_crs.sli Metamorphic Rocks - Coarse (0.4 - 14.98 µm)
meta_crs.hdr ENVI Header for Above
meta_fn.sli Metamorphic Rocks - Fine (0.4 - 14.98 µm)
meta_fn.hdr ENVI Header for Above
meteor.sli Meteorites (2.08 - 25 µm)
meteor.hdr ENVI Header for Above
minerals.sli Minerals (2.08 - 25 µm)
minerals.hdr ENVI Header for Above
sed_crs.sli Sedimentary Rocks - Coarse (0.4 - 14 µm)
sed_crs.hdr ENVI Header for Above
sed_fn.sli Sedimentary Rocks - Fine (0.4 - 14.98 µm)
sed_fn.hdr ENVI Header for Above

ENVI User’s Guide JHU Spectral Library


908 Appendix C: ENVI Spectral Libraries

snow.sli Snow (0.3 - 14 µm)


snow.hdr ENVI Header for Above
soils.sli Soils (0.42 - 14 µm)
soils.hdr ENVI Header for Above
veg.sli Vegetation (0.3 - 14 µm)
veg.hdr ENVI Header for Above
water.sli Water (2.08 - 14 µm)
water.hdr ENVI Header for Above

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, etc.) 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.
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 (e.g., the lunar environment) where thermal gradients may
cause significant departure from Kirchhoffian behavior are discussed in
Salisbury et al., 1994.

JHU Spectral Library ENVI User’s Guide


Appendix C: ENVI Spectral Libraries 909

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 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.

ENVI User’s Guide JHU Spectral Library


910 Appendix C: ENVI Spectral Libraries

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.

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.

JHU Spectral Library ENVI User’s Guide


Appendix D:

ENVI Map
Projections
This appendix covers the following topics:

Map Projections . . . . . . . . . . . . . . . . . . . . . 913 Ellipsoids . . . . . . . . . . . . . . . . . . . . . . . . . 917


Coordinate Systems . . . . . . . . . . . . . . . . . . 917 Datums . . . . . . . . . . . . . . . . . . . . . . . . . . . 919

ENVI User’s Guide 911


912 Appendix D: ENVI Map Projections

ENVI uses the U.S. Geological Survey General Cartographic Transformation


Package (GCTP) which includes 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 758). 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 User Defined Map Projection
Types in the ENVI Programmer’s Guide). More information about map projections
can be found in the following references.
Snyder, J. P., 1987. Map Projections-A Working Manual, U.S. Geological Survey
Professional Paper 1395, 383 p.
http://www.colorado.edu/geography/gcraft/notes/datum/datum_f.html
http://www.connect.net/jbanta/

ENVI User’s Guide


Appendix D: ENVI Map Projections 913

Map Projections
Use map projections to represent all or part of the 3-dimensional surface of the earth
in 2-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 (e.g.,
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, i.e., air and sea navigation, satellite mapping, etc.
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. A conical projection is 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. 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.

ENVI User’s Guide Map Projections


914 Appendix D: ENVI Map Projections

You can easily 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 758). 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
Programmer’s Guide).
The map projections available in ENVI are listed in Table D-1. The ENVI projection
number is used when creating map information structures when programming in
ENVI.

ENVI Projection
Projection Name and Description
Number

Alaska Conformal 23
a, b, x0, y0, name
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 17
r, lat0, lon0, x0, y0, name
General Vertical Nearside Perspective 15
r, lat0, lon0, x0, y0, height, [datum], name
Geographic 1
Gnomonic 13
r, lat0, lon0, x0, y0, name

Table D-1: Map projections available in ENVI.

Map Projections ENVI User’s Guide


Appendix D: ENVI Map Projections 915

ENVI Projection
Projection Name and Description
Number

Hammer 27
r, lon0, x0, y0, name
Hotin Oblique Mercator A 5
a, b, lat0, lat1, lon1, lat2, lon2, x0, y0, k0, [datum],
name
Hotin Oblique Mercator 6
B a, b, lat0, lon0, azimuth, x0, y0, k0, [datum], name
azimuth:azimuth of central line (degrees east of north)
Interrupted Goode 24
r, name
Interrupted Mollweide 26
r, name
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
Oblated Equal Area 30
r, lat0, lon0, x0, y0, shapem, shapen, angle, name
Orthographic 14
r, lat0, lon0, x0, y0, name

Table D-1: Map projections available in ENVI. (Continued)

ENVI User’s Guide Map Projections


916 Appendix D: ENVI Map Projections

ENVI Projection
Projection Name and Description
Number

Polar Stereographic 31
a, b, lat0, lon0, x0, y0, [datum], name
Polyconic 10
a, b, lat0, lon0, x0, y0, [datum], name
Robinson 21
r, lon0, x0, y0, name
Sinusoidal 16
r, lon0, x0, y0, name
Space Oblique Mercator A 22
a, b, sat num, path num, path flag, x0, y0, [datum],
name
Space Oblique Mercator B 32
a, b, sat num, path num, x0, y0, [datum], 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-1: Map projections available in ENVI. (Continued)

Map Projections ENVI User’s Guide


Appendix D: ENVI Map Projections 917

ENVI Projection
Projection Name and Description
Number

Wagner IV 28
r, lon0, x0, y0, name
Wagner VII 29
r, lon0, x0, y0, name

Table D-1: Map projections available in ENVI. (Continued)

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. Map projections
are used 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.

ENVI User’s Guide Map Projections


918 Appendix D: ENVI Map Projections

You can easily add an ellipsoid to ENVI by adding it to the “ellipse.txt” file in the
map_proj directory of the ENVI distribution. To add an ellipsoid, enter the name,
semi-major axis (a) in meters, and semi-minor axis (b) in meters to this file.
The ellipsoids available in ENVI are listed in Table D-2.

Airy IUGG
Australian National Krassovsky
Bessel 1841 Mercury
Clarke 1858 Modified Airy
Clarke 1866 Modified Everest
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-2: Ellipsoids available in ENVI.

Map Projections ENVI User’s Guide


Appendix D: ENVI Map Projections 919

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
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. Users can easily add a datum to ENVI by adding
it to the datum.txt file. To add a datum, enter the name, associated ellipsoid name
(must be in ENVI’s ellipse.txt file), and the Molodensky x, y, and z shift values
in meters from the WGS-84 datum. See the web pages listed on page 912 for more
information.

ENVI User’s Guide Map Projections


920 Appendix D: ENVI Map Projections

Map Projections ENVI User’s Guide


Index
Numerics Resampling, 803
Rotate, Move, Zoom, 811
2-D Scatter Plots. See Scatter Plots Saving Files, 816
3-D Image Cube User Function, 692 Smoothing Images, 815
3-D SurfaceView Surface Types, 806
Animating Flight Paths, 812 Viewing Panoramically, 812
Annotation Trace, 810
Changing Background Color, 814
Changing Vertical Exaggeration, 814 A
Cursor Functions, 805
Cursor Location/Value, 806 ACRES CCRS Landsat Files, 71
Defining Flight Paths, 807 ACRES SPOT Files, 72
Displaying 3-D Files, 802 Action, 224
Flying Through Active Display, 177
Importing Vectors, 814 Adaptive Filtering
Modes, 807 Bit Error Removal, 609
Outputting, 816, 817 Frost, 606
Printing , 817 Gamma, 607

ENVI User’s Guide 921


922

Kuan, 608 Annotation


Lee, 604 Adding to Images, 222
Local Sigma, 608 Adding to Plots, 222
Using, 604 Arrows, 230
Additional Z Profile Color Ramps, 232
Extracting, 340 Convert to DXF, 785
ADRG Files Declination Diagram, 235
Opening, 79 Defining 3-D Flight Path, 809
Aerial Photos Orthorectification, 720 Fonts, 226
AIRSAR Gray Scale Ramps, 232
Extracting Polarization Signatures, 841 Image, 236
Generating Incidence Angle Images, 828 Joining Polygons, 240
Generating Pedestal Height Images, 855 Map Key Annotation, 233
Generating Phase Images, 854 Mouse Button Functions, 224
Generating Scattering Classification Images, Placing in Virtual Borders, 225
855 Plot, 237
Opening TOPSAR Files, 78, 822, 857 Polygons, 227
Radar Tools, 820 Polylines, 229
Resampling to Ground Ranges, 826 Positioning, 223
Synthesizing Images, 832 Scale Bar, 230
Viewing ASCII Header, 823 Selection Mode, 238
Viewing Polarization Signatures, 845 Shapes, 229
Alpha Residual Spectra, 478 Symbols, 227
Analysis Text, 226
Data Types, 423 Trace in 3-D SurfaceView, 810
Hyperspectral Images, 631, 636 Using QuickMap, 289
Integral Spectrum, 337 Antenna
Interactive Tools in ENVI, 332 Pattern Correction, 824
Majority/Minority, 540 Removing Gain Variations, 824
Multispectral Images, 631, 636 Arbitrary Contrast Stretch, 325
Polarimetric Tools, 832 Arbitrary Image Transects, 341
Principal Components, 556 ARC/INFO Interchange
Radar Images, 820 Loading Vectors into Displays, 196
Spectral Mapping Wizard, 664 Opening Files, 90
Animation ArcView File
3-D SurfaceViews, 812 Exporting Vector Layers to, 203, 309
Characteristics, 379 ArcView Raster (.bil)
Creating, 378 Opening Files, 83
Resampling, 378 Saving Display as, 402
Saving as MPEG, 380 Saving Files As, 121

ENVI User’s Guide Index


923

ArcView Shape Available Files List


Attributes, 309 Getting File Information, 173
Loading Vectors into Displays, 196 Opening Image Files, 174
Opening Files, 89 Available Vectors List
Area of ROI, 275 Creating New Vector Layers, 201
ASCII Creating World Boundaries, 200
Importing Points, 368 Data Files Listed, 196
Opening Files, 85 Exporting Vector Layers to ROIs, 202
Outputting ROIs, 285 Loading Vectors into Displays, 196
Saving Points, 368 AVHRR
ASCII Files Build Geometry Files, 755
Opening as Image File, 86 Calibrating Data, 472
Saving Files As, 120 Georeferencing, 755
ASCII Map Coordinate Conversions, 767 Opening Files, 74
ASCII Spectra Sea Surface Temperature, 473
Input, 345 Viewing Header Info, 472
Saving, 353 AVIRIS
ASTER 1A/1B Files, 75 ATREM Input, 483
ASTER/MODIS Files, 76 NDVI Bands, 584
ATREMATmosphere REMoval Program.See Reading Tapes, 135
ATREM Azimuth
ATSR Files, 75 from Landsat 7 Files, 69, 69, 482
Attributes of Vectors
Add, 311
Query, 310 B
Read into ENVI, 309
Bad Bands
Table, 312
in ASCII Header Data, 104
Viewing, 310
Excluding from Display and Processing, 50,
Available Bands List
102
Displaying Color Images, 179
in Header File, 881
Displaying Gray Scale Images, 178
Bad Lines
Displaying Infrared Images, 180
Bad Lines List File Format, 892
Displaying Shortened Band Names, 183
Replacing, 374, 464
Displaying True Color Image, 180
Band Math
Files In , 176
Assigning Variables, 444
Folding Bands, 181
Available Functions, 441
Hiding, 184
File Format, 893
Locating Bands by Wavelength, 181
File Math, 441, 445
Opening Image Files, 183
Band Names
Selecting the Active Display, 177
Displaying Shortened Names, 183
Shortcut Menu, 177, 180
Editing, 103

ENVI User’s Guide Index


924

in Imported ASCII Files, 103 Landsat 7 Files, 482


Band Ratios Landsat MSS, 480
Calculating, 553 Landsat TM, 481
Complex, 555 Thermal IR to Emissivity, 476
Basic Tools TIMS to Radiance, 476
Band Math, 441, 444 Using ATREM, 482
Compute Statistics, 427 Calibration Factors
Converting Data Types, 423 Applying, 480
Display Information , 209, 396 File Format, 892
Layer Stacking, 421 Cartographic Symbols, 226
Masking, 458 CEOS
Rotating Images, 419 Reading Tapes, 144
Segmenting Images, 450 View Header, 822
Statistics, 427 CIB Files, 79
Stretch Data, 425 Class Color Mapping, 364, 523
Subset Data via ROIs Class Key Annotation, 233
Bias and Gains Class Statistics
from Landsat 7 Files, 69, 69, 482 Calculating, 528
BIL Interleave, 56 Changing Associated File, 248
Bilinear Resampling, 714 Plotting, 247
Binary Encoding Classification, 513 Text Report, 247
BIP Interleave, 56 Classes
Bit Error Removal Filter, 609 See Also Classification
BMP Combining, 543
Opening Files, 85 Editing, 244
Saving Display as, 402 Overlaying on Images, 243
Borders. See Virtual Borders Training, 503
Boundaries. See World Boundaries Viewing Distribution Reports, 246
Brovey Sharpening, 552 Classification
BSQ Interleave, 56 See Also
Buffer Zone Image, 546 Post Classification, Supervised Classifica-
tion, Unsupervised Classification
Calculating Rule Images, 504
C Class Key Annotation, 233
Collecting Endmembers, 495
Cache Size, 876
Converting ROIs to Classification, 280
CADRG Files, 79
Converting to Vector, 781
Calibrating
Entering Parameters, 504
AVHRR Data, 472
Functions, 494
Empirical Line, 488
ROI Separability, 281
Flat Field, 486
from Rule Images, 525
IAR Reflectance, 487

ENVI User’s Guide Index


925

Closing Computing
All Displays, 210 AVHRR Sea Surface Temperature, 473
All Files, 159 ROI Spectral Separability, 281
All Plot Windows, 210 Statistics, 427 , 556
Closing Filter, 594 Sun Elevation for Hill Shade, 799
Clump Classes, 541 Confusion Matrix
Collecting Calculating, 530
Endmembers, 495 Example of, 533
Points, 368 Context-Sensitive Help , 27
Color Image from Grayscale, 582 Contingency Matrix, 530
Color Mapping Continuum Removal, 660
Class Color Mapping, 364 Contour Levels Format (.lev), 895
Control RGB Image Planes, 363 Contour Lines
Density Slicing , 358, 359 Exporting to Vector Files, 254
ENVI Color Tables, 358 Output Contours to Vectors, 254
Functions, 358 Plotting on Images, 249
Color Normalized Sharpening, 552 Contrast Stretching
Color Tables Arbitrary Stretch, 325
Applying, 358 Default (Quick) Stretch, 318
System, 163 Defining Look-Up-Tables, 326
Color Transforms File-to-File, 425
Converting Images, 575 Gaussian Stretch, 324
Hue, Lightness, Saturation, 577 Histogram Equalization, 325
Hue, Saturation, Value, 575 Histogram Matching, 325
Munsell, 575, 579 Interactive, 321
colors.txt, 883 Linear Stretch, 323
Combining Piecewise Linear Stretch, 323
Bands, 117 Restoring LUTs, 331
Classes, 543 Saving LUTs, 331
Command Line Square Root, 325
See Also ENVI Command Line, IDL Com- Converting
mand Line ASCII Coordinates, 767
Switches, 32 Band Values to ROIs, 279
Compile Module, 126 Classification to Vector, 781
Complex Data Complex Data, 469
Calculating Images, 469 Data Type
Converting, 469 File-to-File, 425
Display Lookup Function, 110 Stretching, 330
Outputting Images, 469 Map and Lat/Lon, 765
Compressing Output, 55 Raster to Vector, 780

ENVI User’s Guide Index


926

Convolution Filtering Data Fusion


Directional, 590 3-D SurfaceView
Gaussian, 590 Overview , 802
High Pass, 589 Hill Shade Image, 797
Laplacian, 589 Image File
Low Pass, 589 Sharpening , 551
Median, 590 Data Input
Roberts, 590 Supported Formats, 59
Sobel, 590 Tape Utilities, 129
Types, 589 Data Management
User-Defined, 590 Cross-Platform File Portability, 58
Using, 591 ENVI File Naming Conventions, 57
Co-occurrence Texture Filters, 600 Geo-Browser, 155
Covariance Image, 431 Data Output
Creating, 289 Printing, 405
Animations, 378 Supported Formats, 62
Meta File, 117 Tape Utilities, 129
QuickMap Overlays, 289 Types, 398
Standard File, 117 Data Type
Cross Hair Cursors, 190 Caution when Altering, 99
Cross Platform File Portability, 58 Converting, 330, 423, 425
Cross-Track Illumination Correction, 468 Image File Interleaves, 56
Cubic Convolution Resampling, 714 Data Viewer, 115
Cursor Data-Specific Utilities
See Also Mouse Buttons AVHRR, 471
Functions in 3-D Plots, 805 Landsat MSS, 474
Location/Value in 3-D Plots, 806 Landsat TM, 475
Location/Value in Image Displays, 393 SeaWiFS, 475
Mirroring in Linked Images, 333, 336 Thermal IR, 476
Query Vector Info, 310 TIMS Radiance, 476
Viewing HDF Global Attributes, 471
Date
D Extracting from Landsat 7 Files, 482
in Vector Attribute File, 311
Dancing Pixels
Datum File (datum.txt), 888
Image Distribution, 383
Decorrelation Stretch, 580
Linking to Images and Plots, 384, 387
Default Stretch
Scatter Plot Distribution, 382, 383
Quick, 318
Dark Subtraction , 465
Setting in Header File, 109
Data Editor, 374
Delaunay Triangulation, 714
Delaunay Triangulation Warping, 714

ENVI User’s Guide Index


927

DEM. See Digital Elevation New Display, 177


Density Slice File Format, 893 Output, 398
Density Slicing, 358, 359 Display Enhancements
Deskewing MSS, 474 Filtering, 317
Destripe Data, 468 Histogram Matching, 320
Digital Elevation Stretches and Filtering, 316
3-D SurfaceView , 802 Display Images
Arbitrary Profiles, 341 from Available Bands List, 176
Draping Images Over, 802 Color Composite, 179
Multiple Resolutions in 3-D Plotsj, 807 Color Infrared, 180
Opening DEM Files, 81 Gray Scale, 178
Opening Files, 80 True Color, 180
Orthorectification, 720 Using Spectral Plots, 339
Reading DEM Tapes, 136 Display Information , 209, 396
Replacing Bad Values, 800 Display Menu Definition, 874
Topographic Features, 794 DLG
Topographic Modeling, 790 Loading Vectors into Displays, 196
X and Y Profiles, 337 Opening Files, 95
Dilate Filter, 594 Reading Tapes, 137
Directional Filters, 590 DMA DTED Files, 81
Directory List, 153 DMSP (NOAA) Files, 75
Display Characteristics DOQ Files, 83
Changing Display Preferences, 217 Drag-and-Drop
Indicator Box Colors, 218 Endmember Spectra, 495
Main Image Window Scroll Bars, 217 Spectra Between Plots, 343
Positioning Scroll/Zoom Windows, 194 DRG Files, 83
Resizing Image Windows, 218 DXF
Virtual Borders, 217 from Annotation, 785
Display Concepts from EVF, 786
Active Display, 37 Loading Vectors into Displays, 196
Main Image Window , 34, 185 Opening Files, 92
Resizing Windows, 36 from ROI, 784
Scroll Window, 34, 192 Dynamic Overlays, 334
Supplemental Windows, 37
Vectors, 38
Zoom Window, 36, 188 E
Display Control
Earth-Sun Distance, 482
Active Display, 177
Editing
Close All Displays, 210
ENVI Configuration, 160
Closing All Plot Windows, 210
ENVI Header File, 99
Maximize Open Displays, 210
ENVI Preferences, 160

ENVI User’s Guide Index


928

ROI Attributes, 268 ENVI Files


System Color Tables, 163 Image, 56
System Graphic Colors, 162 Naming Conventions, 57
Vector Appearance, 299 Saving As Meta Files, 119
Eigenvalues Saving Displays As, 402
Calculating, 556 Saving Files As, 117
Generating Statistics Files, 427 ENVI Header File
in MNF Transform, 563 Band Offsets, 110
Subsetting PC Rotations, 556 Changing Z Plot Information, 108
Ellipsoid File (ellipse.txt), 887 Complex Lookup Function, 110
Emissivity Creating, 65
Calculating from Thermal IR, 477 Editing, 99, 174
Calibration, 476 Editing Ancillary Information, 102
Normalization, 478 Band Names, 103
Producing Alpha Residual Spectra, 478 FWHM, 103
Empirical Line Calibration, 488 Spectral Library Names, 103
Endmember Collection, 495 Wavelengths, 103
ENVI Editing Classification Information, 108
Customizing, 859 Entering Geographic Corners, 106
Functionality Review, 15 Entering Map Information, 105
GUI, 33 Entering Pixel Sizes, 107
and IDL, 14 Format, 879
Installing, 861 General Image Parameters, 99
Logo, 226 Header Info Window, 100
Review of Functionality, 15 Row Offsets, 110
Runtime Version, 14 Selecting Bad Bands, 102
Starting, 32 Selecting File Type, 101
ENVI Command Line Setting Default Stretch, 109
Displaying, 125 ENVI Runtime (ENVI RT), 14
Exporting Data to IDL Variable, 125 ENVI Vector Files
Importing IDL Variables to, 124 from Contour Lines, 254
ENVI Configuration Loading Vectors into Displays, 196
Caching Information, 876 Opening, 96
Process Tile Size, 876 Saving Points As, 370
Total Cache Size, 876 ENVI Window Finder, 171
Configuration File Details, 867 EOS Files, 75
Customizing, 865, 867 ER Mapper
Display Menu Definition File, 874 Opening Files, 84
Items to be Aware of, 864 Saving Display as, 402
Main Menu Definition File, 873 Saving Files As, 121
Platform Dependencies, 862

ENVI User’s Guide Index


929

ERDAS Ellipsoid File, 887


Opening 7.5 Files, 84 ENVI Header File, 56, 879
Opening 8.x Files, 84 ENVI Image File, 56
Saving Display as, 402 File Type File, 884
Saving Files As, 122 Filter Kernels (.ker), 894
Erode Filter, 594 GCP File Format (.pts), 896
ERS Graphic Colors File, 883
Opening Files, 78 Grid File (.grd), 894
Reading Tapes, 144 Map Key File (.key), 895
ESA CEOS Landsat TM Files, 71 Map Projections File, 886
ESA SHARP Files, 74 Math Expressions (.exp), 893
EVF. See ENVI Vector File Mosaic Template File (.mos), 895
Exporting Previous Files List, 891
Classes to Vector Layers, 548 Sensor File, 885
Contours to Vectors, 254 Spectral Libraries, 890
Data to IDL Variable, 125 State Plane Projections, 889
Vectors to ArcView , 309 Supported
Extensions, 57 Input, 59
External File Formats, 68 Output, 62
Extracting Tape Script Format (.fmt), 893
Additional Z Profile, 340 Vector Template File, 897
Image Spectrum, 338 File Math, 445
File Name Extensions, 57
File Naming
F Conventions, 57
Cross-Platform Portability, 58
Fast Fourier Transform. See FFT Filtering
File Output
FAST TM Files, 69
Selecting, 53
Feathering, 742
vs. Memory Execution, 41
Feature Fitting. See Spectral Feature Fitting
File Type File (filetype.txt), 884
FFT Filtering
Files
Filter Definition, 612
See Also Opening Files
Forward, 611
Available Files List, 173
Inverse, 615
Closing All, 159
File Format
Converting to Vector, 89
Generalized Raster, 878
Creating New, 117
File Formats
Opening in ENVI, 64
Bad Lines List (.bll), 892
Saving, 117
Calibration Factors (.cff), 892
Filter Kernel Format, 894
Contour Levels File (.lev), 895
Filtering
Datum File, 888
Adaptive, 604
Density Slice Range File (.dsr), 893

ENVI User’s Guide Index


930

Convolution, 589 Starting ENVI, 32


FFT (Fast Fourier Transform), 611 Vector Display Concepts, 38
Morphological, 594 Generating
Texture, 599 AIRSAR Pedestal Height Image, 855
Finding Windows, 171 AIRSAR Phase Image, 854
Flat Field Calibration, 486 AIRSAR Scattering Classification Images,
Fly-Through. See 3-D SurfaceView 855
Fold Bands, 181 Test Data, 112
Fonts, 226 Generic Image Files, 85
Formats Geo-Browser, 155
Supported Input, 59 Geographic Corners, 106
Supported Output, 62 Geographic Image Locations, 155
Fourier Transform (FFT). See FFT Filtering Geographic Lookup Table. See GLT File
Frost Filters, 606 Geometry Files
FWHM (Full Width Half Max), 103 AVHRR, 755
SeaWiFS, 752
Georeferenced Grid Lines, 258
G Georeferenced Images
Attaching GPS Link, 771
Gain and Offset User Function, 467
Building Multi-Band Files, 421
Gamma Filters, 607
Linking, 336
Gaussian Contrast Stretch, 324
Mosaicking, 457, 737
Gaussian Filters, 590
Subsetting, 47
GCPs
Georeferencing
Collecting from Vector Windows, 714
AVHRR Data, 755
Exporting from Vector Windows, 308
from GLT Files, 747
File Format, 896
from IGM Files, 747
The GCP List, 705
Image-to-Image, 702
Map Coordinate Conversion, 767
Image-to-Map, 710
Selection
from Input Geometry, 745
Image-to-Image, 702
SeaWiFS, 752
Image-to-Map, 710
Super, 750
General Information
from Super GLT Files, 749
Compressing Output, 55
GeoSPOT - ArcView Raster (.bil) Files, 72
ENVI Functionality, 15
GeoTIFF
Hardware platforms, 12
Opening Files, 85
Image Display Concepts, 34
Opening Landsat Files, 69
Queue, 54
Saving Display as, 402
Review of ENVI Functionality, 15
GIS
Runtime Considerations, 861
Attributes, 309
Selecting File or Memory Output, 53
Digitizing on Screen, 302
Selecting items in Lists, 52

ENVI User’s Guide Index


931

Exporting Vectors to Shape Files, 309 Layers, 221


Vector Layers, 297 Point Collection Window, 370
Vector Windows, 204 Scroll Window, 195
GLT File Zoom Window, 195
Building, 745 High Pass Filter, 589
Building Super GLT Files, 748 Hill Shade Image
Georeferencing from, 745 Computing Sun Elevation Values, 799
Georeferencing from Super GLT, 749 Creating from Color Images, 797
GPS-Link, 770 Creating from Color Tables, 798
Graphic Colors Histogram
Editing, 162 Creating Plots of Statistics, 430
File Format, 883 Equalization Stretch, 325
Graphical User Interface (GUI), 33 in Interactive Stretching, 321
Grid Lines Matching, 320, 325
Burn-in, 398 of Rule Bands, 526
File Format, 894 Statistics, 427
Georeferenced, 258 History Recorder, 159
Overlaying on Images, 256 HLS Transform, 577
Pixel-Based (Generic), 257 Horizontal Profile, 337
Gridding Irregular Points, 782 Hourglass Processing Flow, 664
Ground Control Points. See GCPs HSV Sharpening , 551
Growing Regions of Interest, 272 HSV Transform, 575
Hue, Lightness, Saturation Transform, 577
Hue, Saturation, Value Transform, 575
H Hyperspectral Data
Analysis, 631, 636
Hardware
Using Spectral Mapping Wizard, 664
Mouse Requirements, 33
Platforms Supported, 12
HDF
Opening Files, 85, 88
I
Saving Display as, 402 IAR Reflectance Calibration, 487
View Global Attributes, 471 IDL
Header File. See ENVI Header File Compiling Code, 126
Heads Up Digitizing, 302 and ENVI, 14
Help Logo, 226
About ENVI, 27 IDL Command Line
Context-Sensitive, 27 Turning Off Blocking, 162
ENVI Online Help, 21 IDL Variables
Mouse Button Descriptions Export Plot Data to, 354
Hiding Exporting Data To, 125
Dialogs, 220 Importing, 124

ENVI User’s Guide Index


932

IGCP Spectral Libraries, 905 Vectors into 3-D SurfaceViews, 814


IKONOS Files Incidence Angle Image, 828
Opening, 73 Indicator Box Colors, 218
Opening GeoTIFF, 73 Infrared Images
Opening NITF, 73 Displaying, 180
Illumination Correction, 468 Input
Image Plot Data, 345
Creating Animations, 378 Thermal Files, 76
Extracting Spectral Plots, 338 Input File
Mosaic, 457, 731 ATSR, 75
Overlays, 220 AVHRR, 74
Rotating, 419 ESA SHARP, 74
Segmenting by Pixel DN, 450 KLM/Level 1B, 74
Specifying Transects, 341 Digital Elevation
Image Borders, 225 DMA DTED, 81
Image Cube, 692 USGS DEM, 81
Image Displays USGS SDTS DEM, 82
General Concepts, 34 DMSP (NOAA), 75
Main Image Window , 185 EOS, 75
Outputting, 398 Generic Image
Scroll Window, 192 ASCII, 85, 86
Shortcut Menu, 213 BMP, 85
Zoom Window, 188 GeoTIFF, 85
Image File HDF, 85, 88
Formats, 56 JPEG, 85
Generic Formats, 85 MrSID , 86
Opening from Available Bands List, 183 PDS Image, 88
Opening from Available Files List, 174 PICT, 85
Resampling to High Resolution, 551 SRF, 85
Saving Files As, 402 TIFF, 85
Supported Input Formats, 59 XWD, 85
Supported Output Formats, 62 Geo-Browser, 155
Image Processing Files, 83 IKONOS
Image Sharpening, 551 GeoTIFF IKONOS, 73
Image Window See. Main Image Window NITF, 73
Importing Image Processing
IDL Variables, 124 ArcView Raster (.bil), 83
Library Spectra into n-D Visualizer, 645 ER Mapper, 84
Points to ASCII, 368 ERDAS 7.5 (.lan), 84
ROIs into Endmember Collection, 498 ERDAS 8.x (.img), 84
ROIs to Scatter Plots, 390 PCI (.pix), 85

ENVI User’s Guide Index


933

IRS-1, 73 USGS DLG , 95


Landsat USGS SDTS DLG, 96
ACRES CCRS, 71 Installing ENVI, 861
ESA CEOS TM, 71 Interactive Analysis Tools
FAST, 69 2-D Scatter Plots, 382
GeoTIFF, 69 Classification Overlays, 243
HDF, 69 Color Mapping, 358
MRLC, 70 Cursor Location/Value, 393
NLAPS, 70 Density Slicing, 359
Military Dynamic Overlays, 333
ADRG, 79 Linked Displays, 333
CADRG , 79 Overview, 332
CIB, 79 Pixel Locator, 366
NITF, 80 Profiles and Spectral Plots, 337
Radar Regions of Interest, 261
ERS, 78 Spatial Pixel Editor, 374
JERS, 78 Spectral Pixel Editor, 377
RADARSAT, 77 Interleave, 56
TOPSAR, 78 Interpolation
Scan Directory List, 153 in 3-D Plots, 815
SeaWiFS, 75 of Irregularly Gridded Data, 782
Selecting, 42 in System Color Tables, 163
SPOT Zoom Window, 36, 191, 218
ACRES SPOT, 72 Intersecting ROIs, 274
GeoSPOT-ArcView Raster (.bil), 72 Inverse FFT, 615
Vegetation Files, 72 Irregular Points to Grid, 782
Supported Formats, 59 IRS-1 Files, 73
Thermal Isodata Classification, 517
MODIS/ASTER, 76
TIMS, 76
USGS J
DEM, 80
JERS
DOQ , 83
Opening Files, 78
DRG, 83
Reading Tapes, 144
Vector
Johns Hopkins University Spectral Libraries,
ARC/INFO Interchange, 90
907
ArcView Shape, 89
JPEG
DXF, 92
.jgw files, 86
ENVI Vector, 96
Opening Files, 85
MapInfo, 93
Outputting Georeferenced File To, 403
Microstation DGN, 94
Saving Display as, 402

ENVI User’s Guide Index


934

JPL AIRSAR. See AIRSAR Linear Band Prediction, 650


JPL Spectral Libraries, 904 Linear Contrast Stretch, 323
Linear Spectral Unmixing, 651
Linking
K Georeferenced Images, 336
Images, 333
Kappa Coefficient, 530
List Item Selection, 52
KLM/Level 1B Files, 74
Local Sigma Filter, 608
K-Means Classification, 519
Log Manager, 159
Kuan Filter, 608
Logos
ENVI and IDL, 226
L Look-Up-Tables (LUTs)
Defining, 326
Landsat Restoring, 331
Opening Files Saving, 331
ACRES CCRS, 71 Low Pass Filter, 589
ESA CEOS, 71 LS-Fit, 650
GeoTIFF, 69 LUTs. See Look-Up-Tables
HDF, 69
MRLC, 70
NLAPS, 70 M
TM Fast, 69
Mahalanobis Distance Classification, 509
Landsat 7
Main Image Window
Date Extraction , 69, 69
Changing Indicator Box Color, 218
Landsat MSS
Controlling from Zoom Window, 187
Aspect Ratio, 474
Display Menu, 212
Calibration, 480
Displaying Scroll Bars, 185, 217
Deskewing, 474
Mouse Button Functions, 188
Read Tapes, 130
Resizing, 185, 218
Landsat TM
Majority Analysis, 540
Calibration, 481
Map
Date Extraction , 482
Building Customized Projections, 758
Reading Tapes, 132
Converting ASCII Coordinates, 767
Laplacian Filter, 589
Converting Coordinates, 765
Lat/Lon
Converting Map Projections, 762
Converter, 765
Georeferencing
Specifying World Boundaries, 200
Super from IGM Files, 750
Layer Stacking, 421
Georeferencing AVHRR Data, 755
Lee Filtering, 604
Georeferencing from GLT Files, 747
Libraries. See Spectral Libraries
Georeferencing from IGM Files, 747
Line of Sight Calculator, 372
Georeferencing from Input Geometry, 745

ENVI User’s Guide Index


935

Georeferencing from Super GLT Files, 749 Math


Georeferencing SeaWiFS Data, 752 Band, 441
GPS Link, 770 File, 445
Layer Stacking, 421 Spectral, 679
Merging Old Projection Files, 769 Maximize Open Displays, 210
Mosaicking, 731 Measurement Tool
Orthorectification, 720 Arbitrary Profile, 342
Registration, 701 Regions of Interest, 275
Map Coordinate Converter, 765 Using, 437
Map Information , 105 Median Filter, 590
Map Key Memory Management
Annotation, 233 File vs. Memory Execution, 41
File Format, 895 Resources, 41
Map Projection Converter, 762 Tiling Operations, 41
Map Projections Memory vs. File Function Execution, 41
ASCII Coordinate Conversions, 767 Menu Definition File, 873
Build Customized Map Projection, 758 Menus. See Shortcut Menu
Convert Projection, 762 Merge Regions, 273
Converting Coordinates, 765 Meta Files
Customizing, 757, 758 Creating, 117
File (map_proj.txt), 886 Saving Files As, 119
Merge "map_proj.txt" files, 769 Microstation DGN Files, 94
Selecting Types, 757 Military Files, 79
Map Scaling of Postscript Output, 399 Minimum Noise Fraction. See MNF Transform
MapInfo Files, 93 Mining Symbols, 226
Masking Minority Analysis, 540
Apply Mask , 463 Mirroring Cursor Location, 333, 336
Apply to Output Mixture Tuned Matched Filtering
Image, 404 Results, 659
Postscript, 401 in Spectral Mapping Wizard, 665, 671
Printer, 407 Using, 657
Build Mask, 458 MNF Transform
Creating, 458 Applying Forward to Spectra, 572
Including ROIs, 461 Applying Inverse to Spectra, 573
as Spatial Subset, 51 Dark Image Noise Statistics, 569
MASTER Files, 76 in Spectral Mapping Wizard, 665, 669
Matched Filtering Inverse, 573
Mixture Tuned, 657 Noise Statistics from Data, 564
Results, 656 Overview, 563
Using, 655 Modes
in 3-D SurfaceView, 807

ENVI User’s Guide Index


936

Controlling Cursor in Vector Windows, 301 Multi Part ROIs, 266


when Drawing ROIs, 263 Multiband Files, 421
MODIS 1B Files, 75 Multilook SIR-C Data, 852
MODIS/ASTER Files, 76 Multi-resolution Image Linking, 336
Morphological Filtering Munsell Transform, 575, 579
Applying Filters, 596
Closing, 594
Dilate, 594 N
Erode, 594
n-Dimensional Visualizer
Opening, 594
Class Controls, 641
Using, 595
Collapse Classes, 643
Mosaic Images
Define Classes, 641
Feathering, 742
Export Classes to ROIs, 647
Georeferenced, 457, 737
Export ROIs to, 284
Pixel-Based, 457, 731
Import Library Spectra, 645
Virtual Mosaic, 735 , 740
Interact with Classes, 641
Mosaic Template Format, 895
Overview, 636
Mouse Buttons
Pre-clustering, 637
Annotation, 224
Shortcut Menu, 640
Functions in Main Image, 188
in Spectral Mapping Wizard, 665, 670
Linked Windows/Dynamic Overlay Off, 336
Z Profile, 645
Linked Windows/Dynamic Overlay On, 335
NDVI Transform, 584
Polygon Drawing, 228
Nearest Neighbor Resampling, 714
Profiles, 356
Neural Net Classification, 514
Regions of Interest, 267
NITF
Spectral Plots, 356
Opening Files, 80
Three-Button Emulation, 33
Saving Files As, 122
Viewing Descriptions, 396
NLAPS
Movie Picture Experts Group. See MPEG
Opening Files, 70
Movie. See Animation
Reading Tapes, 138
MPEG
Saving Animation, 380
Saving Flight Sequences, 816 O
MRLC Files, 70
MrSID Files, 86 Occurrence Texture Filters, 599
MSS Online Help, 21
Aspect Ratio, 474 Open Previous File, 98
Calibration, 480 Opening Files
Deskewing, 474 ACRES SPOT, 72
Read Tapes, 130 ADRG, 79
MTMF. See Mixture Tuned Matched Filtering ARC/INFO, 90

ENVI User’s Guide Index


937

ArcView Raster (.bil), 83 MapInfo, 93


ASCII, 85 Microstation DGN, 94
ATSR, 75 Military, 79
AVHRR, 74 MODIS/ASTER, 76
BMP, 85 MRLC, 70
CADRG, 79 MrSID, 86
CIB, 79 NITF, 80
Digital Elevation, 80 PCI (.pix), 85
DLG, 95 PDS, 88
DMSP (NOAA), 75 PICT, 85
DTED, 81 Radar, 77
DXF, 92 RADARSAT, 77
ENVI Vector, 96 Scan Directory List, 153
EOS, 75 SeaWiFS, 75
ER Mapper, 84 SPOT, 71
ERDAS 7.5, 84 SPOT Vegetation, 72
ERDAS 8.x, 84 SRF, 85
ERS, 78 Statistics, 435
ESA CEOS Landsat TM, 71 Thermal IR, 76
ESA SHARP, 74 TIFF, 85
External Formats, 68 TIMS, 76
Generic Image, 85 Topographic, 789
with Geo-Browser, 155 TOPSAR, 78, 857
GeoSPOT-ArcView Raster (.bil), 72 USGS, 83
GeoTIFF, 85 USGS DEM, 81
HDF, 85, 88 USGS DOQ, 83
IKONOS, 73 USGS DRG, 83
IKONOS GeoTIFF, 73 USGS SDTS DEM, 82
IKONOS NITF, 73 USGS SDTS DLG, 96
Image Processing, 83 Vector, 89
IRS, 73 XWD, 85
JERS, 78 Opening Filter, 594
JPEG, 85 Orthorectification
KLM/Level 1B, 74 Aerial Photos, 720
Landsat 7, 69, 69 SPOT, 726
Landsat ACRES CCRS, 71 Output
Landsat FAST TM, 69 as ArcView Raster (.bil), 121
Landsat GeoTIFF, 69 as ASCII Files, 120
Landsat HDF, 69 Compressing, 55
Landsat MRLC, 70 as ENVI Files, 117
Landsat NLAPS, 70 as ENVI Meta Files, 119

ENVI User’s Guide Index


938

as ER Mapper Files, 121 Pixel


as ERDAS Files, 122 Dancing Pixels, 382
as Image Files, 402 Entering Size in Header File, 107
as NITF Files, 122 Replace Bad Values, 374
as PCI Files, 122 Rotating and Refining Clusters, 637
Plots, 355 Pixel Editor
Postscript, 398 Spatial, 374
Printing , 405 Spectral, 377
QuickMap Options, 293 Pixel Locator, 366
Selecting File or Memory, 53 Pixel Purity Index
Standardized, 398 FAST PPI, 631
as TIFF Files, 123 Maximum Iterations, 633
Zoom Window, 405 Restarting, 634
Output Directory , 157 in Spectral Mapping Wizard, 665, 670
Overlays Using PPI Images in Endmember Collection,
Burn-In to Output, 398 635
Classes, 243 Pixel-Based Mosaics, 731
Classification Results on Image, 545 Platform Dependencies, 862
Contours, 249 Plots
Density Slices, 359 Annotation, 222, 351
Grid Lines, 256 Data Input, 345
Image, 220 Data Parameters, 346
Image Annotation, 222 Input ASCII, 345
Regions of Interest Input Spectral Libraries, 345
Vector Layers, 295 Interactive Functions
Display Plot Data Labels, 343
Move Plot to New Window, 343
P Rescale Spectral Plots, 344
X-Y Cursor, 343
Panoramic, 812
Legends, 343
Parallelepiped Classification , 505
New Plot Window, 350
PCI
Output, 355, 398
Opening Files, 85
Plot Functions, 353
Saving Display as, 402
Plot Parameters, 348
Saving Files As, 122
Stack Data, 351
PDS Image Files, 88
Points
Pedestal Height Image, 855
Collecting, 368
Phase Image, 854
Saving as ENVI Vector Files, 370
PICT
Polarimetric Tools, 832
Opening Files, 85
Polarization Signatures
Saving Display as, 402
Displaying as Images, 851
Piecewise Linear Contrast Stretch, 323

ENVI User’s Guide Index


939

Extracting, 841 Format, 891


From ROIs, 843 Opening, 98
Polarization Signature Viewer, 845 Principal Components
Single Pixel, 356, 842 Analysis, 556
Polygon Drawing. See Annotation Compute New Statistics and Rotate, 556
Polynomial Warping, 714 Using a Subset, 558, 566
Positioning Scroll/Zoom Windows, 194 Eigenvalues, 556
Post Classification Forward Rotate, 559
Accuracy, 530 Inverse Rotate, 561
Buffer Zone Image, 546 Printing
Class Colors, 523 3-D Plots, 817
Classes to Vector Layer, 548 Display Windows, 405
Clump Classes, 541 QuickMaps, 292
Combine Classes, 543 Processing Log , 159
Confusion Matrix, 530 Profiles
Functions, 523 Additional Z Profile, 340
Kappa Coefficient, 530 Arbitrary Profiles (Transects), 341
Majority/Minority Analysis, 540 X Profile (Horizontal), 337
Overlay Classes on Grayscale Image, 545 Y Profile (Vertical), 337
Overlaying Classes, 243 Z Profiles (Spectrum), 338
ROC Curves, 536 Projections
Rule Classifier, 525 ASCII Coordinate Conversions, 767
Segmentation Image, 547 Convert, 762
Sieve Classes, 542 Customizing, 758
Statistics, 528 Map Coordinate Converter, 765
Postscript Output Supported Projections, 886
Multiple Pages, 399
Saving Image As, 398
Scaling, 399 Q
Setting Graphics Options, 400
Queue
PPI. See Pixel Purity Index
Executing Queued Functions, 158
Preferences
Holding Functions, 54
Editing, 160
Quick Stretching , 318
Indicator Box Colors, 218
QuickMap, 289
Scroll Bars, 217
Printing, 292
Virtual Borders, 217
Restore Template, 293
Window Sizes, 218
Setting Parameters, 290
Previous Files List
Using Small Images, 290

ENVI User’s Guide Index


940

R Editing Attributes, 268


Export ROIs to EVF, 284
Radar Files Export to n-D Visualizer, 284
Opening, 77 Grow, 272
Radar Tools Input Points from ASCII, 272
Adaptive Filters, 829 Intersect Regions, 274
AIRSAR Scattering Mechanism Classifier, Intersections as Masks, 461
855 Line of Sight Calculator, 372
Antenna Pattern Correction, 824 Measurement Tool, 275
Extract Polarization Signatures from ROIs, Merge Regions, 273
843 New Region, 268
Extracting Polarization Signatures, 841 Outputting to ASCII, 285
Incidence Angle Image, 828 Overview, 261
Multilook SIR-C Data, 852 Reconcile ROIs, 277
Pedestal Height Image, 855 Reconcile via Map, 278
Phase Image, 854 Restore ROIs, 282
Polarimetric Tools, 832 Restore Saved ROI, 452
Single Pixel Polarization Signatures, 842 ROI Types, 263
Slant to Ground Range, 826 Donut, 266
Synthesize SIR-C Images, 837 Multi Part, 266
Synthesizing JPL AIRSAR Data, 832 Point, 265
Texture Filters, 830 Polygon, 263
The Polarization Signature Viewer, 845 Polyline (Vector), 265
TOPSAR Tools, 857 Rectangle and Ellipse, 266
View CEOS Header, 822 Saving Regions, 282
RADARSAT Separability, 281
Generating Incidence Angle Images, 828 Using as Spatial Subset, 49, 414
Opening Files, 77 Registration
Reading Tapes, 143 Assessing Accuracy, 717
Resampling to Ground Ranges, 826 Image-to-Image, 702
Viewing Header, 822 Image-to-Map, 710
Radial Resampling, 749 Enter GCPs from GPS, 770
Raster to Vector Conversion, 780 Enter GCPs from Vector Windows, 714
Ratio Bands, 553 Mosaicking Images, 731, 737
Reference Channel Emissivity, 477 Overview, 701
Reflectance Spectra. See Spectral Libraries Warp Images from Existing GCPs, 718
Regions of Interest Warping and Resampling Options, 714
Area of ROIs, 274 Removing
Convert Band Values, 279 Antenna Gain Variations, 824
Convert to DXF, 784 Water Vapor Bands, 102
Converting to Classification Images, 280
Delete ROI, 269, 452

ENVI User’s Guide Index


941

Replacing Files, 117


Bad DEM Values, 800, 858 Look-Up-Tables, 331
Bad Lines, 464 Regions of Interest to File, 282
Bad Pixel Values, 374 Saving Files
Reporting as ArcView Raster (.bil), 121
ROI Area, 275 as ASCII, 120
Statistics, 433 as ENVI Files, 117
Resampling as ENVI Meta Files, 119
in Animation, 378 as ER Mapper, 121
Bilinear, 714 as ERDAS, 122
Cubic Convolution, 714 as Image, 402
Library Spectra, 622 as NITF, 122
Nearest Neighbor, 714 as PCI, 122
Options, 714 as Postscript, 398
Radial, 749 as TIFF, 123
Slant to Ground Range, 826 Saving Spectra
Spectral Data Files, 686 to ASCII, 353
Rescale Spectral Plots, 344 to Spectral Library, 354
Resizing Scan Directory List, 153
Images, 411 Scan Tape, 150
Main Image Window , 185 Scatter Plots
Windows, 36 2-D, 382
RGB Image Planes, 363 Dancing Pixels on Image, 383
RGB Sharpening , 551 Dancing Pixels on Plot, 383
Roberts Filter, 590 Density Distribution, 384
ROC Curves, 536 Drawing ROIs, 385
ROIs. See Regions of Interest n-Dimensional, 636
Rotating Shortcut Menu, 386
3-D Plots, 811 Scroll Bars
Images, 419 Displaying in Main Image Window, 185
RST Warping, 714, 714 Set in Preferences, 217
Rule Classifier, 525 Scroll Window
Rule Images, 504, 525 Controlling Main Image from, 192
Display, 192
Hiding, 195
S Meta Zoom, 193
Mouse Button Functions, 194
SAM. See Spectral Angle Mapper
Positioning, 194
SAR. See Radar Tools
Resizing, 192
Saturation Stretch, 581
Shortcut Menu, 194
Saving
Current Session to Startup Script, 157

ENVI User’s Guide Index


942

SDTS Generating Pedestal Height Images, 855


Loading Vectors into Displays, 196 Generating Phase Images, 854
Opening Files, 96 Generating Scattering Classification Images,
SDTS DEM Files, 82 855
Sea Surface Temperature, 473 Multilook, 852
SeaWiFS Radar Tools, 820
Build Geometry File, 752 Reading Tapes, 139
Build IGM File, 752 Resampling to Ground Ranges, 826
Georeference Data, 753 Synthesize Images, 837
Opening Files, 75 SIR-C Viewing Polarization Signatures, 845
Segmentation Image, 450, 547 Slant to Ground Range, 826
Selecting Sobel Filter, 590
Active Display, 177 Spatial Pixel Editor, 374
Files to Open, 42 Spatial Subsetting. See Subsetting Images
Map Projection Types, 757 Spectra
Multiple Listed Items, 52 ASCII Input, 345
Sensor File (sensor.txt), 885 Saving ASCII Spectra, 353
Separability Measures, 281 Saving to Spectral Library, 354
SFF. See Spectral Feature Fitting Spectral Library Input, 345
Shaded Relief, 797 Z Profiles, 338
Shape File Spectral Analyst, 673
Attributes, 309 Spectral Angle Mapper
Exporting Vector Layers to, 309 Classification, 649
Opening, 89 in Spectral Mapping Wizard, 665, 671
Sharpening Spectral Feature Fitting
Color Normalized (Brovey), 552 Methodology, 661
HSV , 551 Results, 662
Images, 551 Spectral Libraries
Shift Difference, 564 Editing Names in ENVI Header, 103
Shortcut Menu File Format, 890
2-D Scatter Plot, 386 IGCP, 905
Available Bands List, 177 Johns Hopkins University (JHU), 907
Main Image Display, 213 JPL, 904
n-D Visualizer, 640 Library Descriptions, 899
Scroll Window, 194 Overview, 619
Vector Window , 304 Plot Options, 621
Zoom Window, 213 Resampling, 622
Sieve Classes, 542 Saving from Plot, 354
SIR-C USGS Mineral, 901
Extracting Polarization Signatures, 841 USGS Vegetation, 902
Generating Incidence Angle Images, 828 Vegetation, 903

ENVI User’s Guide Index


943

Viewing Spectra, 619 Spectral Unmixing, 651


Spectral Mapping Wizard, 664 SPOT
Spectral Math Opening Files, 71
Applying to Multiband Images, 683 Orthorectification, 726
Assignment of Variables, 682 Reading Tapes, 134
Basic Operations, 679 Vegetation Files, 72
Execution, 682 Square Root Stretch, 325
File Format, 893 SRF
Table of Spectral Math Functions, 680 Opening Files, 85
User Functions, 684 Saving Display as, 402
Spectral Pixel Editor, 377 Stack Plot Data, 351
Spectral Plots, 338 Standard ENVI Functions
Spectral Resampling, 686 Compressing Output, 55
Spectral Slices File Selection, 42
Arbitrary, 628 File/Memory Output, 53
Extracting, 627 Masking, 51
Horizontal, 628 Output Display, 398
Vertical, 628 Queue, 54
Spectral Subsetting. See Subsetting Images Selecting Multiple Items in Lists, 52
Spectral Tools Spatial Subsetting, 45
Binary Encoding, 649 Spectral Subsetting, 50
Continuum Removal, 660 Starting ENVI, 32
Linear Spectral Unmixing, 651 Startup Script
LS-Fit, 650 Commands, 875
Mapping Methods, 649 Executing, 157
Matched Filtering, 655 Save Session, 157
Mixture Tuned Matched Filtering, 657 Startup Switches, 32
n-Dimensional Visualizer, 636 State Plane Projections Files, 889
Pixel Purity Index (PPI), 631 Statistics
Plot Options, 621 Average Spectrum, 427
References, 694 Basic, 427
Spectral Analyst, 673 Calculating on a Subset, 428
Spectral Angle Mapper (SAM), 649 Classification Statistics, 528
Spectral Feature Fitting, 661 Correlation Matrix, 427
Spectral Libraries, 619 Covariance Image, 431
Spectral Library Resampling, 622 Covariance Matrix, 427
Spectral Library Viewer, 619 Eigenvectors, 427
Spectral Mapping Wizard, 664 Histogram Plots, 430
Spectral Math, 679 Histograms, 427
Spectral Slices, 627 Noise Statistics, 564
Unmixing, 651 Noise Statistics from Dark, 569

ENVI User’s Guide Index


944

Reports, 433 Switches Along Command line, 32


Shift Difference, 564 Symbols, 226
Spectral, 435 Synthesizing SAR Data
Sum Bands, 435 AIRSAR, 832
Tabulated Frequency Distributions, 427 SIR-C Images, 837
View Statistics, 435 Synthetic Color Image, 582
Stretching. See Contrast Stretching System Color Tables, 163
Subsetting Images
Masking, 51
Spatial T
by Image, 46, 412
Tape Script Format, 893
by Map Coordinates, 47
Tape Utilities
by ROIs, 49, 414
AVIRIS, 135
by Samples/Lines, 46, 412
Dump Tape, 151
Selecting, 45, 412
ENVI Tape Format, 146
Using Another File, 48, 413
Formats
Spectral
AVHRR, 133
Excluding Bad Bands, 50
ERS, 144
by Range of Bands, 51
Generic CEOS Tapes, 144
Selecting, 50, 411
JERS, 144
Using Another File, 51
Landsat MSS, 130
Sum Bands, 435
Landsat TM, 132
Sun Elevation
NLAPS, 138
Computing, 792
RADARSAT, 143
from Landsat 7 Files, 69, 69, 482
SIR-C CEOS, 139
Super GLT File
SPOT, 134
Building, 748
USGS DEM, 136
Georeferencing from, 748
USGS DLG , 137
Supervised Classification
X-SAR, 144
Binary Encoding, 513
Read ENVI Tape, 147
Entering Parameters, 504
Read Known Tape Formats, 130
Functions, 503
Reading Tapes, 129
Mahalanobis Distance, 509
Scan Tape and Customize Dump, 150
Maximum Likelihood, 510
Write ENVI Tape, 148
Minimum Distance, 507
Tasseled Cap Transform, 586
Neural Net, 514
Templates
Parallelepiped, 505
QuickMap, 293
Spectral Angle Mapper (SAM), 511
Test Data
Supported Input Files, 59
Constant Value, 113
Supported Output Files, 62
Gaussian PSF Images, 114
Surface Plots. See 3-D SurfaceView
Generating, 112

ENVI User’s Guide Index


945

Horizontal or Vertical Ramp, 113 Transects, 341


Random Number Images, 113 Transforms
Texture Filters Band Ratios, 553
Co-occurrence Measures, 600 Color Transforms, 575
Occurrence Measures, 599 Decorrelation Stretch, 580
Radar, 830 MNF Transform, 563
Using, 599 NDVI, 584
Thermal IR Principal Components, 556
Calibrate to Emissivity, 476 Saturation Stretch, 581
Opening Files, 76 Sharpening
TIFF Color Normalized (Brovey), 552
Opening Files, 85 HSV , 551
Saving Display as, 402 Synthetic Color Image, 582
Saving Files As, 123 Tasseled Cap, 586
Supported Input Formats, 61 True Color Images
Tile Size, 876 Displaying, 180
Tiling, 41
TIMS
Calibration, 476 U
Opening Files, 76
Unmixing, 651
TM
Unsupervised Classification
Calibration, 481
Isodata, 517
Reading Tapes, 132
K-Means, 519
TM Fast Files, 69
User Functions
Topographic Tools
3-D Image Cube, 692
3-D SurfaceView , 802
Gain and Offset, 467
Classification of Features, 794
User-Defined Filters, 590
Hill Shade Image, 797
User-Defined Plot Function, 353
Line of Sight Calculator, 372
USGS
Opening Files, 789
DEM, 81
Rasterizing Point Data, 782
DLG, 95
Replacing Bad Values, 800, 858
DOQ, 83
Topographic Features, 794
DRG, 83
Topographic Modeling, 790
Opening Files, 83
TOPSAR
SDTS DEM, 82
Convert Data, 857
SDTS DLG, 96
DEM Replace Bad Values, 800, 858
USGS Munsell Transform, 579
Opening Files, 78, 822 , 857
USGS Spectral Library
Tools, 857
Minerals, 901
Viewing ASCII Header, 823
Vegetation, 902
Training Classes, 503

ENVI User’s Guide Index


946

Utilities Display Vector Layers, 297


Calibration, 480 Displaying Vector Data, 204
Empirical Line Calibration, 488 Load Vector Layers, 304
Flat Field Calibration, 486 Mouse Buttons, 205
IAR Reflectance Calibration, 487 Shortcut Menu, 304
MSS Calibration , 480 Vector Appearance Controls, 299
TIMS Radiance, 476 Zooming in the Vector Window, 205
TM Calibration , 481 Vectors
Data-Specific Add New, 302
Landsat MSS, 474 Attributes, 309
Landsat TM, 475 Add, 311
SeaWiFS, 475 Information, 302
Thermal IR, 476 Query, 310
TIMS, 476 Table, 312
Data-Specific Utilities Viewing, 310
AVHRR, 471 Available Vectors List, 196
General Purpose Convert ANN to DXF, 785
Dark Subtraction , 465 Convert EVF to DXF, 786
Destripe Data, 468 Convert Layer Projection, 199
Replacing Bad Lines, 464 Convert ROI to DXF, 784
UTM Projection, 758 Digitizing on Screen, 302
UTM to Lat/Lon Converter, 765 Display, 196
Edit Existing, 302
Editing Layers, 299
V Export from Classification, 548
Export to ROIs, 308
Vector Attribute File, 780
File Formats, 89
Vector Display Group, 38
Importing in 3-D Plots, 814
Vector Key, 233
Irregular Points to Grid, 782
Vector Layers
Layers List, 297, 297
Creating New Using Query, 310
Load Vector Layer, 304
Displaying, 297
Mouse Buttons, 205
Saving, 203
New Layer, 305
Vector Overlays, 220, 295
Opening Files, 89
Vector Parameters Window
ARC/INFO , 90
Bringing to the Front, 304
ArcView Shape, 89
Vector Template Format, 897
DXF, 92
Vector Windows
ENVI Vector, 96
add Annotation to , 306
MapInfo, 93
Collecting GCPs, 714
Microstation DGN , 94
Cursor Modes, 301
USGS DLG , 95
Cursor Tracking, 206

ENVI User’s Guide Index


947

USGS SDTS DLG, 96 Window Finder, 171


Output, 398 Windows
Output to ArcView Shape, 309 Closing All Displays, 210
Overlaying on Images, 295 Closing All Plots, 210
Raster to Vector Conversion , 780 Display, 185
Read from ASCII File, 303 Finding, 171
Select GCPs, 714 Resizing, 36
World Boundaries, 200 , 779 Start New Display, 172
Vector-to-Raster Conversion, 308 Start New Vector, 172
Vegetation Index World Boundaries Vector, 200 , 779
Calculating, 584
NDVI, 584
Tassled Cap, 586 X
Vertical Exaggeration, 814
X Profiles, 337
Vertical Profile, 337
X-SAR Tapes, 144
View Statistics File, 435
XWD
Viewing in 3-D Plots, 812
Opening Files, 85
Virtual Borders
Saving Display as, 402
Adding Annotation to, 225
Setting in Preferences, 217
Virtual Mosaic, 735, 740 Y
Virtual Reality Modeling. See VRML Output
Visualize n Dimensions, 636 Y Profiles, 337
VRML Output, 817

Z
W Z Plot Information, 108
Warping Z Profiles
Delaunay, 714 Extracting, 338
from Existing GCPs, 718 Extracting Additional, 340
Image-to-Image, 702 Zoom Window
Image-to-Map, 710 Changing Indicator Box Color, 218
Options, 714 Controlling Interpolation, 191, 218
Orthorectification, 720 Controlling Zoom Factor, 189
Polynomial, 714 Display, 188
RST, 714 Hiding, 195
Water Vapor Interpolation, 36
Omit from Hyperspectral Data, 102 Mouse Button Functions, 191
Wavelength Output, 405
Editing, 103 Positioning, 194
Locating, 181 Resizing, 188

ENVI User’s Guide Index


948

Shortcut Menu, 213 Symbol Boxes, 190

Index ENVI User’s Guide

You might also like