How to open Envi

advertisement
Digital Image Processing with ENVI
ENVI is a powerful image processing tool. Here we will touch on only a few
image transformations and classification techniques. ENVI tutorials will be a
valuable resource to help you determine which image processing technique is
best for your applications. ENVI tutorials are available from the ITTVIS website:
http://www.ittvis.com
About notation for this exercise:
Large, bold red font denotes a specific action
Blue bold font indicates the specific ENVI window/GUI in which you are working
The greater than symbol “>” indicates a submenu
The ENVI workspace spawns lots of windows while you work, so it is important to keep
your windows organized on your desktop as you work.
Open ENVI
Double click on the “ENVI 4.4” icon on your desktop.
Take a look at the submenus under the ENVI main menu bar.
Load data: Open a Landsat scene
(1) Main Menu File > Open External File > Landsat > GeoTIFF
(2) In the Enter TIFF/GeoTIFF Filenames window, navigate to
T:\corpus_data\L7_2005.05.22_p26r41\
(3) Select Landsat bands 1-5,7 (these spectral bands have the same spatial
resolution)
(4) Select “Okay”
(5) Available Bands List menu appears
Create a Data Cube
(1) In Main Menu GUI, go to Basic Tools > Layer Stacking
(2) In Layer Stacking Parameter Window, click “Import File…”
(3) In Layer Stacking Input Window under Select Input File, select bands 1-5,
and 7
(4) In the Layer Stacking Parameter Window , click Reorder Files
(5) In the Reorder Files Window, drag Band 1 to position one followed by 2, 3, 4,
5, 7, click okay
(6) Choose a file name, e.g. L7_20050522_p26r41_rds.img
(7) New data stack will load in your Available Bands window
Rename Data Cube Bands
(1) From Main Menu Window, select File > Edit ENVI Header
(2) From ENVI Header Window , select your data cube, click okay
(3) In Header Info Window, select Edit Attributes > Band Names
(4) In the Edit Band Name Values Window, click on each band and rename the
bands with their Landsat band number and name; e.g. name Band 1: “Band 1 –
Blue”
(5) Select okay
(6) Use your Available Bands List, to load a composite image
Spectral Plots
(1) From the Display Window select Tools > Profiles > Z Profile Spectrum
(2) In the Spectral Profile Window, examine the spectra for various land types
(3) Use File > Cancel to exit
Overlay vector file
(1) In Display Window, select Overlay> Vectors
(2) In Vector Parameters Window, select File > Open vector file
(3) In the Select Vector Filenames Window, navigate to:
T:\corpus_data\TXSP83SF
(4) Change “Filters” to “Shapefile (*.shp)
(5) Select “cty00.shp”
(6) Click okay
(7) Import Vector File Parameters Window appears
(8) In Import Vector Files Parameter Window, evaluate “Native File Projection”
parameters (typically ENVI can read the shapefile’s projection information)
(9) Select okay
(10)
See Nueces County shapefile
(11)
Zoom in & look at county boundary, what things do you notice?
(12)
In your Available Vectors List Window, you should see “cty000.shp,”
to close this shapefile, go to Option > Remote All Layers
Subset scene based on a Vector File
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
Follow steps above, but open T:\corpus_data\cc-subset.shp
In the Import Vector File Parameters Window, under “Native File
Projection” select “UTM
Under Datum, select “WGS-84”
Set zone to 14N
Click the “Apply Projection to Undefined” button
Select “Okay”
A Vector Parameter Window appears
In Vector Parameter Window, select File > Export Active Layer to ROI
In Export EVF GUI, select “Covert all records…” option, click
Click okay
In Display Window, go to Overlay > Region of Interest
In ROI Tool Window appears
(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
In ROI Tool Window, select File > Subset data via ROI
In your Spatial Subset via ROI Window, under “Select Input File” select
your data stack
Click okay
In the Spatial Subset via ROI Parameters Window , click on your ROI
file name under “Select Input ROIs”
Choose your file name, suggestion: T:\corpus_data\
L7_2005.05.22_p26r41_cc-sub
Click okay
New file will appear in the Available Bands List Window
Select bands from new file, load image
Transformations
Calculate a Simple Ratio
(1) From Main ENVI Menu, select Transform, take a look at the various image
transformations available here
(2) From Main ENVI Menu, select Transform > Band Ratios
(3) In the Band Ratio Input Bands Window, select the NIR band (Band 4) for
numerator and red (Band 3) for the denominator
(4) Select “Enter Pair”
(5) Select Okay
(6) In the Band Ratio Parameters window, create a file name
(7) You’ve now calculated the NIR/Red simple ratio
(8) The new band appears in your Available Bands List now
(9) Load your simple ratio image in Display #1
(10)
Load a natural color (3,2,1) image in Display #2
(11)
Link displays (Display Window > Tools > Link > Link Displays)
(12)
What do you notice about the bright values?
Calculate NDVI
NDVI =
(1)
(2)
(3)
(4)
(NIR-Red)/(NIR+Red)
From Main ENVI Menu, Transformation > NDVI
In the NDVI Calculation Input File Window, Select your subset data stack
Select Okay
In the NDVI Calculation Parameters Window, notice that the “Input File Type” box is set to Landsat
TM and the “NDVI Bands” are correctly set to bands 3 and 4, respectively.
(5) Chose a file name (something with NDVI in it would be good!)
(6) Select Okay
(7) NDVI band shows up in your Available Bands List
(8) Load the NDVI image into a third Display window
(9) Link all three displays (3,2,1 image, Simple Ratio image, NDVI image
(10) Investigate images
(11) Under the Display Window, select > Tools > Cursor location value
(12) Look at the values for all three images
=================================================================================
General note about ENVI data format:
“ENVI uses a generalized raster data format consisting of a simple flat binary file and a small associated
ASCII (text) header file. This file format permits ENVI to use nearly any image file, including those that
contain their own embedded header information. ENVI also supports a variety of data types: byte, integer,
unsigned integer, long integer, unsigned long integer, floating-point, double-precision floating-point,
complex, double-precision complex, 64-bit integer, and unsigned 64-bit integer.” –ENVI tutorial
Download