0% found this document useful (0 votes)
35 views12 pages

Unsupervised Pixel Classification Guide

Uploaded by

dawit.girma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views12 pages

Unsupervised Pixel Classification Guide

Uploaded by

dawit.girma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

ADVANCED CLASSIFICATION

Introduction
Classification is the process of sorting pixels into a finite number of individual classes, or
categories of data based on their data file values. If a pixel satisfies a certain set of criteria,
then the pixel is assigned to the class that corresponds to that criteria. There are two ways
to classify pixels into different categories:
• Supervised
• Unsupervised
Supervised vs Unsupervised Classification
Supervised classification is more closely controlled by you than unsupervised classification.
In this process, you select pixels that represent patterns you recognize or that you can
identify with help from other sources. Knowledge of the data, the classes desired, and the
algorithm to be used is required before you begin selecting training samples.

By identifying patterns in the imagery, you can train the computer system to identify pixels
with similar characteristics. By setting priorities to these classes, you supervise the
classification of pixels as they are assigned to a class value. If the classification is accurate,
then each resulting class corresponds to a pattern that you originally identified.
Unsupervised classification is more computer-automated. It allows you to specify
parameters that the computer uses as guidelines to uncover statistical patterns in the data.
Use Unsupervised Classification
This section shows you how to create a thematic raster layer by letting the software identify
statistical patterns in the data without using any ground truth data. ERDAS IMAGINE uses
the ISODATA (Iterative Self-Organizing Data Analysis Technique) algorithm to perform an
unsupervised classification. It is iterative in that it repeatedly performs an entire
classification (outputting a thematic raster layer) and recalculates statistics. "Self-
Organizing" refers to the way in which it locates the clusters that are inherent in the data.
The ISODATA utility repeats the clustering of the image until either:
• A maximum number of iterations has been performed, or
• A maximum percentage of unchanged pixels has been reached between two iterations.

1. Click the DataPrep icon on the ERDAS IMAGINE icon panel.

The Data Preparation menu opens.

1
Generate Thematic Raster Layer
1. Select Unsupervised Classification from the Data Preparation menu to perform an
unsupervised classification using the ISODATA algorithm.
The Unsupervised Classification (Isodata) dialog opens.

2. Click Close in the Data Preparation menu to clear it from the screen.
3. In the Unsupervised Classification dialog under Input Raster File, enter
guto_gida84.img. This is the image file that is classified.
4. Under Output File, enter guto_gida_Unsup.img in the directory of your choice.
This is the name for the output thematic raster layer.
Set Initial Cluster Options
The Clustering Options allow you to define how the initial clusters are generated.
5. Under Clustering Options, enter 10 in the Number of Classes field.
Choose Processing Options
The Processing Options allow you to specify how the process is performed.
1. Enter 24 in the Maximum Iterations number field under Processing Options.
This is the maximum number of times that the ISODATA utility reclusters the data. It prevents this
utility from running too long, or from potentially getting stuck in a cycle without reaching the
convergence threshold.
2. Confirm that the Convergence Threshold number field is set to .950.
Convergence Threshold
The convergence threshold is the maximum percentage of pixels whose cluster assignments can go
unchanged between iterations. This threshold prevents the ISODATA utility from running
indefinitely. By specifying a convergence threshold of .95, you are specifying that as soon as 95% or
more of the pixels stay in the same cluster between one iteration and the next, the utility should stop
processing. In other words, as soon as 5% or fewer of the pixels change clusters.

2
Evaluate Classification
After a classification is performed, you can use a classification overlay or recode the classes
to evaluate and test the accuracy of the classification.
3. Click OK in the Unsupervised Classification dialog to start the classification process. The
Unsupervised Classification dialog closes automatically.
4. In the Job Status dialog, click OK when the process is 100% complete.
5. Proceed to the “Evaluate Classification” section to analyze the classes, so that you can
identify and assign class names and colors.
Create Classification Overlay
In this example, you use the Raster Attribute Editor to compare the original image data with
the individual classes of the thematic raster layer that was created from the unsupervised
classification (guto_gida_Unsup.img). This process helps identify the classes in the thematic
raster layer. You may also use this process to evaluate the classes of a thematic layer that
was generated from a supervised classification.
Display Files
1. Select File -> Open -> Raster Layer from the Viewer menu bar to display the
guto_gida84.img continuous raster layer.

The Select Layer To Add dialog opens.

2. In the Select Layer To Add dialog under Filename, select guto+gida84.img.


3. Click the Raster Options tab at the top of the Select Layer To Add dialog.
4. Set Layers to Colors at 4, 5, and 3, respectively.
5. Click OK in the Select Layer To Add dialog to display the image file.
6. Select File -> Open -> Raster Layer from the Viewer menu bar to display the thematic
raster layer, guto_gida_Unsup.img, over the guto_gida84.img file.
The Select Layer To Add dialog opens.

3
7. Under Filename, open the directory in which you previously saved guto_gida_Unsup.img
by entering the directory path name in the text entry field and pressing the Enter key on your
keyboard.
8. Select the file guto_gida_Unsup.img from the list of files in the directory.
You are going to evaluate/identify the classes in this file.
9. Click the Raster Options tab at the top of the Select Layer To Add dialog.
10. Click Clear Display to turn off this checkbox.
11. Click OK in the Select Layer To Add dialog to display the image file.
Open Raster Attribute Editor
1. Select Raster -> Attributes from the Viewer menu bar.
The Raster Attribute Editor displays.
2. In the Raster Attribute Editor, select Edit -> Column Properties to rearrange the
columns in the CellArray so that they are easier to view.
The Column Properties dialog opens.

3. In the Column Properties dialog under Columns, select Opacity, then click Up to move
Opacity so that it is under Histogram.
4. Select Class_Names, then click Up to move Class_Names so that it is under Color.
5. Click OK in the Column Properties dialog to rearrange the columns in the Raster Attribute
Editor.
The Column Properties dialog closes.
The data in the Raster Attribute Editor CellArray should appear similar to the following
example:

4
Analyze Individual Classes
Before you can begin to analyze the classes individually, you need to set the opacity for all of
the classes to zero.
1. In the Raster Attribute Editor, click the word Opacity at the top of the Opacity column to
select all of the classes.
2. In the Raster Attribute Editor, right-hold on the word Opacity at the top of the Opacity
column and select Formula from the Column Options menu.
The Formula dialog opens.

3. In the Formula dialog, click 0 in the number pad.


A 0 is placed in the Formula field
4. In the Formula dialog, click Apply to change all of the values in the
Opacity column to 0, and then click Close.
5
5. In the Raster Attribute Editor, click and hold on the color patch under
Color for Class 1 in the CellArray and change the color to Yellow. This provides better
visibility in the Viewer.
Verify the Opacity for Class 1 in the CellArray is set to 1.
This class is shown in the Viewer.
7. In the Viewer menu bar, select Utility -> Flicker to analyze which pixels are assigned to
this class.
The Viewer Flicker dialog opens.
8. Turn on the Auto Mode in the Viewer Flicker dialog by clicking on the checkbox.
The flashing red pixels in the guto_gida84.img file are the pixels of this class. These areas
are forest.
9. In the Raster Attribute Editor, click inside the Class_Names column for Class 1. (You may
need to double-click in the column.) Change this name to Forest and then press Enter on the
keyboard.
10. In the Raster Attribute Editor, click and hold on the Color patch for Forest and select
Green from the dropdown list. (You may need to select the entire row for this class first.)
11. After you are finished analyzing this class, click Cancel in the Viewer
Flicker dialog and set the Opacity for Forest back to 0 in the Raster
Attribute Editor. Press Enter on the keyboard.
12. Change the Color for Class 2 in the CellArray to Yellow for better visibility in the Viewer.
13. Change the Opacity for Class 2 to 1 and press Enter on the keyboard.
This class is shown in the Viewer.
14. In the Viewer menu bar, select Utility -> Flicker to analyze which pixels are assigned to
this class.
The Viewer Flicker dialog opens.
15. Turn on the Auto Mode in the Viewer Flicker dialog.
The flashing yellow pixels in the guto_gida84.img file should be the pixels of this class. These
are grass areas.
16. In the Raster Attribute Editor, click inside the Class_Names column for
Class 2. (You may need to double-click in the column.) Change this name to Grass, then press
Enter on the keyboard.
17. In the Raster Attribute Editor, click and hold on the Color patch for
Grass and select Pink from the dropdown list. (You may need to select the entire row for
this class first.)
18. After you are finished analyzing this class, click Cancel in the Viewer
Flicker dialog and set the Opacity for Grass back to 0. Press Enter on the keyboard.
19. Repeat these steps with each class so that you can see how the pixels are assigned to each
class. You may also try selecting more than one class at a time.
20. Continue assigning names and colors for the remaining classes in the
Raster Attribute Editor CellArray.
21. In the Raster Attribute Editor, select File -> Save to save the data in the CellArray.
22. Select File -> Close from the Raster Attribute Editor menu bar.
23. Select File -> Clear from the Viewer menu bar.

6
SUPERVISED CLASSIFICATION
Perform Supervised Classification
This section shows how the Supervised Classification tools allow you to control the
classification process.
You perform the following operations in this section:
• Define signatures.
• Evaluate signatures.
• Process a supervised classification.
Define Signatures using Signature Editor
The ERDAS IMAGINE Signature Editor allows you to create, manage, evaluate and edit
signatures (.sig extension). The following types of signatures can be defined:
• Parametric (statistical)
• Nonparametric (feature space)
In this section, you define the signatures using the following operations:
• Collect signatures from the image to be classified using the area of interest (AOI) tools.
• Collect signatures from the Feature Space image using the AOI tools and Feature Space
tools.
Preparation
ERDAS IMAGINE must be running and a Viewer must be open.
1. Select File -> Open -> Raster Layer from the Viewer menu bar, or click the Open icon on
the Viewer toolbar to display the image file to be classified.
The Select Layer To Add dialog opens.

2. In the Select Layer To Add dialog File name section, select guto_gida84.img. This is the
image file that is going to be classified.
3. Click the Raster Options tab at the top of the dialog, and then set the
Layers to Colors to 4, 5, and 3 (Red, Green, and Blue, respectively).
4. Click the Fit to Frame option to enable it.
5. Click OK in the Select Layer To Add dialog.
The file germtm.img displays in the Viewer. If you would like to see only the image in the
Viewer and not the surrounding black space, right-click in the Viewer and select Fit Window
to Image.
7
Open Signature Editor
1. Click the Classifier icon on the ERDAS IMAGINE icon panel.

The Classification menu displays.

2. Select Signature Editor from the Classification menu to start the Signature Editor.
The Signature Editor opens.

3. In the Classification menu, click Close to remove this menu from the screen.
4. In the Signature Editor, select View -> Columns.
The View Signature Columns dialog opens.

8
5. In the View Signature Columns dialog, right-click in the first column, labeled Column, to
access the Row Selection menu. Click Select All.
6. Shift-click Red, Green, and Blue in Column boxes 3, 4, and 5 to deselect these rows.
These are the CellArray columns in the Signature Editor that you remove to make it easier to
use. These columns can be reinstated at any time.
7. In the View Signature Columns dialog, click Apply.
The Red, Green, and Blue columns are deleted from the Signature Editor.
8. Click Close in the View Signature Columns dialog.
Use AOI Tools to Collect Signatures
The AOI tools allow you to select the areas in an image to be used as signatures. These
signatures are parametric because they have statistical information.
1. Select AOI -> Tools from the Viewer menu bar.
The AOI tool palette displays.

2. Use the Zoom In tool on the Viewer toolbar to zoom in on one of the light green areas
in the germtm.img file in the Viewer.
3. In the AOI tool palette, click the Polygon icon .
4. In the Viewer, draw a polygon around the green area you just magnified.
Click to draw the vertices of the polygon. Middle-click or double-click to close the polygon.
After the AOI is created, a bounding box surrounds the polygon, indicating that it is currently
selected. These areas are forest.

9
5. In the Signature Editor, click the Create New Signature(s) from AOI icon or select Edit ->
Add from the menu bar to add this AOI as a signature.
6. In the Signature Editor, click inside the Signature Name column for the signature you just
added. Change the name to Forest, then press Enter on the keyboard.
7. In the Signature Editor, hold in the Color column next to Forest 1 and select Green.

8. Zoom in on one of the light blue/cyan areas in the guto_gida84.img file in the Viewer.
9. Draw a polygon as you did in step 2. through step 4..
These areas are also agricultural fields.
10. After you create the AOI, a bounding box surrounds the polygon, indicating that it is
currently selected. In the Signature Editor, click the
Create New Signature(s) from AOI icon, or select Edit -> Add to add this AOI as a signature.
11. In the Signature Editor, click inside the Signature Name column for the signature you
just added. Change the name to Forest 2, then press Enter on the keyboard.
12. In the Signature Editor, hold in the Color column next to forest 2 and select
Chartreuse.
10
After you collected unique signatures for each of the classes, Merge those signature and
give one class name, Forest

From Signature Editor, select Forest 1 and forest 2, and click merge selected features.
Delete the selected, Forest 1 and Forest 2 and give class name Forest for the merged one.

Do the same for all Classes.

As an alternative, you can use “Select Neighborhood Options” to create signature.


1. Select AOI -> Seed Properties from the Viewer menu bar.

The Region Growing Properties dialog opens.


Create an AOI

1. In the AOI tool palette, click the Region Grow icon.


2. Click inside a bright red area in the guto-gida84.img file in the Viewer.
This is a forest area. A polygon opens and a bounding box surrounds the polygon, indicating
that it is selected.

11
12

You might also like