Parallel Processing Implementations of a Contextual Classifier for Multispectral Remote Sensing Data Howard J
Total Page:16
File Type:pdf, Size:1020Kb
Purdue University Purdue e-Pubs LARS Technical Reports Laboratory for Applications of Remote Sensing 1-1-1980 Parallel Processing Implementations of a Contextual Classifier for Multispectral Remote Sensing Data Howard J. Siegel Philip H. Swain Bradley W. Smith Follow this and additional works at: http://docs.lib.purdue.edu/larstech Siegel, Howard J.; Swain, Philip H.; and Smith, Bradley W., "Parallel Processing Implementations of a Contextual Classifier for Multispectral Remote Sensing Data" (1980). LARS Technical Reports. Paper 51. http://docs.lib.purdue.edu/larstech/51 This document has been made available through Purdue e-Pubs, a service of the Purdue University Libraries. Please contact [email protected] for additional information. PARALLEL PROCESSING IMPLEMENTATIONS 060380 OF A CONTEXTUAL CLASSIFIER FOR MULTISPECTRAL REMOTE SENSING DATA HOWARD JAY SIEGEL J PHILIP H. SWAIN J AND BRADLEY W. SMITH Purdue University ABSTRACT pIer algorithms used for remote sensing data analysis) typically require large a Contextual classifiers are being de mounts of computation time. One way to veloped as a method to exploit the spati reduce the execution time of these tasks al/spectral context of a pixel to achieve is through the use of parallelism. Vari accurate classification. Classification ous parallel processing systems that can algorithms such as the contextual classi be used for remote sensing have been fier typically require large amounts of built or proposed. The Control Data Cor computation time. One way to reduce the poration Flexible Processor system is a execution time of these tasks is through commercially available multiprocessor sys the use of parallelism. The applicability tem which has been recommended for use in of the CDC Flexible Processor system and remote sensing [4,5]. PASM is a proposed of a proposed multimicroprocessor system multimicroprocessor for image processing (PASM) for implementing contextual clas and pattern recognition [6]. sifiers is examined. Section II briefly describes the con I. INTRODUCTION text classifier and gives an algorithm for performing it. The use of the Flexible Processor system to implement the classi Contextual classifiers are being de fier is explored in Section III. The use veloped as a method to exploit the spati of PASM to implement the classifier is al/spectral context of a pixel to achieve discussed in Section IV. accurate classification. Just as in writ ten English one can expect to find certain letters occurring regularly in particular II. THE CONTEXTUAL CLASSIFIER arrangements with other letters (qu, ee, est, tion), so certain classes of ground The image data to be classified are cover are likely to occur in the "context" assumed to be a two-dimensional I-by-J of others. The former phenomenon has been array of multivariate pixels. Associated used to improve character recognition ac with the pixel at "row i" and "column j" curacy in text-reading machines. We have is the multivariate measurement n- vector demonstrated that the latter can be used X .. e Rn and the true class of the pixel to improve accuracy in classifying remote 1.) 8 e n {Wl' •.• ,w }. The measurements sensing data [1-3]. Intuitively this ij = C should not be surprising since one can have class-conditional densities easily think of ground cover classes more f(xlw ), k = l,2, ... ,C, and are assumed to likely to occur in some contexts than in k others. One does not expect to find be class-conditionally independent. The wheat growing in the midst of a housing objective is to classify the pixels in the subdivision, for example. A close-grown, array. lush vegetative cover in such a location is more likely the turf of a lawn. In order to incorporate contextual information into the classification pro Classification algorithms such as the cess, when each pixel is to be classified contextual classifier (and even much sim- p-l of its neighbors are also examined. This neighborhood, including the pixel to be classified, will be referred to as the This work was sponsored in part by the p-array. Intuitively, to classify each National Aeronautics and Space Adminis pixel, the contextual classifier computes tration under Contract No. NAS9-15466. the probability of the given observed CH1533-9/80/0000-0019 $OO.75©1980 fEU Reprinted from MACHINE PROCESSING OF REMOTELY SENSED DATA, June 1980 19 pixel being in class k by also considering f{Xllb)f{X2Ia)f{X3Ia)G{b,a,a) the measurement vectors (values) observed for the neighbor pixels in the p-array. + f{Xllb)f{X2Ia)f{X3Ib)G{b,a,b) Specifically, for each pixel, for each class in ~, a discriminant function g is + f{Xllb)f{X2Ib)f{X3Ia)G{b,b,a) calculated. The pixel is assigned to the class for which g is greatest. Each value + f{Xllb)f{X2Ib)f{X3Ib)G{b,b,b) of g is computed by summing the weighted probabilities of the p-l neighbor pixels Note that = G{8 ,8 ,8 ) is the occurring in all possible classification G3{~ij) 1 2 3 states. This is described below mathema relative frequency of occurrence in the tically for pixel (i,j) being in class W k. scene of the specific neighborhood confi guration (8 ,8 ,8 ). The description is followed by an example 1 2 3 to clarify the notation used. Further de tails may be found in [1,2,7]. After computing the discriminant functions ga and gb for pixel (i,j), pixel (i,j) is assigned to the class which has the larger discriminant function value. Algorithm 1, shown in Figure II.2, is one way to implement the cont7x~ual cla~ sifier. The particular class1f1er cons1d 8. w 1J k ered here uses a horizontally linear . p-array of size three. This is shown 1n where Figure ILL Xt£X .. is the measurement vector from the -lJ tth pixel in the p-array {for pixel First consider the main loop. Let (i, j) ) the original image to be classified be an I-by-J array called A. Columns 0 and J-l, 8 t £8 .. is the class of the tth pixel in the -lJ p-array (for pixel (i,j» the two side edges of the image, are not classified since these pixels will not f{x~18t) is the class-conditional density have both right and left neighbors. The of X~ given that the ~th pixel is variable "value" will contain the maximum from class 8 t "g" (discriminant function) value calcu oP{8 .. ) = GP {8 ,8 , ... ,8 ) is the a priori lated for pixel (i,j). This variable may -lJ 1 2 p be updated as the "g" for each class is probability of observing the p-array calculated. The variable "class" is the 81 ,8 2 ", .8p ' class associated with "value." In the main loop, "g{i,j,k)" is a call to a Within the p-array, the pixel locations function to calculate the discriminant may be numbered in any convenient but fix function for pixel (i,j) and class k. ed order. The joint probability distribu This function is called I * (J-2) * C tion GP is referred to as the context times, once for each class for each pixel distribution. being classified. To clarify the computation of the dis criminant function, consider the following Consider the calculation of g{i,j,k). example. Let the context array (neighbor The class of pixel (i,j) is held constant hood) be the p=3 choice shown in Figure at k, while all other possible class 11.1 with the pixels numbered such that assignments are considered for pixels the pixel (i,j) to be classified is asso (i,j-l) and (i,j+l). For each assignment ciated with Xl and 8 , pixel (i,j-l) is of classes for the pixels neighboring 1 pixel (i,j), of which there are C*C, the associated with X and 8 , and pixel 2 2 product of the class-conditional densi (i,j+l) is associated with X3 and 8 , ties ("compf") is weighted by "G{r,k,q)," 3 the a priori probability of observing the Assume there are two possible classes: ~ = 3-array (wr'wk,w ). The array is pre- {a,b}. Then the discriminant function for q "G" class b is explicitly determined and prestored. For each call "g{i,j,k)," the value of "sum" for that i,j, and k is calculated. "Sum" is then gb{X, .) returned as the value of "g{i,j,k)." In 3 f{Xt I 8t )] -lJ ~ [~~l G3{~ij) this straightforward version of the 8 .. £~ , -lJ g{i,j,k) routine, the function to compute 8 =b a class-conditional density ("compf") is 1 called C*C times each time "g" is called. 1980 Machine Processing of Remotely Sensed Data Symposium 20 Now consider the "compf" routine. "compf. " It gets the values it needs from This calculates the class-conditional the X, Y, and Z arrays. For each call density for pixel (a,b) and class k using fIg' (k) ," the value of "sum" for that k is the following equation: calculated. "Sum" is then returned as the value of "g' (k) ." log 1Lk 1- The same "compf" routine is used for f(xlk)=e both Algorithms 1 and 2. Algorithm 1 calls this routine 1* (J-2) *C3 times, while Algorithm 2 calls it only I*(J-2)*C times. where the measurement vector for each pixel is of size four, Lkl is the inverse There are other techniques that can be covariance matrix for class k (four-by employed to make Algorithm 2 even more ef four matrix), ~ is the mean vector for ficient that have not been included in or class k (size four vector), "T" indicates der to avoid obscuring the basic program the transpose, and "log" is the natural flow.