Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
11 views24 pages

Tutorial 3

This tutorial provides a comprehensive guide to multispectral classification using Landsat TM data from Canon City, Colorado, covering both unsupervised and supervised classification techniques. It includes detailed instructions on using ENVI software to analyze color images, perform classifications, and assess accuracy through various methods such as K-Means, IsoData, and Maximum Likelihood. The tutorial assumes familiarity with multispectral classification techniques and provides specific file references for practical application.

Uploaded by

Silue
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)
11 views24 pages

Tutorial 3

This tutorial provides a comprehensive guide to multispectral classification using Landsat TM data from Canon City, Colorado, covering both unsupervised and supervised classification techniques. It includes detailed instructions on using ENVI software to analyze color images, perform classifications, and assess accuracy through various methods such as K-Means, IsoData, and Maximum Likelihood. The tutorial assumes familiarity with multispectral classification techniques and provides specific file references for practical application.

Uploaded by

Silue
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/ 24

Tutorial 3:

Multispectral
Classification
The following topics are covered in this tutorial:

Overview of This Tutorial . . . . . . . . . . . . . . 90 Examine Landsat TM Color Images . . . . . 92

ENVI Tutorials 89
90 Tutorial 3: Multispectral Classification

Overview of This Tutorial


This tutorial leads you through a typical multispectral classification procedure using
Landsat TM data from Canon City, Colorado. Results of both unsupervised and
supervised classifications are examined and post classification processing including
clump, sieve, combine classes, and accuracy assessment are discussed. It is assumed
that you are already generally familiar with multispectral classification techniques.

Files Used in This Tutorial


CD-ROM: ENVI Tutorial and Data CD No. 2
Path: envidata/can_tm

File Description
can_tmr.img Boulder Colorado TM Reflectance
can_tmr.hdr ENVI Header for Above
can_km.img K MEANS Classification
can_km.hdr ENVI Header for Above
can_iso.img ISODATA Classification
can_iso.hdr ENVI Header for Above
classes.roi Regions of Interest (ROI) for Supervised
Classification
can_pcls.img Parallelepiped Classification
can_pcls.hdr ENVI Header for Above
can_bin.img Binary Encoding Result
can_bin.hdr ENVI Header for Above
can_sam.img SAM Classification Result
can_sam.hdr ENVI Header for Above
can_rul.img Rule image for SAM classification
can_rul.hdr ENVI Header for Above
can_sv.img Sieved Image

Overview of This Tutorial ENVI Tutorials


Tutorial 3: Multispectral Classification 91

File Description
can_sv.hdr ENVI Header for Above
can_clmp.img Clump of sieved image
can_clmp.hdr ENVI Header for Above
can_comb.img Combined Classes image
can_comb.hdr ENVI Header for Above
can_ovr.img Classes overlain on gray scale image
can_ovr.hdr ENVI Header for Above
can_v1.evf Vector layer generated from class #1
can_v2.evf Vector layer generated from class #2

ENVI Tutorials Overview of This Tutorial


92 Tutorial 3: Multispectral Classification

Examine Landsat TM Color Images


This portion of the exercise will familiarize you with the spectral characteristics of
Landsat TM data of Canon City, Colorado, USA. Color composite images will be
used as the first step in locating and identifying unique areas for use as training sets in
classification.

Start ENVI
Before attempting to start the program, ensure that ENVI is properly installed as
described in the installation guide.
• To start ENVI in UNIX, enter envi at the UNIX command line.
• To start ENVI from a Windows or Macintosh system, double-click on the
ENVI icon.
The ENVI main menu appears when the program has successfully loaded and
executed.

Open and Display Landsat TM Data


To open an image file:
1. Select File → Open Image File on the ENVI main menu.
Note
On some platforms you must hold the left mouse button down to display the
submenus from the ENVI main menu.

An Enter Data Filenames file selection dialog appears.


2. Navigate to the can_tm subdirectory of the envidata directory on the ENVI
Tutorial and Data CD No. 2 just as you would in any other application and
select the file can_tmr.img from the list and click OK.
The Available Bands List dialog appears on your screen. This list allows you
to select spectral bands for display and processing.
Note
You have the choice of loading either a gray scale or an RGB color image.

Examine Landsat TM Color Images ENVI Tutorials


Tutorial 3: Multispectral Classification 93

3. Select the RGB Color radio button in the Available Bands List, and then
click on bands 4, 3, and 2 sequentially with the left mouse button.
The bands you have chosen are displayed in the appropriate fields in the center
of the dialog.
4. Click on the Load RGB button to load the image into a new display.

Review Image Colors


Use the displayed color image as a guide to classification. This image is the
equivalent of a false color infrared photograph. Even in a simple three-band image,
it’s easy to see that there are areas that have similar spectral characteristics. Bright
red areas on the image represent high infrared reflectance, usually corresponding to
healthy vegetation, either under cultivation, or along rivers. Slightly darker red areas
typically represent native vegetation, in this case in slightly more rugged terrain,
primarily corresponding to coniferous trees. Several distinct geologic and
urbanization classes are also readily apparent as is urbanization.
The following figure shows the resulting Main Image window for these bands.

Figure 3-1: Canon City Landsat TM Data.

ENVI Tutorials Examine Landsat TM Color Images


94 Tutorial 3: Multispectral Classification

Cursor Location/Value
Use ENVI’s Cursor Location/Value dialog to preview image values in the displayed
spectral bands. To bring up a dialog box that displays the location of the cursor in the
Main Image, Scroll, or Zoom windows.
1. Select Tools → Cursor Location/Value from the Main Image window menu
bar.
Alternatively, double-click the left mouse button in the image display to toggle
the Cursor Location/Value dialog on and off.
2. Move the cursor around the image and examine the data values in the dialog
for specific locations. Also note the relation between image color and data
value.
3. Select Files → Cancel in the Cursor Location/Value dialog to dismiss when
finished.

Examine Spectral Plots


Use ENVI’s integrated spectral profiling capabilities to examine the spectral
characteristics of the data.
1. Choose Tools → Profiles → Z Profile (Spectrum) from the Main Image
window menu bar to begin extracting spectral profiles.
2. Examine the spectra for areas that you previewed above using color images
and the Cursor/Location Value dialog by clicking the left mouse button in
any of the display group windows. Note the relations between image color and
spectral shape. Pay attention to the location of the image bands in the spectral
profile, marked by the red, green, and blue bars in the plot.

Examine Landsat TM Color Images ENVI Tutorials


Tutorial 3: Multispectral Classification 95

Figure 3-2: Spectral Plots from Canon City TM Data.

3. Select File → Cancel in the Spectral Profile dialog to dismiss it.

Unsupervised Classification
Start ENVI’s unsupervised classification routines from the ENVI main menu, by
choosing Classification → Unsupervised → K-Means or IsoData, or review the
pre-calculated results of classifying the image in the can_tm directory.

K-Means
Unsupervised classification uses statistical techniques to group n-dimensional data
into their natural spectral classes. The K-Means unsupervised classifier uses a cluster
analysis approach which requires the analyst to select the number of clusters to be
located in the data, arbitrarily locates this number of cluster centers, then iteratively
repositions them until optimal spectral separability is achieved.
Choose K-Means as the method, use all of the default values and click on OK, or
review the results contained in can_km.img.
1. Open the file can_km.img, click on the Gray Scale radio button in the
Available Bands List, click on the band name at the top of the list, select New
Display on the Display button pull-down menu, and then Load Band.

ENVI Tutorials Examine Landsat TM Color Images


96 Tutorial 3: Multispectral Classification

2. From the Main Image display menu, select Tools → Link → Link Displays
and click OK in the dialog to link the images.
3. Compare the K-MEANS classification result to the color composite image by
clicking and dragging using the left mouse button to move the dynamic
overlay around the image.
4. When finished, select Tools → Link → Unlink Display to remove the link
and dynamic overlay.
If desired, experiment with different numbers of classes, change thresholds, standard
deviations, and maximum distance error values to determine their effect on the
classification.
Isodata
IsoData unsupervised classification calculates class means evenly distributed in the
data space and then iteratively clusters the remaining pixels using minimum distance
techniques. Each iteration recalculates means and reclassifies pixels with respect to
the new means. This process continues until the number of pixels in each class
changes by less than the selected pixel change threshold or the maximum number of
iterations is reached.
Choose IsoData as the method, use all of the default values and click on OK, or
review the results contained in can_iso.img.
1. Open the file can_iso.img, click on the Gray Scale radio button in the
Available Bands List, click on the band name at the top of the list, select the
Display #1 button and choose New Display on the pull-down menu. Then
click on the Load Band button.
2. Select Tools → Link → Link Displays. Click OK to link this image to the
color composite image and the K-MEANS result.
3. Compare the IsoData classification result to the color composite image by
clicking and dragging using the left mouse button to move the dynamic
overlay around the image. Toggle the dynamic overlay of the third image by
holding the left mouse button down and simultaneously clicking on the middle
mouse button. Compare the ISODATA and K-MEANS classifications.
4. Select File → Cancel to dismiss the two image displays.
If desired, experiment with different numbers of classes, change thresholds, standard
deviations, maximum distance error, and class pixel characteristic values to
determine their effect on the classification.

Examine Landsat TM Color Images ENVI Tutorials


Tutorial 3: Multispectral Classification 97

Supervised Classification
Supervised classification requires that the user select training areas for use as the
basis for classification. Various comparison methods are then used to determine if a
specific pixel qualifies as a class member. ENVI provides a broad range of different
classification methods, including Parallelepiped, Minimum Distance, Mahalanobis
Distance, Maximum Likelihood, Spectral Angle Mapper, Binary Encoding, and
Neural Net. Examine the processing results below, or use the default classification
parameters for each of these classification methods to generate your own classes and
compare results.
To perform your own classifications from the ENVI main menu, select
Classification → Supervised → [method], where [method] is one of the supervised
classification methods in the pull-down menu (Parallelepiped, Minimum Distance,
Mahalanobis Distance, Maximum Likelihood, Spectral Angle Mapper, Binary
Encoding, or Neural Net). Use one of the two methods below for selecting training
areas, also known as regions of interest (ROIs).
Select Training Sets Using Regions of Interest (ROI)
As described in Tutorial 1, “Introduction to ENVI” and summarized here, ENVI lets
you easily define regions of interest (ROIs) typically used to extract statistics for
classification, masking, and other operations. For the purposes of this exercise, you
can either use predefined ROIs, or create your own.
Restore Predefined ROIs
1. Use pre-selected regions of interest by starting the #1 ROI Tool dialog by
choosing from the #1 Main Image menu bar Overlay → Region of Interest.
2. In the #1 ROI Tool dialog choose File → Restore ROIs.
3. The Enter ROI Filename dialog opens. Select CLASSES.ROI as the input file
to restore.
Create Your Own ROIs
1. Select Overlay → Region of Interest from the Main Image window menu
bar. The ROI Tool dialog for the display group appears.
2. In the Main Image window draw a polygon that represents the new region of
interest. To accomplish this, do the following.
• Click the left mouse button in the Main Image window to establish the first
point of the ROI polygon.

ENVI Tutorials Examine Landsat TM Color Images


98 Tutorial 3: Multispectral Classification

• Select further border points in sequence by clicking the left button again,
and close the polygon by clicking the right mouse button.The middle
mouse button deletes the most recent point, or (if you have closed the
polygon) the entire polygon. Fix the polygon by clicking the right mouse
button a second time.
• ROIs can also be defined in the Zoom and Scroll windows by choosing the
appropriate radio button at the top of the ROI Controls dialog.
When you have finished defining an ROI, it is shown in the dialog’s list of
Available Regions, with the name, region color, and number of pixels
enclosed, and is available to all of ENVI’s classification procedures.
3. To define a new ROI, click the New Region button.
• You can enter a name for the region and select the color and fill patterns
for the region by clicking on the Edit button to bring up the Edit ROI
Parameters dialog. Define the new ROI as described above.
Classical Supervised Multispectral Classification
The following methods are described in most remote sensing textbooks and are
commonly available in today’s image processing software systems.
Parallelepiped
Parallelepiped classification uses a simple decision rule to classify multispectral data.
The decision boundaries form an n-dimensional parallelepiped in the image data
space. The dimensions of the parallelepiped are defined based upon a standard
deviation threshold from the mean of each selected class.
1. Pre-saved results are in the file can_pcls.img. Examine these or perform
your own classification using the CLASSES.ROI regions of interest described
above. Try using the default parameters and various standard deviations from
the mean of the ROIs.
2. Use image linking and dynamic overlay to compare this classification to the
color composite image and previous unsupervised classifications.

Examine Landsat TM Color Images ENVI Tutorials


Tutorial 3: Multispectral Classification 99

Figure 3-3: Parallelepiped Classification Image.

Maximum Likelihood
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).
1. Perform your own classification using the CLASSES.ROI regions of interest
described above. Try using the default parameters and various probability
thresholds.
2. Use image linking and dynamic overlay to compare this classification to the
color composite image and previous unsupervised and supervised
classifications.
Minimum Distance
The minimum distance classification uses the mean vectors of each ROI and
calculates the Euclidean distance from each unknown pixel to the mean vector for
each class. All pixels are classified to the closest ROI class unless the user specifies

ENVI Tutorials Examine Landsat TM Color Images


100 Tutorial 3: Multispectral Classification

standard deviation or distance thresholds, in which case some pixels may be


unclassified if they do not meet the selected criteria.
1. Perform your own classification using the CLASSES.ROI regions of interest
described above. Try using the default parameters and various standard
deviations and maximum distance errors.
2. Use image linking and dynamic overlay to compare this classification to the
color composite image and previous unsupervised and supervised
classifications.
Mahalanobis Distance
The Mahalanobis Distance classification is a direction sensitive distance classifier
that uses statistics for each class. It is similar to the Maximum Likelihood
classification but assumes all class covariances are equal and therefore is a faster
method. All pixels are classified to the closest ROI class unless the user specifies a
distance threshold, in which case some pixels may be unclassified if they do not meet
the threshold.
1. Perform your own classification using the CLASSES.ROI Regions of Interest
described above. Try using the default parameters and various maximum
distance errors.
2. Use image linking and dynamic overlay to compare this classification to the
color composite image and previous unsupervised and supervised
classifications.

Spectral Classification Methods


The following methods are described in the ENVI 3.5 User’s Guide. These were
developed specifically for use on Hyperspectral data, but provide an alternative
method for classifying multispectral data, often with improved results that can easily
be compared to spectral properties of materials. They typically are used from the
Endmember Collection dialog using image or library spectra, however, they can also
be started from the classification menu, Classification → Supervised → [method],
where [method] represents one of the methods shown in the pull-down menu.

The Endmember Collection Dialog


The Endmember Collection:Parallel dialog is a standardized means of collecting
spectra for supervised classification from ASCII files, regions of interest, spectral
libraries, and statistics files.
1. To start the Classification Input File dialog from the ENVI main menu, select
Spectral → Mapping Methods → Endmember Collection.

Examine Landsat TM Color Images ENVI Tutorials


Tutorial 3: Multispectral Classification 101

This dialog can also be started by choosing Classification → Endmember


Collection from the ENVI main menu.
2. In the Classification Input File dialog, click on the Open File button at the
bottom of the dialog.
3. A new file selection dialog appears. In the Please Select a File dialog, choose
the input file can_tmr.img and click Open (Windows) or OK (UNIX). The
can_tmr.img file will appear in the Select Input File: section of the
Classification Input File dialog.
4. Click on the can_tmr.img file within the Select Input File: section of this
dialog and then click OK.
5. This brings up the Endmember Collection:Parallel dialog.

Figure 3-4: Endmember Collection dialog.

The Endmember Collection dialog appears with the Parallelepiped classification


method selected by default. The available classification and mapping methods are
listed by choosing Algorithm → [method] from the Endmember Collection dialog
menu bar, where [method] represents one of the methods available: currently
including Parallelepiped, Minimum Distance, Manlanahobis Distance,
Maximum Likelihood, Binary Encoding, and the Spectral Angle Mapper (SAM).

ENVI Tutorials Examine Landsat TM Color Images


102 Tutorial 3: Multispectral Classification

Binary Encoding Classification


The binary encoding classification technique encodes the data and endmember
spectra into 0s and 1s based on whether a band falls below or above the spectrum
mean. An exclusive OR function is used to compare each encoded reference
spectrum with the encoded data spectra and a classification image is produced. All
pixels are classified to the endmember with the greatest number of bands that match
unless the user specifies a minimum match threshold, in which case some pixels may
be unclassified if they do not meet the criteria.
1. Pre-saved Binary Encoding results are in the file can_bin.img. These were
created using a minimum encoding threshold of 75%. Examine these or
perform your own classification using the CLASSES.ROI regions of interest
described above. To do your own classification, select Algorithm → Binary
Encoding from the menu bar.
2. Use the predefined regions of interest in the file CLASSES.ROI. From the
Endmember Collection dialog menu bar, select Import → from ROI from
Input File.
3. The Input Regions of Interest dialog appears. Click the Select All Items
button, and click OK.
4. You can view the Endmember Spectra plots for the ROIs from the
Endmember Collections dialog menu bar by choosing Options → Plot
Endmembers.
5. In the Endmember Collections dialog click on Apply. This brings up the
Binary Encoding Parameters dialog box.
6. In the Binary Encoding Parameters dialog, click the Memory radio button in
the Output Result to section.
7. Click on the spin button for the Output Rule Images text field to change it to
No and click OK at the bottom of the dialog to start the classification.
8. Use image linking and dynamic overlays to compare this classification to the
color composite image and previous unsupervised and supervised
classifications.
Spectral Angle Mapper Classification
The Spectral Angle Mapper (SAM) is a physically-based spectral classification that
uses the n-dimensional angle to match pixels to reference spectra. The algorithm
determines the spectral similarity between two spectra by calculating the angle
between the spectra, treating them as vectors in a space with dimensionality equal to
the number of bands.

Examine Landsat TM Color Images ENVI Tutorials


Tutorial 3: Multispectral Classification 103

1. Pre-saved SAM Classification results are in the file can_sam.img. Examine


these or perform your own classification using the CLASSES.ROI Regions of
Interest described above, which will be listed in the Endmember Collection
dialog. To do your own classification, select Algorithm → Spectral Angle
Mapper from the Endmember Collection menu bar. Click Apply to start the
classification.
2. If performing your own classification, enter the output filename
can_tmr.sam for the SAM classification image in the Endmember Collection
dialog. Also enter the filename can_rul.img as the rule output image name
and click OK at the bottom of the dialog to start the classification.
3. Use image linking and dynamic overlays to compare this classification to the
color composite image and previous unsupervised and supervised
classifications.
Rule Images
ENVI creates images that show the pixel values used to create the classified image.
These optional images allow users to evaluate classification results and to reclassify
if desired based on thresholds. These are gray scale images; one for each ROI or
endmember spectrum used in the classification.

Figure 3-5: Rule Image for Canon City Landsat TM, Spectral Angle Mapper
Classification. Stretched to show best matches (low spectral angles) as bright
pixels.

ENVI Tutorials Examine Landsat TM Color Images


104 Tutorial 3: Multispectral Classification

The rule image pixel values represent different things for different types of
classifications, for example:

Classification Method Rule Image Values

Parallelepiped Number of bands that satisfied the parallelepiped


criteria.
Minimum Distance Sum of the distances from the class means
Maximum Likelihood Probability of pixel belonging to class
Mahalanobis Distance Distances from the class means
Binary Encoding Binary Match in Percent
Spectral Angle Mapper Spectral Angle in Radians (smaller angles indicate
closer match to the reference spectrum)

1. For the SAM classification above, load the classified image and the rule
images into separate displays and compare using dynamic overlays. Invert the
SAM rule images using Tools → Color Mapping → ENVI Color Tables and
dragging the Stretch Bottom and Stretch Top sliders to opposite ends of the
dialog. Areas with low spectral angles (more similar spectra) should appear
bright.
2. Create classification and rule images using the other methods. Use dynamic
overlays and Cursor Location/Value to determine if better thresholds could
be used to obtain more spatially coherent classifications.
3. If you find better thresholds, select Classification → Post
Classification → Rule Classifier from the ENVI main menu.
4. Double-click the can_tmr.sam input file to bring up the Rule Image
Classifier Tool, enter a threshold to create a new classified image. Compare
your new classification to the previous classifications.

Post Classification Processing


Classified images require post-processing to evaluate classification accuracy and to
generalize classes for export to image-maps and vector GIS. ENVI provides a series
of tools to satisfy these requirements

Examine Landsat TM Color Images ENVI Tutorials


Tutorial 3: Multispectral Classification 105

Class Statistics
This function allows you to extract statistics from the image used to produce the
classification. Separate statistics consisting of basic statistics (minimum value,
maximum value, mean, std deviation, and eigenvalue), histograms, and average
spectra are calculated for each class selected.
1. Choose Classification → Post Classification → Class Statistics to start the
process and select the Classification Image can_pcls.img and click OK.
2. Next select the image used to produce the classification can_tmr.img and
click OK.
3. Use the Class Selection dialog to choose the classes for statistics. Click on
Select All Items, then OK.
4. Finally, choose the statistics to be calculated in the Compute Statistics
Parameters dialog, click OK at the bottom of the Compute Statistics
Parameters dialog.
Several plots and reports will appear, depending on the statistics options selected.

Figure 3-6: Statistics reports from Parallelepiped Classification of Canon City,


CO, Thematic Mapper data.

Confusion Matrix
ENVI’s confusion matrix function allows comparison of two classified images (the
classification and the “truth” image), or a classified image and ROIs. The truth image
can be another classified image, or an image created from actual ground truth
measurements.

ENVI Tutorials Examine Landsat TM Color Images


106 Tutorial 3: Multispectral Classification

1. Select Classification → Post Classification → Confusion


Matrix → [method], where [method] is either Using Ground Truth Image,
or Using Ground Truth ROIs.
2. For the Ground Truth Image Method, compare the Parallelepiped and SAM
methods by entering the two filenames can_sam.img and can_pcls.img
and clicking OK (for the purposes of this exercise, we are using the
can_pcls.img file as the ground truth).
3. Use the Match Classes Parameters dialog to pair corresponding classes from
the two images and click OK.
4. Use Output Result to radio button to output the result to Memory and then
click OK in the Confusion Matrix Parameters dialog.
5. Examine the confusion matrix and confusion images. Determine sources of
error by comparing the classified image to the original reflectance image using
dynamic overlays, spectral profiles, and Cursor Location/Value.
6. For the Using Ground Truth ROIs method, select the classified image
can_sam.img to be evaluated.
7. Match the image classes to the ROIs loaded from CLASSES.ROI, and click
OK to calculate the confusion matrix.
8. Click OK in the Confusion Matrix Parameters dialog.
9. Examine the confusion matrix and determine sources of error by comparing
the classified image to the ROIs in the original reflectance image using
spectral profiles, and Cursor Location/Value.

Examine Landsat TM Color Images ENVI Tutorials


Tutorial 3: Multispectral Classification 107

Figure 3-7: Confusion Matrix using a second classification image as Ground


Truth.

Clump and Sieve


Clump and Sieve provide means for generalizing classification images. Sieve is
usually run first to remove the isolated pixels based on a size (number of pixels)
threshold, and then clump is run to add spatial coherency to existing classes by
combining adjacent similar classified areas. Compare the pre-calculated results in the
files can_sv.img (sieve) and can_clmp.img (clump of the sieve result) to the
classified image can_pcls.img (parallelepiped classification) or calculate your
own images and compare to one of the classifications.

ENVI Tutorials Examine Landsat TM Color Images


108 Tutorial 3: Multispectral Classification

1. To execute the function, select Classification → Post Classification → Sieve


Classes, choose one of the classified images, enter an output to Memory and
click OK.
2. Use the output of the sieve operation as the input for clumping. Choose
Classification → Post Classification → Clump Classes, choose the
previously-made image from memory and click OK.
3. Output to memory and click OK in the Clump Parameters dialog.
4. Compare the three images and reiterate if necessary to produce a generalized
classification image.
Combine Classes
The Combine Classes function provides an alternative method for classification
generalization. Similar classes can be combined to form one or more generalized
classes.
1. Examine the pre-computed image can_comb.img or perform your own
combinations as described below.
2. Select Classification → Post Classification → Combine Classes.
3. Select the can_sam.img file in the Combine Classes Input File dialog and
click OK.
4. Choose Region 3 to combine with Unclassified, click on Add Combination,
and then OK in the Combine Classes Parameters dialog. Output memory and
click OK.
5. Compare the combined class image to the classified images and the
generalized classification image using image linking and dynamic overlays.
Edit Class Colors
When a classification image is displayed, you can change the color associated with a
specific class by editing the class colors.
1. Select Tools → Color Mapping → Class Color Mapping in the Main Image
Display window.
2. Click on one of the class names in the Class Color Mapping dialog and
change the color by dragging the appropriate color sliders or entering the
desired data values. Changes are applied to the classified image immediately.
To make the changes permanent, select Options → Save Changes in the
dialog.

Examine Landsat TM Color Images ENVI Tutorials


Tutorial 3: Multispectral Classification 109

Overlay Classes
Overlay classes allows the user to place the key elements of a classified image as a
color overlay on a gray scale or RGB image.
1. Examine the pre-calculated image can_ovr.img or create your own
overlay(s) from the can_tmr.img reflectance image and one of the classified
images above.
2. Select Classification → Post Classification → Overlay Classes from the
ENVI main menu.
3. Choose the current display as an input for class overly from the Available
Bands List dialog.
4. Select can_tmr.img band 3 for each RGB band (band 3 for the R band,
band 3 for the G band, and band 3 for the B band) in the Input Overlay RGB
Image Input Bands dialog and click OK.
5. Use can_comb.img as the classification input in the Classification Input File
dialog.
6. Click OK and then choose Region #1 and Region #2 in the Class Overlay to
RGB Parameters dialog to overlay on the image. Output to memory and click
OK to complete the overlay.
7. Load the overlay image into an image display and compare with the classified
image and the reflectance image using linking and dynamic overlays.

Interactive Classification Overlays


In addition to the methods above for working with classified data, ENVI also
provides an interactive classification overlay tool. This tool allows you to
interactively toggle classes on and off as overlays on a displayed image, to edit
classes, get class statistics, merge classes, and edit class colors.
1. Display band 4 of can_tmr.img as a gray scale image using the Available
Bands List dialog.
2. From the Main Image window menu bar, select Overlay → Classification.
3. Choose one of the available classified images (a good choice is
can_sam.img) in the Interactive Class Tool Input File dialog and click OK.
The Interactive Class Tool dialog will appear and each class will be listed
with it’s corresponding colors.

ENVI Tutorials Examine Landsat TM Color Images


110 Tutorial 3: Multispectral Classification

4. Click in each On check box to change the display of each class as an overlay
on the gray scale image.
5. Try the various options for assessing the classification under the Options
menu.
6. Choose various options under the Edit menu to interactively change the
contents of specific classes.
7. Select File → Save Image As → [Device] in the Main Image window (where
[Device] is either Postscript or Image) to burn in the classes and output to a
new file.
8. Select File → Cancel to exit the interactive tool.

Classes to Vector Layers


Load the pre-calculated vector layers onto the gray scale reflectance image for
comparison to raster classified images, or execute the function and convert one of the
classification images to vector layers. You can use the following steps to load the pre-
calculated vector layers produced from the clumped classification image above:
1. Select Overlay → Vectors in the Main Image window with the clumped
image can_clmp.img displayed.
2. Choose File → Open Vector File → ENVI Vector File in the Vector
Parameters dialog and choose the files can_v1.evf and can_v2.evf. Choose
Select All Layers in the Available Vectors List dialog, then choose Load
Selected. Select the can_dmp.img. From the Vector Parameters dialog, click
Apply to load the vector layers onto the image display. The vectors derived
from the classification polygons will outline the raster classified pixels.
To complete your own classification to vector conversion:
1. Select Classification → Post Classification → Classification to Vector and
choose the generalized image can_clmp.img within the Raster to Vector
Input Band dialog.
2. Select Region #1 and Region #2 and enter the root name canrtv and click
OK to begin the conversion.
3. Select the two regions in the Available Vectors List dialog click on Load
Selected at the bottom of the dialog.
4. Choose the correct display number in the Load Vector dialog for the gray
scale reflectance image and the vector layers will be loaded into the Vector
Parameters dialog. Click Apply to display the vectors over the image. Use

Examine Landsat TM Color Images ENVI Tutorials


Tutorial 3: Multispectral Classification 111

Edit Layers to change the colors and fill of the vector layers to make them
more visible.

Classification Keys Using Annotation


ENVI provides annotation tools to put classification keys on images and in map
layouts. The classification keys are automatically generated.
1. Choose Overlay → Annotation from the Main Image window menu bar for
either one of the classified images, or for the image with the vector overlay.
2. Select Object → Map Key to start annotating the image. You can edit the key
characteristics by clicking on the Edit Map Key Items button in the
Annotation: Map Key dialog and changing the desired characteristics.
3. Click and drag the map key using the left mouse button in the display to place
the key.
4. Click in the display with the right mouse button to finalize the position of the
key. For more information about image annotation, please see the ENVI 3.5
User’s Guide.

Figure 3-8: Classification image with classification key.

End the ENVI Session


This concludes the Tutorial. You can quit your ENVI session by selecting
File → Exit (Quit on UNIX) on the ENVI main menu, then clicking OK to exit IDL.

ENVI Tutorials Examine Landsat TM Color Images


112 Tutorial 3: Multispectral Classification

If you are using ENVI RT, quitting ENVI will take you back to your operating
system.

Examine Landsat TM Color Images ENVI Tutorials

You might also like