65
The algorithm for object classification was executed with a value of three set for maximum spectral difference. This setting has been shown to be useful for the extraction of impervious surfaces and it merges neighbouring objects according to their layer mean intensities. Neighbouring image objects are merged in the process if the difference between their layer mean intensities is below the value given by the maximum spectral difference, in this instance three. This algorithm is designed to refine existing segmentation results by merging spectrally similar image objects produced by previous segmentations. The classification method is outlined next, followed by its application. 3.3.2.1 Classification method
For classification of a segmented map, five steps are executed as described here.
First, the classes for classification must be created. The necessary sequential actions are: activate the classification sequence on the top toolbar: dropdown icon/classification/class hierarchy right click/add classes to be classified.
Second, the standard nearest neighbour classification rule is applied. In the nearest neighbour drop-down icon, activate apply standard nearest neighbour to classes/select classes to be classified.
Third, the feature space for nearest neighbour classification is created. In the classification drop down icon, activate edit standard nearest neighbour feature space.
Fourth, the classification rule set is defined. The rule set for the classification is established in the process tree dropdown icon. The aim is to identify the active classes for classification and the level at which the classification is to take place.
Fifth, before beginning the classification, training samples must be created for each class. In the classification drop down icon, activate select samples; to select samples, hold down shift and select samples for each active class; 50 samples should be collected for each class;
The final execution step is to run the classification procedure in eCognition by activating the process tree, right-clicking the rule set and clicking the execute command.
3.3.2.2 Application of classification method
The first of the five application steps required the creation of classes for classifying the vegetation in the study area. In this case there was only one class, namely spekboom which had to be defined. The nearest neighbour classification was run on 60 samples. This decision led to certain south-facing slopes and Acacia karroo along the riverbed being erroneously classified as spekboom. Six different cover classes were then defined to instruct the software which features to recognize as
66
not being spekboom. The classes were Acacia, bare rock, non-vegetated soil (no vegetation), spekboom, south-sloping land (i.e. all vegetation occurring on south-facing slopes) and other (all other vegetation that was not spekboom). These classes are listed in Figure 3.11. At this point the
Figure 3.11 Defined classes in eCognition
concern was not about the accuracy of eCognition's classification of these added communities, rather the accuracy of spekboom classification as this was the only objective that had to be reached.
The second step in applying the standard nearest neighbour classification rule was to select classes for applying the nearest neighbour rule. This selection tool is depicted in Figure 3.12.
Figure 3.12 Classes selected for the nearest neighbour classification
The third step entailed the creation of the feature space for nearest neighbour classification and this was done by experimentation with various options using texture. This involved setting parameters for texture after Haralick (an option in eCognition which uses texture to discriminate among objects) by using the gray-level co-occurrence matrices (GLCM) homogeneity and mean which worked well as a tool to discriminate texture features. The layer values in which the mean value for brightness and the maximum difference for each layer specified were added. The selection tool is shown in Figure 3.13.
67
Figure 3.13 Object features selected for the nearest neighbour classification
Fourth, the rule set for the classification was established in the process tree. Here the user had to identify the active classes for classification and the level at which the classification had to take place. Figure 3.14 shows the command screen menu that was activated in eCognition.
Figure 3.14 Identification of active classes and level classification
In the fifth step following the establishment of the rule set, training sites or samples for the actively defined classes were demarcated. In creating training samples for each class, the need for a variety of spekboom samples became clear, especially those which spekboom occurred at different densities and with segments with different colour tones. A minimum of 50 spekboom samples were used in each image to accurately identify all the various ways it occurs based on the slightly
68
different spectral attributes. Figure 3.15 shows the location of some of the samples that were selected.
Figure 3.15 Location of a variety of class samples chosen for classification in BLK PNR
The classification results based on the chosen samples in Figure 3.15 are displayed in Figure 3.16.
Figure 3.16 Results of the nearest neighbour classification from identified samples in BLK PNR
It was evident that the algorithm accurately extrapolated from samples to the classification. Especially important is that the location of spekboom occurrences has been accurately classified as spekboom. This result is statistically demonstrated by comparing the identified (green) patches of spekboom growing on the mountainside in Figure 3.17 with the classified patches (red) in the image of Figure 3.18.
69
Figure 3.17 Spekboom growing in patches on the mountainside in BLK PNR
Figure 3.18 Spekboom patches classified in eCognition (nearest neighbour) in BLK PNR
70
Finally the classified image containing only the classified spekboom polygons was exported in shape-file format to the ArcGIS platform. Unfortunately, due to the similar colour range displayed by Acacia stands, some were mapped as spekboom. Because Acacia occurs along the riverbed in a distinctive, non-overlapping band, it was easy to select and delete such polygons using the editor tool in ArcGIS.
Despite the problems and frustration (slow and freezing) of using eCognition, the vegetation in the Gamka Thicket was identified using segmentation at a scale of 50 and classified using the nearest neighbour rule, the accuracy of this classification will be dealt with next.