Practical 4: Multi-Spectral Image Classification

Spring term 2005

Assessed practical: Multi-Spectral Image Classification

The assignment (making up 30% of the course mark) should be handed in at the end of the first week of the summer term (Fri 29th April) either to Dr. Disney personally, or at the Birkbeck Geography Departmental office (or post through the office door). If you feel you cannot meet this deadline, you should contact Dr. Disney regarding an extension and fill out an extension request (http://www.bbk.ac.uk/geog/study/assignmentcoversheet.pdf). All assignments should be typed up and accompanied by a cover sheet (see above). Please read and follow the submission instructions on page 7 carefully.

Image data:

Filename: Churn_3b.img

Description: Airborne Thematic Mapper (ATM) data for Churn Farm, near Blewbury, Oxfordshire, 4, June, 1984.

5m spatial resolution.
3 Spectral bands corresponding to:

Band 1 (0.63-0.69 mm (red) equivalent to Landsat TM band 3)

Band 2 (0.76-0.90 mm (NIR) equivalent to Landsat TM band 4)

Band 3 (1.55-1.75 mm (SW IR) equivalent to Landsat TM band 5)

Other Material:

Schematic reference sheet with land cover details for the area.

A PC floppy 3.5” diskette (you need to get one) if you want to save digital results as ‘tiff’ graphic files.

Introduction

This last practical introduces multi-spectral classification of remotely sensed data, a process of assigning image pixels to a particular thematic group or class. In this case, the classes are land cover or crop types. The final aim is to map the land cover types of the whole image. To achieve this aim, the objective is to extrapolate classification of land cover types to the unknown areas of the whole image using data obtained from the smaller known areas which we term "training areas" that produce "training statistics". You are given land cover information for the area that was obtained from field survey. Note that this is an exercise - the image you are classifying covers only a small area. A more typcial application would be extracting land cover information over a much wider area from limited training data derived from a small sub-area. The assumption is that the spectral variability of most pixels can be accurately represented using only a small subset of training data.

In Part 1, you are asked to produce the training statistics and in Part 2 you will go on to use these statistics to produce a classification of the whole of the imaged area. Thus the aims are:

(i) Overall, to produce a supervised land classification.

(ii) Specifically, to produce training statistics and consider the statistical relationships between different land classes and how this relates to the process of classification.

(iii) To produce a classification and test its accuracy and then consider the statistical and spectral problems, and possible solutions or improvements.

Part 1

Objective of Part 1: to generate and analyse training statistics that are used for supervised classification in Part 2.

NB Bold Italic text denotes commands/operations in Erdas Imagine.

You will need a floppy disk to store data from one session to the next.

Action:

1. Display a colour composite image of Churn_3b.img in Viewer#1. Familiarise yourself, by comparing the image with the reference sheet provided, with the crop types present and the variations in spectral signature between and within crop types.

2. Now click the Classifier button on the Icon Panel and then the Signature Editor ... button. You will define polygons that will be used to collect all pixels from within to contribute to the signature files that are used for classifying the imagery. You can define as many polygons as you wish for each landcover class. After you have defined the polygon(s) for each class, the polygons are merged to produce an overall class signature data set.

To create polygons we use the AOI (Area of Interest) tool. Bring Viewer#1 to the front and click on the AOI menu in the window and select the Tools… option. A ‘tools’ panel will appear next to Viewer#1 with square buttons that can be used to draw and edit polygons in the Viewer window. You will be using the Create Polygon AOI tool:

First you should define your Winter Wheat training signature. Click on the Create Polygon AOI button in the tool panel and move the cursor over to Viewer#1. Now, locate a winter wheat field and click once with the left mouse button at the edge of that field. Now move the mouse to a different position in the field (perhaps along the same edge of the field at a different end) and click the left button again once. You have now defined two nodes of a polygon. Continue round the field until you get back almost to where you started.

At the last node, double click the left button and the polygon will be completed. If this is a suitable polygon to be used to represent the field, go to the signature editor and press the button marked:

You will now see that Class 1 has appeared in the Signature Editor window. If you wish to create further polygons for the Winter Wheat, repeat the above procedure to (and including)

If you have created several polygons for a class, when you have completed defining all polygons, you need to combine the polygons to one class signature. To do this, go to the Signature Editor window and holding the shift button on the keyboard, select each polygon by clicking on it in the Class column on the left (when selected, each polygon row will turn yellow). Once you have selected all polygons, Click the merge button:
which creates a new signature class as an amalgam of all other selected polygons. Before you go on, delete the selected classes that you have just merged from the Edit/Delete menu in the Signature Editor window. Now rename the one remaining class as Winter Wheat by clicking on the name of the Class and typing in your class name (e.g. Winter Wheat). You have now created a signature class for winter wheat and are ready to move on to the second class. NB, If you only have one polygon per signature class, it is not necessary to merge that class.

You should avoid selecting whole fields for your training classes, as this defeats the object of the classification - if you use all the image data in your training data you won’t actually be classifying anything. Note that in a reall-world classification process we would typically be dealing with much larger images than the small one we have here and so your training regions would only be a very small subset of the image as a whole. Also, you would not know in advance what most of the fields in the image were. That’s the point of doing the classification – to try and take a small area of “known” cover types and use this knowledge to predict what the cover typeds are in the rest of the image. A further reason for selecting smallish regions away from the field boundaries is that if you get really close to the edge of a field you may accidentally include some pixels of a different class in your polygon and this is likely to adversely affect your classification. If the field has several noticeably different cover types make sure you get a sample from each.

Having completed the Winter Wheat class, move onto defining the next class type on the list of thematic types on the handout. Make sure that you retain the order in which they are listed on the handout i.e.
Winter Wheat (Value = 1)
Winter Barley (Value = 2)
Winter Beans (Value = 3)
Peas (Value = 4)
Lucerne (Value = 5)
Grass (Value = 6)
Scrub (Value = 7)
Buildings, quarries and trees (Value = 8)

IMPORTANT: Having completed all classes, and while the Signature Editor is still open, make sure that for each row, the column labelled ‘Value’ contains an integer number from 1 to 8 (Winter Wheat row is 1, Winter Barley is 2.....Buildings, quarries and trees is 8 – see above). If you fail to check this, the classification process will probably give very poor results.

Once you have created all signature classes (8 in total) you should save the data as a signature file. (Note: save it to the hard disk first, then copy the resulting file to the floppy using file manager or Explorer, otherwise it takes a long time for some reason). In the Signature Editor window, from the File/Save menu, call the file a name that is pertinent to you (e.g. JohnSmithSigs.sig). Do not use spaces in the name as Imagine will not recognise these characters. This file will be used in Part 2 of the practical. You should also copy the signature file to floppy disk.

3. When you have finished defining your training areas for all classes, you are now ready to investigate the spectral separability of the signature classes. The signature file you have just created can be examined in various ways.

A An analysis of the means and standard deviations of each signature class can be achieved by plotting the spectral extents of each class in different band combinations (i.e. band 2 vs. band 1, band 3 vs. band 1 and band 2 vs. band 3). To do this, you need to obtain the signature class means and standard deviations (sd=Övariance) in each band.
In the Signature Editor window, select the first signature class (e.g. winter wheat) by left clicking in the pointer column (denoted by the symbol ) to the first row. Now click on the capital sigma symbol button (S) and the class distribution statistics will be displayed in a report box. Right click on the button marked Minimum and select the option Select All. This will shade in all of the columns in the univariate statistics table (upper). Now right click the cursor on Minimum again and this time select Report. A dialogue box will appear and you should select the report format that you require. Once you have chosen, click OK and the univariate statistics in all 3 bands will be displayed in an Editor window. You can copy and paste this information to a Word document or other editor for incorporation into you final write-up.
Close the Editor window and go on to the next signature class (i.e. click on the next row in the column). Repeat the procedure and copy the data to the open editor. (If you prefer you can jot down the statistics on a piece of paper for use later on.)
Having gone through all 8 signature classes you are ready to plot up the distributions of signature classes in 2-D feature spaces. On a piece of graph paper (or in Excel) plot the results as mean values and boxes defined by lines equal to the means plus 2 standard deviations and lines equal to the means minus two standard deviations for three graphs. These graphs should compare:

Band 1 vs. Band 2

Band 2 vs. Band 3

Band 3 vs. Band 1

The example below shows how Winter Wheat training data is plotted for channel 1 and channel 2:

Winter wheat

mean / min / max / var / SD / 2xSD
Channel 1 / 90 / 50 / 150 / 225 / 15 / 30
Channel 2 / 100 / 40 / 120 / 625 / 25 / 50
Channel 3 / 200 / 150 / 230 / 144 / 12 / 24

Consideration

Question 1 Consider the reasons and implications for differences in size between the boxes for various classes.

B You can also examine the distribution of the training data by examining the signature class histograms in each band. To do this, in the Signature Editor window, right click the left hand column (Class #) and choose the Select All option. All signature classes should become highlighted. Now click the Histogram icon button (two to the right from the S button). A histogram plot control panel will appear and you can play with the different ways in which the histograms are displayed. Start by selecting the All Selected Signatures radio button and the Single Bands radio button. With Band No. set to 1, Click the Plot button at the bottom of this panel. A graph will appear showing the histograms of all 8 signature classes for Band 1. The colours correspond to the colours in the Signature Editor window. If you click the padlock button and lock the window, you can go back to the histogram plot control panel and change the Band No. to 2. This time all histograms in band 2 will be plotted in a new window. The same procedure can be completed to get band 3 histograms displayed. (NOTE that the distributions are often skewed and therefore can influence the choice of classification procedure used: a maximum likelihood procedure will give better results when using skewed distributions than a minimum distance or parallelepiped classification. However, the procedure takes far longer to complete. For the purposes of demonstrating the classification procedure, we shall be using the minimum distance and parallelepiped classification rules).

(If you made any mistakes in choosing your training data you can edit incorrect classes in the Signature Editor and the AOIs and save the modified signature file. Remember to save any changes to the signature file.)

Part 2

This Part builds on the training data statistics generated in Part 1. During classification, each pixel of an image is assigned, as far as possible, to a land cover group or class, as defined by the training statistics.

The classification procedure assigns each output map image pixel with a class value appropriate to the land cover classes. Some pixels may not be assigned to any class, i.e. they remain unclassified since they fall outside all boxes or distance thresholds and will be placed into and unclassified category (black). When the program has completed the image classification accuracy must be tested to measure how good the classification has been.

Classification is carried out in the program by testing the three DNs for each pixel to decide whether the point, defined in the 3D (in this case) "feature space" by the DNs, lies within any of the land cover class "boxes" (actually they are "spheroids") defined in the same space. An individual pixel may lie within one box only, more than one box or none at all (unclassified). A parallelepiped (box) classification and a minimum distance classification will be performed.