ENVI Tutorial: A Quick Start To ENVI
ENVI Tutorial: A Quick Start To ENVI
Table of Contents
OVERVIEW OF THIS TUTORIAL .....................................................................................................................................1
Files Used in This Tutorial ..................................................................................................................................1
GETTING STARTED WITH ENVI....................................................................................................................................1
Starting ENVI....................................................................................................................................................1
Starting ENVI on Windows Machines.....................................................................................................................................1
Starting ENVI in UNIX ..........................................................................................................................................................1
Starting ENVI on Macintosh Machines ...................................................................................................................................1
Loading a Grayscale Image ................................................................................................................................1
Opening an Image File.........................................................................................................................................................1
FAMILIARIZING YOURSELF WITH THE ENVI INTERFACE .......................................................................................................2
The ENVI Main Menu.........................................................................................................................................2
Right-Click Menus..............................................................................................................................................3
The Image Window ...........................................................................................................................................3
The Display Group Menu Bar ................................................................................................................................................3
The Image Window Zoom Box .............................................................................................................................................4
Scroll Bars...........................................................................................................................................................................4
The Zoom Window ............................................................................................................................................4
The Scroll Window ............................................................................................................................................5
APPLYING A CONTRAST STRETCH ..................................................................................................................................5
APPLYING A COLOR MAP ............................................................................................................................................6
ANIMATING YOUR IMAGE............................................................................................................................................6
USING SCATTER PLOTS AND REGIONS OF INTEREST ...........................................................................................................7
LOADING AN RGB IMAGE ...........................................................................................................................................7
CLASSIFYING AN IMAGE .............................................................................................................................................7
DYNAMICALLY OVERLAYING IMAGES ..............................................................................................................................8
OVERLAYING AND WORKING WITH VECTORS ....................................................................................................................8
ENDING THE ENVI SESSION .......................................................................................................................................9
Tutorial: A Quick Start to ENVI
1
ENVI Tutorial: A Quick Start to ENVI
Tutorial: A Quick Start to ENVI
Familiarizing Yourself with the ENVI Interface
When the image loads, an ENVI image display appears on your screen. The display group consists of an Image window,
a Scroll window, and a Zoom window. These three windows are intimately linked; changes to one window are mirrored
in the others.
Image Window
You can choose which combinations of windows appear on the screen by right-clicking on any display group window to
display the right-click menu and selecting a style from the Display Window Style submenu. Use the ENVI main menu
bar File Æ Preferences Æ Display Defaults tab to change the default settings for which windows you wish to display
and where you wish to position them.
All windows can be resized by grabbing and dragging a window corner with the left mouse button.
1. Resize the Image window to be as large as possible (until the Scroll window disappears).
2. Now, make the Image window smaller than the full extent of the image data (the Scroll window will reappear).
3. Resize the Zoom window and notice how the outlining box changes in the Image window.
2
ENVI Tutorial: A Quick Start to ENVI
Tutorial: A Quick Start to ENVI
Right-Click Menus
Each of the three display windows has a right-click menu for accessing general display settings and some interactive
functions. Access this menu by right-clicking in the window.
Menu Bar
Zoom Box
3
ENVI Tutorial: A Quick Start to ENVI
Tutorial: A Quick Start to ENVI
The Image Window Zoom Box
The Zoom box (the colored box in the Image window) indicates the region that is displayed in the Zoom window.
1. Place the mouse cursor in the Zoom box in the Image window, hold down the left mouse button, and move the
mouse. The Zoom window is updated automatically when the mouse button is released.
2. Place the cursor anywhere in the Image window (outside of the Zoom box) and click the left mouse button to
move the magnified area instantly. If you click, hold, and drag the left mouse button in this fashion, the Zoom
window is updated as you drag.
3. Click once in the Zoom box in the Image window and use the arrow keys on your keyboard to move the box. To
move several pixels at a time, hold down the Shift key while using the arrow keys.
Scroll Bars
You can choose to have scroll bars displayed in the Image window. These scroll bars provide a way to move through the
Scroll window, allowing you to select which portion of the image appears in the Image window.
1. Right-click in the Image window and select Toggle Æ Display Scroll Bars.
2. To have scroll bars appear in the Image window by default, use the ENVI main menu bar to select the File Æ
Preferences Æ Display Defaults tab. Set the Image Window Scroll Bars toggle to Yes.
Zoom Level
Zoom Controls
There are three Zoom Controls (red by default) in the lower left corner of the Zoom window. These control the zoom
factor and the crosshair cursor in both the Zoom and Image windows.
1. Place the mouse cursor in the Zoom window and click the left mouse button to reposition the magnified area
(displayed in the Zoom box in the Image window) by centering the zoomed area on the selected pixel.
2. Click and hold the left mouse button in the Zoom window while dragging. This causes the Zoom window to pan
within the Image window.
3. Click the left mouse button on the graphic in the lower left corner of the Zoom window to zoom out by a factor
of 1.
4. Using a three button mouse, click the middle mouse button on the graphic to zoom out by a factor of 2.
5. Click the right mouse button on the graphic to return the Zoom window to the default zoom factor.
6. Click the left mouse button on the graphic to zoom in by a factor of 1.
7. Click the middle mouse button on the graphic to zoom in by a factor of 2.
4
ENVI Tutorial: A Quick Start to ENVI
Tutorial: A Quick Start to ENVI
8. Click the right mouse button on the graphic to return the Zoom window to the default zoom factor.
9. Click the left mouse button on the graphic to toggle the crosshair cursor in the Zoom window on or off.
10. Click the middle mouse button on the graphic to toggle the crosshair cursor in the Image window on or off.
11. Click the right mouse button on the graphic to toggle the Zoom box in the Image window on or off.
12. The Zoom window can also have optional scroll bars, which provide an alternate method for moving through the
Zoom window. Right-click in the Zoom window and select Toggle Æ Zoom Scroll Bars. To have scroll bars
appear on the Zoom window by default, use the ENVI main menu bar to select the File Æ Preferences Æ
Display Defaults tab. Set the Zoom window Scroll Bars toggle to Yes.
Subsampling Factor
Image Box
1. Place the mouse cursor inside the Image box, hold down the left mouse button, drag to the desired location, and
release to reposition the portion of the image shown in the Image window. The Image window is updated
automatically when the mouse button is released.
2. Click anywhere within the Scroll window using the left mouse button to instantly move the selected Image
window area. If you click, hold, and drag the left mouse button in this fashion, the Image window will be updated
as you drag (the speed depends on your computer resources).
3. Click in the Image box and press the arrow keys on your keyboard. To move the image in larger increments, hold
down the Shift key while using the arrow keys.
5
ENVI Tutorial: A Quick Start to ENVI
Tutorial: A Quick Start to ENVI
2. Select a color table from the list at the bottom of the dialog to change the color mapping for the three windows in
the display group.
3. In the ENVI Color Tables dialog, Auto Apply is selected by default (Options Æ Auto Apply), so the color table
will automatically be applied. You can toggle this feature on or off using this menu option. If Auto Apply is off,
you must select Options Æ Apply each time you wish to apply the color table and observe the results.
4. From the ENVI Color Tables menu bar, select Options Æ Reset Color Table to return the display group to the
default grayscale color mapping.
5. From the ENVI Color Tables menu bar, select File Æ Cancel to dismiss the dialog.
You can control the animation using the player control buttons (loop backward, loop forward, change direction,
and pause) at the bottom of the Animation window, or by adjusting the value shown in the Speed spin box to
change the speed at which the bands are displayed.
2. From the Animation menu bar, select File Æ Cancel to end the animation.
6
ENVI Tutorial: A Quick Start to ENVI
Tutorial: A Quick Start to ENVI
Using Scatter Plots and Regions of Interest
Scatter plots allow you to quickly compare the values in two spectral bands simultaneously. ENVI scatter plots enable a
quick 2-band classification.
1. From the Display group menu bar, select Tools Æ 2D Scatter Plots to display the distribution of pixel values
between Band 1 and Band 4 of the image as a scatter plot. The Scatter Plot Band Choice dialog appears.
2. Under Choose Band X, select Band 1. Under Choose Band Y, select Band 4. Click OK to create the scatter plot.
3. Place the cursor in the Image window (but not inside the Zoom box), then click and drag using the left mouse
button to move the cursor around in the window. As you move the cursor, you will notice different pixels are
highlighted in the scatter plot, making the pixels appear to “dance.” The dancing pixels in the display are the
highlighted 2-band pixel values found in a 10-pixel by 10-pixel region centered on the cursor.
4. Define a region of interest (ROI) in the Scatter Plot window. To do this, click the left mouse button several times
in different areas in the Scatter Plot window. Doing this selects points to be the vertices of a polygon. Click the
right mouse button when you are done selecting vertices. This closes the polygon. Pixels in the Image and Zoom
windows whose values match the values contained in the selected region of the scatter plot are highlighted.
5. To define a second ROI, left-click a few times in the scatter plot to define the vertices of the next ROI class, and
right-click to close the new polygon.
6. From the Scatter Plot menu bar, select Class Æ New and repeat the actions described in the step 4.
7. From the Scatter Plot menu bar, select Class Æ Items 1:20, choose the color for your next ROI, and repeat the
actions described in step 4.
8. From the Scatter Plot menu bar, select Options Æ Export All to export the regions of interest. The ROI Tool
dialog appears. The ROI Tool dialog can also be started from the menu bar in the Image window by selecting
Overlay Æ Region of Interest.
9. From the ROI Tool menu bar, select File Æ Cancel to dismiss the dialog. The region definition is saved in
memory for the duration of the ENVI session.
10. From the Scatter Plot menu bar, select File Æ Cancel to close the Scatter Plot window.
Classifying an Image
ENVI provides two types of unsupervised classification and several types of supervised classification. The following
example demonstrates one of the supervised classification methods.
1. From the ENVI main menu bar, select Classification Æ Supervised Æ Parallelepiped.
2. In the Classification Input File dialog, select can_tmr.img and click OK. The Parallelepiped Parameters dialog
appears.
3. Select the regions of interest (ROIs) you created previously by clicking on the region name in the Select Classes
from Regions list at the left of the dialog.
7
ENVI Tutorial: A Quick Start to ENVI
Tutorial: A Quick Start to ENVI
4. Select Memory in the upper right corner of the dialog to output the result to memory.
5. Set the Output Rule Images toggle to No then click OK. The classification function calculates statistics and a
progress window appears during the classification. A new entry titled Parallel (CAN_TMR.IMG) is added to the
Available Bands List.
6. In the Available Bands List, click Display #1 and select New Display.
7. In the Available Bands List, select the Gray Scale radio button, click on Parallel (CAN_TMR.IMG), and select
Load Band. A new display group containing the classified image is loaded.
8
ENVI Tutorial: A Quick Start to ENVI
Tutorial: A Quick Start to ENVI
4. Click on one of the vector layer names and examine the information about the layer at the bottom of the
Available Vectors List.
5. Click the Select All Layers button near the bottom of the dialog to select all of the listed vectors to plot, then
click the Load Selected button.
6. When the Load Vector Layer dialog appears, click Display #1 to load the vectors into the first display. The
vector layers are listed in the #1 Vector Parameters dialog.
7. In the Display #1 Vector Parameters dialog, click Apply to load the vectors onto the image. From the Vectors
Parameters menu bar, select Options Æ Vector Information to start an information dialog about the vectors.
8. To display the currently selected vector layer and list basic information about the vectors, click and drag using the
left mouse button in the Image window.
9. Click on another layer name in the Vector Parameters dialog then click and drag in the Image window to track a
different layer.
10. From the Vector Parameters menu bar, select Edit Æ Edit Layer Properties. Change vector layer parameters
as desired and click OK.
11. In the Vector Parameters dialog, click Apply to display the changes.
9
ENVI Tutorial: A Quick Start to ENVI