Tutorial 1
Tutorial 1
Introduction to ENVI
ENVI Tutorials 47
48 Tutorial 1: Introduction to ENVI
File Description
can_tmr.img Cañon City, CO TM Data
can_tmr.hdr ENVI Header for Above
When you start ENVI, the ENVI main menu appears as a menu bar. Clicking with
the left mouse button on any of the ENVI main menu topics brings up a menu of
options, which may in turn contain submenus with further options. The choices
selected from these submenus will often bring up dialog boxes that allow you to enter
information or set parameters relating to the ENVI function you have selected.
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.
ENVI supports a variety of data types: byte, integer, long integer, floating-point,
double-precision floating-point, complex, and double-precision complex.
The separate text header file provides information to ENVI about the dimensions of
the image, any embedded header that may be present, the data format, and other
pertinent information. The header file is normally created (with your input) the first
time a particular data file is read by ENVI. You can view and edit it at a later time by
selecting File → Edit ENVI Header from the ENVI menu bar. You can also
generate ENVI header files outside ENVI, using a text editor.
Figure 1-1: An ENVI Display group: the Main Image, Scroll, and Zoom windows.
Use the Available Bands List to load both color and gray scale images into a display
by starting a new display or selecting the display number from the pull-down list of
displays, clicking on the appropriate radio button, then selecting the desired bands
from the list by clicking on the band name(s).
The File pull-down menu at the top of the Available Bands List dialog provides
access to file opening and closing, file information, and the Cancel button. The
Options menu provides a function to find the band closest to a specific wavelength,
show the currently displayed bands, allows toggling between full and shortened band
names in the list, and the capability to fold all of the bands in a single open image into
just the image name. Folding and unfolding the bands into single image names or lists
Start ENVI
Before attempting to start the program, ensure that ENVI is properly installed as
described in the installation guide.
• To open ENVI in UNIX, enter envi at the UNIX command line.
• To open ENVI from a Windows or Macintosh system, double-click on the
ENVI icon.
The ENVI main menu appears when the program has successfully loaded and
executed.
• Clicking the left mouse button on the + (plus) graphic zooms up by a factor of
1. Clicking the middle mouse button on this graphic zooms doubles the Zoom
factor. Clicking the right mouse button on the graphic returns the Zoom
window to the default zoom factor.
• Click the left mouse button on the right (third) graphics box to toggle the
Zoom window crosshair cursor. Click the middle mouse button on this graphic
to toggle the Main Image crosshair cursor. Click the right mouse button on this
graphic to toggle the zoom box in the Main Image window on or off.
• Double-click the left mouse button on the right (third) graphics box to toggle
interpolation in the Zoom window. Double-click the right mouse button in this
graphic to toggle scroll bars on the Main Image window.
Scroll the Image
A red box in the Scroll window indicates what portion of the entire image is currently
displayed in the Main Image window. You can move the selected area by clicking
inside the scroll indicator box with the left mouse button and dragging the box to a
new position. The displays in the Main Image and Zoom windows are updated when
you release the mouse button. You can also reposition the scroll indicator box by
clicking at the desired location outside of the box using the left mouse button (as for
the Zoom window box above). If you click, hold and drag the left mouse button in
this fashion, the Main Image window is updated as you drag (the speed depends on
your computer resources).
Scroll Bars
The Main Image window can also have optional scroll bars, which provide an
alternate method for moving through the Scroll image, allowing you to select which
portion of the image appears in the Image window. To add scroll bars, select
File → Preferences from the Main Image window menu bar. Click on the arrow
toggle button next to the Scroll Bars text field in the dialog to toggle scroll bars on,
then click OK at the bottom of the dialog. The portion of the image displayed in the
Main Image window can now be controlled by clicking and dragging the scroll bars
using the left mouse button. Scroll bars can be turned on by default for all images
from the ENVI menu bar by selecting File → Preferences → Display Defaults and
clicking on the toggle button for the Image window scroll bars as described above.
Figure 1-4: The Cursor Location/Value dialog displays the screen and data
values of the selected pixel.
3. Position the Profile plot windows so you can see all three at once.
A red crosshair extends to the top and bottom and to the sides of the Main
Image window. The red lines indicate the line or sample locations for the
vertical or horizontal profiles.
4. Move the crosshair around the image (just as you move the zoom indicator
box) to see how the three image profile plots are updated to display data on the
new location.
5. Close the profile plots by selecting File → Cancel from within each plot
window.
Figure 1-5: The Horizontal (X) Profile (left) and Spectral (Z) Profile (right) plots.
2. Select one band for the X axis and another band for the Y axis and click OK.
It may take a few seconds for ENVI to extract and tabulate the data values.
3. Once the scatter plot has appeared (Figure 1-6), position the mouse cursor
anywhere in the Main Image window and drag with the left mouse button
pressed.
Pixel values contained in a ten-pixel by ten-pixel box surrounding the
crosshair will be highlighted in red on the scatter plot.
Note
The Mouse Button Descriptions dialog tells you the functions of the different
mouse button actions when applied in the Scatter Plot display.
4. Move the cursor around in the Main Image window to observe the dancing
pixels effect.
5. You can also use the scatter plot to highlight specific data values in the Main
Image window. Place the mouse cursor in the scatter plot window and click
and drag with the middle mouse button.
A ten-pixel-square box will appear in red on the plot. Pixels with the values
contained in the box are highlighted on the image in the Main Image window
and appear to dance, as you drag the cursor in the Scatter Plot display moving
the 10-by-10 pixel area.
6. From the Scatter Plot menu bar, select File → Cancel to close the Scatter Plot
window.
Dynamic Overlays
ENVI’s multiple Dynamic Overlay feature allows you to dynamically superimpose
parts of one or more linked images onto the other image. Dynamic overlays are
turned on automatically when you link two displays, and may appear in either the
Main Image window or the Zoom window.
1. To start, click the left mouse button to see both displays completely overlaid
on one another.
2. To create a smaller overlay area, position the mouse cursor anywhere in either
Main Image window (or either Zoom window) and hold down and drag with
the middle mouse button. Upon button release, the smaller overlay area is set
and a small portion of the linked image will be superimposed on the current
image window.
3. Now click the left mouse button and drag the small overlay window around the
image to see the overlay effects.
4. You can resize the overlay area at any time by clicking and dragging the
middle mouse button until the overlay area is the desired size.
Figure 1-7: The ROI Tool dialog with two regions defined.
• Click the left mouse button in the Main Image window to establish the first
point of the ROI polygon.
• Select further border points in sequence by clicking the left button again,
and close the polygon by clicking the right mouse button.The middle
mouse button deletes the most recent point, or (if you have closed the
polygon) the entire polygon. Click the right mouse button a second time to
fix the polygon.
• ROIs can also be defined in the Zoom and Scroll windows by selecting the
appropriate window radio button in the ROI Tool dialog.
When you have finished defining an ROI, it is shown in the dialog in the
Available Regions of Interest list, with the name, region color, and number of
pixels enclosed (Figure 1-7).
3. To define a new ROI, click the New Region button.
• You can enter a name for the region and select the color and fill patterns
for the region by clicking on the Edit button.
Other types of ROIs
ROIs can also be defined as polylines or as a collection of individual pixels by
selecting the desired ROI type from the ROI_Type pull-down menu. See the ENVI
3.5 User’s Guide or the hypertext online help for further discussion of these types of
ROI.
1. Once you have created the ROI definitions, you can erase them from the
display (leaving the definition in the list) by selecting the ROI from the
Available Regions of Interest list and clicking on the Erase button.
2. Clicking on the Stats button allows you to view statistics about the ROI you
select.
3. Clicking the Delete button permanently deletes the selected ROI definitions
from the list.
4. The other buttons and options under the pull-down menus at the top of the
ROI Tool dialog let you calculate ROI means, save your ROI definitions, load
saved definitions, or display or delete all the definitions in the list.
Region of interest definitions are retained in memory after the ROI Tool dialog is
closed, unless you explicitly delete them. This means the ROIs are available to other
ENVI functions even if they are not displayed.
Annotation Types
The Annotation: Text dialog allows you to choose from a variety of annotation
types. Different types are selected from the Object menu and include Text, Symbols,
Rectangles, Ellipses, Polygons, Polylines, Arrows, Map Scale Bars and Declination
Diagrams, Map Keys, Color Table Ramps, and Images. By default, the Annotation
dialog starts up with Text selected. Other fields in the dialog let you control the size,
color, placement, and angle of the annotation text. When you select different
annotation types from the Object menu, the fields in the dialog change to display
options appropriate to the new type.
Placing Annotation
Try placing a text annotation in your Main Image window:
1. Type some text in the text field of the Annotation: Text dialog.
2. Select a font, color, and size from the appropriate menus and parameters in the
dialog, then position the mouse pointer in the Main Image window and press
the left mouse button.
Note
The Mouse Button Description dialog describes the mouse button interactions
within annotation.
Your text is displayed in the window at the point you chose (Figure 1-10).
3. Drag the handle using the left mouse button to position the text in the window.
• You can continue to change the annotation’s properties and position by
changing the fields in the dialog box or dragging the text or symbol while
holding down the left mouse button.
4. When you are satisfied with the annotation, press the right mouse button to fix
the annotation in position.
3. You can also restore saved annotation files by selecting File → Restore
Annotation in the Annotation: Text dialog.
2. You can adjust the grid line attributes by setting the line thickness and color
and the grid spacing using the Options → Edit Pixel Grid Attributes pull-
down menu from the Grid Lines Parameters dialog. This selection brings up
the Edit Pixel Attributes dialog box.
3. In the Edit Pixel Attributes dialog, you can change the color, thickness and
grid spacing for the labels, lines, box and corners of the grid. When the
attributes are set up to your satisfaction, click OK in the Edit Pixel Attributes
dialog to apply the changes to the grid on the images.
4. When you have added a satisfactory grid, click Apply in the Grid Line
Parameters dialog.
2. Select 24-Bit color or 8-Bit gray scale output, graphics options (including
annotation and gridlines), and borders.
If you have left your annotated and gridded color image on the display, both
the annotation and grid lines will be automatically listed in the graphics
options.
You can also select other annotation files to be applied to the output image.
3. Select output to Memory or File using the desired radio button.
• If output to File is selected, enter an output filename.
Note
If you select other graphics file formats from the Output File Type button
which, by default is set to ENVI, your choices will be slightly different.