Documente Academic
Documente Profesional
Documente Cultură
Name:
Introduce the student to the options and commands in ENVI in order to:
• import, analyze, and output image data
• create and use region of interest files
The questions provided within this lab are designed to help the student better understand the
practical details of programming in IDL and are recommended but are not for assessment.
Login: XXXX
Password: XXXX
1
Before you start:
This starts both ENVI (The Environment for Visualizing Images) and the IDL (Integrated
Development Language) programming interface
With your mouse pointer, select File/Open image file and by using Browse select the file you
want to open (image1) and press ok. This will open the available bands list. Double clicking on
Band1 of image1 will load the image in Display. Selecting the Map info tab in the Available
bands list provides you with the projection information of the image.
2
The first thing you will notice is that there is more than 1 viewer window.
For this image, there are the ‘Main Image Window’ and the ’Zoom Window’. The Zoom window
contains the contents of the red box seen in the Main image window. In larger images the
contents of the Main Image Window are themselves a small red box in a ‘Scroll Window’, which
contains the complete image.
Try moving the Main Image Window around the computer screen – you will see that the Zoom
window remain locked in place. To move each window separately, right click on the Main Image
Window to bring up the Main Image Options Menu:
To move the red box, left click anywhere within the Main Image Window.
You can create a ‘dynamic link’ with the zoom window (i.e. if you move the red box around the
zoom contents will automatically change) by clicking anywhere outside the red box on the image
window. Now hold down the left mouse button and move it around the Main Image Window.
If you click inside the red box, this link will not happen.
In the bottom left hand corner of the zoom window, there are three icons:
Now left click anywhere in the zoom window and when holding the left mouse button down,
move the mouse up, down, left, and right. You should see that the location of the red box and the
contents of the zoom window change as you move the mouse around. This is another technique
to navigate with the zoom window.
To clear files in the Available bands list select File/Close all Files from the Available Bands list
menu bar. Do this.
3
1.3 Opening a Satellite Sensor File
ENVI can open several different types of file format. In the last two stages, we dealt with a basic
ASCII file. However, as a plethora of remote sensing systems exist, ENVI has been adapted to
be able to read multiple different file formats.
In this stage, we are going to import the visible to mid infrared bands of some MODIS data.
As ENVI version 4
automatically detects MODIS
level 1B data. This will open
two files: one in radiance and
the other in reflectance. Through this route, you cannot get a file with simple DN values.
However, if you opened this file using the File/Open Image File
option, you would get the following window:
Select Earth View 500M Solar Bands Scaled Integers to get the
MODIS bands 1-7 DN Values (After selecting BSQ as the file type
in the next window).
4
With the reflectance data you can produce a true color version of the image. This is done by first
selecting the RGB option at the bottom of the Available Bands list box and assigning the correct
bands to the R, G, and B
Band 1 = Red
Band 2 = NIR
Band 3 = Blue
Band 4 = Green
To see this image better, we need to move the limits of each of the red, green, and blue
histograms. This is done by selecting Enhance/Interactive Stretching from the Main Image menu
bar:
5
Now left click on the right hand side vertical dotted line and when holding the left mouse button
down drag the line left until it is placed at the edge of the normal looking distribution. Then
select the G button and repeat this for both the green and blue histograms.
After repeating this task for all three options, press Apply and if the image looks ok close this
window and move the red box in the Scroll Window onto the dark feature 2/3rds the ways down
the image on the left hand side:
Identify:
This dark feature:
The blue stuff at the top-right hand side of the Main image:
6
1.4 Creating a Subset of an Image
Using the menu ENVI menu bar Select Basic Tools/Resize Data (Spatial/Spectral), select the
first (the Reflectance data) MODIS image.
File allows you can select a previously subsetted file and this command will make your chosen
file the same size and dimensions. The other options will be covered in a later exercise.
Select Image, move the box around, and then press ok.
You will notice that the sample and line numbers will
change. When using Image you can change the size of
the box by either entering a larger size or by clicking on
a corner of the red box and dragging the mouse.
7
Using the sample and lines option enter the following numbers and press ok:
Now select Spectral Subset and highlight only the Red, Green, and Blue bands:
Now press ok, and again press ok on the main subset box. This will bring up a window asking
you to either save this image on the computer or to save it in the computer’s memory.
Select Choose and call the image: subset1 and save it under C:\ATRS.
Next, select subset 1 from the Available bands list and display the RGB image. Remember that
B1=Red; B4=Green; and B3=Blue. Display the image.
8
Identify and Justify with other bands:
This stage will describe how to produce and use regions of interest in ENVI. This stage is
important, as we will be using this function a lot in this course. For more examples
9
- Many more options are contained in the options menu, but we will cover these later
Producing a ROI
Using the mouse produce a polygon (you choose the shape) within the dark feature in the middle
of the image:
Now on the ROI window box select New Region. Next click on the upper left hand corner of the
Main Image window and draw a second polygon in the dark green area.
Next press Edit and Name the ROIs as red=burned; green=trees; and blue=grass.
Next select File/Save ROIs and select press Select all Items. Finally, save this ROI file as
subsetroi in the C:/ATSR directory.
Now that we have these regions, we can do a number of useful things with them.
Selecting Options/Stats for all Regions –produces the min, max, mean, and standard deviation
for each band of EACH ROI.
Likewise selecting Options/Mean for all Regions – produces the mean value for each band of
EACH ROI in a graphical format.
10
Subsetting and Image with the ROIs
Refer back to stage 1.4 and use the Basic Tools/Subset Data with ROIs option from the Main
ENVI menu bar.
Next, select only the burned ROI and select the option to
mask all the pixels outside of the ROI. This converts all
these pixels to a set value (default = 0) and keeps the
values in the ROI as they were.
Now, experiment and try this again with one, two, or all of
the ROIs and with different masks/no masks.
The final task of this lab will be to use the ROIs to produce a supervised classification of the
subsetted image.
Next select subset1 and press ok. This will display the maximum likelihood window.
In this window, ONLY select all the ROIs, select no to providing rule images, and provide a
filename and then press ok:
11
This will produce a new file in the available bands list, which is a classified version of subset1.
Describe:
How good do you think the classification is?
12