Supervised Classification in ER Mapper
Make sure that you copy the data to your Q: directory before you begin this
process. The reason for doing this is that when you complete this process you
change the "header" file (the .ers file)
Here are the steps for classification using the raw TM data bands.
- Start ER Mapper and open a new RGB algorithm. Load the data and make it
RGB321 and save it as an algorithm named data_name_here_RGB321.alg
in your Q: directory.
- All classification depends on the distribution of the cell data so if you
haven't done so yet, you must first calculate the statistics. To do this,
choose Calculate Statisitcs from the Process Menu. When you
get the options box, set the resampling to 1 through 4, and click the "force
recalculation" button. Then click ok and wait.
- Getting ready to draw the training regions. What you're doing
is make a new annotation layer first that shows
vector outlines. This vector outline is used to make a new set of rasterized
regions that define the cells of your training region. This is a several step
- From the Edit Menu choose the Edit/ Create Regions option.
- Two boxes will come open. One is for the New Map Composition,
make sure that it refers to the correct dataset (on whose header file
you want to right this information; remember that it is easily transferred
another dataset sharing the same geometry.)
- Click ok when you're done and you should see the second new window with
a toolbar. You'll also get a new layer in your algorithm.
- Save As...this algorithm using the main ER Mapper menu
(not the new tools menu) using a name such as "small_Va_RGB321_with_landuse"
- Drawing the training regions
- Open the Geoposition tool under the View menu.
- Using the zoom and pan buttons, zoom in on BV.
- From the tools menu, choose the polygon tool it looks like this.
- Outline the residential part of BV and double-click on the last point
to close the area.
- Double-click on the polygon tool and an options box will come open.
Use it to set color.. of the line (and enclosed region). From the
View menu of this set color box you can choose the "named colors"
option, it's easier to use. Click ok when you've got a color you like.
- Now click on the text/attribute button
and give this region a name. If you want to outline other areas of the
same type, just outline them later and use exactly the
same name. It is better to have more than one training region for each
- From the tools palette choose the save as... button.
Make sure that it is saving the information to the correct dataset. This
will add the region definition information. I recommend that you click
on the save button of the tools menu after working with each region outline.
- Zoom out using the All datasets button on the geoposition menu box and
then zoom in on a area of pasture.
Repeat 4.I to 4.VII the zoom out again. Find the lynchburg reservoir....
- Evaluating your training regions
- Make sure that you have both saved the region annotation to your dataset
(using the tools palette) and save the algorithm using the main ER Mapper
save button. To either view the raw statistics or the histograms, I refer
you to the tutorial manuals. The following instructions apply only to
the scattergram method.
- From the View Menu, choose the scattergram option. It may ask you to
confirm some setup information. click ok. You should see a density plot
of band 1 vs band 2 data. To see how good your training regions are, open
the setup box and click on the "show means and 95 confidence intervals
near the bottom AND open the dataset to which you just attached the
raster regions, with the open dialog box at the bottom.
- All of your training regions, in appropirate colors, should appear as
"x's" with elipses around them. Change bands in the setup box
and use the "limits to actual" button to zoom in. If you don't
like some of your training regions you can delete them using the "scissors"
keys in the tools palette (click on them first).
- Classifying the data based on your training regions.
- From the Process Menu choose Classification then Supervised Classification.
- Select the Output Dataset option and enter a name like 1999_sup_class_max_like.
Make sure that it goes into your home directory.
- Click the classification type drop-down menu and choose Maximum Likelihood
then Maximum Likelihood Standard
- When the setup box opens, un-select the typicality and
posterior probability options. They add a lot of time to the processing
and space to the dataset.
- Click ok and wait.
- Viewing the classified image.
- Open a RGB image of your dataset, and then add a "New Surface"
from the Edit button.
- Change the new pseudocolor layer type to "class display."
- From the process stream at the bottom, load in your newly created classified
dataset and hit refresh button.
- If you don't like the colors, choose the Edit Class/Region Color
and Name option from the Edit Menu.
- Subsetting the classified image.
If you want to display a map with just one or more of the classification layers,
but not all follow these steps.
- Close all the windows and open a new Pseudocolor algorithm.
- Change the layer type to Classification.
- Load your new classified dataset into the algorithm.
- From the process stream, choose the equation editor and enter the following
equation if you want to display class number 1
if input1=1 then 1 else null
or...input1=2, etc for other classes and then click the apply button and
the GO button.
- From the process stream change the color.
- You may add as many classification layers as you wish, and you may display
them over a RGB image if you want.
Classifying data other than raw TM bands
- First make an algorithm using RGB or any number of pseudocolor layers that contains ratios or principal components.
- Save the algorithm. Then Save As A Virtual Dataset using a good name
that tells you what is there plus the word "virtual." This makes
a new dataset header (with the .ers ending) that makes use of other raw data
and the algorithm as if it were a dataset.
- Run statistics on the new dataset using the Process menu and Calculate Statisitcs options
- Add the old training layers to the new dataset by opening up a new annotation
layer (edit/create regions under the Edit Menu), loading the previous training
regions, and "save as" them from the Tools palette to the new dataset
(this rewrites the header file).
- Rerun the statistics.
- Now you can evaluate then classify the image as above, now using the newly created virtual dataset.