Exc 5 - BE Courses

advertisement
UDP 422 – GeoSpatial Analysis
Exercise 5: Classifying Satellite Imagery
2/12/2016
Exercise 5: Classifying Satellite Imagery
Objectives




Classify the urban landscape by using remotely sensed data. To do this, you will
be introduced to one of the leading image processing software: ENVI 5.1. In this
exercise you will learn how to:
Extract and interpret spectral signatures of urban materials.
Collect signatures for five urban material: Pavement, Forest, Grass, Mixed
Urban, and Water
Classify a satellite image.
Setup
Data can be found within the zip file exc5 from the website
Background and Definitions
Below is a list of terminology used in the document which you should be familiar with. As
you work through this document write in brief definitions for each word for your future
reference. If you need further clarification, use the Help button.
 Satellite band, single band, multiple band:
 Color Composite:
 False Color Composite:
 Reflectance curves:
 Areas of Interest:
 Exploring satellite bands:
 Near Infrared (NIR) wavelengths:
 spectral reflectance curves:
 Signatures:
 Supervised classification:
Directions
1. We begin by opening the satellite image of
Seattle (what we’re classifying) and an aerial
photograph subset (to help collect the spectral
signatures) Open ENVI from Start > All Programs
> ENVI 5.1 > ENVI.
2. We now need to load both images. To do this,
let’s first open up two views. Go to Views > Two
Vertical Views.
Band
Wavelength
1 Visible blue
2 Visible green
3 Visible red
4 Non-visible Near Infrared
5 Non-visible Infrared
6 Non-visible Infrared
3. Now load the data. Select/highlight the bottom
View (from the lefthand window) and go to the File
Figure 1: Satellite Bands
-1-
UDP 422 – GeoSpatial Analysis
Exercise 5: Classifying Satellite Imagery
2/12/2016
menu and select Open. Navigate to your folder and open aerial.img.
4. Now repeat – but this time highlight the top view and select seattle_tm.img. This is
an unclassified satellite image of the Seattle Metropolitan area, saved in an ERDAS
IMAGINE file format. Satellite raster image files may consist of a single band or may
include multiple bands (in this case 6 bands of the Landsat TM 7 satellite). The bands
are organized according to Figure 1.This may take a moment. A window will pop up
(Data Manager) with a list of bands, which correspond to the wavelengths shown in Fig.
1.
5. Now we have to specify which bands we want to visualize. ENVI can use a Color
Composite to view the image using a combination of three bands represented in
intensities of red, blue and green. Because we are using colors to view both the visible
and non-visible spectrum, this is known as a “false” color display or
False Color Composite.
We can set the RGB colors of each band and select which bands
we would like to display in the window (Figure 2).
Click the box next to the appropriate layer (band) under the
seattle_tm.img in this order – Layer 4; Layer 3; then Layer 2. This
sets red to represent band 4 (Near Infrared band), green to
represent band 3 (Red band) and blue for band 2 (Green band).
Now click Load Data in the bottom right of the Data Manager
window. Now you can close the Data Manager.
Use the –/+ magnifying glass icons to zoom out/in.
Figure 2. The Data
Manager window.
Notice how a pattern gradient from blue to red runs west to east.
Dense urban areas are represented by a light blue color in the western portion of the
image. Vegetation strongly reflects Near Infrared (NIR) wavelengths. Therefore, if we
use red to view NIR, forest and vegetation will strongly stand out as red. Changing the
assignment of these color filters can help to discriminate or enhance certain features in
the landscape. For example, we can view the image by changing the bands we are
viewing.
6. Right click on the seattle_tm.img data set in the lefthand window, select Change RGB
Bands. We will set another combination of a False Color combination. Set Infrared band
(band 5) to red, Near Infrared (Band 4) to green and Visible Red (Band 3) to blue. Select
OK. Notice that the vegetation is now a green color and the urban areas are a purplepink color and you can see some differences in the urban areas. Patterns to the east
also begin to emerge.
-2-
UDP 422 – GeoSpatial Analysis
Exercise 5: Classifying Satellite Imagery
2/12/2016
OBSERVING SPECTAL RESPONSE PATTERNS
You can explore spectral response patterns further by looking at spectral reflectance
curves for typical materials found in the urban landscape. Each curve represents the
average reflectance curve compiled by measuring a large sample of features. To look at
these curves, you need to delineate Regions of Interest (ROIs) for each material.
Typically ROIs are created for signatures when classifying an image. We will revisit this
later. For the moment, you will use them to plot out reflectance graphs for different
material in the urban landscape.
LINKING AN AERIAL PHOTO WITH THE SATELLITE IMAGE.
We will use an aerial photograph to help us identify typical land cover types in the
landscape. Often times the aerial photograph is a subset of the satellite image that we
want to classify. ENVI allows us to link both images allowing us to zoom and pan around
both images simultaneously. The file aerial.img is a true-color aerial photo is of an area
in Bellevue, East of Seattle.
Go to Views > Link Views. A new window opens. Here select Geo Link. Click New
Link, then click on the display of each image to set what is linked. Hit OK. This activates
a spatial link between the 2 images and as you move around in satellite image, the aerial
photograph moves with it. Note that the two images have different spatial extents.
-3-
UDP 422 – GeoSpatial Analysis
Exercise 5: Classifying Satellite Imagery
2/12/2016
CREATING REGIONS OF INTEREST
ROI Tool overview: The ROI tool can be found by
right clicking on the image in the lefthand window
and selecting New Region of Interest. See image
to the right.
A Region of Interest Tool box opens (see screen shot above). You will notice there are
several geometries, or shapes, that can be used to select ROI's: polygons, rectangles,
ellipses, polylines, and points.
By default a region of interest is available – named ROI #1. Click in this box and rename
it something more descriptive, like Heavy Urban.
Then to create a New Region, select the icon in the upper lefthand portion of the window
with a green plus sign. This will create a new region of ROIs for another cover type that
you will specify, like forest. Again, rename this to something more descriptive than ROI
#1.
You can delete a region of interest by clicking the icon just to the right of the New ROI
icon. This Delete ROI button will completely delete the highlighted region of interest.
ROI Statistics Results are accessible by right clicking on the region of interest in the
lefthand screen and clicking the Statistics option.
1. You want to classify the seattle_tm.img image. First we will focus on heavy urban
areas. In either window, zoom in and pan until you are in a section of downtown
Bellevue where there is dense urban pavement (purple or pink areas or light
blue/white if you’re using a 432 band combination). Use the aerial photograph to
identify pockets of pavement. Then zoom in close.
2. First, on the lefthand window make sure that the Heavy urban region of interest is
selected/highlighted. Then in the Region of Interest Tool window choose the shape
type, either a polygon or rectangle shape – your choice.
-4-
UDP 422 – GeoSpatial Analysis
Exercise 5: Classifying Satellite Imagery
2/12/2016
3. You can change the color of the heavy urban ROIs by clicking on the ROI Color box.
Choose a color for heavy urban (or keep the default).
4. In the window where the satellite image is use the mouse to click vertices to define a
polygon or create a rectangle which encloses impervious surfaces. The polygon should
include only urban pixels. You want to pick between 15-30 pixels – no more. Remember
that it is important that the polygon be as homogenous as possible in order for us to
observe its spectral pattern. Right click twice to finish the ROI polygon (right click only
once to finish a rectangle). Notice that the record count in the Region of Interest ROI
Tool window now indicates that you have created one record, or region of interest.
5. To save, go to File>Save As in the Region of Interest (ROI) Tool Window. Select the
regions of interest you want to save (currently there is only one with records) and then
navigate to your exercise folder, and enter a file name. Make sure to select all the ROI
regions you want to save. The file will have an xml extension. Save now and often during
the creation of the ROIs.
To pan around the image you will have to select the pan from the main window toolbar
set. Then to begin drawing a new region of interest, you will need to select the geometry
tool you would like to work with from the Region of Interest (ROI) Tool window.
6. Create four more polygons for the heavy urban ROI (five total polygons). Click the
arrow buttons at the bottom of the Region of Interest (ROI) Tool window to zoom to
each individual heavy urban ROI polygon you have created. As you click through, if you
are unsatisfied with one of your polygons, you can click the Delete Part button (the red
“X” to the right of the arrow buttons) in order to delete that one region of interest (record).
7. Create four new regions, one each for forest (assign green as the color), grass
(yellow), water (blue), and mixed urban (red) cover classes and create five polygons
for each. Be careful about how you pick your ROI polygons. Look for a residential area
in Bellevue to create the Mixed Urban category. Make sure to rename the ROI Name
and change the color of each class
8. When you have finished creating the remaining ROIs, save your ROI file again. You
will have to use Save As each time you add a new region of interest (the type, not
individual records). For each new save as iteration you can save a new version (e.g.
ROIv1; ROI v2, and so on) or if you are confident you won’t need previous versions just
save over the first file.
VIEWING SPECTRAL PLOTS
Use ENVI’s integrated spectral profiling capabilities to examine the spectral
characteristics of the data.
1. Let’s look at the Spectral Profile of the pixels in our regions of interest. We’ll first
create a spectral plot for the heavy urban signatures based on your ROIs.
2. Highlight the urban ROI region in the left-hand window and click the Statistics Option.
This displays a spectral plot for your urban ROIs showing the changes in spectral values
across the band wavelengths.
-5-
UDP 422 – GeoSpatial Analysis
Exercise 5: Classifying Satellite Imagery
2/12/2016
The variability in your signatures is shown by the green lines of standard deviations
(right click the plot and select Plot Key to see an explanation of the line colors). Areas
with greater variation (heterogeneity) in the land-cover class (like urban areas) have a
wider distance between the green bands. The heterogeneous nature of the urban
environment makes it difficult to create an accurate classification using the 30 meter
Landsat sensor.
You should be able to see a general pattern where pavement (which tends to dominate
urban areas) reflects evenly across the first four bands: Blue, Green, Red and NIR while
it drops off in the last two non-visible. Also, take note of the Basic Stats section below
the plot as further evidence of the variability of the ROIs across the band wavelengths.
3. Copy this image as a screenshot and paste it into a word document.
4. Repeat this for each of the remaining four classes, inserting the spectral plot from
each into a word document.
Q1. What is the difference between urban and forest spectral signatures? What
do you think is causing these differences?
Q2. Insert into your document the JPEGS of your spectral plot for each ROI
region.
Q3. Give a brief description of the additional three material signatures (grass,
water and mixed urban).
CLASSIFYING YOUR DATA: SUPERVISED CLASSIFICATION
Now that we have collected sample ROIs for our five cover types, we are ready to
classify the data. We will use a supervised classification technique using the ROIs we
collected for training sites and the maximum likelihood classifier option in ENVI.
Maximum likelihood classification assumes that the statistics for each class in each band
are normally distributed and calculates the probability that a given pixel belongs to a
specific class. Unless a probability threshold is selected, all pixels are classified. Each
pixel is assigned to the class that has the highest probability (i.e., the maximum
likelihood).
Since our collected ROIs represent signatures across the image, ENVI automatically
calculates the spectral seperability of each class based on the statistics we saw from the
spectral plots. All we need to do is give ENVI the original seattle_tm.img image and the
ROI file and set some parameters to create the classification.
0. Due to an upgrade to the software, ENVI no longer classifies ERDAS IMAGINE files.
So we will now have to convert the seattle_tm.img file to a new file format. Go to File >
Save As. Select seattle_tm.img as the input file. Keep the Spatial Subset and Spectral
Subset defaults. Select OK. Now change the output format to ENVI (it may be selected
as the default). Navigate to your working directory and name the new file seattle_tm1.
Hit OK. This new data set is loaded – you can repeat the steps from the first page to set
the RGB colors of three bands of your choice (the default is to load it in as a grayscale).
-6-
UDP 422 – GeoSpatial Analysis
Exercise 5: Classifying Satellite Imagery
2/12/2016
1. Now we are ready to classify our data. From the main ENVI toolbox on the right hand
side of the window, go to Classification>Supervised>Maximum Likelihood
Classification
2. Select the seattle_tm1.dat (our new data file) as the Input File. Since we want to
classify the entire image (although we only selected ROIs for an area corresponding to
Bellevue), we will accept the default Spatial Subset (Full Scene).
Click OK to continue.
3. Now we specify the ROI file that you saved from section CREATING REGIONS OF
INTEREST. Your saved ROI file is associated with the image so ENVI will automatically
enter your ROIs in the Select Classes from Regions window. Click Select All Items
to select all of the ROIs to use in the classification.
4. Leave the Probability Threshold and Data Scale Factor at their default settings.
The probability threshold option controls the cutoff that a pixel will belong to a specific
class. This could be important if there are mixed pixels, errors with overlapping ROIs, or
we are unsure of the purity of spectral signatures represented by an ROI.
5. Make sure the Output Results option is set to File
your working folder and specify an output file name.
, and navigate to
This is optional, but you can specify an output Rule Image
and save it to
file using same process as for the output classification image. In this way you would be
able to view the probability for each cell being classified into the actual and cover class
based on the ROIs you created.
Click OK to start the classification, this make take a few minutes.
After the classification finishes, ENVI will automatically load the classified image into the
window.
6. The classification output is in ENVI native format and ArcMap is not able to read it
directly. We will need to export it to a format ArcGIS can ingest. Go to File > Save As.
Now select your input file (leave the rest as the default settings), click OK. Then select
the Output Format as a TIFF. Navigate to your folder and name your output file, click
OK.
7. Open your output TIFF file in ArcMap. See what it should roughly look like in Figure 5
(you will need to change the color scheme, do not use this one!).
-7-
UDP 422 – GeoSpatial Analysis
Exercise 5: Classifying Satellite Imagery
2/12/2016
Figure 5. classified land cover
8. Open the properties of your TIFF file and go to the symbology tab. Select Unique
Values. Change the labels to the appropriate land-cover classes and the colors if
necessary.
Q4. For the grand finale, set up the map with all the fixings, and export as a jpeg
image (the layout should be for a letter size sheet, 150 dpi, cropped to the graphics
boundary).
Deliverable
Please upload a word document file with your_name_exc5 as the title. Within this file
there should be the following:
Answers to questions 1 - 3.
Q1. What is the difference between urban and forest spectral signatures? What
do you think is causing these differences?
Q2. Insert into your document the JPEGS of your spectral plot for each ROI
region.
Q3. Give a brief description of the additional three material signatures (grass,
water and mixed urban).
And the jpeg map (Q4).
Q4. For the grand finale, set up the map with all the fixings, and export as a jpeg
image (the layout should be for a letter size sheet, 150 dpi, cropped to the
graphics boundary).
Due on January 30, 2014 by midnight.
-8-
Download