window over the image and checking for the situation where none of the
eight neighboring pixels is the same class as the center pixel. When
this situation is encountered, the class label of the center pixel is
changed. The criterion used to determine the new class of the center
pixel has been changed from the original algorithm. In the original
algorithm, the classes are assumed to be nominal and a simple majority
rule (mode of the distribution) is used for class conversion. In the
version implemented for FOCIS, the classes are assumed to be at least
weakly ordinal and apriori class conversion weights are used. In this
approach, the counts of pixels in each class are multipled by the class
conversion weights and the largest value of the resulting products
determines the new class of the center pixel.
Creation of a polygon table is the second step in the spatial filtering
process. An entry is made in the polygon table for each polygon in the
image that stores among other items, the number of pixels in the poly
gon, their class label, and the frequency of occurrence of each class
in the pixels bordering on the polygon. Diagonal pixels are considered
to be bordering on polygons. The entries in the polygon table are
sorted by size and row number before use in polygon conversion.
For polygon conversion, each polygon is evaluated in the order of its
occurrence in the polygon table. If the polygon is larger than the
minimum size specified by the user for that class then the polygon is
not changed. If the polygon is below the minimum size then the entire
polygon is converted to another class depending on the class composi
tion of the surrounding pixels. The pixel counts for each class are
multiplied by the class conversion weights and the largest product
determines the new class. Following class conversion, a polygon table
entry is created for the new polygon that includes the current polygon.
At this time, all polygon entries that are subsets of the new polygon
are removed. If the new polygon does not meet tire minimum size require
ment then it is converted to a new class in the same manner as before.
In this way each polygon is evaluated until all polygons in the clas
sified image meet the minimum size requirement for their respective
classes.
One result of the spatial filtering of the classified image is that
pixels change classes. Due to the algorithm that is used, large
classes tend to grow and small classes shrink. However, class conver
sion weighting reduces the magnitude of this effect by increasing the
chances of small classes having polygons of similar classes converted
to their class label.
Research in spatial filtering of classified images has often stemmed
from two different motivations and their associated assumptions con
cerning the accuracy of the classification. In one case, the clas
sification is assumed to have errors and the use of spatial filtering
is motivated by the intention to improve classification accuracy
(Guptill, 1978; Goldberg and Goodenough, 1978). The contrasting sit
uation assumes that the classification is accurate prior to spatial
filtering and improved spatial coherence is the desired result. Based
on the assumption that the original classification is accurate, ap
plication of the spatial filtering algorithm degrades accuracies by
adding pixels to classes they do not represent (Table 1). This added
variance is an undesirable by-product of producing a stand map with
improved spatial coherence. Thus, there is a direct trade-off between
spatial coherence and classification accuracy. The result of applying
the modified Davis and Peet spatial filter to a test classification map
can be seen in Figure 3 and compared against the original (Figure 2).