THE UNIVERISTY OF UTAH

 

IMAGE CLASSIFICATION USING ENVI

________________________________________________________________________

 

* PURPOSE: 

 

A land cover classification is often the first step taken on an image before any other type of information extraction analysis is performed. The information gained from this process allows the analyst to understand more about the land cover at the particular time of the image. Relating seasonal effects from one season to another is conventional before any conclusions are made about the land cover type. The MLC or Maximum Likelihood Classification uses the Gaussian distribution to model class probability distribution based on class signatures to determine if a given pixel falls within the hyperellipse space, then it is assigned to a class.

 

 

 MATERIALS:

 

The Salt Lake City Central Downtown ETM+ image (slc.img)

 

In this experiment, we use the landcover descriptions for the Southwest Regional Gap Analysis Project to classify the downtown area of Salt Lake City. The area is classified into 6 classes: 1. Developed, Open Space – Low Intensity 2. Developed, Medium – High Intensity 3. Agriculture 4. Open Water 5. Disturbed, Non-Specific 6. Rocky Mountain Gambel Oak-Mixed Montane Shrubland.

Following are the descriptions for these classes:

1. DEVELOPED, OPEN SPACE—LOW INTENSITY

Description: Open Space: Includes areas with a mixture of some construction materials, but mostly vegetation in the form of lawn grasses. Impervious surfaces account for less than 20 percent of total cover. These areas most commonly include large-lot single-family housing units, parks, golf courses, and vegetation planted in developed settings for recreation, erosion control, or aesthetic purposes. Developed, Low intensity: Includes areas with a mixture of constructed materials and vegetation. Impervious surfaces account for 20-49 percent of total cover. These areas most commonly include single-family housing units.

2. DEVELOPED, MEDIUM –HIGH INTENSITY

Description: Developed, Medium Intensity: Includes areas with a mixture of constructed materials and vegetation. Impervious surface accounts for 50-79 percent of the total cover. These areas most commonly include single-family housing units. Developed, High Intensity: Includes highly developed areas where people reside or work in high numbers. Examples include apartment complexes, row houses and commercial/industrial. Impervious surfaces account for 80 to 100 percent of the total cover.

3. AGRICULTURE

Description: Agriculture.

There may not be such a category on the image.

4. OPEN WATER

Description: All areas of open water, generally with less than 25% cover of vegetation or soil.

 

5. DISTURBED, NON-SPECIFIC

Description: Generic Human Alteration, not alteration type specified

 

6. ROCKY MOUNTAIN GAMBEL OAK-MIXED MONTANE SHRUBLAND  

Concept Summary: This ecological system occurs in the mountains, plateaus and foothills in the southern Rocky Mountains and Colorado Plateau including the Uinta and Wasatch ranges and the Mogollon Rim. These shrublands are most commonly found along dry foothills, lower mountain slopes, and at the edge of the western Great Plains from approximately 2000 to 2900 m in elevation, and are often situated above pinyon-juniper woodlands. Substrates are variable and include soil types ranging from calcareous, heavy, fine-grained loams to sandy loams, gravelly loams, clay loams, deep alluvial sand, or coarse gravel. The vegetation is typically dominated by Quercus gambelii alone or codominant with Amelanchier alnifolia, Amelanchier utahensis, Artemisia tridentata, Cercocarpus montanus, Prunus virginiana, Purshia stansburiana, Purshia tridentata, Robinia neomexicana, Symphoricarpos oreophilus, or Symphoricarpos rotundifolius. There may be inclusions of other mesic montane shrublands with Quercus gambelii absent or as a relatively minor component. This ecological system intergrades with the lower montane-foothills shrubland system and shares many of the same site characteristics. Density and cover of Quercus gambelii and Amelanchier spp. often increase after fire.

 

_______________________________________________________________________


 

 STEP 1. TRAINING SITE SELECTION & CLASSIFICATION

 

l       Create Your Own ROI’s as Training Sites

1.      Load slc.img as a 4, 3, 2 image.

2.      From the ENVI main menu, select Basic Tools->Region of Interest->ROI Tool. The ROI Tool dialog will appear.

3.      Select window to create ROI. For our purpose, use the Zoom window.

4.     Next we’ll learn how to draw a polygon that represents the region of interest. Click the left mouse button in the Zoom window to establish the first point of the ROI polygon.

5.      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.

6.      ROI’s can also be defined in the main Image window and Scroll window by choosing the appropriate radio button at the top of the ROI Tools dialog. Choose ‘Off’ to not add ROI’s with the mouse click in the window.

* When you have finished defining a 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.

7.    For each class, try to draw as many polygons as you can (at least 3 polygons each class) 

8.    After you finish drawing ROIs for one class and move to draw ROIs for another new class, click ‘New Region’.

9.    Select several ROIs for each land cover type such that the full range of potential conditions is covered for each land cover type.  For example, in mountain vegetation select several north and south facing slopes to cover direct sunlit and shadowed areas.

10.  Select exactly 6 relatively distinct training sites for classes found in the slc.img. Choose from the following classes which have been indicated:

Developed, Open Space – Low Intensity

Developed, Medium – High Intensity

Agriculture

Open Water

Disturbed, Non-Specific

Rocky Mountain Gambel Oak-Mixed Montane Shrubland

11.  To perform the supervised classification selects Classification -> Supervised->Maximum Likelihood (or other desired classification method).

12.  Select slc.img and click OK.

13.  Select All Items from the Select Classes from Regions section. Select other defaults and output results/rule images to memory or file.

 

14.  Load the classified image in new Display

 

15.  Try other classification methods for comparison.

 

 

 

 STEP 2. 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.

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 choose the classified image.

2.      Next select the classified image as the classification input file and click ‘OK’.

3.      Next select the original image used to produce the classification (slc) as statistics input file and click ‘OK’.

4.      Use the Class Selection dialog to choose the classes for statistics. Click on Select All Items, then OK.

5.      Finally, choose the statistics to be calculated, output to file or memory and click OK at the bottom of the Compute Statistics Parameters dialog.

6.      Several plots and reports will appear, depending on the statistics options selected.

 

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.      From the image window, select Tools->Color Mapping-> Class Color Mapping

2.      Click on one of the class names in the Class Color Mapping dialog and change the color by click on the ‘color’ button. Changes are applied to the classified image immediately. To make the changes permanent, select Options->Save Changes in the dialog.

 

 

 

 STEP 3. VERIFY YOUR CLASSIFICATION ACCURACIES

 

Are you curious how well the classifier does to your image?

Do you have a set of independent samples for each class and would like to know how accurate they are classified?

You want to separate your training and test samples. You do not want to use the same set of training samples to evaluate your classification accuracy.

To answer the above questions, you need to use three programs in

 

Calculating Confusion Matrices

Use Confusion Matrix to show the accuracy of a classification result by comparing a classification result with ground truth information. ENVI can calculate a confusion matrix (contingency matrix) using either a ground truth image or using ground truth regions of interest (ROIs). In each case, an overall accuracy, producer and user accuracies, kappa coefficient, confusion matrix, and errors of commission and omission are reported. Here, we use the ground truth ROIs to assess the classification accuracy.

Using Ground Truth Regions of Interest

To display a confusion matrix report using regions of interest for ground truth, you should first create six new ROIs using the Basic Tools->Region of Interest->ROI Tool, then:

  1. Select Classification->Post Classification->Confusion Matrix->Using Ground Truth ROIs.
  1. In the Classification Input File dialog, select the classification image.

The ground truth ROIs must be opened and associated with an image of the same size as the classification output image. The ROIs are automatically loaded into the Match Classes Parameters dialog.

  1. When the Match Classes Parameters dialog appears, match the ground truth ROIs with the classification result classes by clicking on the matching names in the two lists and clicking Add Combination. The class combinations are shown in a list at the bottom of the dialog. If the ground truth and classification classes have the same names, they are automatically matched.

 

To remove a class match from the list, click on the combination name. The two class names reappear in the lists at the top of the dialog.

  1. After all of your class combinations are made, click OK. The Confusion Matrix Parameters dialog appears.
  1. Next to the Output Confusion Matrix in label, select the Pixels and/or the Percent check boxes.

  1. Next to the Report Accuracy Assessment label, click the Yes or No toggle button.
  1. Click OK.

The report shows the overall accuracy, kappa coefficient, confusion matrix, errors of commission (percentage of extra pixels in class), errors of omission (percentage of pixels left out of class), producer accuracy, and user accuracy for each class. Producer accuracy is the probability that a pixel in the classification image is put into class X given the ground truth class is X. User Accuracy is the probability that the ground truth class is X given a pixel is put into class X in the classification image. The confusion matrix output shows how each of these accuracy assessments is calculated. See the following example for details.

 

 

 

 Questions:

 

Given the image - slc.img and the following classification scheme:

Developed, Open Space – Low Intensity

Developed, Medium – High Intensity

Agriculture

Open Water

Disturbed, Non-Specific

Rocky Mountain Gambel Oak-Mixed Montane Shrubland

 

Conduct the classification. Answer the following questions.

 

1.  How did you select training samples?

2.  How are the training samples determined?  Did you use any map or airphoto to assist you?

3.  How many samples in each class did you use in your classification?

4.  Provide a report of the classification accuracy using independent samples for verification.

            Summarize the accuracy.

5.  What are your suggestions for improving your classification results? 

            Is there any need to adjust the classification scheme?

            Is it possible to improve training?

6.      Can you find a program that converts the classification results into a vector GIS format?

7.      Conduct two supervised classifications using the parallelepiped and the maximum likelihood Measures, while using the same regions of interest for both classifications. Now compare the two classifications and note any differences that you see due to the different Distance Measure techniques.