Lab - 7 Classification
Lab - 7 Classification
Lab 7
Image Classification
Objectives
Image
Quickview
File - pkl2mac2006.img
Landsat TM Data
Band 1 = Blue (.45-.52)
Band 2 = Green (.52-.60)
Band 3 = Red (.63-.69)
Band 4 = NIR (.76-.90)
Band 5 = MIR (1.55-1.75)
Band 7 = MIR (2.08-2.35
A. Signature Extraction
To begin, open a color infra-red composite of pkl2mac2006.img in a viewer (RGB=
bands 4,3,2) and fit to frame. The ERDAS Imagine Signature Editor allows you to
create, manage, evaluate, edit, and classify signatures (.sig extension). Both parametric
(statistical) and non-parametric (feature space) signatures can be defined. In this exercise,
we will be defining signatures by collecting them from the image to be classified using
the Signature Editor and Area of Interest (AOI) tools. The Signature Editor can be
accessed through the Classifier icon in the Imagine icon panel. This device will enable
you to select and save training sites and make them available for future use in a
supervised classification. You may launch the Signature Editor without having obtained
any previous signatures or you can retrieve a .sig file using Load under the File menu
within the Signature Editor.
The Signature Editor has many interesting and useful tools. The tools you should concern
yourself with are the buttons directly beneath the menu bar, especially the three that have
pluses and minuses on them. These will be used in conjunction with the AOI editor to
enter training sites into a .sig file. The first button, it looks like an L with a plus next to it,
is used to add a currently selected AOI site to the file. The next one to the right will
replace the highlighted field with the current AOI site. The third button is used to merge
training sites (signatures) once you feel they have similar spectral characteristics.
The Seed Properties option is also important because it allows you to modify the limits
of seed area growth by area and/or distance in addition to letting you select the
Neighborhood selection criteria. We will be using the Neighborhood default setting
which specifies that four pixels are to be searched, then only those pixels above, below, to
the left, and to the right of the seed or any accepted pixels are considered contiguous.
Under Geographic Constraints, the Area check box should be turned on to constrain the
region area in pixels. Enter 500 into the Area number field and press Return. This will be
the maximum number of pixels that will be in the AOI. Enter 10.00 in the Spectral
Euclidean Distance number field. The pixels that are accepted in the AOI will be within
this spectral distance from the mean of the seed pixel. Before closing the Seed Properties
window, click on Options and make sure that the Include Island Polygons box is turned
on in order to include nonadjacent polygons within the logical growth region.
To begin the process, you must select an area on the image using one of the AOI tools,
such as the polygon or rectangle tool, or you can place a seed and grow a region using the
Region Grow tool (looks like a magnifying glass in the AOI menu). Use whatever you
need in that particular instance, just make sure you think you know what the area
represents in terms of ground cover. In the viewer, zoom into an area where you want to
select an AOI using the viewer's magnifier tool and then select the AOI polygon tool and
draw a polygon around your chosen area (or you may plant a seed to grow). After the
AOI is created, a bounding box surrounds the polygon or region, indicating that it is
currently selected.
While the area is selected, use the Create New Signature button to add the selected area
into the Signature Editor. Now click inside the Signature Name column for the signature
you just added and give it a name (use names like urban1, urban2, etc. to define your
individual AOIs). You may also want to change the color in the Color column.
You can use the Image Alarm tool under View in the Signature Editor to get a preview
of the extent that the classes you have chosen represent the rest of the image. If you select
the Image Alarm option a pop-up box titled Signature Alarm will open. In this box you
can choose to indicate classes that overlap and the color that represents overlap. This can
be useful if you are considering merging classes. The signature alarm will also, as
mentioned, let you see the extent of each of the classes (you will need to do this anyway
before you can see the overlap). Do this by selecting (highlighting) a class or a set of
classes in the signature editor using the cursor. You can select the color you would like to
represent the class as by clicking on the colored square with the right mouse button. Once
you have made your selections click on the OK button in the signature alarm and let
Imagine do its work. Using this tool, you can see what areas are covered and which are
not using the classes you have selected (according to the rules of parallellepiped
classification logic).
For this lab, take at least three relatively distinct training sites for each of the following
classes found in the scene:
1. Urban
2. Open/develop land
3. Mangrove Forest
4. Forest
5. Water
6. Oil Palm
When you are done generating the training sites for these 6 classes and you feel they are
representative of the whole scene based on your use of the signature alarm, save the
signature editor file using the Save As menu item under file in the signature editor menu.
10
B. Feature Selection
The Signature Mean Plot button to the left of the histogram in the signature editor,
allows you to view the mean plots of your training data on the screen and thus estimate
which of the TM bands best discriminates between the different training sites that you
have selected. Select this option as well as the histogram (if you feel this is more helpful,
use the all selected signatures and all bands option and make sure you have all of the
classes highlighted when you do this).
11
The most precise way to accomplish the task of determining which bands to use is to
through the use of the separability option under the Evaluate menu in the Signature
Editor. Select 3 for the Layers Per Combination choice. Refer to Jensen's book to
determine which Distance Measure to use and how to interpret the results that will
appear in the cell array (choose Cell Array option). Use the Best Average listing method
and click OK. The results of this operation will appear in a pop-up box titled
Separability CellArray. Note which 3 bands seem to do the best job of spectrally
separating your classes. Also note which classes overlap and which are spectrally
separable. You will need this information for the next part of the exercise.
Display Signature Mean Plot Window
Display Signature Histogram Window
12
Now that you have specified your training sites, you are ready to proceed with the
supervised classification. Under the Classify menu in the Signature Editor, choose the
Supervised Classification option. Because you have already selected a signature file it
will not ask for one. If you were to close the signature editor and access the supervised
classification through the Imagine Classifier menu, you would be able to open a .sig file.
In the Supervised Classification pop-up box that appears give a name for your output
13
file. The Parametric Rule setting should be set to Minimum Distance (note: the
textbook gives a good description of the differences, advantages and disadvantages of the
various classification logic schemes) and everything else should be left as you find them.
Select OK when everything is in place. Open a new viewer and display the results, then
answer the following questions concerning signature extraction and supervised
classification:
Minimum Distance
14
Maximum Likelihood
Mahalanobis Distance
1)
identify the overlaps by using the specific color. Enables to perform a rapid but crude
pre-classification with one or more signatures. Besides the function is to identify
signatures that is likely to be confused with one another during classification , To
highlight each pixel that has been chosen using Signature Editor. By using Image
each pixel can be shown clearly and represents the isolated features in the image
based on each class according to the parallelepiped rule. Furthermore it can be
applied for single or multiple selected signatures. Image Alarm function also offer the
ability to detect which signatures is overlaps and the users can identify the overlaps
using the specific color (different with another signature class color).
2)
Explain why do you think the mean plot and the separability cell array seem to
differ on the three most important bands in certain instances.
Mean plot is used to examine the spectral profiles of the land cover categories. An
additional measure you can use to evaluate your training signatures is the Separability
feature from the Evaluate menu. The larger the
separability values are, the more likely the final
classification results will be good. Looking at the
separability table, some class are clearly
separable, others not so clearly. This is due to
their low reflectance, making it difficult to
distinguish between them.
3)
Which Distance Measure method did you choose and why? Which three bands
appear best to separate the classes? (Use the results from the Signature
Separability measures on this one)
Transformed Divergence because its measure the divergence (statistical distance)
between signatures and determine band subsets that maximize the classification.
16
4)
Which land cover classes seem to be confused the most and why do think
this is the case?
The land cover classes seem to be confused is the urban area and open
develop land area. This is because of the value of pixels on both areas
consists of a more or less same value (in yellow circle).
5)
If
out
you
could
combine or throw
certain
signatures
17
Combine forest and mangrove area as one class which is vegetation. This is because,
both area resemble almost in the same category. The reflectance value of this area
basically depends on the chlorophyll in the plants.
18
information and knowledge of the terrain, or useful ancillary data if this approach is to be
successful.
To begin the unsupervised classification, click on the Classification icon and then select
Unsupervised Classification.
Fill in the input and output information in the Unsupervised Classification dialog box.
Give both the Output Cluster Layer and Output Signature Set a similar name. Make sure
that under Clustering Options the Initialize from Statistics box is on and set Number
of Classes to 20. Set Maximum Iterations to 20 and leave the Convergence Threshold
set to 0.950. Maximum Iterations is the number of times that the ISODATA utility will
recluster the data. It prevents the utility from running too long, or from getting stuck in a
cycle without reaching the convergence threshold. The convergence threshold is the
maximum percentage of pixels whose cluster assignments can go unchanged between
iterations. This prevents the ISODATA utility from running indefinitely. Leave everything
else in its default state. When you have entered all the relevant information click OK to
begin the process.
19
RECODE
20
21
22
The next step is to open the Signature Editor (under the Classification menu) with the
*.sig file you created in the unsupervised classification. Select all the clusters (they
should all be highlighted in yellow).
In the Signature Editor main menu select Feature and then in that pull-down menu
select Objects. This will display a Signature Objects dialog box that allows you to tell
Imagine which viewer you want to receive the signature editor information about the
clusters. In this case we want the viewer in which you have displayed your chosen feature
space graphic. Select that viewer # in the Signature Objects space provided that
represents this viewer. Select Plot Ellipses and Plot Means (or you can try the others if
you like). Leave everything else in it's default state and click OK. Only selected clusters
in the Signature Editor window will be drawn. More than likely your ellipses and means
are multi-tonal in nature. If you would like them all to be white, red, green, etc... select all
the classes in the Signature Editor dialog box using the mouse and change the color to
the one you desire. Save the information as an Annotation Layer.
23
24
To analyze the content of the clusters, you should use a combination of techniques. The
first should be to use the mean scatter plot to make some educated guess about the
information in each cluster. You might want to label each of the 20 clusters on the scatter
plot using the Label option in the Signature Objects dialog box so you know what
cluster is containing which class. You will more than likely have to zoom in to get a
better look at some of the clusters given the close proximity of clusters to each other. You
should also have a viewer open with the original scene displayed. This will further help
you identify the land cover class. If you are feeling adventurous, you can overlay your
classified image on the original image and set all the clustered image's colors to
transparent using the Raster Attribute Editor found under the Viewer menu (Raster Attributes).
Once you have set all classes to transparent then you can individually color (by making
them opaque) particular classes and see where they are on the image. Another method
25
may be to use the Utility - Swipe or the Utility - Fade tools in the Viewer by opening the
classified image on top of the raw data (do not Clear Display after opening the first raw
image). Regardless of how you choose to proceed you should not rely on any one
particular method but a combination of methods and some common sense to arrive at a
sound classification.
When you have decided upon the class breakdowns, use the Raster Attribute editor to
assign class names and colors to the classification image. Create the same five classes
you used in the supervised classification and place each of the 20 clusters into one of the
classes by giving it the same color and class name as every other cluster in that class.
When you satisfied with your unsupervised classification, finish the lab by doing the
following:
6)
Create a graphic locating what clusters you placed in each of your final six
classes.
Water
26
Mangrove
Forest
Oil Palm
27
Urban
7)
28
The analyst has control of a set selected menu of informational categories tailored
to a specific purpose and geographic region
The analyst using supervised classification is not faced with the problems of
matching spectral categories on the final map with the informational categories of
interest
The analyst, in effect, imposes a classification structure upon the data and these
analyst-defined classes may not match the natural classes within the data, and
therefore may not be distinct or well defined it multidimensional data space.
Training data are often defined primarily on informational categories, and only
secondarily on spectral properties
Training data selected by the analyst may not represent conditions encountered
throughout the image especially if the area to be classified is large, complex, or
inaccessible
Conscientious selection of training data may be a time-consuming, expensive, and
tedious undertaking, even if ample resources are at hand
The advantages of using an unsupervised classification as follows:
No extensive prior knowledge of the region is required, but knowledge of the
region is required to interpret the meaning of the results produced by the
classification process
The opportunity for human error is minimized
The classes defined by unsupervised classification are often much more uniform in
respect to spectral composition
Unique classes are recognized as distinct units
29
30
8)
31