Sie sind auf Seite 1von 5

Image Analysis - Supervised classification. Evaluation of accuracy.

Background: Digital image classification is the process of assigning pixels to classes.


Usually each pixel is treated as an individual unit composed of values in several
spectral bands. By comparing pixels to one another and to those of known identity, it
is possible to assemble groups of similar pixels into classes that match the
informational categories of interest to users of remotely sensed data. These classes
form regions on a map or an image; after classification, the digital image is presented
as a mosaic of uniform parcels, each identified by a color or symbol. In principle,
these classes are homogenous -pixels within classes are more similar to another than
they are to pixels in other classes. In practice, of course, each class will display some
diversity, as each scene will exhibit some variability within classes.
Image classification has formed an important part of the fields of remote sensing,
image analysis, and pattern recognition.
There are four standard types of classification formula supported by Er Mapper:
Parallepiped, Minimum distance, Mahalanobis distance, Maximum likelihood.
There are four Maximum likelihood classification types. These are enhanced,
enhanced neighbor, standard and standard neighbor. They assign a cell to a class by
taking into account the distance weighted by the covariance matrix of the means, and
the prior probability the cell belongs to it. These classifications work well with good
quality training regions or classes. You can specify Equal Prior Probability for all
classes or edit the Bayesian prior Probability for individual classes.
All classifications produce a band containing the class number for each pixel. For
standard classifications you can also obtain a second band containing the typicality for
each pixel, a measure of how representative it is of its class.
In Enhanced classifications, selecting Gen Post Prob and Typicality produces two
bands for each selected class or region. One reports post probability, which is an
indication of the3 likelihood of the pixel belonging to each class. The other band
reports how representative the pixel is of that class.
The Neighbor classifications also enable you to smooth the data by using the classes
of the surrounding pixels to modify the prior probability. The neighbor Filter sets the
number of neighbors used to smooth each pixel. Increasing the number of passes will
also increase smoothing.
Minimum distance: Cells are assigned to the class with the closest class mean. The Threshold specifies
the maximum distance from the mean for any member of class, in units of standard deviations. Cells far
from all classes are assigned a null value instead of an arbitrary class.
Parallepiped: Cells are arbitrarily assigned to the first class where they lie between the minimum and
maximum data values (for all specified bands). Classes are rectangular (or the multi-dimensional
equivalent) and can overlap. Thresholds are set implicitly by the maximum and minimum values in
each class. This is a very simple classifier.
Mahalanobis: Similar to Minimum distance except it takes into account the directional spread of class
data using the covariance matrix of the means.
If you selected one of the Maximum likelihood or Minimum Distance classification
types, set the parameters for the classification:
Depending on the classification type, one of the following parameters will be
displayed:
Equal prior probability
Maintains all unaltered prior probabality setting, so that all prior probabilities total 1.0. If you change
the setting for a class or region, the rest of the fields change automatically so the total still adds up to 1.
Threshold
Specifies the maximum distance from the mean for any member of the class, in units of standard
deviations. Cells far from all classes are assigned a null value instead of an arbitrary class. This
excludes distant cells from classes.
Generate Typicality
Creates a band containing the typicality for each pixel. This is a measure of how representative the
pixel is of the class it’s allocated to.
Neighbor filter
Sets the number of neighboring pixels used to smooth each pixel.
Number of passes
Increasing the number of passes also increases smoothing.

Exercise:

Supervised classification starts with training regions drawn on the image, then finds
all other pixels with similar spectral characteristics.
Defining training regions:
Selection of training may be as important as choise of classification algorithm.
Perhaps the most important property of a good training area is its uniformity or
homogeneity. Data within each tarining area should exhibit unimodal frequency
distribution for each spectral banb to be used. The optimum number of training areas
depends upon the number of categories to be mapped, their diversity, and the
resources that can be devoted to delineating tarining areas. Ideally, each
informational category, or each spectral subclass, should be repesented by a number
(perhaps five to ten at a minimum) of training areas, to assure that spectral properties
of each category are represented. It is usually better to define many small training
fields than to use only a few large fields.
In ErMapper, regions are vector polygons that define an area of interest in an image.
Regions can be used to process or display parts of an image separately from others,
mask out parts of an image for maosaick, defining training sites as will be done here,
and other purposes. The definition of each region is stored in the header file for the
raster dataset.

First, open the Landsat TM algorithm (the rectified one, if you have it…)
Click the View Algorithm for image Window toolbar button (the two green flying
layers)
Choose the rectified dataset by clicking the open-folder button and selecting the path
to c:/y31/lankitmo.alg or whatever you have.
Add a vector layer for region definition to your algorithm
1. From the edit menu, select edit/create regions. The map compositon dislog box
opens.
2. In the dialog, select the raster region option under Mode. This tells Er Mapper that
the annotation layer will be used to create regions for a raster dataset (for use in
training site selection in this case)
3. Click OK. ErMapper opens the tools palette dislog box containing your vector
annotation tools. Also notice that a new vector layer titled ‘Region layer’ has been
added to the layer list in the Algrithm window.
4. Click on the new ‘Annotation layer’ layer to select it, then click the Open Color
chooser button to choose a color. The color you choose is the color in which your
regions will be displayed as you draw them using the annotation tools.
Open the Geoposition dialog box
1. From the view menu select Geoposition. The algorithm geoposition extents dialog
box opens
2. Select the Zoom option to display buttons for zooming and panning. You will use
these options to help zoom in and out of areas as you define your training region
polygons.

Define a region to represent lakes


1. On the Tools palette dialog, click the zoom mode button (the magnifier)
2. Zoom to one of the lakes by dragging a zoom box.
3. On the tools palette dialog, click on the Polygon button
4. Draw a polygon to define an area of water by clicking once at each point, then
double clicking to close the polygon. The polygon is selected by default when you
close it. Since it is selected, you can now add a text attribute to give the polygon a
name.
5. On the tools dialog, click the edit Text attribute button
6. Enter the text ‘Vesi’ and apply, then close.
You have now defined a training region representing lakes in the image. When you
claculate statistics for this image later, the statistics for pixels inside this region will
be used as a ‘signature’ to classify other areas of lake in the image.
Now you should define other regions to the image. First consider for a moment, what
classes you would like to have in the end-use image. For forestry, is it enough to
classify to classes of main tree species? Or shoud you try to classify to forest land an
waste land? What about peatlands? Or a volume/dominat tree species classification:
pine stands < 100m3, pine 101-200, pine >201, spruce <100, spruce 101-200, spruce
>201 etc. Of course you should try to mask out water, roads, arable land and in our
example image the ‘airport’.
For definition of the training regions, we have a set of aerial photos and field sample
plots measured on the area they represent. When you have made a decision of the
informational classes you will try to get out of the image, use the copies of the aerial
photos to define training regions. The ‘field data’ you can get from a list connected to
the sample plots. These are plots used in a real study.

Save the regions to the practice dataset


1. On the tools palette dislog, click the Select name to save file button (the arrow
going to the diskette)
2. Select the dataset you were workig with. The regions definitions and names are
saved to the header file of the dataset. You can now calculate statistics for the
pixels in each region. Close.
Calculate statistics for the new regions
1. From the process menu select Calculate statistics. Select the current dataset. Select
also the Force recalculate statistics option (to calculate statistics again in case they
have previously been calculated). Ok, wait and close.

To set up training regions:


Training area information contains a list of the regions and classes used by the
supervised classification. You can add regions or classes from one or more classified
datasets.
1. click on Add New…Select a dataset from the file chooser
All regions and/or classes in the dataset are added to the unsupervised classification.
You may add regions/classes from any numbers of datasets, to a maximum of 256
regions. These may be:
• training regions drawn using Edit/create regions
• classes from a previous Unsupervised or Supervised classification
• regions converted from a vector polygon dataset using the annotation tool
2. The following information is displayed for each class or region:
Dataset, the dataset containing the selected class or region
Class/Region, the name of the class or region
3. You may not need all the regions or classes in each selected dataset
Highlight the region and click DEL to remove unwanted regions
4. Set the following for the classes and regions:
Bayesian Prior Prob: edit the values required. A total of all fields is automatically
maintained at 1 by changing all unedited fields.
Gen Post Prob and typicality: Select for each class or region if required. This
produces two bands for each selected class or region.
To run Supervised Classification:
When the dataset, regions and classes are selected and the processing parameters are
set, you can run the supervised classification.
1. Click OK in the Supervised classification dialog box to begin processing. The
Supervised classification status dialog box is displayed, showing the progress of
the classification. A message is displayed when the processing is complete. Stop
abots the processing without closing the window.
2. Assign colors to the classes as in the previous exercise
3. Display the regions using the Classification Display overlay.

Verifying supervised classification: One of the problems is verifying the validity of


the classification. With the supervised classification in ER Mapper you can generate
Prior Probability and typicality for the classes you are interested in. These provide a
measure of how accurate the classifications are.

Das könnte Ihnen auch gefallen