exploring envi 50 manual

Upload: manupenas

Post on 02-Jun-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Exploring ENVI 50 Manual

    1/195

    Exploring ENVI

    Copyright 2012

    E3De, ENVI and IDL are trademarks of Exelis, Inc. All other marks are the property of their

    respective owners. 2012, Exelis Visual Information Solutions, Inc.

    Produced by Outreach ServicesExelis Visual Information Solutions

    4990 Pearl East Circle

    Boulder, CO 80301303-786-9900

  • 8/10/2019 Exploring ENVI 50 Manual

    2/195

    Exploring ENVIii

  • 8/10/2019 Exploring ENVI 50 Manual

    3/195

    Contents

    Exploring ENVI iii

    Contents

    INTRODUCTION ........................................................................................................................................................... 1

    WHAT IS ENVI? ................................................................................................................................................................. 2

    ENVIRESOURCES .............................................................................................................................................................. 2

    ABOUT THIS TRAINING MANUAL ....................................................................................................................................... 4

    MASTERING THE BASICS .......................................................................................................................................... 5

    LEARNING OBJECTIVES ...................................................................................................................................................... 6

    PREREQUISITES .................................................................................................................................................................. 6

    REQUIRED TOOLS FOR COMPLETING THIS MODULE........................................................................................................... 6

    ASSOCIATED DATA ............................................................................................................................................................ 6

    FUNDAMENTALS ................................................................................................................................................................ 6

    SETTING PREFERENCES AND DISPLAY MANAGEMENT ....................................................................................................... 8

    EXPLORING THE ENVIINTERFACE ................................................................................................................................... 12

    WORKING WITH A PORTAL,AND BLEND,FLICKER,AND SWIPE........................................................................................ 18

    CHIPPING AND SAVING ..................................................................................................................................................... 19

    SPECTRAL PROFILES ......................................................................................................................................................... 20

    ENVIHELP ...................................................................................................................................................................... 21

    MORE ON SETTING PREFERENCES .................................................................................................................................... 22

    SPATIAL AND SPECTRAL SUBSETTING .............................................................................................................................. 23

    CLOSING FILES ................................................................................................................................................................. 26

    SKILLS CHECK.................................................................................................................................................................. 26

    SELF TEST ........................................................................................................................................................................ 26

    RASTER DATA MANAGEMENT ............................................................................................................................. 27

    LEARNING OBJECTIVES .................................................................................................................................................... 28

    PREREQUISITES ................................................................................................................................................................ 28

    REQUIRED TOOLS FOR COMPLETING THIS MODULE......................................................................................................... 28

    ASSOCIATED DATA .......................................................................................................................................................... 28

    READING RASTER IMAGE DATA ....................................................................................................................................... 28

    ENVIS IMAGE FORMAT .................................................................................................................................................. 29

    THE ENVIHEADER FILE .................................................................................................................................................. 29

    MANAGING FILES ............................................................................................................................................................. 35

    SKILLS CHECK.................................................................................................................................................................. 36

    SELF TEST ........................................................................................................................................................................ 36

    IMAGE DISPLAY CONCEPTS .................................................................................................................................. 37

    LEARNING OBJECTIVES .................................................................................................................................................... 38

    PREREQUISITES ................................................................................................................................................................ 38

    REQUIRED TOOLS FOR COMPLETING THIS MODULE......................................................................................................... 38

    ASSOCIATED DATA .......................................................................................................................................................... 38

    STRETCHING IMAGE DATA ............................................................................................................................................... 38

    COLOR TABLES ................................................................................................................................................................ 42

    RASTER COLOR SLICES .................................................................................................................................................... 44SKILLS CHECK.................................................................................................................................................................. 48

    SELF TEST ........................................................................................................................................................................ 48

    EXAMPLE APPLICATION: VEGETATION ANALYSIS ...................................................................................... 49

    LEARNING OBJECTIVES .................................................................................................................................................... 50

    PREREQUISITES ................................................................................................................................................................ 50

    REQUIRED TOOLS FOR COMPLETING THIS MODULE......................................................................................................... 50

    ASSOCIATED DATA .......................................................................................................................................................... 50

    PREPROCESSING ............................................................................................................................................................... 50

  • 8/10/2019 Exploring ENVI 50 Manual

    4/195

    Contents

    Exploring ENVIiv

    DARK SUBTRACTION ........................................................................................................................................................53

    TOPOGRAPHIC MODELING ................................................................................................................................................56

    IMAGE TO IMAGE REGISTRATION ......................................................................................................................................57

    BUILDING MASKS .............................................................................................................................................................59

    NORMALIZED DIFFERENCE VEGETATION INDEX (NDVI) .................................................................................................61

    STATISTICS .......................................................................................................................................................................62

    3DSURFACEVIEW ............................................................................................................................................................63

    SKILLS CHECK ..................................................................................................................................................................68

    SELF TEST .........................................................................................................................................................................68

    VECTOR LAYERS .......................................................................................................................................................69

    LEARNING OBJECTIVES .....................................................................................................................................................70

    PREREQUISITES .................................................................................................................................................................70

    REQUIRED TOOLS FOR COMPLETING THIS MODULE .........................................................................................................70

    ASSOCIATED DATA ...........................................................................................................................................................70

    WORKING WITH VECTORS IN ENVI ..................................................................................................................................70

    IMAGE REPROJECTION ......................................................................................................................................................71

    EDITING VECTOR LAYERS ................................................................................................................................................72

    LINEAR FEATURE EXTRACTION ........................................................................................................................................74

    SKILLS CHECK ..................................................................................................................................................................78

    SELF TEST .........................................................................................................................................................................78

    REGIONS OF INTEREST AND CLASSIFICATION TECHNIQUES ...................................................................79

    LEARNING OBJECTIVES .....................................................................................................................................................80

    PREREQUISITES .................................................................................................................................................................80

    REQUIRED TOOLS FOR COMPLETING THIS MODULE .........................................................................................................80

    ASSOCIATED DATA ...........................................................................................................................................................80

    2DSCATTER PLOT AND REGIONS OF INTEREST ................................................................................................................80

    SUPERVISED AND UNSUPERVISED CLASSIFICATION ..........................................................................................................83

    TERRAIN CATEGORIZATION ............................................................................................................................................100

    SKILLS CHECK ................................................................................................................................................................107

    SELF TEST .......................................................................................................................................................................107

    PRINCIPAL COMPONENTS ANALYSIS ...............................................................................................................109

    LEARNING OBJECTIVES ...................................................................................................................................................110

    PREREQUISITES ...............................................................................................................................................................110

    REQUIRED TOOLS FOR COMPLETING THIS MODULE .......................................................................................................110

    ASSOCIATED DATA .........................................................................................................................................................110

    INTRODUCTION ...............................................................................................................................................................110

    SKILLS CHECK ................................................................................................................................................................115

    SELF TEST .......................................................................................................................................................................115

    SPECTRAL LIBRARIES AND HYPERSPECTRAL PROCESSING TOOLS ....................................................117

    LEARNING OBJECTIVES ...................................................................................................................................................118

    PREREQUISITES ...............................................................................................................................................................118

    REQUIRED TOOLS FOR COMPLETING THIS MODULE .......................................................................................................118

    ASSOCIATED DATA .........................................................................................................................................................118INTRODUCTION ...............................................................................................................................................................118

    SEQUENTIAL MAXIMUM ANGLE CONVEX CONE (SMACC) ...........................................................................................118

    WORKING WITH SPECTRAL LIBRARIES ...........................................................................................................................123

    SPECTRAL ANGLE MAPPER (SAM)CLASSIFICATION ......................................................................................................124

    SKILLS CHECK ................................................................................................................................................................131

    SELF TEST .......................................................................................................................................................................131

    EXTENDING ENVI ....................................................................................................................................................133

    LEARNING OBJECTIVES ...................................................................................................................................................134

  • 8/10/2019 Exploring ENVI 50 Manual

    5/195

    Contents

    Exploring ENVI v

    PREREQUISITES .............................................................................................................................................................. 134

    REQUIRED TOOLS FOR COMPLETING THIS MODULE....................................................................................................... 134

    ASSOCIATED DATA ........................................................................................................................................................ 134

    INTRODUCTION ............................................................................................................................................................... 134

    BAND AND SPECTRAL MATH .......................................................................................................................................... 135

    TIPS FOR WRITING EXPRESSIONS ................................................................................................................................... 136

    BATCH PROCESSING IN ENVI ........................................................................................................................................ 148

    LIBRARY ROUTINES ....................................................................................................................................................... 151

    ENVIEXTENSIONS ........................................................................................................................................................ 155

    SKILLS CHECK................................................................................................................................................................ 161

    SELF TEST ...................................................................................................................................................................... 161

    COLOR TRANSFORMS AND DATA FUSION TECHNIQUES .......................................................................... 163

    LEARNING OBJECTIVES .................................................................................................................................................. 164

    PREREQUISITES .............................................................................................................................................................. 164

    REQUIRED TOOLS FOR COMPLETING THIS MODULE....................................................................................................... 164

    ASSOCIATED DATA ........................................................................................................................................................ 164

    INTRODUCTION ............................................................................................................................................................... 164

    COLOR TRANSFORMS ..................................................................................................................................................... 165

    IMAGE TO IMAGE REGISTRATION ................................................................................................................................... 168

    DATA FUSION USING COLOR TRANSFORMS .................................................................................................................... 170

    SKILLS CHECK................................................................................................................................................................ 171

    SELF TEST ...................................................................................................................................................................... 172

    FEATURE EXTRACTION ........................................................................................................................................ 173

    LEARNING OBJECTIVES .................................................................................................................................................. 174

    PREREQUISITES .............................................................................................................................................................. 174

    REQUIRED TOOLS FOR COMPLETING THIS MODULE....................................................................................................... 174

    ASSOCIATED DATA ........................................................................................................................................................ 174

    FEATURE EXTRACTION WORKFLOW .............................................................................................................................. 174

    EXTRACTING DARK ROOFTOPS WITH RULE-BASED CLASSIFICATION ............................................................................ 175

    SKILLS CHECK................................................................................................................................................................ 183

    SELF TEST ...................................................................................................................................................................... 183

    MOSAICKING IN ENVI ............................................................................................................................................ 185

    LEARNING OBJECTIVES .................................................................................................................................................. 186

    PREREQUISITES .............................................................................................................................................................. 186

    REQUIRED TOOLS FOR COMPLETING THIS MODULE....................................................................................................... 186

    ASSOCIATED DATA ........................................................................................................................................................ 186

    INTRODUCTION ............................................................................................................................................................... 186

    SKILLS CHECK................................................................................................................................................................ 189

    SELF TEST ...................................................................................................................................................................... 189

  • 8/10/2019 Exploring ENVI 50 Manual

    6/195

  • 8/10/2019 Exploring ENVI 50 Manual

    7/195

    Exploring ENVI 1

    Introduction

    What is ENVI? ............................................................................................................................ 2ENVI Resources .........................................................................................................................2

    About this Training Manual .........................................................................................................4

  • 8/10/2019 Exploring ENVI 50 Manual

    8/195

  • 8/10/2019 Exploring ENVI 50 Manual

    9/195

    Introduction

    Exploring ENVI 3

    The PSG team is experienced in extending ENVIs robust suite of user functions and batch programmingcapabilities, and it has up-to-date knowledge on recent product enhancements and future product direction.

    You can e-mail the Global Services Group [email protected].

    Contacting Exelis Visual Information Solutions

    Call, email, or visit us online:Exelis Visual Information Solutions4990 Pearl East Circle

    Boulder, CO 80301 USAPhone: 303-786-9900Fax: 303-786-9909Email:[email protected]:www.exelisvis.com

    TrainingExelis Visual Information Solutions offers a full range of IDL and ENVI training courses foreveryone from the beginning user to the experienced application developer. We teach courses on a

    rotating basis at our training facility in Boulder, Colorado. We also offer regional training classesevery year at various locations in the United States, Europe, and Australia. For the latest trainingschedule, a detailed course outline, and/or the cost of a training course, call, send e-mail([email protected]), or go online.

    Tutorials

    A number of ENVI tutorials are available on the ENVI website(www.exelisvis.com/ProductsServices/ENVI/Tutorials.aspx )and on the data CDs that shipped with

    your ENVI software.

    ENVI Support

    If you experience a problem with ENVI, first verify that the issue is not a result of misinterpreting theexpected outcome of a specific function or action. Double-check the ENVI Help, or check with a localexpert. Make sure your system is properly configured with enough virtual memory and sufficient operatingsystem quotas.

    If the problem still occurs, report it to Technical Support quickly, so that the issue can be resolved, or a

    workaround can be provided. If you cannot find the information you need in the ENVI written guides orHelp, report this to Technical Support as well, so that the documentation can be updated.

    Contacting Technical Support

    To report a problem, call, e-mail, or go online to submit a support incident:Phone: 303-413-3920

    Email:[email protected]

    Online ResourcesThere are two additional resources for ENVI support: the Exelis Visual Information Solutions website and

    the IDL newsgroup.

    Website

    The Exelis Visual Information Solutions website has several links that provide additional ENVI

    mailto:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]://www.exelisvis.com/http://www.exelisvis.com/http://www.exelisvis.com/mailto:[email protected]:[email protected]:[email protected]://www.exelisvis.com/ProductsServices/ENVI/Tutorials.aspxhttp://www.exelisvis.com/ProductsServices/ENVI/Tutorials.aspxhttp://www.exelisvis.com/ProductsServices/ENVI/Tutorials.aspxmailto:[email protected]:[email protected]:[email protected]:[email protected]://www.exelisvis.com/ProductsServices/ENVI/Tutorials.aspxmailto:[email protected]://www.exelisvis.com/mailto:[email protected]:[email protected]
  • 8/10/2019 Exploring ENVI 50 Manual

    10/195

  • 8/10/2019 Exploring ENVI 50 Manual

    11/195

  • 8/10/2019 Exploring ENVI 50 Manual

    12/195

    Mastering the Basics Learning Objectives

    6 Exploring ENVI

    Learning ObjectivesIn this chapter you will learn how to:

    Use ENVI to display a multispectral image

    Enhance, zoom, pan, and rotate the image

    Create a Portal and compare it to the original scene using blend, flicker, and swipe tools Use Chip View To to take a screen capture of the image and save it to JPEG format

    Change ENVI Preferences

    PrerequisitesFor this chapter it helps to have a basic understanding of remote sensing.

    Required Tools for Completing This Module ENVI 5.0

    Associated Data qb_boulder_msiQuickbird image of Boulder, Colorado that comes with the ENVI

    installation.

    New_Zealand_WV2.datWorldView2 data set of New Zealand.

    FundamentalsThe ENVI interface provides quick access to common display tools such as contrast stretching, brightness,sharpening, and transparency. You can work with multiple layers of data at one time and in several windows

    or views, using the Data Manager and Layer Manager to keep track of multiple data sets. ENVIs Portalcapability allows you to punch through layers to view and work with other layers below. In addition,

    ENVI will reproject and resample images on-the-fly. ENVIs Toolbox contains many of the popular imageprocessing tools.

    Exercise #1: Starting ENVI and Exploring the Toolbox

    1. In Windows, start a new ENVI session by clicking Start All Programs ENVI x.x

    ENVI+IDL. If you are working on a UNIX machine, then type enviat the UNIX prompt.

    2. In ENVI + IDL, the IDL Workbench window (the control panel for the IDL session that is runningENVI) is minimized at the bottom of the screen. This window (Figure 1)is only used for advanced

    techniques involved with customizing and extending ENVI but must be open to run ENVI + IDL. Ifyou are running ENVI (vs. ENVI + IDL), access to the IDL Workbench is not provided, and

    therefore, the window is not displayed.

    If you are working on a UNIX machine, the IDL Workbench window is automatically opened.

  • 8/10/2019 Exploring ENVI 50 Manual

    13/195

    Fundamentals Mastering the Basics

    Exploring ENVI 7

    Figure 1: IDL Workbench Window

  • 8/10/2019 Exploring ENVI 50 Manual

    14/195

    Mastering the Basics Setting Preferences and Display Management

    8 Exploring ENVI

    3. Once ENVI loads, you will see the single window interface (Figure 2). This is the primary controlpanel for working in ENVI, allowing you to do such things as open files and apply processing

    functions.

    Figure 2: The ENVI Interface

    4. Explore the options available in the ENVI Toolbox on the right side of the interface. There areliterally hundreds of different tools available from this menu. Expand the categories by clicking onthe plus symbol for them. Try to get an overview of what tools are available in each category.

    Note the location of the following tools:

    Edit ENVI Header is under the Raster Management menu

    Building masks falls under Raster Management Masking

    Principal Components Analysis (PCA) is under the Transform menu

    5. At the top of the Toolbox list is Favorites. This is useful for quickly accessing tools you use often.To add a tool, click on it to select it and the large plus sign above the list will be clickable. Click onit to add that tool to your list of favorites. You can remove a tool from the list of favorites byselecting it and clicking the large minus sign.

    Setting Preferences and Display ManagementOpening files and displaying images is perhaps the most basic, yet fundamentally important task for image

    processing software. By default when you open a file, ENVI attempts to automatically display a true coloror gray scale image based on your file type. In this exercise, you will change this preference. Displaying

  • 8/10/2019 Exploring ENVI 50 Manual

    15/195

  • 8/10/2019 Exploring ENVI 50 Manual

    16/195

    Mastering the Basics Setting Preferences and Display Management

    10 Exploring ENVI

    6. Click OKto close the Preferences dialog.

    7. From the ENVI main menu bar, select File Open.

    8. With a default installation, ENVI looks for data in the Program

    Files..\Exelis\ENVIxx\datadirectory, where xxis the software version number. Select

    the file qb_boulder_msifrom the list, and click Open. The image is automatically displayed as

    color-infrared (CIR). You can also find data in the ProgramFiles..\Exelis\ENVIxx\classic\datadirectory.

    9. Click on the Data Managericon . The Data Manager lists the files that you have opened andallows you to select bands to display. When you open a file in ENVI, it is added to the top of the

    Data Manager list.

    10.When you click on band names in the Data Manager, color assignments automatically cycle throughred, green, then blue (in that order). Click the band name you want to assign to red. A red box

    appears next to the band name.

    11.Select two other bands for green and blue. If one band is assigned multiple colors, a split boxappears next to the band name, showing the colors. Click Load Datato see the new bandcombination.

  • 8/10/2019 Exploring ENVI 50 Manual

    17/195

    Setting Preferences and Display Management Mastering the Basics

    Exploring ENVI 11

    12.Right-click on the filename qb_boulder_msiand select Load True Color. ENVI looks forwavelength information in the header file to select which bands will make a true-color. The optionto load a True Color or CIR image using the right-click menu requires that the bands in the file have

    wavelength information associated with them.

    13.Right-click on one of bands of qb_boulder_msiand select Load GrayScale.

    14.Click the Helpicon at the bottom of the Data Manager. Scroll down a bit in Help and note thatyou can load a specific band as a grayscale image by right-clicking on that band and selecting LoadGrayscale. Close the ENVI Help by clicking the Xat the top right of the dialog window.

    You will find quick access to helpful tips throughout ENVI. ENVI Help is also accessible via theHelp menu.

    15.Click on the File Information arrowhead in the Data Manager. Useful information found hereincludes file size and dimensions, data type, and map projection.

    16.Click on Band Selectionin the Data Manager. This is another tool you can use to select bands todisplay. The red button is currently the active one, so any band you click on will be placed there.Then the Green button will be active.

    17.Position your mouse cursor over the toolbar buttons at the top of the Data Manager to view theirpop-up labels. Note that you can open new files, expand and collapse files (experiment with these),close files, and pin the Data Manager to keep it on the screen or unpin it to have it automatically

    close when you load an image into the display. There is also a button to open a file in ArcMap.

    18.Close the Data Manager by clicking the Xon the top right of the dialog window.

    Exercise #3: Working with Layers and Multiple Views

  • 8/10/2019 Exploring ENVI 50 Manual

    18/195

    Mastering the Basics Exploring the ENVI Interface

    12 Exploring ENVI

    You can load multiple layers into ENVI at one time and manage those layers using the Layer Manager. Bydefault, all layers in the Layer Manager are displayed in the Image window. You can temporarily hide the

    display of a layer so that you can work with other layers in the Image window. You can control the orderof layers in the Image by dragging and dropping layers in the Layer Manager list or by using menu options.

    1. Click and drag the CIR (bands 4,3,2) qb_boulder_msito the top of the Layer Manager just

    below Overview. It should be visible as the top layer.

    2. Click the check box for the top layer to deselect it. This hides the image from view. Click thecheck box again to display that layer again.

    3. Right-click on one of the file names in the Layer Manager, and note the various options, includingDisplay in Portal, change Order, and Send to ArcMap (you will not see Send to ArcMap if you are

    running in 64-bit mode). Select Remove.4. From the ENVI menu select Views Create New View. The display is divided into two with one

    of the Views being empty. The new View is also listed in the Layer Manager.

    5. Click the Data Manager icon to open it. Then right-click on one of the band names and select LoadGrayscale. The band will be loaded into the empty View.

    6. Experiment with other views by selecting Two Horizontal Views, 2x2 Views, etc.

    7. Return to a 2x2 View. There will be four Views listed in the Layer Manager. Right click on theView at the bottom of the list and select Remove View. You will now have three Views with one ofthem extending across the bottom of the display. Use the Data Manager to place an image in anyView that is empty. To select a View for updating, either click on it in the display or click on its

    listing in the Layer Manager.8. Select Views One Viewand close the Data Manager.

    Exploring the ENVI InterfaceThe ENVI interface includes a menu bar, toolbars, category bars, and a status bar. Much of the ENVIinterface is customizable and provides options to make use of multiple monitors.

  • 8/10/2019 Exploring ENVI 50 Manual

    19/195

    Exploring the ENVI Interface Mastering the Basics

    Exploring ENVI 13

    Exercise #4: Working with ENVIs Buttons and Sliders

    1. Detach the Layer Manager panel by clicking the Detachbutton to the right of the Layer

    Manager category bar (see image above). Note that the Toolbox also has a detach button.

    2. Reattach the Layer Manager panel by clicking the Xon the top right of the Layer Manager window.

    3. Close the entire Layer Manager panel by clicking on the collapse bar to the right of the categories(see image above). This allows you to view a larger Image window. Now, open the Layer Manager

    panel by clicking again on the same bar (to the left of the Image window).

    4. Collapse the Toolbox panel by clicking the arrow or collapse bar to the left of the Toolbox (seeimage above). Expand the Toolbox panel by clicking again on the same arrow or collapse bar.

    5. Click the Cursor Valuebutton . Then as you move your cursor around the display, you will seethe following information:

    Geo: latitude/longitude coordinates are displayed if the image is georeferenced

    Map: coordinates are displayed if the image is georeferenced

    Proj:projection name is displayed if the image is georeferenced

    File name

    File: The cursors (sample, line)image coordinates (where the upper-left pixel in the image isthe origin of the coordinate system)

    Data: The data values are the actual values of the pixel in the image file. For RGB composites,three values are displayed. For classification images, the class value and class name are

  • 8/10/2019 Exploring ENVI 50 Manual

    20/195

    Mastering the Basics Exploring the ENVI Interface

    14 Exploring ENVI

    displayed.

    6. Close the Cursor Value dialog. Then click the Crosshairsbutton . The Cursor Value dialog willappear again along with display Crosshairs. The Cursor Value dialog initially shows thecoordinates for the Crosshair. As you move your cursor around the image, the coordinates update tothe cursor position.

    7. Click somewhere in the display. The crosshairs will move to you and the Cursor Value dialogdisplays those coordinates. Move the cursor away from the crosshairs and the Cursor Value dialog

    will update. Now click on the arrow keys on your keyboard. The crosshairs will follow and theCursor Value dialog will again display the coordinates of the crosshairs. Close the Cursor Value

    dialog and click the Crosshairsicon again to toggle it off.

    8. The next button to the right is the Undo button . Click on this to undo the last change in the

    display. The next button redoes the change.

    9. Click the Panbutton then click and drag your cursor in the Image window to pan in the direction

    of the mouse. When in Select mode you can also use the middle mouse button to perform a pan.

    10.Click the Flybutton then click in the display and hold to continuously drift in the direction ofthe cursor. Positioning the mouse further from the center of the display causes the drift to increasein speed.

    11.The next four button icons are grayed-out. These are used for vector editing and are available whenvector layers are displayed

    12.The next several buttons are used for annotation. Experiment withthem as you have time.

    13.Click the Rotatebutton then click and drag the cursor in a clockwise or counter-clockwisedirection to rotate the image. The degrees drop-down list near the middle of the upper toolbarinteractively reports the current degree of rotation.

    14.Click the Selectbutton to exit the Rotate tool.

    15.Click the degrees drop-down list on the toolbar and select 0. Note that

    you can also use the North Up button instead of the 0 rotation to get

    the same orientation. The grayed-out Top Up button is used to orientthe image when it contains Rational Polynomial Coefficient (RPC)

    information.

    16.Click the Zoombutton andthen click and drag your cursor to draw a box around an area nearthe center of the image. This will zoom in to that area.

    17.Click on the Fixed Zoom In and Fixed Zoom Outbuttons. The current zoom factor and pixel scale

    are shown in the drop-down menu to the right. Click on the arrowhead for thismenu and note the options for zoom factor (pixel scale). At the bottom of this list click on UseMapScale. Now select some different map scales from the pull-down menu. Access the drop-downmenu again and select Use Pixel Scale. This will return to the default behavior.

    Note:Unless the contrast stretch tool is being accessed, the scroll bar on your mouse will also zoom in

    and out. You may have to click in the image display first to activate it.

  • 8/10/2019 Exploring ENVI 50 Manual

    21/195

    Exploring the ENVI Interface Mastering the Basics

    Exploring ENVI 15

    18.Click on the Zoom To Full Extentbutton . This is a useful button to view your entire image inthe display.

    19.In the Go Towindow, type in 660.5,390and hit the ENTERkey. This should center the image on atrack near a large reservoir. If the Crosshairs are turned on, they will be placed on the location youspecify. If you type in x, y locations and both values are integers or are outside the range used for

    Lat/Long, ENVI assumes they are pixel coordinates. If x and y values are greater than 30,000,append a "p" to one of the values to indicate it is a pixel coordinate, not a map coordinate. If the

    image is a subset, offsets are taken into account. Data coordinates are specified by appending anasterisk(*) after one of the coordinates.

    20.Type 39 59 51N,105 12 28.5Win the Go Towindow. The display will be centered on a small beachjutting into the reservoir. Map coordinates (e.g., Easting and Northing in a UTM projection) canalso be used with the Go To tool. Also, MGRS coordinates can be typed as an alphanumeric string.

    MGRS Northing and Easting values can have up to five digits of precision. Note that you can clickon the arrowhead to access a pull-down list of previously used coordinates.

    21.The next row of tools in the ENVI menu includes various sliders for Brightness, Contrast,Sharpen, and Transparency. Experiment with these. They can be manipulated in the following

    ways: Click on the slider bar to the right or left of the indicator, or click the slider then use the

    Page Upor Page Downkeys to move the slider up or down incrementally by ten percent.

    Click on the icons at each end of the slider bar, or click the slider then use the arrow keys onthe keyboard to move the slider incrementally by one unit.

    Click the slider then use the Homekey on the keyboard to move the slider to 100 and theEndkey to move the slider to 0.

    22.Click the Resetbutton on each slider to return them to their default values.

    Exercise #5: Contrast Stretching and Other Tools

    1. Experiment with different contrast stretches by selecting options from the drop-down list. Once this tool is selected, you can use the mouse scroll button to access different

    stretches. If you choose Custom stretch, close the histogram window that appears; we will discuss

    this stretch below. TheStretch on Full Extent and Stretch on View Extenticons can be

    used to specify what part of the image is used to determine histogram statistics for the stretches. Ifyou have multiple layers open, you can click on a specific layer to select it and have the sliders and

    contrast stretches operate on that layer. Click the Reset Stretch Typebutton to return to thedefault.

    2. Access the Custom Stretch by either choosing it from the pull-down list or clicking on the icon.The pull-down menu of this tool is set to Linear to start. Type in a value of 0.05in the Linear(Percent Value) window and hit the ENTERkey. The display will update. Try values of0.5 and 1.

  • 8/10/2019 Exploring ENVI 50 Manual

    22/195

    Mastering the Basics Exploring the ENVI Interface

    16 Exploring ENVI

    3. Select Gaussianfrom the Custom Stretch pull-down menu. For Gaussian (Standard Deviation)type in a value of 0.05. Try values of0.5 and 1. Click on the Reset Dialogbutton to go back to

    the default.

    4. Click on the Red button to view the histogram for the band displayed as red. You will see Black-Point and White-Point values showing what data numbers (DN) values are set as upper and lower

    limits of the current stretch. If you are in Linear Stretch mode, typing in a Linear (Percent Value)will cause the Black-Point and White-Point bars to shift. You can also move the Black-Point and

    White-Point bars manually. This will automatically update the contrast stretch. If you move the barsto the end points, the Black-Point and White-Point windows will show the minimum and maximumvalues for the data set. Experiment with the other bands that are displayed by clicking on the Green

    button, and then the Blue button. When you are finished experimenting click on the Reset Dialog

    button to go back to the default. Close the Custom Stretch tool.

    5. Click on the Mensuration tool . The Cursor Value tool will appear. Next click on the Polylineannotation button and click in the display to measure something of interest. Distances and headings

    between polyline nodes will be displayed in the Cursor Value dialog. If you want to keep thepolyline, right click and choose Accept. If you wish to discard the polyline, right click and choose

    Clear. The Arrow annotation can also be used for calculating distance and heading. To clear allannotations still displayed, right click on the New Annotationlayer in the Layer Manager and

    select Remove. Choose Noto respond to the question about saving the annotation. To clear a singleannotation, right click on it and choose Delete. When finished with annotation click on the Select

    button and close the Cursor Value dialog.

    6. The Overview window provides a view of the full extent of the layers loaded into the display. To

    turn the Overview window on click in the check box for it in the Layer Manager . Ifyou have multiple views in the display, each view has its own Overview. The view box is a smaller,

  • 8/10/2019 Exploring ENVI 50 Manual

    23/195

    Exploring the ENVI Interface Mastering the Basics

    Exploring ENVI 17

    partially transparent window inside the Overview window that shows the extent of the image visiblein the main display.

    7. Increase or decrease the size of the View box by clicking and dragging a corner of that box. Thiswill zoom in or out on the displayed. The View box adjusts shape to maintain the proper aspect ratio

    of the display.

    8. Click inside of the View box and drag it to any location within the Overview window todynamically update the Image window. Click outside of the View box in the Overview window to

    re-center the View box on the spot where you clicked.

    9. As you move the View box around it leaves behind a snail trail. This helps by showing youwhich part of the scene you have viewed. To clear the snail trail right click Overview in the LayerManager and select Clear Snail Trail. If you want to turn the snail trail off, right click onOverview and de-select Show Snail Trail.

    10.Place your cursor in the display and note the information displayed in the Status bar at the bottom ofthe ENVI interface. You will see Latitude and Longitude in one block, and map projection anddatum in the next. One block does not show anything currently. Right click in that block and you

    will see that NITF classification level is checked. This is not NITF data so nothing is displayed.You have the option to display anything on the list in any block during the current ENVI session.You can specify what you want for future ENVI sessions by changing ENVI Preferences. If a sceneis not georeferenced you wont see any map information in the Status bar.

    Note: The Status bar always displays information about the base layer in the Layer Manager. Forinformation on any other layer use the Cursor Value tool.

    11.The right-most segment of the Status bar is the Process Manager. It displays the process name andstatus for the oldest running process, along with an option to cancel the process by clicking the

    Cancel Process button . When all processes finish, this segment becomes blank. As one or more

    processes are running, you can click the Process Description button to display a window thatshows the name and status of each process, and the name of the input images.

  • 8/10/2019 Exploring ENVI 50 Manual

    24/195

    Mastering the Basics Working with a Portal, and Blend, Flicker, and Swipe

    18 Exploring ENVI

    Working with a Portal, and Blend, Flicker, and SwipeA Portal is a window inside the display that allows you to view a layer below. A Portal is listed as a separate

    layer in the Layer Manager with a distinctive icon.

    Exercise #6: Portals

    1. Click on the Data Managericon . Click on Band 3to load it as Red, click on Band 4to displayit as green, and click on Band 1for Blue. Then click Load Datato display the selected bands as anew layer. Recall you can also use the Band Selection tool at the bottom of the Data Manager tochoose bands for display. Close the Display Manager

    2. You will now see two images listed in the Layer Manager, and the Portal, Blend, Flicker, and

    Swipe icons above the display are now selectable. Click the Portalbutton on the toolbar. ENVI

    creates a Portal to display the lower layer and it is listed in the Layer Manager with the Portal icon. If you have more than two layers open and you want to see one of the lower layers in a Portal,

    right click on that layer in the Layer Manager and choose Display in Portal.

    3. Click and drag inside the Portal to move it around the Image window.

    4. Click and drag on a corner or side of the portal to resize it.

    5. Middle click in the display to access the Pantool . As you pan around the image notice that thePortal stays in one spot while the image moves behind it.

    6. You can attach (or pin) the Portal to the image so that the Portal moves with the main image. Placeyour cursor inside of the Portal near the top to display the Portal toolbar.

  • 8/10/2019 Exploring ENVI 50 Manual

    25/195

    Chipping and Saving Mastering the Basics

    Exploring ENVI 19

    7. Click the Pinbutton . The button changes to Unpin. Middle click and Pan around again. ThePortal stays fixed to the image.

    8. Place your cursor at the top inside of the Portal to display the Portal toolbar. Click the Unpinbutton

    on the Portal toolbar.

    Exercise #7: Blend, Flicker, and SwipeBlend, Flicker, and Swipe help you compare two different layers. You can use these tools for comparingentire images or you can use them inside of a Portal. These tools are enabled only when you have two or

    more layers open in the Layer Manager, and when you display at least one layer in the display.

    1. Click on the green arrowhead at the top of the Portal. This starts Flicker. You can change the

    speed by clicking on the slower or faster buttons.

    2. Click the Pausebutton on the Portal toolbar to stop Flicker.

    3. Right-click inside of the Portal and select Blend. This adjusts the transparency of the top image.

    4. Right-click inside of the Portal and select Swipe. Swiping automatically begins between the twolayers.

    5. Click the Pausebutton on the Portal toolbar to stop the swipe.

    6. Close the Portal by either clicking on the x button at the top of the Portal, right clicking on thePortal layer in the Layer Manager and choosing Remove, or right clicking in the Portal itself andchoosing Close Portal.

    7. Click on theView Flickerbutton at the top of the ENVI interface. This opens a new Portal thatcovers the entire display. Right click in the display and choose Close View Portal.

    Chipping and SavingIn this step, you will take a screen capture of the contents of the Image window, and save the image. The

  • 8/10/2019 Exploring ENVI 50 Manual

    26/195

    Mastering the Basics Spectral Profiles

    20 Exploring ENVI

    Overview window, any enhancements, zooming, rotating, or Portals that are displayed in the image windoware burned into the output image.

    Exercise #8: Saving the Display

    1. Click the Chip to Filebutton on the ENVI toolbar. The Chip to File Parameters dialog appears.

    2. From the Output Filedrop-down list, select JPEG. Next click theFile Selectbutton . TheSelect Output Filename dialog appears.

    3. Navigate to C:\ENVI_coursefiles\envidata\enviout, and type display_chipasthe output filename. Click Open.

    4. Click OKin the Chip to File Parameters dialog. The display chip will be listed in the LayerManager and loaded into the display.

    5. In the ENVI menu, click on File Chip View Toand note the other options for output, whichinclude Print, ArcMap, and PowerPoint.

    6. Right click on the display_chip.jpgfile in the Layer Manager and select Remove.

    Spectral ProfilesIn this step, you will open a spectral plot window and roam around the display. More will be done with thistool later.

    Exercise #9: Opening a Spectral Profile Plot

    1. From the ENVI menu bar, select Display Spectral Profile. The Spectral Profile plot windowappears. Click inside the display and drag your cursor around. The plot in the display updates toshow the spectral profile for the pixel under your cursor.

    2. Move your cursor into the plot. As you get near a specific band, the X and Y values at that

    wavelength will be displayed in the lower right corner of the plot window.

  • 8/10/2019 Exploring ENVI 50 Manual

    27/195

    ENVI Help Mastering the Basics

    Exploring ENVI 21

    3. Collect spectra in the plot by SHIFT clicking. Collect spectra from different land cover types to seehow they compare.

    4. Click on the arrowhead on the right side of plot window to show the plot key panel. All thespectra will be listed along with their pixel coordinates.

    5. Right click in the plot and select Remove All.

    6. Close the Spectral Profile plot. You will use the Spectral Profile tool again in a later chapter.

    7. Right click on the Viewitem in the Layer Manager and select remove All Layers.

    ENVI HelpExtensive ENVI documentation is accessible from within ENVI, and printable documentation and tutorialsare available on the ENVI web site (http://www.exelisvis.com/ProductsServices/ENVI.aspx ). ENVI Helpincludes Contents, Index, Search, and Favoritestabs to help you find topics quickly and easily.

    Exercise #10: Using ENVI Help

    1. From the ENVI main menu bar, click on the HelpContents.

    2. The Contentstab of Help is open by default. On the left side of this page, click the plus (+) sign

    next to Explore Imageryto expand this topic. Click on the Display Toolssub-topic. Informationon many of the tools discussed in this chapter is shown in the right panel.

    3. An even quicker way to find a topic in the Help is to use the Indextab to conduct a search of theindex. Click the Indextab, then search for information on how to custom-configure ENVI by typingPreferencesin the text window near the top, then hitting the ENTER key. You will set some

    preferences in the next section.

    4. Click on the Searchtab. This also gives you a text window in which to type your search topic. TypePreferencesin the text window near the top, then hit the ENTER key.

    http://www.exelisvis.com/ProductsServices/ENVI.aspxhttp://www.exelisvis.com/ProductsServices/ENVI.aspxhttp://www.exelisvis.com/ProductsServices/ENVI.aspxhttp://www.exelisvis.com/ProductsServices/ENVI.aspx
  • 8/10/2019 Exploring ENVI 50 Manual

    28/195

  • 8/10/2019 Exploring ENVI 50 Manual

    29/195

    Spatial and Spectral Subsetting Mastering the Basics

    Exploring ENVI 23

    5. Click on the Annotationlisting. Note that you can set up properties for the various types ofannotation.

    6. Click the OKbutton to close the Preferences dialog.

    Spatial and Spectral SubsettingFor many applications, it is helpful to think about multispectral data sets as a 3D cube with all of the bandsstacked on top of one another (as in the figure below).

    Visualizing image data in this manner makes it easy to see that multispectral images provide information intwo distinct domains: spatialand spectral. Thespatialdomain of the data represents an area within any one

    band (in sample/line space), while thespectraldomain of the data represents the response of any one pixel

    in all of the bands (in band space).

    Many processing algorithms can be categorized as either spatial or spectral, depending on the domain from

    which the data are extracted for processing. For example, image registration is a spatial function, whileimage classification is a spectral function. When applying routines such as these, it is convenient to definethe part of the image that you would like to work on at the time the processing is being set up. In ENVI, youcan easily do this through the use of the standard file input selection dialog.

    samples

    lines

  • 8/10/2019 Exploring ENVI 50 Manual

    30/195

    Mastering the Basics Spatial and Spectral Subsetting

    24 Exploring ENVI

    Exercise #12: Defining Subsets

    1. From the ENVI Toolbox, expand Raster Managementand double click onResize Data.TheResize Data Input File dialog appears.

    2. To open up the data set you will subset, click Open New File. Then browse to

    C:\ENVI_coursefiles\envidata\WorldView2and double click on

    New_Zealand_WV2.dat. In the Resize Data Input File dialog, notice that:

    The right side of the dialog window lists a summary of the image characteristics.

    If your processing function allows for image subsetting, then the Spatial Subset and/orSpectral Subsetbuttons appear at the bottom of the dialog.

    3. Click the Spatial Subsetbutton. The Select Spatial Subset dialog appears, allowing you to definespatial subsets in several different ways:

    The sample and line ranges can be explicitly typed using the fields provided.

    Clicking the Subset UsingImagebutton allows you to drag and re-size a box on a thumbnail

    picture of the image to define a subset. If the image is georeferenced, clicking the Subset Using Mapbutton allows the subset to be

    defined by entering map coordinates.

    You can subset your image using the area of another image, or you can subset your image basedon the area encompassing selected regions of interest (ROIs) or ENVI Vector Files (EVFs).

    The Opendrop-down button allows you to open an ROI File, or EVF File. The Previousbuttonautomatically applies the last spatial subset used to the current selection (this can save timewhen the same subsets are being applied to multiple images).

  • 8/10/2019 Exploring ENVI 50 Manual

    31/195

    Spatial and Spectral Subsetting Mastering the Basics

    Exploring ENVI 25

    4. Click the Subset Using Imagebutton and define an area that captures only the left half of the image,similar to the image shown at right (the exact subset is not important for this exercise).

    To resize the box, click on the corner of the box and drag.

    To move the box, click inside the box and drag to the new location.

    Click with the left or middle mouse button to center the box on the cursor.

  • 8/10/2019 Exploring ENVI 50 Manual

    32/195

    Mastering the Basics Closing Files

    26 Exploring ENVI

    Click OK. The Select Spatial Subset dialog reappears with the sample and line ranges from yourselection entered into the corresponding fields. You can make additional changes to the subset here

    if you want.

    5. Click OK. You are back to the Resize Data Input File dialog. Click OK again.

    6. The Resize Data Parameters dialog appears with the output file dimensions. You have the option to

    change the pixel size here.

    7. Click Chooseand browse to the output directory if necessary. Type in an output file name of

    NZ_WV2_sub.datand click Open. Click OK to perform the process.

    8. The subset will be displayed on top of the input file. Inspect your subset result by adjusting thezoom level and panning around.

    9. When finished, right click on the View listing in the Layer Manager and select Remove All Layers.

    Closing FilesOnce a file is opened in ENVI, it always remains open until the session is ended or you manually choose toclose the file. However, because data from the files are only read when needed, having many files opened

    does not consume any memory. Nonetheless, sometimes it is useful to remove an opened file from the ENVIsession.

    Exercise #13: Close Files

    1. Open the Data Manager and click on Close File button or Close All Files button. You canalso close files by right clicking on a file in Data Manager and selecting either Close Fileor CloseAll Files.

    2. Close the Data Manager.

    Skills CheckAt this point you should:

    Know how to create RGB or Gray Scale displays

    Know how to find and use ENVI Help

    Understand how to change ENVI Preferences

    Know how to spatially subset an image.

    Self Test1. From this point forward, when you write a new file to disk from ENVI, where is it written by

    default?

    2. What options do you have to define a spatial subset?

  • 8/10/2019 Exploring ENVI 50 Manual

    33/195

    Exploring ENVI 27

    Chapter 2:

    Raster DataManagement

    Learning Objectives..................................................................................................................28Prerequisites ............................................................................................................................28Required Tools for Completing This Module .............................................................................28

    Associated Data.......................................................................................................................28The ENVI Header File ..............................................................................................................28

    Reading Raster Image Data .....................................................................................................28ENVIs Image Format...............................................................................................................29The ENVI Header File ..............................................................................................................29Managing Files .........................................................................................................................35Skills Check .............................................................................................................................36Self Test ...................................................................................................................................36

  • 8/10/2019 Exploring ENVI 50 Manual

    34/195

    Raster Data Management Learning Objectives

    28 Exploring ENVI

    Learning ObjectivesIn this chapter you will learn how to:

    Read various types of raster image data into ENVI

    What ENVI standard image file formatmeans

    What ENVI header files are and how to edit them Useful file management techniques

    PrerequisitesFor this chapter it helps to have a basic understanding of remote sensing. You should also know how to

    display an image in ENVI.

    Required Tools for Completing This Module ENVI 5.0

    Associated Data FlKeys.tifQuickbird image of Florida. This data set is a high-resolution (2.8 m pixel size)

    multispectral image from DigitalGlobes QuickBird satellite. It is a subset of a scene acquired in2002. It covers an area in the Florida Keys, USA (Cudjoe and Cedar Keys). It has been

    geometrically corrected to a UTM projection and distributed in GeoTIFF format. ENVIautomatically reads the information from the GeoTIFF tags embedded in the file and can easilyimport the data and map information.

    Note:Image courtesy of DigitalGlobe (www.DigitalGlobe.com). The data is to be used for classexercises only and any other use of the data including resale, distribution or reproduction, or for

    purposes other than noted above without the prior written permission of DigitalGlobe is strictlyprohibited.

    bldr_tm.dat - Landsat TM scene over Boulder, CO, which does not currently have an ENVIheader.

    Reading Raster Image DataThere are hundreds of different formats for storing image data, which can often make working with remotesensing data difficult. ENVI uses a very flexible method for importing raster data that allows virtually any

    type of image data to be imported. ENVI also includes custom readers for common remote sensing formats,as well as for generic and special image formats produced by other image processing software. The custom

    readers are found under the File Open As option in the ENVI menu bar.

    Image files open in ENVI almost instantaneously regardless of size. When roaming around the image the

    display refreshes rapidly. The reason for this is that ENVI uses pyramid files which are copies of the datafile at various reduced resolutions. ENVI only builds pyramids for a data file the first time you open it.When you open the data file thereafter, it displays more quickly because it accesses the previously built

    pyramid file. For some compressed data formats, ENVI does not need to create a pyramid file.

    Pyramids are used to speed image display by reducing the resampling required when displaying largeportions of an image at low resolution. The Process Manager in the Status bar shows the progress of

    building pyramids when you first open a data file.

    http://fridge/Tech_Marketing/ENVI_coursefiles/Exploring_ENVI/www.DigitalGlobe.comhttp://fridge/Tech_Marketing/ENVI_coursefiles/Exploring_ENVI/www.DigitalGlobe.comhttp://fridge/Tech_Marketing/ENVI_coursefiles/Exploring_ENVI/www.DigitalGlobe.comhttp://fridge/Tech_Marketing/ENVI_coursefiles/Exploring_ENVI/www.DigitalGlobe.com
  • 8/10/2019 Exploring ENVI 50 Manual

    35/195

    ENVIs Image Format Raster Data Management

    Exploring ENVI 29

    By default, pyramid files are created in the directory containing the original data file. If this directory isunavailable (due to write permission, for example), ENVI attempts to write the pyramid file in directory set

    in theAlternate Header Directorypreference. If this is not available, ENVI uses the IDL temporarydirectory.

    ENVIs Image FormatENVI imagefiles (those generated by ENVI) are stored in the simplest possible generalized raster format,which consists of a binary stream of bytes without embedded non-image data or structural elements of anytype. This format is typically referred to as aflat-binaryfile and is commonly described as a lack offormat because of its simplicity.

    Because the image file does not contain embedded non-image data, each file has an accompanying ASCIIfile called the ENVI header file which contains all of the information needed to read the data in as an image.

    Exercise #1: Reading Image Formats and Header File Input

    1. From the ENVI menu bar, select File Open Asand examine the list of supported formats.

    ENVIs numerouscustom readers make it possible to read very complicated formats, such as the10-bit compressed AVHRR Level 1B, RADARSAT, or TOPSAR data. Other file types in the list

    are flat binary but contain embedded binary data that describe the image; or they have specialformat header files which specify the image dimensions, wavelengths, or map information. In

    addition, ENVI can read formats from other vendors, such as Multi-Resolution Seamless ImageDatabase (MrSID) compressed format single-band or three-band files, or Enhanced CompressedWavelet (ECW) images.

    When using one of the custom readers for file import, ENVI automatically extracts all of theinformation contained in the input file and enter its image bands into the Available Bands List. In

    some cases, the image format being read includes not only the information required for reading thedata itself but also ancillary information such as georeferencing data, wavelengths, or band names.

    You are not required to know any details about data files to import them into ENVI.

    With each new ENVI release, and as more instruments are developed, the list of supported formatswith special custom readers in ENVI is expanded.

    2. From the ENVI Toolbox, expand Raster Management and double click on Edit ENVI Header.

    3. In the Edit Header Input File dialog, click on the Opentab and select New File. Then navigate to

    the envidata\QuickBirddirectory, select FlKeys.tif, and clickOpen. Note thedimensions, interleave, data type, and file size listed in the File Information panel. Click OK. TheHeader Info dialog appears.

    The ENVI Header FileImage files opened in ENVI have an ENVI header file associated with them. This is true even for images

    that are stored in memory only or that are imported into ENVI in their native format (without beingconverted into ENVI image format). The ENVI header file is a small ASCII text file that contains the basicinformation that ENVI must know in order to read the image data (such as the number of samples, lines, and

    bands), as well as any other ancillary information available (such as band names and wavelengths). Whenimporting a file using one of ENVIs custom readers, ENVI extracts the necessary information from the filesand then automatically generates an ENVI header file. When reading an image without a custom reader inENVI (a generic raster image), ENVI prompts you to enter the basic required image information thengenerates a header file. Once a file has an ENVI header, ENVI reads it without any input from you.

    http://c/Program%20Files/Exelis/envi50/help/Content/Preferences.htm%23AlternateHeaderDirectoryhttp://c/Program%20Files/Exelis/envi50/help/Content/Preferences.htm%23AlternateHeaderDirectory
  • 8/10/2019 Exploring ENVI 50 Manual

    36/195

    Raster Data Management The ENVI Header File

    30 Exploring ENVI

    Header files are always named with the same root name as the image data file but with a.hdrextension.Thus, in most cases, after a file has been read by ENVI, you end up with a pair of files for each image - the

    image file and the ENVI header file.

    When reading an image in its native format (for example, a TIFF file), ENVI only creates a header file in

    memory. However, if you add any more information to the file that cannot be stored in the imagesnative

    format (for example, adding band names to a TIFF image), ENVI creates a.hdrheader file.

    Required InformationThe Header Info dialog provides access to the editable fields in the ENVI header file. The fields that arerequired are shown in the main Header Info view. The required image descriptor fields are:

    Number of samples per band

    Number of lines per band

    Number of bands in the entire file

    Offset (in bytes) of embedded header data before the image data begins

    Data type (i.e., number of bytes per image pixel)

    Byte order (related to the type of operating system that wrote the data)

    File type (a list of ENVI categories; ordinary raster images are ENVI standard)

    Interleave (the storage format for multi-band images)

    The two remaining fields, xstartand ystart, are not technically required. These two values define the imagecoordinates to use for the first pixel in the image (i.e., the upper-left pixel). By default, the upper-left pixel isassigned a value of (1,1). Changing these values introduces an offset in the image coordinates reported by

    tools like the Cursor Value. However, it does not in any way change or subset the actual image data.

    Optional InformationThe header file can also contain a wealth of ancillary information about the image, ranging from a simple

    text description to detailed map projection information, band wavelengths, associated DEM file, and

  • 8/10/2019 Exploring ENVI 50 Manual

    37/195

    The ENVI Header File Raster Data Management

    Exploring ENVI 31

    instructions for how to display the image. All of the optional fields are accessed using the Edit Attributesdrop-down button.

    4. In the Header File dialog, click the Edit Attributesdrop-down button and examine the optionalfields available. Some fields are only appropriate for special file types so they are unavailable

    (grayed out).

    5. Select Wavelengths. The Edit Wavelength values dialog appears. If the wavelengths for the bandsdo not appear, then first click on Band 1, then in the text edit window that appears type in 0.485and

    hit the ENTER key.

    6. Band 2 will be selected now. For Band 2 type in a value of 0.560and hit the ENTER key.

    7. For Band 3 use a wavelength value of 0.660and for Band 4, a value of0.830.

    8. Click on the drop-down menu for Wavelength/FWHM Unitsand choose Micrometers. Then clickOK.

    9. In the Header File dialog, click the Edit Attributesdrop-down button and select the Map Infooption. The Edit Map Information dialog appears.

    The Map Information header field defines georeferencing information for the image by specifyingthe projection into which the image is geometrically corrected, as well as a reference pixel for which

    a map coordinate and pixel size are defined.

    The Map Information for the Florida QuickBird image was filled out automatically by ENVIscustom QuickBird reader when the image was opened.

    10.Click Cancelto return to the main Header Info dialog, then click OKagain to exit the Header Infodialog. The Data Manager and the Layer Manager will now show wavelength values. You may see

    the display update as well with this new header information.

    11.In the Layer Manager, right click on the Viewlisting and select Remove All Layers.

    About Header Values

    Data Types

    ENVI currently supports nine different IEEE data types, each defined in the table below. When defining the

    ENVI header for a new file that contains integer data, it is critical that you know the number of bytes perimage pixel and whether or not the integer is signed (can have negative values) or unsigned (only positivevalues)

    Table 1: ENVI Data Types

    ENVI Data Type Bytes-per-pixel Range of values

    Byte 1 0 to 255

    Integer (signed) 2 -32768 to +32767

    Unsigned integer 2 0 to 65535

    Long integer (signed) 4 Approx +/- 2 billion

    Unsigned long integer 4 Approx 0 to 4 billionFloating point 4 +/- 10

    Double precision 8 +/- 10

    Complex (floating point) 8 Real and imaginary are floats

    Complex (double precision) 16 Real and imaginary are doubles

    Interleave

    Interleaverefers to the storage order for data in a multi-band image. There are three different types of

  • 8/10/2019 Exploring ENVI 50 Manual

    38/195

    Raster Data Management The ENVI Header File

    32 Exploring ENVI

    interleaves: band sequential (BSQ); band interleaved by line (BIL); and band interleaved by pixel (BIP).Even though we often visualize a multi-band image as a cube, in the computers memory the entire image is

    really just a continuous stream of bytes. The interleave describes how this stream of bytes for the multi-bandimage are ordered in memory.

    For BSQ images, the stream of bytes runs through each full image band sequentially (from the upper-left

    pixel to the lower-right pixel), then begins again at the first pixel of the next band. Thus, the data for anygiven image band are next to each other in memory, allowing very fast access for extracting spatial data or

    displaying images. BIP images are stored in the opposite order, where each pixel spectrum is next to eachother in memory (i.e., each bands value for pixel 1, then each bands value for pixel 2, etc.). This

    arrangement allows very fast access to spectral data but relatively slow access to spatial data. BIL imagesuse a storage order that is a compromise between BSQ and BIP. In BIL images, the same line from each

    band is stored next to each other in memory (i.e., line 1 of all bands, then line 2 for all bands, etc.). See the

    figure on the next page for an illustration of the three interleaves.

    Byte Order

    DEC workstations and PCs read and write binary data in a slightly different manner than older Macintoshand UNIX operating systems. Because ENVI can run on all of these platforms, it is important to know

    which type of operating system wrote the image data that is being imported. The two byte orders are calledHost (Intel), which reads the least significant byte first (for the DEC workstations and PCs) and Network(IEEE), which reads the most significant byte first (UNIX and older Macintosh). If the file was created inENVI, then this header field is automatically set so that the file can be read into ENVI on any of itssupported platforms.

  • 8/10/2019 Exploring ENVI 50 Manual

    39/195

    The ENVI Header File Raster Data Management

    Exploring ENVI 33

    Exercise #2: Defining an ENVI HeaderIf the image does not have an ENVI header filethat is, if it has never been opened in ENVI before aheader file can be generated. After defining the required header information, ENVI writes the header file to

    disk and uses it whenever the file is read into ENVI in the future. Because the data for this exercise havebeen subset into a small scene, the original Landsat header information no longer applies and the customreaders cannot be used.

    1. From the ENVI Toolbox, expand Raster Management and double click on Edit ENVI Header.

    2. In the Edit Header Input File dialog, click on the Opentab and select New File. Then navigate to

    the envidata\boulderdirectory, select the bldr_tm.datfile, and clickOpen. After the file

    is opened, ENVI searches for a file called bldr_tm.hdr, the name the associated ENVI headerfile would have if it exists. If an ENVI header does not currently exist, an empty Header Info dialog

    appears.

    3. Given the following information about this image file, if the needed parameters are missing, typethem in.

    Note: Because ENVI is a cross-platform application, the Windows TABkey to move between fieldsis disabled. However, it is best to get into the habit of hitting the ENTERkey when filling in ENVIdialogs. In some cases, hitting the ENTERkey will move you from item to item as the tab does inWindows. Also, some ENVI dialogs wont recognize that you typed values in unless you hit theENTERkey.

  • 8/10/2019 Exploring ENVI 50 Manual

    40/195

    Raster Data Management The ENVI Header File

    34 Exploring ENVI

    Samples702

    Lines863

    Bands6

    Offset 0bytes

    File Type ENVI Standard

    Byte OrderHost (Intel)

    Data TypeFloating Point (i.e., 4-bytes per pixel)

    InterleaveBIP

    Band Names = Band 1, Band 2, Band 3, Band 4, Band 5, Band 7

    4. To enter the band names, click the Edit Attributesdrop-down button, and select Band Names.Make sure there is a Band 6 but no Band 7 in the list. If necessary you would click on Band 6andchange that to read Band 7, and hit the ENTER key. Click OK.

    5. Unlike the Florida QuickBird image, the Boulder TM image is not georeferenced. The image hasbeen geometrically corrected; however, the Map Info has not been entered into its ENVI header file.Click the Edit Attributesdrop-down button, and select Map Info. The Edit Map Information

    dialog appears.

    6. Use the pixel with an image coordinate of (526,645) for the reference pixel. In the Image Xfield,type 526. In the Image Yfield, type 645.

    7. The Boulder image is in a UTM projection, Zone 13 N. Click the Change Projbutton. Select UTMand type13in the Zonefield. Keep the datum at its default setting of North America 1927. ClickOKto set the new projection.

    8. Enter the following UTM map coordinate values for the reference pixels: in the E(easting) field,type 480168.67; in the N(northing) field, type 4427572.69.

    9. The Landsat TM image pixel size is 30 m. In both the X Pixel Sizeand Y Pixel Sizefields, type30.0.

    10.The Map Informationdialogis now complete. Click OKto return to the Header Info dialog.

  • 8/10/2019 Exploring ENVI 50 Manual

    41/195

    Managing Files Raster Data Management

    Exploring ENVI 35

    11.Next, you will define the wavelengths for the six bands. Click the Edit Attributesdrop-downbutton, and select Wavelengths. The Edit Wavelength values dialog appears.

    12.ENVI allows wavelength values to be read directly from an ASCII file (this is particularlyconvenient for hyperspectral data sets where you may have hundreds of bands). Click the Import

    ASCIIbutton, navigate to the envidata/boulderdirectory, select the twave6.ascfile, andclick Open. This file contains both the wavelengths for the six TM bands and also the full-width-half-maximum values (FWHM) for these bands.

    13.The Input ASCII File dialog appears. In the Wavelength Columnfield, type 1. In the FWHMColumnfield, type 2, then click OKto return to the Edit Wavelength Values dialog.

    If the ASCII file contained only wavelengths, you could leave the FWHM Column empty; it isconvenient to import it with the wavelengths if it is available.

    14.Click OK in the Edit Wavelength Values dialog then click OK in the Header Info dialog to acceptthe ENVI header file information. The image will now be displayed.

    15.Close the Edit Header Input File dialog.

    16.Ensure that the Boulder TM image listing in the Layer Manager now specifies band wavelengths.

    Managing FilesThere is no limit to the number of files that can be opened simultaneously in ENVI; therefore, you may findyourself with so many bands available that you cant find the one you are looking for. This problem can becompounded when working with hyperspectral images, which can add hundreds of entries into the Data

    Manager.

  • 8/10/2019 Exploring ENVI 50 Manual

    42/195

    Raster Data Management Skills Check

    36 Exploring ENVI

    Exercise #3: Additional File Management Tools

    Folding Images

    When several multi-band images have been opened, the Data Manager List can become quite crowded. Onesolution for this problem is to temporarily collapse all of the bands in a multi-band file into a single entry in

    the list.1. Open the Data Manager by clicking on its icon just to the right of the Open folder icon. At the top of

    the Data Manager are plus (+) and minus (-) icons. To collapse the bands so that only the filename

    is listed, click on the Collapse All(-) icon. The individual bands are no longer displayed.

    2. To expand all files, click on the Expand All(+) icon.

    3. You can collapse or expand individual files by click on the or icons next to each file listing ineither the Data Manager or the Layer Manager.

    4. Close the Data Manager.

    5. Collapse and expand the listings in the Layer Manager by clicking on the Collapse All and

    Expand All icons at the top of the Layer Manager.

    6. When you are finished with this exercise, right-click on bldr_tm.datin the Layer Manager, andselect Remove.

    Skills CheckAt this point you should:

    Know how to open specific file formats in ENVI

    Know how to edit ENVI headers

    Self Test

    1. What are the items in the header file that ENVI needs to know in order to display an image?2. How can you collapse and expand file listings in the Data Manager?

    3. What information is contained in an ENVI header file?

  • 8/10/2019 Exploring ENVI 50 Manual

    43/195

    Exploring ENVI 37

    Chapter 3:

    Image Display Concepts

    Learning Objectives..................................................................................................................38Prerequisites ............................................................................................................................38Required Tools for Completing This Module .............................................................................38

    Associated Data.......................................................................................................................38Stretching Image Data ..............................................................................................................38Color Tables .............................................................................................................................42Raster Color Slices ..................................................................................................................44Skills Check .............................................................................................................................48

    Self Test ...................................................................................................................................48

  • 8/10/2019 Exploring ENVI 50 Manual

    44/195

    Image Display Concepts Learning Objectives

    38 Exploring ENVI

    Learning ObjectivesIn this chapter you will learn how to:

    Control the contrast stretch of an image

    How to apply color to gray scale images

    The difference between color tables and raster value ranges

    PrerequisitesFor this chapter it helps to have a basic understanding of remote sensing.

    Required Tools for Completing This Module ENVI 5.0

    Associated Data

    SEcoast.datAVHRR data from the NOAA-16 satellite over the southeastern United States.The data set contains four bands of AVHRR data with a pixel size of 1100 m. The image wasobtained in September, 2001

    Grnland - AVHRR data from Greenland.

    Stretching Image DataWhy are image data contrast stretched when making a display?

    The pixels in a data file that make up an image can have any value - negative, positive, integer, or floatingpoint. When the image data are projected on screen, they are displayed as brightness values for each screen

    pixel. A data pixel with a larger value is brighter than one with a smaller value. However, unlike the imagedata, screen pixels can only have 256 unique brightness values, varying as integers between 0 and 255

    (where 0 is black and 255 is white). Clearly this limitation prevents the most of the data from beingdisplayed with brightness exactly equal to their real value. For example, how do you display a negative datavalue or floating point data ranging from 0 to 1?

    Stretching the imag