You are on page 1of 7

GEO/EVS 425/525 Unit 1 Introduction to the ERDAS Imagine and ENVI Viewers

Remote sensing enables scientists to extract information about the environment and to portray it in a way that others can understand readily. In furtherance of the course goal to facilitate your learning how to think like a remote-sensing professional, we will be using two of the most powerful commercial software packages available today to open, examine, manipulate, and extract information from a wide selection of imagery. The packages are ERDAS Imagine and ENVI. Each of these packages does some things better than the other, and your exposure to both will enable you to see which operations verge on the universal and which are idiosyncratic to the software being used. It will also facilitate your understanding of what operations are hidden, as it were, in one or the other software package. The on-line presentation goes through all of the operations presented in this laboratory. You are advised to attend this presentation before trying the software yourself. The repository for all of the images required for the first few exercises in this course are on the Q: drive. The repository for all images you produce is your X: drive. Opening an image ERDAS Imagine. To open ERDAS Imagine, double-click on the icon on your desktop labeled ERDAS Imagine. The Imagine viewer opens. It includes a menu bar and a rather large icon area, along with a table of contents window on the left-hand side. Most of the screen is taken up with the view, which is the black area labeled 2D View #1. You should first maximize the viewer. Note that many of the icons are grayed out; they dont have any significance until you have loaded an image. Now lets load an image. Right-click on the view and choose to Open Raster Layer. The default directory for your imagery should be Q:; one of the files in that directory is named CLEVELAND.IMG. Click on it and then click OK. Note that the icon area is organized into several areas. As you move the cursor around the image you can see its current location in the lower left-hand corner of the view. Carry out the following operations: On the Information tab: Examine the metadata for the image Click on Inquire and move the cross-hair around to obtain information about individual pixels Open an inquire box and adjust its size Change the color of the inquire cross-hair and box Measure the distance between two points, such as CSU and University Circle Measure the area of something, such as the downtown area of Cleveland On the Extent tab: Click on the fit-to-frame icon Using the + zoom tool, outline a particular part of Cleveland and zoom to it. Experiment with the + zoom, - zoom, and fit-to-frame tools to see what they do Experiment with the Previous Extent and Pan tools to see what they do On the Window tab: Click on the Add Views tab and add additional views by clicking on the icons in the Arrangements area Experiment with the tools in the Split Views, Other Views, and Layout Mode areas

When you are done with the operations outlined here, close the image by right-clicking on the image name in the table-of-contents window, highlight the image, and choosing to Remove Image(s). ENVI To open ENVI, double-click on the icon on your desktop labeled ENVI+IDL. The first thing that opens is IDL, which minimizes itself automatically. Then ENVI loads. It should look reasonably familiar

to you, as the viewer is patterned after that of ArcGIS. The Layer Manager, or Table of Contents, is on the left; the toolbox is on the right; the view is the light-colored area in the middle. To open an image, click on the Open File icon on the icon bar or File -> Open on the menu bar. Open the Cleveland image from the Q: drive. It doesnt open immediately. The table-of-contents window shows that it is a 7-band image. Click on band 4. The square to the left turns red. Then click on band 3, then band 2. The squares turn green and blue, respectively. This assigns the bands in the image to the corresponding guns of the monitor. ERDAS does this assignment automatically; ENVI enables you to do it when you load an image. There are advantages to each approach. When you have assigned the bands you want to the red, green, and blue channels, click on Load Image. Note that as with ERDAS, the software tells you the location of the cursor in the lower left-hand corner of the view. Experiment with the following icons: Zoom icons: Zoom to an area you choose Fixed zoom in Fixed zoom out Experiment with the scale window to see what the effect of different scales would be. Experiment with the Undo Zoom and Redo Zoom icons. Movement and information icons Cursor Value Crosshairs Pan

Note that there are some slider bars below the icon bar. Experiment with these. Most of them dont have an analogue in ERDAS. The crosshair tool is analogous to the inquire cursor of ERDAS. The analog of ERDASs inquire box in ENVI is the Portal. The portal and the inquire box have some similarities and differences. To see what the portal will do, click on the Data Manager icon to open the Data Manager. Right-click on the name of the image in the Data Manager and choose to open as grayscale. You now have two images of Cleveland in your view, one over the other. Now click on the Portal icon in the main ENVI icon bar and adjust the size of the portal. You are now looking through the grayscale image at the color image. To add views to your viewer, click on Views and then choose the configuration of views you want. To measure distances or areas, click on the mensuration icon. You can easily measure straight-line segments, but not areas using this tool. Image Metadata It is useful to know how much information you can uncover about an image youre looking at. Fortunately, both packages make it easy to find out the most important stuff. ERDAS Imagine Go back to the image metadata for the Cleveland image in ERDAS. To get that, you can click on Metadata in the Information tab, or you can right-click the file name in the table-of-contents window and choose to look at the metadata. In either case, the Image Information window opens. It has four tabs. Examine the information on all four tabs, by clicking on each of the four tabs and examining the information that appears. Does this information makes sense to you? Concentrate especially on the General and Histogram tabs. On the General tab, the File Info section is fairly straightforward. The Layer Info section is very important, although the information it contains is not intuitively obvious. The Width and Height are the number of columns and rows, respectively, comprising the image. The Type refers to the type of the image in the viewer. This one is a continuous image. That means that the data included in the image are continuous from the lowest value to the highest. You can ignore the Block Width and Block Height. The Data Type refers to the way that information is stored. Unsigned 8-bit indicates that the data are stored as integers, each 8 bits (one byte) in length. The Statistics Info section is fairly straightforward. The Map Info section is equally important, and it is fairly obvious, as it

documents the details of the UTM coordinate system. The Projection Info section is also straightforward. Look over all of the information on this tab, and on the other tabs. Do you understand all of the information that you have about this image? Look at the Histogram tab. You can move through the various bands by clicking on the icons on the right-hand side of the icon bar. ENVI To get the image information in ENVI, click on Statistics -> Compute Statistics in the toolbox. You get most of the same information you got with the General tab of the ERDAS metadata. You will see the information provided on the ERDAS metadatas Histogram tab later in this exercise. Stretch and Image Colors It is a rare image in which the digital numbers comprising the image run from 0 to 255. Most images are much more compressed spectrally. For this reason, they are stretched. That is, the software calculates the minimum and maximum digital numbers and uses an algorithm to map the range of actual digital numbers to available digital numbers. For example, if the range of actual digital numbers runs from 100 to 150, this 50-DN range would be mapped to the entire 256-DN range available from 0 to 255. Pixels with a DN or 100 would be mapped to or around 0; pixels with a DN of 150 would be mapped to or around 255. The differences in various approaches to stretch relate to the algorithm used. ERDAS Imagine Load the Cleveland image into your viewer. In the Raster Options tab, check the checkbox for No Stretch in addition to the checkboxes you checked before. When you click OK, see what happens. Now load it into your viewer again. Make sure that none of the checkboxes are checked. The default for ERDAS is a stretched image. Turn the top image off and on so that you can see the difference. Now click on the Multispectral tab and click on the General Contrast icon in the Enhancement area. When the Contrast Adjust window opens, click on the Method button to see what methods are available. Try each approach, and see what happens. If a particular method has a parameter (i.e. a blank field into which you can place a number), enter a number and see what happens when you click Apply. You have a great deal of flexibility in determining what information actually ends up in the viewer. ENVI If you thought you had a lot of flexibility with ERDAS, you have even more with ENVI. Click on the stretch button on the icon bar. Its default label is Optimized Linear. Choose each alternative to the default. Does the No Stretch option give you the same image as the No Stretch option in ERDAS? The last choice available this way is Custom. This opens a new window that enables you to see the frequency distribution of the image. It is precisely the same information provided by the Histogram tab of ERDAS Imagines Metadata program. If you click on the color squares on the right-hand side of this window, it will highlight the range of actual digital numbers, explicitly showing the minimum value (i.e. black-point) and maximum value (i.e. white-point). You should click on all of the choices for custom stretches and put different numbers (typically between 0 and 1) into the fields that open up for parameter insertion for each of the choices. To go back to the default stretch, click on the Reset Dialog icon, which is to the right of the stretch button. Comparing Two Images in Your View It is a common task to compare two related images of the same area. You will compare the satellite image of the Shaker Heights quadrangle with an analysis of the percentage of impervious surface in that quadrangle. ERDAS Imagine Load the ShakerHeights and SHPerv images into your view. On the Raster Options tab, check the Clear Viewer and Fit to Frame checkboxes. In the View area of the Home tab there is a Flicker button with a dropdown to its right. Click on the dropdown. Experiment with the Swipe, Blend, and Flicker tools. All can be set to Automatic, and you should do that. Adjust the speeds for automatic action so that you can see what the results will be. Which of these tools gives the most useful ways of comparing images?

ENVI Load the same two images into your view. Click sequentially on the Blend, Flicker, and Swipe icons just to the right of the Portal icon in the icon bar. All of the tools open in automatic mode, and they work exactly as they do in ERDAS. Note that you can create a portal and operate these tools within the portal rather than on the entire image. Some Detail on Color and Image Type Thematic Mapper (Multispectral) Image In both of these software packages, the color balance in the Cleveland image is determined mainly by the bands you chose to map to the color channels of the monitor. It is a true-color image meaning that each band in the image corresponds to a particular color in the spectrum, the intensity of the colors chosen for each monitor-color channel is a digital number ranging from minimum to maximum (typically 0 to 255 for 8-bit color), and that the intensity of the monitors output for each pixel is mapped to the value of the digital number of that pixel for the band to which it is mapped. For a Thematic Mapper image such as Cleveland, the bands are as follows: 1. Blue 2. Green 3. Red 4. Near Infrared 5. Near Middle Infrared 6. Thermal 7. Middle Infrared Thus if you map band 3 to the monitors red channel, band 2 to the monitors green channel, and band 1 to the monitors blue channel you will get an image that approximates the actual color of the earths surface. In fact, when you mapped the bands in ENVI, you didnt do that. You mapped band 4 to the red channel, band 3 to the green channel, and band 2 to the blue channel. This gives you the same color balance as a false-color infrared image produced by infrared film. You didnt have to do a mapping in ERDAS, as it produces a 4-3-2 image automatically (unless you change your preferences). You can, of course, make any band combination you want. You should try. At the very least, you should create a 3-2-1 (i.e. true RGB color) image and a 7-5-4 (i.e. all infrared) image, although you should experiment. As you carry out these experiments, try to assess which combinations give you the greatest information content. ERDAS Imagine To change the band mappings, click on the Multispectral tab. Then click in turn on each of the square color blotches in the Bands area and choose the band you wish to assign to the red, green, and blue channels. ENVI To change the band mappings, right-click on the image name in the Layer Manager window and choose Change RGB bands. Click first on the band you want to assign to red, then on the band you want to assign to green, then on the band you want to assign to blue. Then click OK. An even easier way to change the colors in a view is to open the Data Manager by clicking on its icon. This window lists every image open in the viewer, along with their bands. Click on a band under the image name youre interested in. The block to the left turns red. Click again; the block turns green. Click again; the block turns green. Click on Load Data to reload the image. You can go back and forth to show several different sets of bands, which are simultaneously in the view. Right-click on the image name in the Data Manager, and choose to Load Grayscale, Load CIR, or whatever. See what happens! Now click on the File Information band in the Data Manager. This is another way to get the image metadata. Click on the Band Selection band in the Data Manager. Note that the red band indicator is highlighted. Click on a band name in the top window of the Data Manager. The name goes into the red field. Do the same for the green and blue fields. Click on Load Data.

Continuous Single-Band Image Now lets look at a different sort of raster image. Remember that the thematic mapper image was a multi-band continuous image its digital numbers varied from a minimum value to a maximum value in each of the bands comprising the image. Many images are single-band images, but with values ranging from minimum to maximum. Lets experiment with one of these. SHPerv is an image of the percentage of impervious surface in the Shaker Heights, Ohio, quadrangle. It contains a single attribute, percentage impervious surface, which varies continuously from 0 to 100. ERDAS Imagine To load SHPerv, right-click on the view area of your viewer and choose to load a raster image. SHPerv is one of the files on the Q: drive that you can choose. Before you click OK, however, click on the Raster Options tab. The Display As selection is set to Gray Scale. You dont want to change that yet, but you will want to change it before youre done. Click on the Clear Display and Fit to Frame check boxes to select them, and click on OK. The image will appear, fit to the frame of the view. If you had the Cleveland image in your view previously, it will disappear. As you would expect, it is a gray-scale image; it is dark where the percent impervious surface is low and bright where the percent impervious surface is high. Now right-click on the image name in the contents window and choose to look at the attribute table. That table shows values representing ranges of the percentage impervious surface and the corresponding histogram. The Row column ranges from 0 to 255; it corresponds to the intensity of the level of gray color from 0 (i.e. black) to 255 (i.e. white). Because you chose gray-scale for your Display-As selection, you cant change the gradation of gray. Now reload your image. Again, check the Clear Display and Fit to Frame boxes, but click on the Display As dropdown and choose to display the image as PseudoColor. When you click OK, the image will load, but it may look somewhat different from its previous incarnation. Again, right-click on the images name in the Contents window and choose to examine the attribute table. It looks just like it did before, except that there is a color column. Lets change the colors so that 100% impervious is black and 0% impervious is green. To do that, click on the Table tab and then on Colors. The default slice type is IHS. Leave it that way for the time being. The default slice method is By Value. Again leave it that way. Change the beginning color (i.e. 0% impervious) to green and the end color (i.e. 100% impervious) to black. Click on OK. See what happens. Now change the slice method to By Equal Areas, and click OK again. Is there a change? Now change the slice method back to By Value, and change the slice type to RGB. You will probably have to reset the colors. Again see what happens when you click OK. Again change the slice method back to By Equal Areas and see what happens. Be sure you understand how the software was interpreting your commands. ENVI Close the Cleveland image by right-clicking on the View tab in the Layer Manager window and choosing to Remove All Layers. Then load SHPerv into your view. Click on the Fit to Frame icon to insure that it is fit to the frame. Right-click on the image name in the Layer Manager window and choose Change Color Table. Choose several different color tables to see what they do. If you choose the More button, you can access not only pre-set color tables but also the ability to change them. For example, you can choose the black-white color ramp, but then set one end point to green. Single-Band Thematic Image A thematic image differs from a continuous image in that the attribute in the image refers to a class of some sort rather than to an intensity of some value. Most typically, the class in question is land cover. Load the CuyClass image into each package and see what it does. ERDAS Imagine Right-click on the view area of your viewer and choose to Open a Raster Layer. CuyClass is located on the Q: drive. On the Raster Options tab, check the Clear Display and Fit to Frame checkboxes. You will notice that since this is a thematic image, the default Display As selection is PseudoColor. Right-click on the image name in the Contents window, and choose the Attribute Table. The Row column shows the ID number of each land-cover type, and the colors shown in the map are clearly identified in the table, as are the numbers of pixels of each land-cover type.

It would be reasonable to add information about both the identity and the area of each land-cover type. Click on the Tables tab. In the center of the icon area of that tab are two checkboxes, Add Class Names and Add Area. Check both, and choose either hectares or acres for the area. Now you can add the names of the land-cover types; the areas were calculated automatically. Here are the correct names for the land-cover types: 1 URBAN (open impervious surfaces: roads, buildings, parking lots and similar hard surface areas which are not obstructed from areal view by tree cover.) 2 AGRICULTURE/OPEN URBAN AREAS (cropland and pasture; parks, golf courses, lawns and similar grassy areas not obstructed from view by tree cover) 3 SHRUB/SCRUB (young, sparse, woody vegetation; typically areas of scattered young tree saplings) 4 WOODED (deciduous and coniferous) 5 OPEN WATER 6 NON FORESTED WETLANDS (includes wetlands identified from 1994 Thematic Mapper data as well as from the Ohio Wetlands Inventory) 7 BARREN (e.g. strip mines, quarries, sand and gravel pits, beaches) We can also change the colors for each land-cover type to generate a color selection that is more meaningful to the viewer. In the attribute table, left-click on a color rectangle that you wish to change. The basic color palette opens. If you find what you want there, you can click on that color, and it will replace the color in both the attribute table and on the map. If you want more freedom in choosing a color, click on the Other . . . at the end of the basic palette, and generate your color. When you have completed your adjustments to the attribute table, exit it. You will be prompted to save it; if you like your changes click Yes. ENVI Close any images out of your view, and load CuyClass into the view. It will be a black mass. Right-click on the image name in the Layer Manager window, and choose Change Color Table. You should have a choice of several other color palettes or more. Make your choice from the available choices; the Edit Raster Color dialog opens. Can you make any progress? Now click on Raster Color Slices and choose the image youre working on. The Edit Raster Color Slice dialog opens. When you click on the rainbow icon (the leftmost icon on the icon bar), you get the opportunity to choose one of a large number of predefined color tables. Experiment with the choices youre given. If you want to change a specific color, right-click on the specific color rectangle in the Edit Raster Color dialog and choose to Edit Color. When the Edit Color dialog opens, you can first choose the framework within which you will edit the color (RGB is the most intuitive). You can move the slider bars to generate a color, or you can choose a color from the palette to the right of the slider bars. If you want, you can save your new color palette. MrSID and TIFF Images Raster images tend to be large. You will encounter images that are in many different formats. To make them feasible for transfer from one place to another, particularly by download from the worldwide web, they are often compressed, so that a given image takes up less room than it otherwise would. The most common format for uncompressed imagery is the TIFF format. This format was originally developed as a way to store imagery as a bitmap, where each pixel had a value of 0 through 255 for each of the 3 primary colors, red, green, and blue. This means that an image with a size of 500 x 500 pixels would have a size of 500 x 500 x 3 x 8, or 6 megabytes. As you will see, 500 x 500 is rather small, given the size of images you will be dealing with, but 6 megabytes isnt small. One of the most useful and common formats for compressing images is the MrSID format developed by LizardTech, Inc. Since you will unquestionably use these files, and since they have some quirks that you need to know about, its useful to meet them now. Both ERDAS and ENVI can read TIFF and MrSID without needing to import them. Both TIFF and MrSID can contain a subsidiary file called a world file that includes information required to establish the images reference system. However, that information may not be complete. Newer versions of the MrSID compression algorithm can easily be read by both software programs. Images compressed with earlier versions can be read, but they leave much to be desired.

ERDAS Imagine For example, load the CL303NE0017.sid image into the ERDAS viewer and move your cursor around the view. Note that the lower left-hand side of the viewer indicates a location, but it doesnt tell you what reference system is being used. This image was compressed with an earlier version of the MrSID algorithm. If you view the metadata in ERDAS, you will find that the reference system is undefined. However, it is clear that ERDAS has read the world (cl303ne0017.sdw) file as well as the main image (cl303ne0017.sid) file and that it knows what the coordinates are; it just does not have the context for those coordinates. It is up to you to tell ERDAS that the coordinates belong to the UTM zone 17 projection and that the units are in meters. Open the metadata and click Edit -> Change Map Model. When the window opens, set the units to meters and the system to UTM. Agree to save the map model. Then click on Edit -> Add/Change Projection. When the window opens, click on the Standard tab and choose UTM GRS 1980 NAD 83 North. Then choose Zone 17. Agree to save the projection information. Save your file. If you need to define an existing projection for any other type of file (e.g. TIFF) you will use exactly the same procedure. If you check your directory, you will notice that a new file named cl303ne0017.aux has been created that enables ERDAS to recognize the world file information. ENVI At the time of this writing, ENVI can read the SID file, but it does not make sense of the world file, so it does not record the projection information at all. However, if you follow the instructions above for ERDAS and create the AUX file, ENVI will read the image perfectly. Try it! This should be a reminder to you that there are times when you will want to use one program to do one thing even though you want to use a different program to process the same image further. We can also use the programs to load MrSID images processed with a more recent algorithm. ERDAS Imagine and ENVI Using the normal file-load for each program, load the image, @ into the view. Note that for both programs, the projection information is read properly.

You might also like