ENVI_Ejercicios

Embed Size (px)

Citation preview

  • 8/18/2019 ENVI_Ejercicios

    1/149

     

    Curso: Introducción a la Teledetección yProcesamiento Digital de Imágenes util izando ENVI

     

    Unidad Nº 1 

     Av. Javier Prado Este N° 1224 2do Piso www.telematica.com.(51-1) 476-1599 [email protected].(51-1) 476-1574

  • 8/18/2019 ENVI_Ejercicios

    2/149

     

    ENVI Tutorial:

    Introduction to ENVI

    Table of Contents

    O VERVIEW OF THIS TUTORIAL.....................................................................................................................................1 GETTING STARTED WITH ENVI....................................................................................................................................1 

    S tarting ENVI....................................................................................................................................................1  Starting ENVI on Windows Machines.....................................................................................................................................1 Starting ENVI in UNIX ..........................................................................................................................................................1 

    Starting ENVI on Macintosh Machines...................................................................................................................................1 

    L oading a Grayscale Image................................................................................................................................1  Opening an Image File.........................................................................................................................................................1 The Available Bands List ......................................................................................................................................................1

     

    ENVI FILE FORMATS ................................................................................................................................................2 E xploring the ENVI Heade r File...........................................................................................................................2  

    ENVI WINDOWS AND DISPLAYS...................................................................................................................................3 T he ENVI Main Menu Bar ...................................................................................................................................3  T he Display Group.............................................................................................................................................3  

    The Image Window .............................................................................................................................................................4 The Scroll Window...............................................................................................................................................................5 The Zoom Window ..............................................................................................................................................................5 

    T he Mouse Button Descriptions Dialog ................................................................................................................6  

    B ASIC ENVI FUNCTIONS............................................................................................................................................6 Displaying the Cursor Location and Value............................................................................................................6  

    Displaying Image Profiles...................................................................................................................................7  P erforming Quick Contrast Stretching..................................................................................................................7  Displaying Interactive Scatter Plots.....................................................................................................................7  

    L oading a Color Image.......................................................................................................................................8  L inking Two Displays .........................................................................................................................................8  

    Dynamic Overlays ................................................................................................................................................................8 

    S electing Regions of Interest..............................................................................................................................9   A nnotating the Image......................................................................................................................................10   A dding Grid Lines............................................................................................................................................11  S aving and Outputting an Image...................................................................................................................... 11 

     

    E xiting ENVI ................................................................................................................................................... 12  

  • 8/18/2019 ENVI_Ejercicios

    3/149

      Tutorial: Introduction to ENVI

    Overview of This TutorialThis tutorial is designed to introduce you to the basic concepts of the ENVI software and some of its key features. Itassumes that you are already familiar with general image-processing concepts.

    In order to run this tutorial, you must have ENVI installed on your computer.

    Files Used in This TutorialENVI Resource DVD: envi dat a\ can_t m

     File Descriptioncan_ t mr . i mg Cañon City, CO, TM Datacan_t mr . hdr ENVI Header for Above

    Getting Started with ENVI

    Starting ENVIBefore attempting to start the program, ensure that ENVI is properly installed as described in the Installation Guide that

    shipped with your software.

    Starting ENVI on Windows Machines

    •  Select Start Programs ENVI  x.x    ENVI.(where x.x  is the version number)

    Starting ENVI in UNIX

    •  For ENVI, enter envi_rt at the UNIX command line.

    •  For ENVI+IDL, enter envi at the UNIX command line.

    Starting ENVI on Macintosh Machines

    1.  Display an OSX, UNIX X-window.2.  Do either of the following:

    •  For ENVI, type envi_rt at the UNIX command prompt.

    •  For ENVI +IDL, type envi at the UNIX command prompt.

    Loading a Gray Scale ImageOpen a multispectral Landsat Thematic Mapper (TM) data file representing Cañon City,Colorado, USA.

    Opening an Image File

    1.  From the ENVI main menu bar, select File Open Image File.

    2.  Navigate to the envi dat a\ can_t mdirectory, select the file can_ t mr . i mg 

    from the list, and click Open.

    The Available Bands ListENVI provides access to both image files and to the individual spectral bands in thesefiles. The Available Bands List is a special ENVI dialog containing a list of all the aimage bands in all open files, as well as any associated map information. You can usethe Available Bands List to load both color and gray scale images into a display.

    vailable

    The File menu at the top of the Available Bands List dialog provides access to fileopening and closing, file information, and canceling the Available Bands List. The Options menu provides a way to findthe band closest to a specific wavelength, shows the currently displayed bands, allows toggling between full andshortened band names in the list, and provides the capability to fold all of the bands in a single open image into just the

    1

    ENVI Tutorial: Introduction to ENVI

  • 8/18/2019 ENVI_Ejercicios

    4/149

      Tutorial: Introduction to ENVI

    image name. Folding and unfolding the bands into single image names or lists of bands can also be accomplished byclicking on the + (plus) or – (minus) symbols to the left of the filename in the Available Bands List.Right-clicking in the Available Bands List displays a menu with access to different functions. The right-click menuselections will differ depending on what item is currently selected in the Available Bands List.

    1.  Select TM Band 4. The band you have chosen is displayed in the field marked Selected Band .

    2.  Click the Gray Scale radio button then click  Load Band to load the image into a new display. Band 4 will beloaded as a gray scale image.

    ENVI File FormatsENVI uses a generalized raster data format consisting of a simple flat-binary file and a small associated ASCII (text)header file. This file format permits ENVI to use nearly any image file, including those that contain their own embeddedheader information. ENVI also supports a variety of data types: byte, integer, unsigned integer, long integer, unsignedlong integer, floating-point, double-precision floating-point, complex, double-precision complex, 64-bit integer, andunsigned 64-bit integer.

    Generalized raster data are stored as a binary stream of bytes in either Band Sequential (BSQ), Band Interleaved byPixel (BIP), or Band Interleaved by Line (BIL) format.

      BSQ is the simplest format, with each line of data followed immediately by the next line of the same spectralband. BSQ format is optimal for spatial (x,y) access to any part of a single spectral band.

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

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

    Exploring the ENVI Header FileThe separate text header file provides information to ENVI about the dimensions of the image, any embedded headerthat may be present, the data format, and other pertinent information. The header file is normally created (sometimeswith your input) the first time a particular data file is read by ENVI. It can also be created outside of ENVI using a texteditor.

    1.  From the ENVI main menu bar, select File Edit ENVI Header.

    2.  Click once on can_ t mr . i mg to view the ENVI header file for this image.

    3.  Click the Cancel button to close the header file.

    4.  Right-click on an image name in the Available Bands List and select Edit Header as an alternate way to view theENVI header file. Close the header file.

    2

    ENVI Tutorial: Introduction to ENVI

  • 8/18/2019 ENVI_Ejercicios

    5/149

      Tutorial: Introduction to ENVI

    ENVI Windows and Displays

    The ENVI Main Menu BarIn ENVI, activities are initiated by using the menus in the ENVI main menu bar, which may be oriented horizontally asshown below, or vertically (as set via the option on the File Preferences Miscellaneous tab).

    The Display Group As you work with ENVI, a group of windows will appear on your screen allowing you to manipulate and analyze yourimage. This group of windows is collectively referred to as the “display group” and the default setup consists of an Imagewindow, a Scroll window, and a Zoom window.

    Image window

    Zoom WindowScroll Window

     You can choose which combinations of windows appear on the screen by right-clicking on any image window to displaythe right-click menu and selecting a style from the Display Window Style submenu. Use the ENVI main menu barFile Preferences Display Defaults tab to change the default settings for which windows you wish to display andwhere you wish to position them.

     You may have many display groups open on the screen at any time. A wide variety of other types of ENVI windows may

    also be displayed, such as scatter plots, spectral profiles, spectral plots, and vector windows.

     All windows can be resized by grabbing and dragging a window corner with the left mouse button.

    1.  Resize the Image window to be as large as possible (until the Scroll window disappears).

    2.  Now, make the Image window smaller than the full extent of the image data (the Scroll window will reappear).

    3.  Resize the Zoom window and notice how the outlining box changes in the Image window.

    3

    ENVI Tutorial: Introduction to ENVI

  • 8/18/2019 ENVI_Ejercicios

    6/149

      Tutorial: Introduction to ENVI

    The Image Window

    The Image window shows a portion of the image at full resolution.

    Display Group Menu Bar

    Zoom Box

    The Display group menu bar provides access to many ENVI features related to the images in the display group. By

    default, it appears at the top of the Image window. If you have chosen to display only the Scroll and Zoom windows or just the Zoom window, the menu bar will appear at the top of the Zoom window.

    The Zoom box (the colored box in the Image window) indicates the region that is displayed in the Zoom window.

    1.  Place the mouse cursor in the Zoom box in the Image window, hold down the left mouse button, and move themouse. The Zoom window is updated automatically when the mouse button is released.

    2.  Place the cursor anywhere in the Image window (outside of the Zoom box) and click the left mouse button tomove the magnified area instantly. If you click, hold, and drag the left mouse button in this fashion, the Zoomwindow is updated as you drag.

    3.  Click once in the Zoom box in the Image window and use the arrow keys on your keyboard to move the box. Tomove several pixels at a time, hold down the Shift key while using the arrow keys.

     You can choose to have scroll bars displayed in the Image window. These scroll bars provide a way to move through theScroll window, allowing you to select which portion of the image appears in the Image window.

    1.  Right-click in the Image window and select Toggle Display Scroll Bars.

    2.  To have scroll bars appear in the Image window by default, use the ENVI main menu bar to select the FilePreferences Display Defaults tab. Set the Image Window Scroll Bars toggle to Yes.

    4

    ENVI Tutorial: Introduction to ENVI

  • 8/18/2019 ENVI_Ejercicios

    7/149

      Tutorial: Introduction to ENVI

    The Scroll Window

    The Scroll window displays the entire image at reduced resolution (subsampled). The subsampling factor is listed inparentheses in the window Title Bar at the top of the image. The highlighted Image box (red by default) indicates thearea shown at full resolution in the Image window.

    Subsampling Factor

    Image Box

    1.  Place the mouse cursor inside the Image box, hold down the left mouse button, drag to the desired location, andrelease to reposition the portion of the image shown in the Image window. The Image window is updatedautomatically when the mouse button is released.

    2.  Click anywhere within the Scroll window using the left mouse button to instantly move the selected Imagewindow area. If you click, hold, and drag the left mouse button in this fashion, the Image window will be updatedas you drag (the speed depends on your computer resources).

    3.  Click in the Image box and press the arrow keys on your keyboard. To move the image in larger increments, holddown the Shift key while using the arrow keys.

    The Zoom Window

    The Zoom window shows a portion of the image magnified the number of times indicated by the number shown inparentheses in the Title Bar of the window. The zoom area is indicated by a highlighted box (the Zoom box) in the Imagewindow.

    Zoom Level

    Zoom controls

    There are three Zoom controls (red by default) in the lower left corner of the Zoom window. These control the zoomfactor and the crosshair cursor in both the Zoom and Image windows.

    1.  Place the mouse cursor in the Zoom window and click the left mouse button to reposition the magnified area(displayed in the Zoom box in the Image window) by centering the zoomed area on the selected pixel.

    2.  Click and hold the left mouse button in the Zoom window while dragging. This causes the Zoom window to panwithin the Image window.

    5

    ENVI Tutorial: Introduction to ENVI

  • 8/18/2019 ENVI_Ejercicios

    8/149

      Tutorial: Introduction to ENVI

    3.  Click the left mouse button on the  graphic in the lower left corner of the Zoom window to zoom out by a factorof 1.

    4.  Using a three button mouse, click the middle mouse button on the graphic to zoom out by a factor of 2.

    5.  Click the right mouse button on the graphic to return the Zoom window to the default zoom factor.

    6.  Click the left mouse button on the graphic to zoom in by a factor of 1.

    7. 

    Click the middle mouse button on the graphic to zoom in by a factor of 2.8.  Click the right mouse button on the graphic to return the Zoom window to the default zoom factor.

    9.  Click the left mouse button on the graphic to toggle the crosshair cursor in the Zoom window on or off.

    10. Click the middle mouse button on the graphic to toggle the crosshair cursor in the Image window on or off.

    11. Click the right mouse button on the graphic to toggle the Zoom box in the Image window on or off.

    12. The Zoom window can also have optional scroll bars, which provide an alternate method for moving through theZoom window. Right-click in the Zoom window and select Toggle Zoom Scroll Bars. To have scroll barsappear on the Zoom window by default, use the ENVI main menu bar to select the File PreferencesDisplay Defaults tab. Set the Zoom window Scroll Bars toggle to Yes.

    The Mouse Button Descriptions DialogENVI has many interactive functions, and the mouse button combinations and actions are different for each one. TheMouse Button Descriptions dialog is available to assist you in understanding what the mouse buttons do in each graphicswindow. Start the Mouse Button Descriptions dialog by performing either of these methods:

    •  From the Display group menu bar, select Window Mouse Button Descriptions.

    •  From the ENVI main menu bar, select Window Mouse Button Descriptions and place your cursor over theImage window.

    When the Mouse Button Descriptions dialog is open, the mouse button assignments for each ENVI display or graphicswindow are shown in the dialog when the cursor is poised over a display group window. In the dialog, MB1 is the leftmouse button, MB2 is the middle mouse button, and MB3 is the right mouse button.

    Basic ENVI FunctionsThis section of the tutorial takes you on a step-by-step tour of ENVI’s basic functions.

    Displaying the Cursor Location and Value You can choose to display the location of your mouse cursor, screen value (RGB color), and the actual data value of thepixel underneath the crosshair cursor using the Cursor Location/Value dialog. When several display groups are open, thisdialog specifies which display group’s location and value are being reported.

    1.  To display the cursor location and value, select Window Cursor Location/Value from either the ENVI mainmenu bar or the Display group menu bar. You can also right-click in the Image window and select CursorLocation/Value.

    2.  Move the mouse cursor over the Image, Scroll, or Zoom windows to display location and value information in theCursor Location/Value dialog.

    3.  Double-click in the Image window to hide the Cursor Location/Value dialog. Double-click again to show theCursor Location/Value dialog.

    4.  From the Cursor Location/Value menu bar, select File Cancel to close the dialog.

    6

    ENVI Tutorial: Introduction to ENVI

  • 8/18/2019 ENVI_Ejercicios

    9/149

      Tutorial: Introduction to ENVI

    Displaying Image ProfilesX (horizontal), Y (vertical), and Z (spectral) profile plots can be selected and displayed interactively. These profiles showthe data values across an image line (X), column (Y), or spectral bands (Z). To display these profiles, perform thefollowing steps.

    1.  From the Display group menu bar, select Tools Profiles X Profile to display a window plotting data valuesversus sample number for a selected line in the image.

    2.  From the Display group menu bar, select Tools Profiles Y Profile to display a plot of data value versusline number.

    3.  From the Display group menu bar, select Tools Profiles Z Profile to display a spectral plot. You can alsoopen a Z profile from the right-click menu in any Image window.

    4.  From the Display group menu bar, select Window Mouse Button Descriptions to view the descriptions ofthe mouse button actions in the Profile displays.

    5.   A red crosshair extends to the top and bottom and to the sides of the Image window. The red lines indicate theline or sample locations for the vertical or horizontal profiles. Move the crosshair around the image (just as youmove the Zoom box) to see the three image profile plots update to display data on the new location.

    6.  Close the profile plots by selecting File Cancel from the menu bar within each window.

    Performing Quick Contrast Stretching You can perform quick contrast stretches using default parameters and data from either the Image window, the Zoomwindow, or the Scroll window.

    1.  From the Display group menu bar, select Enhance and apply various contrast stretches (Linear, Linear 0-255,Linear 2%, Gaussian, Equalization, and Square Root).

    2.  Compare the effects of the various stretches on the display group.

    Displaying Interactive Scatter Plots You can plot the data values of two selected image bands versus

    each other in a scatter plot to graphically display the overlappingvalues.

    1.  From the Display group menu bar, select Tools 2DScatter Plots. The Scatter Plot Band Choice dialogappears, allowing you to choose the two image bands tocompare.

    2.  Select one band for the x axis and another band for the yaxis and click OK . It may take a few seconds for ENVI toextract and tabulate the data values.

    3.  Once the scatter plot has appeared (see image right),position the mouse cursor anywhere in the Image window

    and drag with the left mouse button pressed. Pixel valuescontained in a ten-pixel by ten-pixel box surrounding thecrosshair will be highlighted in red on the scatter plot.

    4.  From the Display group menu bar, select WindowMouse Button Descriptions to display the functions ofthe different mouse button actions when applied in theScatter Plot display.

    5.  Click and drag the cursor around in the Image window to observe the dancing pixels effect.

    7

    ENVI Tutorial: Introduction to ENVI

  • 8/18/2019 ENVI_Ejercicios

    10/149

      Tutorial: Introduction to ENVI

     You can also use the scatter plot to highlight specific data values in the Image window.

    1.  Place the mouse cursor in the Scatter Plot window and click and drag with the middle mouse button. Pixel valuescontained in a ten-pixel by ten-pixel box surrounding the crosshair will be highlighted in red on the scatter plotPixels with the values contained in the box are highlighted in the Image window and appear to dance.

    2.  From the Scatter Plot menu bar, select File Cancel to close the Scatter Plot window.

    Loading a Color ImagePreviously, you opened and were working with Band 4 of can_ t mr . i mg. You opened that image using the Gray Scale option. Now you will openthree bands of the image using the RGB Color option.

    1.  If the Available Bands List dialog is not displayed, select Window Available Bands List from the ENVI main menu bar.

    2.  Click the RGB Color radio button, then select TM Band 1 undercan_tmr.img. The band you have chosen is displayed in the fieldmarked R .

    3.  Select TM Band 2. The band you have chosen is displayed in thefield marked G .

    4.  Select TM Band 5. The band you have chosen is displayed in thefield marked B .

    5.  Click Display #1 and select New Display.

    6.  Click  Load RGB to load the image into a new display.

    Linking Two DisplaysLink the two displays together for comparison. When you link two displays,any action you perform on one display (scrolling, zooming, etc.) is echoed inthe linked display. To link the two displays on your screen, do the following.

    1.  From the Display group menu bar, select Tools Link LinkDisplays. You can also right-click in the Image window and selectLink Displays.

    2.  Click OK  in the Link Displays dialog to establish the link.

    3.  Scroll and zoom in one display group and observe as your changes are mirrored in the second display.

    Dynamic Overlays

    ENVI’s multiple dynamic overlay feature allows you to dynamically superimpose parts of one or more linked images ontoanother image. Dynamic overlays are turned on automatically when you link two displays, and may appear in either theImage window or the Zoom window.

    1.  Click the left mouse button in one of the Image windows to see the image displays overlaid on one another.

    2.  To create a smaller overlay area, position the mouse cursor anywhere in either Image window (or 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.  Click the left mouse button in the Image window and drag the small overlay window around the image to see the

    overlay effects.

    4.  Resize the overlay area at by clicking and dragging the middle mouse button until the overlay area is the desiredsize.

    8

    ENVI Tutorial: Introduction to ENVI

  • 8/18/2019 ENVI_Ejercicios

    11/149

      Tutorial: Introduction to ENVI

    Selecting Regions of InterestENVI lets you define regions of interest (ROIs) in your images. ROIs are typically used to extract statistics forclassification, masking, and other operations.

    1.  From the Display group menu bar, select Overlay Region of Interest, or right-click in the Image windowand select ROI Tool.

    2.  Draw a polygon that represents the region of interest by clicking the left mouse button in the Image window toestablish the first point of the ROI polygon, then selecting further border points in sequence by clicking the leftbutton again. Close the polygon by clicking the right mouse button, then accept the polygon by clicking the rightmouse button again. The middle mouse button deletes the most recent point, or (if you have closed the polygon)the entire polygon.

    ROIs can also be defined in the Zoom and Scroll windows by selecting the appropriate window radio button in theROI Tool dialog.

    When you have finished defining an ROI, it is shownin the dialog table, with the name, region color,number of pixels enclosed, and other ROI properties.

    ROIs can also be defined as polylines or as a

    collection of individual pixels by selecting the desiredROI type from the ROI_Type pull-down menu in theROI Tool.

    3.  Click the New Region button.

    4.  Select an ROI by clicking in a cell of the far leftcolumn of the ROI Tool table. An ROI is selectedwhen its entire row is highlighted. An asterisk next tothe row also signifies the currently active ROI.Multiple ROIs can be selected by using Shift-click orCtrl-click. All the ROIs can be selected by clicking theSelect All button. Click and type to edit the valuesin the cells of the ROI Tool table. Change the name

    for the region and select a new color.

    5.  Hide ROIs by selecting them in the table and clickingthe Hide ROIs button. Use the Show ROIs buttonto re-display these hidden ROIs.

    6.  Go to an ROI in the ENVI display by selecting it and clicking the Goto button.

    7.   View the statistics for one or more ROIs by selecting them in the table and clicking the Stats button.

    8.  Grow an ROI to its neighboring pixels within a specified threshold by selecting it and clicking the Grow button.

    9.  Pixelate polygon and polyline ROIs by selecting them in the table and clicking the Pixel button. Pixelated objectsbecome a collection of editable points.

    10. Delete ROIs by selecting them in the table and clicking the Delete button.

    The ROI Tool table also allows you to view and edit various ROI properties, such as name, color, and fill pattern.Menu options available at the top of the ROI Tool dialog let you perform other various tasks, such as calculateROI means, save your ROI definitions, and load saved definitions. ROI definitions are retained in memory afterthe ROI Tool dialog is closed, unless you explicitly delete them. ROIs are available to other ENVI functions evenif they are not displayed.

    11. Close the ROI Tool using the menu at the top of the table, select File Cancel.

    9

    ENVI Tutorial: Introduction to ENVI

  • 8/18/2019 ENVI_Ejercicios

    12/149

      Tutorial: Introduction to ENVI

     Annotating the ImageENVI’s flexible annotation features allow you to add text, polygons, color bars, and other symbols to your plots andimages.

    The Annotation Text dialog allows you to choose from a varietyof annotation types. Different types are selected from the

    Object menu and include Text, Symbols, Rectangles, Ellipses,Polygons, Polylines, Arrows, Map Scale Bars and DeclinationDiagrams, Map Keys, Color Table Ramps, and Images. Bydefault, the Annotation dialog starts up with Text selected. Otherfields in the dialog let you control the size, color, placement, andangle of the annotation text. When you select differentannotation types from the Object menu, the fields in the dialogchange to display options appropriate to the new type.

    1.  From the Display group menu bar, select Overlay Annotation.

    2.  Type some text in the text field of the Annotation Textdialog.

    3.  Select a font, font size, and color using the fieldsprovided in the dialog, then position the mouse pointerin the Image window and click the left mouse button. Your text is displayed in the window at the point youclicked.

    Remember, you can view the mouse button descriptionsusing the Display group menu bar Window Mouse Button Descriptions option.

    4.  Using the left mouse button, drag the handle (displayed in the image below as a diamond shape to the left,bottom of the text) to position the text in the window.

    5.   You can continue to change the annotation’s properties and position by changing the fields in the dialog box ordragging the text or symbol while holding down the left mouse button. When you are satisfied with theannotation, click the right mouse button to fix the annotation in position.

    6.   You can save your image annotation by selecting File Save Annotation from the Annotation Text dialogmenu bar. If you do not save your annotation in a file, it will be lost when you close the Annotation Text dialog(you will be prompted to save the annotation if you close without first saving). You can also restore savedannotation files by selecting File Restore Annotation from the Annotation Text dialog menu bar.

    10

    ENVI Tutorial: Introduction to ENVI

  • 8/18/2019 ENVI_Ejercicios

    13/149

  • 8/18/2019 ENVI_Ejercicios

    14/149

      Tutorial: Introduction to ENVI

    2.  Select 24-Bit Color or 8-bit (gray scale) output.

    3.  Click the Change Graphic Overlay Selections button to select graphics options (including annotation andgridlines)

    4.  Set border options.

    5.  Select output to Memory or File using the desired radio button. If output to File is selected, enter an outputfilename.

    6.  If you select other graphics file formats from the Output File Type drop-down which, by default is set to ENVI,your choices will be slightly different.

    7.  Click OK  to save the image. This process saves the current display values for the image, not the actual datavalues.

    Exiting ENVIEnd the ENVI session by selecting File Exit from the ENVI main menu, then click OK  to terminate ENVI whenprompted.

    12

    ENVI Tutorial: Introduction to ENVI

  • 8/18/2019 ENVI_Ejercicios

    15/149

     

    ENVI Tutorial:Working with ENVI Zoom

    Table of ContentsO VERVIEW OF THIS TUTORIAL.....................................................................................................................................2 

    Files Used in This Tutorial ..................................................................................................................................2  STARTING ENVI ZOOM..............................................................................................................................................2 SETTING PREFERENCES..............................................................................................................................................2 OPENING AND DISPLAYING AN IMAGE ............................................................................................................................2 WORKING WITH THE D ATA M ANAGER ............................................................................................................................3 WORKING WITH L AYERS.............................................................................................................................................3 

    Reordering Layers .............................................................................................................................................3  

    Hiding Layers....................................................................................................................................................4  EXPLORING THE ENVI ZOOM INTERFACE ........................................................................................................................4 

    USING DISPLAY TOOLS ..............................................................................................................................................5 WORKING WITH THE O VERVIEW WINDOW ......................................................................................................................5 PERFORMING RX  A NOMALY DETECTION..........................................................................................................................6 WORKING WITH A PORTAL..........................................................................................................................................7 

    Pinning the Portal to the Image..........................................................................................................................7  Working with Blend, Flicker, and Swipe ...............................................................................................................8  

    Blending .............................................................................................................................................................................8 Flickering ............................................................................................................................................................................8 Swiping...............................................................................................................................................................................8 

    CHIPPING AND S AVING ..............................................................................................................................................9 R ESETTING PREFERENCES AND CLOSING ENVI ZOOM.........................................................................................................9 

  • 8/18/2019 ENVI_Ejercicios

    16/149

      Tutorial: Working with ENVI Zoom

    2

    ENVI Tutorial: Working with ENVI Zoom

    Overview of This TutorialIn this tutorial, you will use ENVI Zoom to display a hyperspectral image of Jasper Ridge, California, and enhance, zoom,pan, and rotate the image. You will perform RX anomaly detection on the scene to identify anomalous spectral targets. You will create a Portal over a target of interest and compare it to the original scene using blend, flicker, and swipe tools.Finally, you will use Chip from Display to take a screen capture of the image and save it to JPEG format.

    Files Used in This TutorialENVI Tutorial Data DVD: envi dat a\ j sp99hym

     

    File Description j sp99hym. ef f HyMap apparent reflectance data, Jasper Ridge, California, USA

    1999 HyMap data of Jasper Ridge, California, used for the tutorial are copyright 1999 Analytical Imaging and Geophysics(AIG) and HyVista Corporation (All Rights Reserved), and may not be redistributed without explicit permission from AIG([email protected]).

    Starting ENVI Zoom•  Windows: Select Start  Programs  ENVI  x.x    ENVI Zoom.

    •  UNIX: Type envi zoomat the UNIX command line.

    Setting PreferencesBy default when you open a file, ENVI Zoom attempts to automatically display a true color or gray scale image based onyour file type. For this tutorial, you will change this preference and display the Data Manager.

    1.  From the menu bar, select File  Preferences. The ENVI Zoom Preferences dialog appears.

    2.  On the left side of the dialog, select Data Manager.

    3.  On the right side of the dialog, double click the Auto Display Method for Multispectral Files field and selectCIR  (color infrared). This will cause image files to be displayed as color infrared by default.

    4.  Double-click the Launch Data Manager After File/Open field, and select Always. This will change thepreference and allow the Data Manager to be viewed every time a file is opened.

    5.  Ensure the following settings are selected:

    •   Auto Display Files On Open = True 

    •  Clear Display When Loading New Data = False •  Close Data Manager After Loading New Data = False.

    6.  Click OK  in the ENVI Zoom Preferences dialog to save these preferences.

    Opening and Displaying an Image1.  Click the Open button on the toolbar. The Open dialog appears.

    2.  Navigate to envi dat a\ j sp99hymand open j sp99hym. ef f . Because of the preferences you set in the

    previous step, the image is automatically displayed as color-infrared (CIR) and the Data Manager is displayed.

  • 8/18/2019 ENVI_Ejercicios

    17/149

      Tutorial: Working with ENVI Zoom

    3

    ENVI Tutorial: Working with ENVI Zoom

    Working with the Data ManagerThe Data Manager lists the files that you have opened and makes them accessible to load into your display. When youopen a file in ENVI Zoom, a new item is added to the top of the Data Manager tree. You can open multiple files in oneENVI Zoom session, and you can choose which of those files to display and how to display them using the Data Manager.

    1.  When you click on band names in the Data Manager,color gun assignments automatically cycle through red,

    green, then blue (in that order). Experiment withselecting different band combinations. Click the bandname you want to assign to red. A red box appearsnext to the band name.

    2.  Repeat for the green and blue bands.

    If one band is assigned multiple colors, a split box

    appears next to the band name, showing the colors.

     You must click Load Data each time to see the newband combination.

    3.   You originally had a CIR image loaded into the Imagewindow. In the Data Manager, right-click on the

    filename (jsp99hym.eff) and select Load TrueColor. ENVI Zoom determines the proper bands to loada true-color image into the Image window.

    4.  Click the Tip: Working with the Data Manager linkat the bottom of the Data Manager. You will find quickaccess to helpful tips throughout ENVI Zoom. Thesetips provide links to the ENVI Zoom Help, which is alsoaccessible via the Help toolbar button or Help menu.

    5.  Close the ENVI Zoom Help (use the X  at the top right ofthe dialog window).

    6.  Explore the toolbar buttons on the Data Manager. From the Data Manager toolbar, you can open new files,

    expand and collapse files, close files, and “pin” the Data Manager to keep it on the screen or “unpin” it to have itautomatically close when you load a file into the display.

    7.  Close the Data Manager (use the X  on the top right of the dialog window).

    Working with Layers You can load multiple layers into ENVI Zoom at one time and manage those layers using the Layer Manager. In the lastexercise, you created separate true color and color infrared layers for the same file. Both are displayed in the LayerManager.

    Reordering Layers You can control the order of layers in the Image and Overview windows by

    dragging and dropping layers in the Layer Manager tree or by using menuoptions (which you will use in a later exercise).

    1.  Click and drag Raster1: jsp99hym.eff  in the Layer Manager aboveRaster 2: jsp99hym.eff .

  • 8/18/2019 ENVI_Ejercicios

    18/149

      Tutorial: Working with ENVI Zoom

    4

    ENVI Tutorial: Working with ENVI Zoom

    Hiding Layers

    By default, all layers in the Layer Manager are displayed in the Image window. You can temporarily hide the display of alayer so that you can work with other layers in the Image window.

    1.  Right-click on Raster1: jsp99hym.eff  in the Layer Manager, and disable the Show option to turn the display ofthat layer off in the Image window.

    2.  Right-click on a Raster1: jsp99hym.eff  again and enable the Show option to turn the display of that layer

    back on.

    Exploring the ENVI Zoom Interface

    The ENVI Zoom interface includes a menu bar, toolbars, category bars, and a Status bar. Much of the ENVI Zoominterface is customizable and provides options to make use of multiple monitors.

    1.  Detach the Layer Manager category by clicking the Detach button to the right of the Layer Manager category bar(see image above).

    2.  Reattach the Layer Manager category by clicking the X  on the top right of the Layer Manager dialog window.

    3.  Collapse the entire category panel by clicking on the collapse bar to the right of the categories (see imageabove). This allows you to view a larger Image window. Now, expand the categories by clicking again on thesame bar (to the left of the Image window).

    4.  Collapse the Cursor Value category by clicking the arrow to the left of the Cursor Value category bar (see imageabove). Now, expand the Cursor Value category by clicking again on the same arrow.

    Menu bar

    Toolbars

    Category bars

    Status bar

    Process Manager

    STEP 1

    STEP 3

    STEP 4

  • 8/18/2019 ENVI_Ejercicios

    19/149

      Tutorial: Working with ENVI Zoom

    5

    ENVI Tutorial: Working with ENVI Zoom

    Using Display Tools

    1.  Click the Zoom button then click and drag your cursor to draw a rubber-band box around a vegetated areanear the center of the image. This will zoom to that area in the Image window.

    2.  Click the Pan button then click and drag your cursor in the Image window to pan in the direction of themouse. You can also use the middle mouse button to perform a pan.

    3.  Click the Fly button then click and hold to continuously drift in the direction of the cursor. Moving furtherfrom the center (closer to any side) causes the drift to increase in speed.

    4.  Click the Crosshairs button . A set of red crosshairs appears in the Image window. You can click-and-dragthe crosshairs to move them anywhere in the image. The Cursor Value category lists the pixel coordinates of thepixel directly underneath the center of the crosshairs. (You may want to use the Zoom tools to zoom in toindividual pixels.)

    5.  In the field labeled Go To, type the pixel coordinates 240,500 and press the Enter key. The crosshairs jump tothat location in the image, and the Image window centers over that location. If you were working with ageoreferenced file, you could enter map coordinates or latitude/longitude coordinates in the Go To field.

    6.  Click the Rotate button then click and drag the cursor in a clockwise or counter-clockwise direction to rotatethe image. The Rotate To drop-down list on the toolbar interactively reports the current degree of rotation.

    7.  Click the Select button to exit the Rotate tool.

    8.  Click the Rotate To drop-down list on the toolbar and select 0°.

    9.  Experiment with the Brightness, Contrast, Sharpen, and Transparency sliders.•  Click on the slider bar to the right or left of the indicator or click the slider

    then use the Page Up or Page Down keys to move the slider up or down incrementally by ten percent.•  Click on the icons to the right or left of the slider bar or click the slider then use the arrow keys on the

    keyboard to move the slider up or down incrementally by one unit.

    •  Click the slider then use the Home key on the keyboard to move the slider to 100 and the End key to move

    the slider to 0.

    10. Click the Reset button on each slider to return them to their default values.

    11. Experiment with different stretch types by selecting options from the Stretch Types drop-down list (Linear isselected by default).

    Working with the Overview Window

    The Overview window provides a view of the full extent of the layers loaded into the Image window. Each time youdisplay a new layer, the Overview window is resized to encompass the extents of all layers in the Image window. TheOverview window is not populated until pyramids are built for the image, therefore it may appear blank for several

    seconds when you first load an image while pyramids are being built.The View box is a small, partially transparent window inside the Overview window that shows the extent of the imageryvisible in the Image window.

  • 8/18/2019 ENVI_Ejercicios

    20/149

      Tutorial: Working with ENVI Zoom

    6

    ENVI Tutorial: Working with ENVI Zoom

    1.  Increase or decrease the size of the View box by clicking and dragging a corner of that box. This will zoom in orout on the image displayed in the Image window. As you click and drag a side, the View box adjusts shape tomaintain the proper aspect ratio of the Image window.

    2.  Click inside of the View box and drag it to any location within the Overview window to dynamically update theImage window.

    3.  Click outside of the View box in the Overview window to recenter the View box on the spot where you clicked.

    Performing RX Anomaly DetectionRX Anomaly Detection processing uses the Reed-Xiaoli Detector algorithm to detect the spectral or color differencesbetween a region to test and its neighboring pixels or the entire dataset. This algorithm extracts targets that arespectrally distinct from the image background. Results from RXD analysis are unambiguous and have proven veryeffective in detecting subtle spectral features.

    1.  From the menu bar, select Processing  RX

     Anomaly Detection. The Select Input File dialogappears.

    2.  RX Anomaly Detection works with all bands of a

    multispectral file, so you will not need to perform any

    spectral subsetting. The filename j sp99hym. ef f  is

    already highlighted in the Select Input File dialog. ClickOK . The RX Anomaly Detection Parameters dialogappears.

    3.  In the Algorithm drop-down list, use the default RXD algorithm.

    4.  For this tutorial, the mean spectrum will be derivedfrom the entire dataset. In the Mean source drop-down list, use the default value of Global.

    5.  Click the File or Memory button to select OutputResult To Memory.

    6.  Click OK . The Process Manager in the lower-right corner of the ENVI Zoom window shows the processing statusof the RX Anomaly Detection algorithm.

    7.  When processing is complete, the resulting image appears in the Layer Manager as"Raster 3: {Memory} RXD Result," and it is automatically displayed in the Image window.

    View box

  • 8/18/2019 ENVI_Ejercicios

    21/149

      Tutorial: Working with ENVI Zoom

    7

    ENVI Tutorial: Working with ENVI Zoom

    8.  Explore this image, when you are finished looking at it, right-click on the Raster 3: {Memory} RXD Result inthe Layer Manager and select Remove Selected Layer to remove it from the display.

    9.  Click the Data Manager button on the toolbar. Notice that the RXD result is still available (it has not beendeleted; it is at the bottom of the list). You have just removed it from the display.

    10. Close the Data Manager.

    Working with a Portal A Portal is a window inside the Image window that allows you to view multiple layers in the Layer Managersimultaneously. A Portal works as a separate layer (inside the Portals folder) in the Layer Manager. In this step, you willcompare the true-color and CIR Jasper Ridge layers.

    1.  In the Layer Manager, right-click on the Raster 2: jsp99hym.eff  (the true-color image) and select OrderLayer Bring to Front. This will place the Raster 2 image at the top of the layer list.

    2.  Click the Portal button on the toolbar. ENVI Zoom creates a new Portal from the second layer in the LayerManager, which is the Raster 1 CIR image. ENVI Zoom adds the new Portal to the Portals folder in the LayerManager.

    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.  Click the Pan button on the ENVI Zoom toolbar. Grab the true-color image (click outside of the Portal) anddrag it around in the Image window. Notice how the Portal stays in one location while the image moves behind it.

    6.  Click the Select button to exit the Pan tool.

    Pinning the Portal to the Image You can attach (or pin) the Portal to the image so that the Portal moves with the data (vice moving and panning with the

    image as you did in the last exercise). This way, when you pan the image, the Portal stays fixed to its original positionrelative to the data.

    1.  Click once inside the Portal to select it, then place your cursor at the top inside of the Portal to display the Portaltoolbar.

    2.  Click the Pin button . The button changes to Unpin.

  • 8/18/2019 ENVI_Ejercicios

    22/149

      Tutorial: Working with ENVI Zoom

    8

    ENVI Tutorial: Working with ENVI Zoom

    3.  Click the Pan button on the ENVI Zoom toolbar. Grab the true-color image (click outside of the Portal) anddrag it around in the Image window. Notice how the Portal stays fixed to the image.

    4.  Click the Select button on the ENVI Zoom toolbar to exit the Pan tool.

    5.  Click once inside the Portal to select it, then place your cursor at the top inside of the Portal to display the Portaltoolbar.

    6.  Click the Unpin button on the Portal toolbar.

    Working with Blend, Flicker, and SwipeENVI Zoom provides tools that help you compare two different layers. You can use these tools for comparing entireimages or you can use them inside of a Portal, as you will do in this tutorial. These tools are enabled only when you havetwo or more layers open in the Layer Manager, and when you display at least one layer in the Image window. For optimalviewing when using these tools, it is recommended that you not use the transparency enhancement slider.

    Blending

    Blending allows you to gradually transition from one image to another, by increasing the transparency of one image.

    1.  Right-click inside of the Portal and select Blend. Blending automatically begins between the true color and CIR

    layers.

    2.  Experiment with the speed of the blend, using the and buttons available on the Portal toolbar.

    3.  Click the Pause button on the Portal toolbar to stop the blend.

    Flickering

    Flickering allows you to toggle between two images at a desired speed.

    1.  Right-click inside of the Portal and select Flicker. Flickering automatically begins between the true color and CIRlayers.

    2.  Experiment with the speed of the flicker, using the and buttons available on the Portal toolbar.

    3.  Click the Pause button on the Portal toolbar to stop the flicker.

    4.  If you paused the flicker action while the true color image was displayed, your Portal will appear transparent.Right-click in the Portal and select Load New Layer  Raster 1: jsp99hym.eff .

    Swiping

    Swiping allows you to spatially transition from one image to another using a vertical dividing line that moves between twoimages.

    1.  Right-click inside of the Portal and select Swipe. Swiping automatically begins between the between the true

    color and CIR layers.

    2.  Experiment with the speed of the swipe, using the and buttons available on the Portal toolbar.

    3.  Click the Pause button on the Portal toolbar to stop the swipe.

    To exit blend, flicker, or swipe, you must close the Portal, unless you want the Portal to appear in the screen capture youwill create in the next step.

  • 8/18/2019 ENVI_Ejercicios

    23/149

      Tutorial: Working with ENVI Zoom

    9

    ENVI Tutorial: Working with ENVI Zoom

    Chipping and SavingIn this step, you will use Chip from Display to take a screen capture of the contents of the Image window, and savethe image. Any enhancements, zooming, rotating, or Portals that are displayed in the Image window are burned into theoutput image. ENVI Zoom creates an 8-bit, three-band image at screen resolution.

    1.  Click the Chip from Display button on the ENVI Zoom toolbar. The Chip From Display Parameters dialog

    appears.

    2.  From the Output File drop-down list, select JPEG.

    3.  Click the File Select button . The Select Output Filename dialog appears.

    4.  Browse to a preferred location on your hard drive, type zoomtutorial as the file name, and click Open.

    5.  Click OK  on the Chip From Display Parameters dialog. ENVI Zoom adds the output file to the Data Manager,where you can open and view the new JPEG image.

    Resetting Preferences and Closing ENVI Zoom

    1.  From the menu bar, select File  Preferences. The ENVI Zoom Preferences dialog appears.

    2.  Click the Restore Defaults button at the bottom of the dialog.3.  Click OK  to save these preferences.

    4.  From the menu bar, select File  Exit and click OK  to exit ENVI Zoom.

  • 8/18/2019 ENVI_Ejercicios

    24/149

     

    Curso: Introducción a la Teledetección yProcesamiento Digital de Imágenes util izando ENVI

     

    Unidad Nº 2 

     Av. Javier Prado Este N° 1224 2do Piso www.telematica.com.(51-1) 476-1599 [email protected].(51-1) 476-1574

  • 8/18/2019 ENVI_Ejercicios

    25/149

     

    ENVI Tutorial:Interactive Display Functions

    Table of ContentsO VERVIEW OF THIS TUTORIAL.....................................................................................................................................2 OPENING A P ANCHROMATIC (SPOT) IMAGE FILE ..............................................................................................................2 PER FORMING INTERACTIVE CONTRAST STRETCHING...........................................................................................................2 

    L inear Stretching Options...................................................................................................................................3  

    Gaussian Stretching Options...............................................................................................................................4  E qualization Stretching Options ..........................................................................................................................4  

     A PPLYING ENVI COLOR T A BLES ...................................................................................................................................4 USING THE PIXEL LOCATOR .........................................................................................................................................5 

    DISPLAYING THE GEOREFERENCED CURSOR LOCATION........................................................................................................5  A PPLYING INTERACTIVE FILTERS ..................................................................................................................................6 

    COMPARING IMAGES USING D YNAMIC O VERLAYS ..............................................................................................................6 R EVIEWING GEOSPOT M AP INFORMATION.......................................................................................................................6 OPENING AND O VERLAYING DXF  VECTOR FILES ...............................................................................................................7 COMPOSING A B ASIC M AP ..........................................................................................................................................8 

     A dding a Grid to Your Image..............................................................................................................................8   A nnotating the Image with a Map Key ................................................................................................................8  S aving and Restoring Annotation........................................................................................................................8  S aving and Outputting an Image (Burn-In)..........................................................................................................9  

    ENDING THE ENVI SESSION .......................................................................................................................................9 

  • 8/18/2019 ENVI_Ejercicios

    26/149

      Tutorial: Interactive Display Functions

    Overview of This TutorialThis tutorial provides an introduction to using ENVI with Panchromatic (SPOT) data, including display, contrastenhancement, basic information about ENVI and some suggestions for your initial investigations of the software. It isdesigned to introduce first-time ENVI users to the basic concepts of the package and to explore some of its key features.It assumes that you are already familiar with general image-processing concepts. It is recommended that new usersbegin with either the Quick Start to ENVI  tutorial or the Introduction to ENVI  tutorial before beginning this tutorial.

    Files Used in This TutorialENVI Resource DVD: envi dat a\ enf i davi

    File Descriptionenf i davi . bi l SPOT Panchromatic Data, Enfidaville, Tunisiaenf i davi . hdr ENVI Header for Aboveenf i davi . dsc GeoSpot Volume Descriptor Fileenf i davi . r ep GeoSpot report file (REP/B: GEOSPOT Structure)enf i davi . rsc GeoSpot Raster Source Description File

    dxf . t xt DXF coding descriptor fileal t i . dxf Spot height DXF fileenergy. dxf Oil or Gas Pipeline DXF filehydr o. dxf Hydrology DXF filei ndust r y. dxf Industrial Areas DXF filephysi o. dxf Physiographic areas DXF filepopu. dxf Urban Features (Population Centers) DXF filet r anspor . dxf Transportation Networks DXF filecopyri t e. t xt Data Copyright Notice Panchromatic Data and Vector Overlays

    This dataset is a SPOT Panchromatic image and corresponding DXF files of Enfidaville, Tunisia, courtesy of ITT VisualInformation Solutions International France. These data are Copyright CNES-Spot Image and IGN France.

    Opening a Panchromatic (SPOT) Image FileBefore attempting to start the program, ensure that ENVI is properly installed as described in the Installation Guide thatshipped with your software.

    1.  From the ENVI main menu bar, select File Open Image File.

    2.  Navigate to the envidata\enfidavi directory, select the file enfidavi.bil from the list, and click Open. The Available Bands List appears on your screen. This is a SPOT Panchromatic image of Enfidaville, Tunisia, courtesyof ITT Visual Information Solutions France. The data in this file is copyrighted as Copyright CNES-Spot Image andIGN France.

    3.  Select Band 1.

    4.  Ensure the Gray Scale radio button is selected - then click  Load Band to load the image into a new display.5.  Examine the image in the display group.

    Performing Interactive Contrast StretchingInteractive contrast stretching plots a histogram and allows you to interactively control the contrast of the displayedimage. Many different types of stretches can be applied. By default, a linear 2% stretch is applied to the data when it isfirst displayed.

    2

    ENVI Tutorial: Interactive Display Functions

  • 8/18/2019 ENVI_Ejercicios

    27/149

      Tutorial: Interactive Display Functions

    1.  From the Display group menu bar, select Enhance Interactive Stretching. An Interactive Stretching dialog

    for the displayed band appears. This dialog allows you to change the contrast stretch of the displayed image.Two histogram plots display the color or gray scale range of the input image (left) and the output image aftercontrast stretching (right). Initially, the input and output histograms reflect the default stretch applied to the datawhen the image was displayed.

    2.  Input histogram information can be extracted from the Image window, from the Scroll window (subsampled),from the Zoom window, from the entire image band (all pixels of the data), or from a user defined region-of-interest (ROI). Explore the options available in the Histogram_Source menu on the Interactive Stretchingdialog menu bar.

    Linear Stretching Options

    When images are loaded into the display group, a 2% linear contrast stretch is applied by default. This can be modified

    by selecting File Preferences from the Display group menu bar, then clicking the Display Defaults tab.

    1.  From the Interactive Stretching dialog menu bar, select Stretch_Type Linear. Two vertical dotted lines

    appear in the input histogram plot—these bars can be repositioned to control the minimum and maximum valueused in the contrast stretch.

    2.  In the Input Histogram window, there are two dotted vertical bars on eitherside of the histogram. These bars can be repositioned to control the minimumand maximum value used in the contrast stretch. Position the mouse cursorover the left bar then click and hold the left mouse button as you drag the barfrom side to side. As the dotted vertical bar is moved across the plot,numbers appear on the status bar of the Interactive Stretching dialog.Whenever the left mouse button is clicked over the histogram plot, the status

    bar displays the current data value, the number of pixels and percentage ofpixels that have that value, and the cumulative percentage of pixels withvalues less than or equal to the current value.

    3.   You can choose to have stretching or histogram changes applied to your images automatically, by selectingOptions Auto Apply from the Interactive Stretching dialog menu bar. To have changes applied to your image

    only when you click the Apply button, toggle the Auto Apply option off. For this exercise, toggle the Auto Apply option on.

    4.  Position the left dotted vertical bar in the Input Histogram window so that a cumulative percentage of pixelsequaling approximately 5% is selected. Now move the right bar so that the cumulative percentage isapproximately 95% of the pixels.

    3

    ENVI Tutorial: Interactive Display Functions

  • 8/18/2019 ENVI_Ejercicios

    28/149

      Tutorial: Interactive Display Functions

    5.   You can also position the bars by entering a minimum and maximum value (numbers or percentages) in theStretch fields provided in the dialog. Enter 4% in the left text field and 96% in the right text field and pressthe Enter key. The % values are converted to digital numbers and the left and right bars in the display areupdated with the data values at 4% and 96%, respectively.

    Gaussian Stretching OptionsThe default Gaussian stretch is centered at a mean of 127 with the data values 3 standard deviations set to 0 and 255.

    1.  From the Interactive Stretching dialog menu bar, select Stretch_Type Gaussian.

    2.  From the Interactive Stretching dialog menu bar, select Options Set Gaussian Stdv to set the standard

    deviation. The Set Gaussian Stdv dialog appears allowing you to adjust the standard deviation value and see theeffect when the new setting is applied to the display group.

    3.  Set the Gaussian Stdvs to 4.00 and click OK .

    4.   You can choose to have the stretch automatically applied to the image display group by ensuringOptions Auto Apply is selected from the Interactive Stretching dialog menu bar.

    Equalization Stretching Options You can use the Equalization option in the Interactive Stretching dialog to automatically scale the data to equalize thenumber of digital numbers in each histogram bin.

    1.  From the Interactive Stretching dialog menu bar, select Stretch_Type Equalization.

    2.   You can choose to have the stretch automatically applied to the image display group by ensuringOptions Auto Apply is selected from the Interactive Stretching dialog menu bar.

    3.  From the Interactive Stretching dialog menu bar, click File Cancel to close the Interactive Stretching dialog.

     Applying ENVI Color Tables You can use Color Mapping to apply color tables to images, createinteractive density sliced images, control the RGB image planes and tochange classification color mapping.

    1.  From the Display group menu bar, select Tools ColorMapping ENVI Color Tables. The ENVI Color Tables dialog

    appears.

    2.  Explore the color options in the Color Table list and observe the

    color-coded image.3.  Use the Stretch Bottom and Stretch Top sliders to apply quick

    stretches to the displayed image.

    4.  From the Color Tables dialog menu bar, select Options ResetColor Table to return to the original stretch and gray scale colortable.

    5.  From the Color Tables dialog menu bar, select File Cancel to

    close the Color Tables dialog.

    4

    ENVI Tutorial: Interactive Display Functions

  • 8/18/2019 ENVI_Ejercicios

    29/149

      Tutorial: Interactive Display Functions

    Using the Pixel LocatorThe Pixel Locator allows exact positioning of the cursor. You can manually enter a sample and line location to positionthe cursor in the center of the Zoom window. If an image contains georeferenced data, you can optionally locate pixelsusing map coordinates. If the image contains an associated DEM, elevation information displays. The Pixel Locatorpertains to the display group from which it was opened. You can open a Pixel Locator for each display group shown onyour screen.

    1.  From the Display group menu bar, select Tools Pixel Locator to open the Pixel Locator dialog.

    2.  Place the cursor in any of the three windows of the display group and click the left mouse button. Notice that thePixel Locator provides the pixel location for the selected pixel.

    3.  Click the toggle button next to the projection field to toggle between true map coordinates andlatitude/longitude geographic coordinates. You can also choose to change the selected projection by clicking theChange Proj button.

    4.  From the Pixel Locator dialog menu bar, select File Cancel to close the Pixel Locator dialog.

    Displaying the Georeferenced Cursor Location You can use ENVI’s Cursor Location/Value to view image values and geographic location. The Cursor Location/Valueoption displays the sample (horizontal, X) and line (vertical, Y) coordinates of the cursor along with the data value of the

    pixel at the cursor location. The position is continuously updated as you move the cursor around the image.

    1.  From the Display group menu bar, select Tools Cursor Location/Value. The Cursor Location/Value dialog

    box appears displaying the location of the cursor in the Image, Scroll, or Zoom windows. The dialog also displaysthe screen value (color) and the actual data value of the pixel underneath the crosshair cursor.

    2.  From the Cursor Location/Value dialog menu bar, select File Cancel to close the Cursor Location/Value dialog.

    5

    ENVI Tutorial: Interactive Display Functions

  • 8/18/2019 ENVI_Ejercicios

    30/149

      Tutorial: Interactive Display Functions

     Applying Interactive FiltersENVI gives you the ability to apply several different pre-defined or user-defined filters to a display. The following exerciseshows you how to apply a pre-defined filter to the image in the Image window.

    1.  From the Display group menu bar, select Enhance Filter and choose a desired filter type to apply to the

    displayed image.2.  Experiment with the different sharpening, smoothing, and median filters on the displayed image.

    3.  From the Available Bands List, click the Display #1 drop-down button and select New Display to create a

    second display group.

    4.  Select Band 1 and click Load Band to load the image into the second display.

    5.  From the Display group menu bar in image #2, select Enhance Filter and select a filter different from that

    applied to Image #1.

    Comparing Images Using Dynamic OverlaysUse image linking and dynamic overlays to overlay portions of multiple images simultaneously (or flicker images) and toperform identical operations on multiple images from within a single Image window.

    1.  From the Display group menu bar, select Tools Link Link Displays. You can also right-click in the image

    and select Link Displays.

    2.  Click OK  in the Link Displays dialog to establish the link.

    3.  Click the left mouse button in one of the Image windows to see the image displays overlaid on one another.

    4.  To create a smaller overlay area, position the mouse cursor anywhere in either Image window (or Zoom window)and hold down and drag with the middle mouse button. Upon button release, the smaller overlay area is setand a small portion of the linked image will be superimposed on the current Image window.

    5.  Click the left mouse button in the Image window and drag the small overlay window around the image to see the

    overlay effects.

    6.  Resize the overlay area at by clicking and dragging the middle mouse button until the overlay area is the desired

    size.

    Reviewing GeoSpot Map Information You can review the GeoSpot Map information for this image in the ENVI Headerfile.

    1.  In the Available Bands List, right click on the Map Info icon and selectEdit Map Information. The Edit Map Information dialog appears.

    2.  Note that the data are in UTM projection, Zone 32 utilizing the NAD27datum.

    3.  Click  Cancel to close the Edit Map Information dialog.

    6

    ENVI Tutorial: Interactive Display Functions

  • 8/18/2019 ENVI_Ejercicios

    31/149

      Tutorial: Interactive Display Functions

    Opening and Overlaying DXF Vector Files

    1.  From the ENVI main menu bar, select File Open Vector File.

    2.  In the Select Vector Filenames dialog, click the Files of type drop-down list and select DXF (*.dxf).

    3.  Navigate to the envi dat a\ enf i davi  directory and select all of the files with the .dxf extension (use the Shift 

    key to select multiple files).

    4.  Click Open or OK . The Import Vector Files Parameters dialog appears.

    5.  In the Native File Projection section of the dialog (near the bottom), click on UTM. This field refers to the mapunits of the imported vector data.

    6.  Click the Datum button. The Select Geographic Datum dialog appears.

    7.  Select the Mexico (NAD27) datum from the list and click OK .

    8.  In the Zone field of the Import Vector Files Parameters dialog, type 32 and click the N radio button.

    9.  Click the Apply Projection to Undefined button then click OK  to load the DXF files and convert them to .evf(ENVI Vector Files). The Available Vectors List dialog appears.

    10. On the Available Vectors List, click the Select All Layers button.

    11. Click the Load Selected button. A Load Vector dialog appears which lists all of the available displays.

    12. On the Load Vector Dialog, select Display #1 and click OK . The #1 Vector Parameters dialog appears showingthe named vector layers.

    13. Click on one of the layer names in the #1 Vector Parameters dialog. In the Image window click and drag usingthe left mouse button and observe map coordinates for the selected vectors in the #1 Vector Parameters dialog.

    7

    ENVI Tutorial: Interactive Display Functions

  • 8/18/2019 ENVI_Ejercicios

    32/149

      Tutorial: Interactive Display Functions

    Composing a Basic MapIn this exercise, you will create a basic map. You will add grid lines, annotate your image, and save and output yourimage.

     Adding a Grid to Your Image You can use Grid Lines to overlay one or more grids on an image. Grids can be pixel-based or map-coordinate and/or

    latitude/longitude based (for georeferenced images). Each display group can have its own set of grids, which aredisplayed in the Image, Scroll, and Zoom windows.

    1.  From the Display group menu bar, select Overlay Grid Lines. The Grid Line Parameters dialog appears.

    Note that an image border is automatically added when you overlay grid lines (visible in the Scroll window).

    2.  Using the Grid Line Parameters dialog menu bar Options menu, you can adjust the grid lines by setting the linethickness and color and the grid spacing.

    3.  When you have added a satisfactory grid, click Apply in the Grid Line Parameters dialog.

     Annotating the Image with a Map KeyENVI’s flexible annotation features allow you to add text, polygons, color bars, and other symbols to your plots andimages.

    1.  From the Display group menu bar, select Overlay Annotation. The Annotation dialog appears.

    2.  To annotate a map key corresponding to the DXF overlays, select Object Map Key from the Annotation

    dialog menu bar.

    3.  Click the Edit Map Key Items button to edit the map key characteristics. The Map Key Object Definition dialogappears.

    4.   You can change the names, colors, and fill (for polygons) using the Map Key Object Definition dialog. Click OK  toreturn to the Annotation dialog.

    5.   Add a background color by clicking the color swatch in the Annotation dialog. Use the right-click menu to select a

    color from a list.

    6.  Click the left mouse button to place the map key in the Image window. Reposition the map key by clicking, or byclicking and dragging with the left mouse button. Set the map key by clicking the right mouse button in theimage.

    Saving and Restoring Annotation You can save your image annotation to a file. If you do not save your annotation in a file, it will be lost when you closethe Annotation dialog (you will be prompted to save the annotation if you close without first saving)

    1.  From the Annotation dialog menu bar, select File Save Annotation.

    8

    ENVI Tutorial: Interactive Display Functions

  • 8/18/2019 ENVI_Ejercicios

    33/149

      Tutorial: Interactive Display Functions

    2.   You can also restore saved annotation files by selecting File Restore Annotation from the Annotation dialog

    menu bar.

    3.  To suspend annotation operations and return to normal ENVI functionality temporarily, select the Off  radiobutton at the top of the Annotation dialog. This allows you to use the scroll and zoom features in your displaywithout losing your annotations.

    4.  To return to the annotation function, select the radio button for the window in the display group that you areannotating.

    Saving and Outputting an Image (Burn-In)ENVI gives you several options for saving and outputting your filtered, annotated, gridded images. You can save yourwork in ENVI’s image file format, or in several popular graphics formats (including Postscript) for printing or importinginto other software packages. You can also output directly to a printer. For this exercise, you will save the file inGEOTIFF format.

    1.  From the Display group menu bar, select File Save Image As Image File. The Output Display to Image

    File dialog appears.

    2.  Click the Output File Type drop-down list and select TIFF/GeoTIFF output from the pull-down menu. If thedisplayed image is annotated and gridded, both the annotation and grid lines will be automatically saved.

    3.  Type or choose an output filename in the field provided and click OK  to save the image. Because this is ageoreferenced image, ENVI automatically saves it as a GEOTIFF.

    Ending the ENVI Session You can quit your ENVI session by selecting File Exit from the ENVI main menu.

    9

    ENVI Tutorial: Interactive Display Functions

  • 8/18/2019 ENVI_Ejercicios

    34/149

     

    ENVI Tutorial:

    Landsat TM and SPOT Data

    Fusion

    Table of ContentsO VERVIEW OF THIS TUTORIAL.....................................................................................................................................2 D ATA FUSION .........................................................................................................................................................3 

    P reparing Images..............................................................................................................................................3  LONDON, UK, D ATA FUSION EXAMPLE ...........................................................................................................................4 

    Read and Display ER Mapper Images..................................................................................................................4  

    Resize Images to the Same Pixel Size .................................................................................................................4  

    Manual HSV Data Fusion....................................................................................................................................4  Forward HSV Transform.......................................................................................................................................................5 Create a Stretched SPOT Image to Replace TM "Value" Band.................................................................................................5 Inverse HSV Transform........................................................................................................................................................5 Display Results ....................................................................................................................................................................5

     

     A utomated HSV Data Fusion ..............................................................................................................................6  BREST, FRANCE, D ATA FUSION EXAMPLE ........................................................................................................................7 

    Open and Display Images ..................................................................................................................................7  Resize Images to Same Pixel Size .......................................................................................................................7  F use the SPOT Panchromatic Image ...................................................................................................................8  Display and Compare Results .............................................................................................................................8  

  • 8/18/2019 ENVI_Ejercicios

    35/149

      Tutorial: Landsat TM and SPOT Data Fusion

    Overview of This TutorialThis tutorial is designed to demonstrate selected ENVI data fusion capabilities. For additional data fusion details, pleasesee ENVI Help . Two examples are provided for this tutorial.

    The first uses Landsat TM and SPOT data from London, UK (Data Courtesy of ITT Visual Information SolutionsInternational UK, Ltd). The TM data are Copyright, European Space Agency, and distributed by Eurimage/NRSC. The

    SPOT data are Copyright CNES, 1994, distributed by Spot Image/NRSC. Both datasets are used with permission (NRSC,1999).

    The second example uses multispectral and panchromatic SPOT data from Brest, France (Data Courtesy of ITT VisualInformation Solutions International, France, Copyright CNES-Spot image, 1998. Used with permission of SPOT, 1999.These data may not be used for commercial purposes).

    Files Used in This TutorialENVI Resource DVD:

    File Description

    TM/SPOT example (envi data/ l ont msp)  l on_spot London SPOT datal on_spot . er s ER Mapper header for abovel on_t m London Landsat TM datal on_t m. ers ER Mapper header for above

    SPOT example ( envi data/ brest sp)  s_0417_1. bi l ( . hdr ) Brest SPOT panchromatic datas_0417_2. bi l ( . hdr ) Brest SPOT-XS multispectral datacopyr i ght . t xt Data copyright statement

    2

    ENVI Tutorial: Landsat TM and SPOT Data Fusion

  • 8/18/2019 ENVI_Ejercicios

    36/149

      Tutorial: Landsat TM and SPOT Data Fusion

    Data FusionData fusion is the process of combining multiple image layers into a single composite image. It is commonly used toenhance the spatial resolution of multispectral datasets using higher spatial resolution panchromatic data or single-bandSAR data.

    The following sections demonstrate the preparation required to fuse image datasets in ENVI, and how to perform data

    fusion.

    Preparing ImagesTo perform data fusion in ENVI, the files must either be georeferenced (in which case spatial resampling is performed onthe fly), or, if not georeferenced, cover the same geographic area, have the same pixel size, have the same image size,

    and have the same orientation. The files used in this exercise are not georeferenced. Therefore, the low spatial resolutionimages must be resampled to have the same pixel size as the high spatial resolution image (using nearest-neighborresampling).

    3

    ENVI Tutorial: Landsat TM and SPOT Data Fusion

  • 8/18/2019 ENVI_Ejercicios

    37/149

      Tutorial: Landsat TM and SPOT Data Fusion

    London, UK, Data Fusion Example

    Read and Display ER Mapper ImagesThe London data consist of TM and SPOT data binary files with ER Mapper header files. ENVI has ER Mapper routines toautomatically read the data.

    1.  From the ENVI main menu bar, select File → Open External File → IP Software → ER Mapper. A file

    selection dialog appears.

    2.  Navigate to envi data\ l ont msp and use the  key to select l on_t m. ers and l on_spot . er s. Click

    Open.

    3.  In the Available Bands List, select the RGB Color radio button, then click Load RGB to display the true-color

    Landsat TM image (l on_t m).

    4.  In the Available Bands List, click Display #1 and select New Display.

    5.  Select the Gray Scale radio button. Under l on_spot , select the Pseudo Layer band and click Load Band to

    display the gray scale SPOT image.

    Resize Images to the Same Pixel SizeThe Dims field of the Available Bands List shows that the spatial dimensions of the SPOT image are 2820 x 1569, andthose of the Landsat TM are 1007 x 560. The Landsat data have 28 m spatial resolution, while the SPOT data have 10 mspatial resolution. You will need to resize the Landsat image by a factor of 2.8 to create 10 m data that match the SPOTdata.

    1.  From the ENVI main menu bar, select Basic Tools → Resize Data (Spatial/Spectral). A Resize Data Input

    File dialog appears.

    2.  Select l on_t mand click OK . A Resize Data Parameters dialog appears.

    3.  In the xfac field, enter 2.8. In the yfac field, enter 2.8009. You must use a value of 2.8009 rather than 2.8 toadd an extra pixel to the y dimension, so the images will exactly match. This difference is insignificant for thepurposes of this exercise.

    4.  In the Enter Output Filename field, enter r esi ze_l on_t mand click OK .

    5.  In the Available Bands List, click Display #2 and select Display #1.

    6.  Select the RGB Color radio button. Load r esi ze_l on_t mas an RGB composite into Display #1.

    7.  From a Display group menu bar, select Tools → Link  → Link Displays. A Link Displays dialog appears. Click OK  

    to link the resized image (Display #1) to the SPOT panchromatic image (Display #2). Compare the two images.

    8.  When you are finished, select Tools → Link  → Unlink Displays from a Display group menu bar.

    Manual HSV Data FusionManually performing data fusion may help you better understand the data fusion process. First, transform the color TMimage into hue-saturation-value (HSV) color space. Replace the value band with the higher resolution SPOT data andstretch the value band from 0 to 1 to fill the correct data range. Then transform the TM hue and saturation data andSPOT data values back to RGB color space. This produces an output image that contains the colors from the TM data withthe spatial resolution of the SPOT data.

    4

    ENVI Tutorial: Landsat TM and SPOT Data Fusion

  • 8/18/2019 ENVI_Ejercicios

    38/149

      Tutorial: Landsat TM and SPOT Data Fusion

    Forward HSV Transform

    1.  From the ENVI main menu bar, select Transform → Color Transforms → RGB to HSV . An RGB to HSV Input

    dialog appears.

    2.  Select Display #1 (which contains r esi ze_l on_t m) and click OK . An RGB to HSV Parameters dialog appears.

    3.  In the Enter Output Filename field, enter out _hsv and click  OK  to perform the transform.

    4.  In the Available Bands List, under out _hsv, display the resulting Hue, Sat, and Val bands as individual gray

    scale images or as an RGB composite in Display #1.

    Create a Stretched SPOT Image to Replace TM "Value" Band

    1.  From the ENVI main menu bar, select Basic Tools → Stretch Data. A Data Stretch Input File dialog appears.

    2.  Select l on_spot  and click OK . A Data Stretching dialog appears.

    3.  In the Output Data section of the Data Stretching dialog, enter 0 in the Min field and 1.0 in the Max field.

    4.  In the Enter Output Filename field, enter st r et ch_l on_spot  and click OK  to stretch the SPOT data to

    floating-point data with a range of 0 to 1.0.

    Inverse HSV Transform

    1.  From the ENVI main menu bar, select Transform → Color Transforms → HSV to RGB. An HSV to RGB Input

    Bands dialog appears.

    2.  Select the Hue and Sat bands under out _hsv as the H and S bands for the transform. Select the Stretch band

    under st r et ch_l on_spot  as the V band. Click OK . An HSV to RGB Parameters dialog appears.

    3.  In the Enter Output Filename field, e