Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P...

20

Transcript of Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P...

Page 1: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

Fuzzy Integral Filters:Properties and Parallel ImplementationHongchi Shi, Paul D. Gader, and Wentsong ChenDepartment of Computer Engineering and Computer ScienceUniversity of Missouri - ColumbiaColumbia, MO 65211fshi,gader,[email protected]

0This research work was in part supported by the University of Missouri Research Board under grant RB96-024, the Lockheed Martin Electronics & Missiles Group under subcontract MUQ832, and the Wright Labora-tory/MNGA under grant number F08630-95-1-0002.

Page 2: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

Fuzzy Integral Filters: Properties and Parallel ImplementationHongchi Shi, Paul D. Gader, and Wentsong ChenAbstractFuzzy integrals as image �lters provide a standard representational form which generalize linear�lters such as the averaging �lter, morphological �lters such as at dilations and erosions, andorder statistic �lters such as the median �lter. However, fuzzy integral �lters are computationallyintensive. Computing the output value obtained by fuzzy integral �ltering at a point involvessorting all the pixels in a neighborhood of the point according to their values and then computingthe ordered weighted sum or maximum with respect to an appropriate fuzzy measure. In thispaper, we discuss some properties of fuzzy integral �lters and describe a method for enhancingthe processing elements of SIMD mesh computers with comparators and counters to e�cientlyimplement fuzzy integral �lters.1. IntroductionRecently, researchers have introduced fuzzy integrals as image �lters [1, 2]. Fuzzy integral�lters form a large class of �lters which generalize linear �lters, morphological �lters, and orderstatistic �lters.Image processing in general involves intensive computation. Parallel computing appears tobe the economical way to achieve real-time performance [3, 4]. The SIMD mesh architectureis considered as a natural parallel architecture for image processing because it directly mirrorsimage data structures and can be easily implemented in hardware. Parallel computers based onthe SIMD mesh architecture, such as the ILLIAC [5], the CLIP series [6, 7, 8], the DAP [9],the MPP [10], the 3D machine [11], and the GAPP [12, 13], have been built. However, fuzzyintegral �lters require parallelism within the processing elements (PEs) in addition to a largenumber of PEs in the processor array. Computing the output value obtained by fuzzy integral�ltering at a point involves sorting all the pixels in a neighborhood of the point according to their1

Page 3: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

values and then computing the ordered weighted sum or maximum with respect to an appropriatefuzzy measure. For an n � n image and a pK � pK neighborhood, the �lter with respect toa fuzzy measure that depends only on set cardinalities takes O(n2K logK) time, if implementedstraightforward on a serial computer. Even combining the moving window technique with abalanced search tree data structure, we can only reduce the time to O(n2K), since we still haveto compute the ordered weighted sum or maximum of K pixel values for every pixel. To achievereal-time �ltering performance, we need to employ parallel processing techniques at two levels: alarge number of PEs corresponding to pixels of images and parallelism within each PE for fastdetermination of order statistics. We consider enhancing the PEs of SIMD mesh computers withcomparators and counters to e�ciently implement fuzzy integral �lters. For the neighborhood ofK pixels, we augment the K registers of each PE with K comparators and K counters to speedup the sorting process. For an n�n image on an n�n enhanced mesh computer, a fuzzy integral�lter of size K with respect to a fuzzy measure that depends only on set cardinalities takes O(K)time, which is optimal.In this paper, we discuss some useful properties of fuzzy integral �lters for image processingand develop a parallel implementation of fuzzy integral �lters on an enhanced mesh processorarray.2. Fuzzy Integral FiltersFuzzy integrals are integrals of a real function with respect to a fuzzy measure. The mostcommonly used fuzzy integrals are the Sugeno integral [14] and the Choquet integral based onthe Choquet functional [15].Let 2X be the set of all subsets of X. A fuzzy measure � de�ned on a set X is a function� : 2X ! [0; 1] satisfying the following conditions:1. �(;) = 0 and �(X) = 1;2. A � B � X implies �(A) � �(B);3. If fAn; n � 1g is a monotone increasing sequence of measurable sets, then limn!1 �(An) =2

Page 4: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

�(S1n=1An).Fuzzy measures are more general than the ordinary additive measure in that �(A [ B) may notbe equal to �(A) + �(B) for disjoint sets A and B.Let � be a fuzzy measure on X and f a function on X with range [r1; r2]. The Choquet fuzzyintegral of f with respect to � is de�ned byC�(f) = Z r2r1 �(fx : f(x) > �g)d�: (1)If f has discrete values from f0; 1; � � � ;M � 1g, the Choquet fuzzy integral of f can be expressedas follows: C�(f) = M�1Xi=0 �(fx : f(x) > ig): (2)If f is de�ned on a �nite point set X = fx0; x1; � � � ; xK�1g, we have the discrete Choquet fuzzyintegral as follows:C�(ff(x0); f(x1); � � � ; f(xK�1)g) = K�1Xi=0 (f(x(i))� f(x(i�1)))�(A(i)); (3)where x(0); x(1); � � � ; x(K�1) is a permutation of x0; x1; � � � ; xK�1 satisfying f(x(0)) � f(x(1)) �� � � � f(x(K�1)), A(i) = fx(i); x(i+1); � � � ; x(K�1)g, and f(x(�1)) is de�ned as 0. When the fuzzymeasure is additive, the Choquet integral is the same as the ordinary Lebesque integral. TheChoquet integral can also be represented asC�(ff(x0); f(x1); � � � ; f(xK�1)g) = K�1Xi=0 f(x(i))(�(A(i))� �(A(i+1))) (4)with A(K) de�ned to be ; so that �(A(K)) = 0.Let � be a fuzzy measure on X. The discrete Sugeno integral of a function f : X ! [0; 1]with respect to � is de�ned byS�(ff(x0); f(x1); � � � ; f(xK�1)g) = K�1_i=0 (f(x(i)) ^ �(A(i))); (5)where _ and ^ represent maximum and minimum, respectively.3

Page 5: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

Following [1, 2], we use F� whenever either S� or C� can be used. It can be shown that whenthe fuzzy measure � is a 0-1 measure, i.e., �(A) takes values from f0; 1g, the Sugeno fuzzy integralis the same as the Choquet fuzzy integral [1].Let f be a gray level image on a �nite point set X, W = fx0; x1; � � � ; xK�1g a window of sizeK, and � a fuzzy measure on W . Let Ay denote A translated by y, i.e., Ay = fx + y : x 2 Ag.Since each Wy has a one-to-one correspondence to W , we can easily extend the de�nition of � onW to Wy by de�ning �(Ay) = �(A); A � W . The fuzzy integral �lter with respect to � and Wis de�ned by FW� (f)(y) = F�(ff(xi) : xi 2 Wyg): (6)Speci�cally, the Choquet fuzzy integral �lter isCW� (f)(y) = F�(ff(xi) : xi 2 Wyg) = Xxi2Wy(�(A(i))� �(A(i+1)))f(x(i)) (7)and the Sugeno fuzzy integral �lter isSW� (f)(y) = S�(ff(xi) : xi 2 Wyg) = _xi2Wy �(A(i)) ^ f(x(i)) (8)3. Some Properties of Fuzzy Integral FiltersIn this section we review some useful, known properties of fuzzy integral �lters and describesome new properties that have not been previously reported on.3.1. Some Basic PropertiesAs pointed out by Grabisch, the fuzzy integral �lters generalize linear �lters, morphological�lters, and order statistic �lters [1]. For an additive measure �, the Choquet integral �lterreduces to a linear �lter, i.e., CW� (f)(y) = Pxi2Wy f(xi)�(fxig). For the fuzzy measure � onW de�ned by �(A) = 1 if jAj � K � d and 0 otherwise, where jAj denotes the cardinalityof A, FW� (f)(y) = d-th order statistic of ff(xi) : xi 2 Wyg. That is, the fuzzy integral �ltersrepresent the d-th order statistic �lter [16] with the median �lter, the minimum �lter, and the4

Page 6: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

maximum �lter being three famous special cases. For a fuzzy measure that depends only on setcardinalities, the Choquet fuzzy integral �lter gives the generalized order statistic �lter [17], i.e,CW� (f)(y) = Pxi2Wy �if(x(i)), where �i = �(A(i))� �(A(i+1)) is a constant.An interesting property that was not pointed out by Grabisch is that fuzzy integral �lters canrepresent any stack �lter [18]. Assume that f is a gray-level image with range f0; 1; � � � ;M � 1g.De�ne the i-th threshold of f byt(i)(f)(y) = ( 1 if f(y) � i0 otherwise. (9)For a given window, Wy, of size K, let t(i)(f)jWy denote the K Boolean values of the i-th thresholdof f over that window. Suppose ~u and ~v are two vectors of K components. The notation ~u � ~vrepresents ~uk � ~vk for k = 1; 2; � � � ; K. A positive Boolean function (PBF), , of K variablesis de�ned to be an increasing function of the K variables, i.e, : f0; 1gK ! f0; 1g such that8~u;~v 2 f0; 1gK; (~u) � (~v) whenever ~u � ~v. Every positive Boolean function de�nes a stack�lter, , as follows: (f)(y) = M�1Xi=1 (t(i)(f)jWy): (10)Stack �lters include erosions, dilations, openings, closings (with at structuring elements), medi-ans and weighted medians, and order statistic �lters as some examples.Note that the set of K-dimensional Boolean vectors is in one-to-one correspondence with theset of all subsets of a window, W , with K elements. Hence, a PBF can be considered as a setfunction on 2W with values in f0; 1g. In fact, every nonconstant PBF uniquely determines a fuzzymeasure (A constant PBF may not satisfy the boundary conditions). The stack �lter de�ned by(10) is a Choquet integral because the terms on the RHS are exactly the integrals in the integralde�nition of the Choquet integral with playing the role of the measure.A binary image can be considered as a set, while a gray level image can be considered as afunction. A set processing (SP) �lter is a �lter accepting a binary image as input and producinga binary image as output, a function processing (FP) �lter is a �lter accepting a gray level image5

Page 7: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

as input and producing a gray level image as output. A function-set processing (FSP) �lter is anFP �lter that works as an SP �lter whenever given a binary image as input. Another interestingproperty of fuzzy integral �lters is that there is a direct relationship between fuzzy measures andkernels of translation invariant, increasing FSP operators that commute with thresholding in theMatheron Representation Theorem [19, 20]. Discrete operators in this class are all stack �lters.Let f and g be gray level images. The notation f � g means f(x) � g(x) for every pixel locationx. An image operator is increasing if and only if (f) � (g) whenever f � g. The kernel ofa translation invariant, increasing operator is de�ned byker[] = fg : (g)(0) � 0g: (11)The Matheron Representation Theorem states that if f is any image, then(f) = _g2ker[] f g; (12)where denotes the gray level erosion. Furthermore, all practical �lters possess a basis B forwhich B � ker[];(f) = [g2B f g;8f 2 ker[] 9g 2 B such that g � f;and g1; g2 2 B =) g1 6� g2 and g2 6� g1:If is an FSP �lter, then the elements of ker[] are at structuring elements and can be identi�edwith subsets of the domain space [16]. Thus, we can think of ker[] as a collection of subsetsof the domain space. Note that the empty set does not satisfy the condition to be an elementof ker[]. In image processing, we are concerned with operators over �nite windows. That is,operators for which there exists a window W such that for all images f , (f)(y) is a functionof the values of f restricted to Wy. In this case, we say that is an operator with window W .6

Page 8: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

Theorem 1 Let be a translation invariant, increasing FSP �lter that commutes with thresh-olding with window W and kernel, nonempty basis B, and K = ker[]. Note that A 2 K impliesA � W . De�ne the measure � to be the characteristic function of K:�(A) = ( 1 if A 2 K0 otherwise. (13)Then (f) = FW�:Proof: We �rst show that � is a measure. The boundary condition �(;) = 0 holds because; 62 K and the condition �(W ) = 1 holds because B 6= ;. To show that � is increasing, letA;B � W with A � B. Since is increasing, if A 2 K we must have B 2 K. In this case,�(A) = �(B) = 1. If A 62 K, then �(A) = 0 � �(B) in any case.Since � is a 0-1 measure, FW� = SW� = CW�. Suppose Wy = fx0; x1; � � � ; xK�1g, f(x(0)) �f(x(1)) � � � � � f(x(K�1)), and A(i) = fx(i); � � � ; x(K�1)g. By de�nition,SW�(f) = K�1_i=0 [f(x(i)) ^ �(A(i))]:The maximum will occur for the index (j) with the property that �(A(j)) = 1 and �(A(j+1)) = 0or j = K � 1. In either case, the maximum value is f(x(j)). Note that the set A(j) is an elementof the basis of the kernel. First, A(j) 2 K because �(A(j)) = 1. Assume j < K � 1. If B � A(j)and B 2 K, then B � A(j+1) so 0 � �(B) � �(A(j+1)) = 0 =) �(B) = 0, which meansB 62 K. If j = K � 1, then A(j) is singleton and clearly minimal.Since is an FSP �lter, the Matheron Representation Theorem can be written as(f)(y) = _B2B[x̂2B f(x)]: (14)We know that A(j) 2 B so A(j) = B for some B 2 B, call it Bj. We havef(x(j)) = ^x2Bjf(x):Assume B 2 B; B 6= Bj, say B = fx(i1); � � � ; x(im)g, where f(x(i1)) � � � � � f(x(im)). Thenf(x(i1)) = x̂2B f(x):7

Page 9: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

Assume f(x(i1)) > f(x(j)). Then (i1) > (j) so �(A(i1)) = 0 since A(i1) � A(j+1) and �(A(j+1)) = 0.But B � A(i1) so �(B) = 0. This contradicts the assumption that B 2 B and therefore , showsthat f(x(j)) = WB2B[Vx2B f(x)] = (f)(y), which proves the theorem.3.2. Fuzzy ConvolutionGeneralizing the conventional convolution, we can de�ne a fuzzy convolution. The fuzzyconvolution provides a better uniform representation with more parameters that may allow us todesign better �lters.Let f be a gray-level image, g a kernel on window W = fx0; x1; � � � ; xK�1g, and � a fuzzymeasure on W . The fuzzy convolution of f with g can be de�ned as follows:(f ? g)(y) = F�(ff(xi)g(y � xi) : y � xi 2 Wg); (15)which is equivalent to (f ? g)(y) = F�(ff(y + zi)g�(zi) : zi 2 �Wg); (16)where g�(�x) = g(x) and �W = fx : �x 2 Wg. If the fuzzy measure is additive, the Choquetfuzzy convolution reduces to the conventional convolution.To apply the fuzzy convolution to image processing, we de�ne a kernel g� to specify thecontributions of the pixels in the window. We then combine the pixels in the window weightedby their contributions using a fuzzy integral with respect to a fuzzy measure � de�ned on thewindow. For example, if we de�ne g� as shown in Figure 1(b) and � as shown in Figure 1(c) whichgives a value for each �(A(i)) � �(A(i+1)) shown in Figure 1(d) for the Choquet fuzzy integral,we obtain a robust edge detector that takes the di�erences between the median of the top threepixels and the median of the bottom three pixels as follows:DW� (f)(y) = F�(ff(x0); f(x1); f(x2); 0; 0; 0;�f(x6);�f(x7);�f(x8)g)= 12[medianff(x6); f(x7); f(x8)g �medianff(x0); f(x1); f(x2)g]: (17)8

Page 10: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

µ(c) fuzzy measure (b) kernel(a) window

A

0.5

0 1 2 3 4 5 6 7 80

1

µ

00.50

000

00.501 1 1

-1 -1 -1

0 0 0

x0

x1

x2

x5

x8

x7

x6

x3

x4

(d) (A )- (A )

(i) (i+1)µµ

Figure 1: The kernel and fuzzy measure used in a robust edge detectorThe robust edge detector derived from the fuzzy convolution outperforms the Sobel edgedetector in the presence of noise. We conducted some experiments to compare their performance.Figure 2 shows the results of the Sobel edge detector and the robust edge detector on a step edgeimage with isolated additive random noise. The step edge with isolated random noise is shownin 3D format in Figure 2(a). Figure 2(b) and (c) are the results of the Sobel edge detector andthe robust edge detector, respectively. Figure 3 gives the results on a real image with isolatedrandom noise.0

2040

6080

0

20

40

60

800

50

100

150

200

250

300

020

4060

80

0

20

40

60

80-100

-50

0

50

100

020

4060

80

0

20

40

60

800

20

40

60

80

Figure 2: Comparison of the Sobel edge detector and the robust edge detector derived from thefuzzy convolution: (a) a step edge with random noise, (b) the Sobel edge detector result, and (c)the robust edge detector result3.3. Robustness of Fuzzy Integral FiltersFuzzy integral �lters can represent robust nonlinear �lters [21, 22, 23]. Well-known robust�lters include the median �lter, the �-trimmed mean �lter, and the quasi-midrange �lter. The9

Page 11: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

Figure 3: Comparison of the Sobel edge detector and the robust edge detector derived from thefuzzy convolution: (a) a step edge with random noise, (b) the Sobel edge detector result, and (c)the robust edge detector result�-trimmed mean �lter is given byTW� (f)(y) = 1K(1� 2�) K�1��KXi=�K f(x(i)); (18)where x(i) (i = 0; 1; � � � ; K � 1) 2 Wy and f(x(0)) � f(x(1)) � � � � � f(x(K�1)). The quasi-midrange �lter is de�ned byLWi (f)(y) = [f(x(i)) + f(x(K�1�i))]=2: (19)They all can be represented by fuzzy integral �lters.Robust �lters based on fuzzy measures use measures whose values depend only on the cardi-nalities of the sets. For example, let�(A) = 8><>: 0 if jAj = 1; 2jAj�25 if jAj = 3; 4; 5; 61 if jAj = 7; 8; 9.The Choquet fuzzy integral �lter is a 29 -trimmed mean �lter with break down point 29 . For thefuzzy measure � given by �(A) = 8><>: 0 if jAj = 112 if jAj = 2; � � � ; 71 if jAj = 8; 9,the Choquet integral �lter is a quasi-midrange �lter with break down point 19 . In general, let� 2 [0; 0:5). If 0 < �(A) < 1 for sets with cardinalities such that �K < jAj < (1��)K, �(A) = 010

Page 12: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

for sets with cardinalities no larger than �K, and �(A) = 1 for sets with cardinalities no smallerthan (1� �)K, then FW� represents a robust �lter with break down point �.4. Parallel Implementation of Fuzzy Integral FiltersIn this section, we consider parallel implementation of discrete fuzzy integral �lters with fuzzymeasures that depend only on set cardinalities. Even with that restriction, fuzzy integral �ltersgeneralize linear �lters, morphological �lters, order statistical �lters, and stack �lters.Fuzzy integral �lters are computationally intensive. On a serial computer, the straightforwardimplementation takes O(n2K logK) time, since each pixel needs O(K logK) time for sortingand O(K) time for computing the weighted sum or weighted maximum. Many researchers haveproposed fast algorithms for a very special case, the median �lter, which needs only one speci�cvalue in the neighborhood [24, 25, 26, 27, 28]. Even combining the moving window technique anda balanced search tree data structure, we can only reduce the time to O(n2K), since we still haveto take the weighted sum or maximum of K elements for every pixel. On an n�n mesh-connectedcomputer with a pixel per PE, we are able to move all the K pixels of its neighborhood to eachPE in O(K) time. We can also compute the weighted sum or maximum of the K pixels in O(K)time. But we have to use O(K logK) time to sort the K pixels in order. The sorting processdominates the time complexity. We propose to enhance the registers of the PEs with comparingand counting capabilities to speed up the sorting process. On such an augmented mesh, fuzzyintegral �lters can be implemented in O(K) time, which is optimal.For a fuzzy measure � that depends only on set cardinalities, �(A) = �(B) whenever jAj = jBj.Thus, � can be represented by K + 1 coe�cients and each �(A(i)) is a constant. Let �i = �(A(i))for the Sugeno integral �lter and �i = �(A(i)) � �(A(i+1)) for the Choquet integral �lter. TheChoquet integral �lter can be represented byCW� (f)(y) = Xxi2Wy �if(x(i)) (20)11

Page 13: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

and the Sugeno fuzzy integral �lter isSW� (f)(y) = _xi2Wy �i ^ f(x(i)): (21)The formulas for the Choquet and Sugeno integral �lters have the same structure and di�er onlyin operations.4.1. Processing Elements Augmented with Comparators and CountersTo �nd the ranks of all the K elements stored in the K registers in each PE, we enhanceeach register with comparing and counting capabilities by adding two comparators and a logKbit counter. Figure 4 shows the enhanced register �le in each PE. The thick lines represent databusses, while the thin lines represent control signals.0enhanced register

register counter

comparator comparatorenable enable

X Y X Y

X<Y X>Y X<YX>Y

clearup/downenable

X=YX=Y

register select

enhanced register 1

enhanced register

.

.

.

K- 1Figure 4: Diagram of enhanced PE register �leThe PE can access a register and its corresponding counter in a unit time. The PE can alsoenable all the comparators to compare the data available in the data bus with the contents oftheir corresponding registers and counters and enable the counters to increment according to thecomparing results in a unit time. The PE can read the content of a register whose counter'scontent matches the data in the data bus in a unit time.12

Page 14: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

The following procedure �nds the order of all the K elements such that counter(j) = kif and only if register(j) contains the k-th smallest element among the K elements. The\register(i):counter(i)" denotes the concatenation of the bits in register(i) and the bits incounter(i).Procedure Ordering-K-elements1 Clear all the counters;2 For i = 0; 1; � � � ; K � 1, do the following:2.1 Load register(i):counter(i) to ACC;2.2 In parallel, compare register(j):counter(j) with ACC andincrement counter(j) by 1 if register(j):counter(j) >= ACC;2.3 Decrement counter(i) by 1;end procedure;Obviously, the above procedure takes O(K) time. It is easy to see how steps 1, 2.1, and 2.3are realized. In step 2.2, each PE sends an \enable" signal to every comparator and an \up"signal to every counter, and the control logic in every enhanced register generates an \enable"signal for its counter according to the comparing result. Thus, this step selectively incrementssome counters. Suppose all the elements are distinct and register(j) contains the k-th smallestelement, which means there are k elements smaller than register(j). In the above procedure, thosek smaller elements each make counter(j) increment by 1. Thus, after the procedure, counter(j)will have value k. To take care of cases of duplicate elements, we append the counter value toeach register in the above procedure.To illustrate the ordering procedure, we give an example with K = 9 in Table 1. The i-throw shows the contents of the registers and counters after the i-th iteration. The notation x : ydenote that the contents of a register and its counter are x and y, respectively.13

Page 15: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

Table: 1: Illustration of ordering K values in the enhanced register �leregister content 1 2 2 8 3 7 9 1 111:0 2:0 2:0 8:0 3:0 7:0 9:0 1:0 11:01:0 ) 1:0 2:1 2:1 8:1 3:1 7:1 9:1 1:1 11:12:1 ) 1:0 2:1 2:2 8:2 3:2 7:2 9:2 1:1 11:22:2 ) 1:0 2:1 2:2 8:3 3:3 7:3 9:3 1:1 11:38:3 ) 1:0 2:1 2:2 8:3 3:3 7:3 9:4 1:1 11:43:3 ) 1:0 2:1 2:2 8:4 3:3 7:4 9:5 1:1 11:57:4 ) 1:0 2:1 2:2 8:5 3:3 7:4 9:6 1:1 11:69:6 ) 1:0 2:1 2:2 8:5 3:3 7:4 9:6 1:1 11:71:1 ) 1:0 2:2 2:3 8:6 3:4 7:5 9:7 1:1 11:811:8) 1:0 2:2 2:3 8:6 3:4 7:5 9:7 1:1 11:8counter content 0 2 3 6 4 5 7 1 84.2. Enhanced Mesh Processor ArrayThe n�n augmented mesh processor array is composed of n2 enhanced PEs connected throughan n� n mesh interconnection network. Such an augmented processor array is being prototypedat Oak Ridge National Laboratory [29]. We denote the PE in the i-th row and j-th column ofthe mesh by PE(i; j) with PE(0,0) in the top left corner of the mesh.The augmented PEs operate in a single instruction stream multiple data stream (SIMD)mode, with all control signals coming from a single control unit. The control unit can broadcasta constant to all the PEs in a unit time. Each PE is connected to its four neighbors. The linksin the interconnection network are unidirectional. In a unit time, all the PEs may transmit datato their directly connected PEs in a speci�ed direction.For an n�n image a on an n�n processor array, each pixel a(i; j) is mapped to a processingelement PE(i; j). Neighboring pixels are mapped to neighboring PEs.To compute the fuzzy integral �lter output of a pixel on each PE(i; j), we need to move theK � 1 pixels in its neighboring PEs to PE(i; j). In order to accomplish the moving process inthe SIMD mode, we design a moving path of length K in the neighborhood and move the pixelsaccording to the path. Similar to convolution paths discussed in [30, 31, 32], a moving path is14

Page 16: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

a simple path starting at the center pixel and including all the pixels in the neighborhood in aspiral clockwise order. For example, the moving path for the 3�3 neighborhood is (0; 0), (�1; 0),(�1; 1), (0; 1), (1; 1), (1; 0), (1;�1), (0;�1), (�1;�1) as shown in Figure 5. The arrows in the�gure denote the moving directions. It is easy to obtain the moving path for the pK � pKneighborhood. To obtain moving paths for more complicate neighborhoods, we can use similartechniques for �nding convolution paths for those neighborhoods discussed in [31, 32].i

j

0

1

-1 0 1

-1

Figure 5: Moving path for 3� 3 neighborhoodGiven a moving path p0 = (0; 0);p1; � � � ;pK�1, we can use the following procedure to movethe K pixels of the neighborhood to each PE's K registers. The moving process takes O(K) time.Procedure Moving-K-neighborhood-pixels-to-registers1 Each PE(i; j) stores a(i; j) into register(0) in parallel;2 For l = 1; 2; � � � ; K � 1, do the following:2.1 Shift a as follows:* Case pl � pl�1 = (0;�1): shift left;* Case pl � pl�1 = (0; 1): shift right;* Case pl � pl�1 = (�1; 0): shift up;* Case pl � pl�1 = (1; 0): shift down;2.2 Store in register(l) the pixel newly shifted in;end procedure;4.3. Fuzzy Integral Filters on the Enhanced Mesh Processor ArrayUsing the moving and ordering procedures, we can implement the fuzzy integral �lters on theenhanced processor array as follows. The algorithm takes O(K) time.15

Page 17: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

Algorithm Fuzzy-integral-�ltersInput: a (input image) and K (�lter size)Output: b (�ltered image)1 Use the Moving-K-neighborhood-pixels-to-registers procedureto obtain the K pixels in its neighborhood for each PE;2 Use the Ordering-K-elements procedure to compute the rank of each element in the K registers;3 Set b(i; j) to 0 for the Choquet integral �lter (�1 for the Sugeno integral �lter) in parallel;4 For each �l 6= 0 for the Choquet integral �lter (� 6= �1 for the Sugeno integral �lter),do the following:4.1 Broadcast the constant �l (�l) to each PE(i; j);4.2 Read the register whose corresponding counter has value l, say r;4.3 Compute b(i; j) = b(i; j) + �l � r for the Choquet integral �lter(b(i; j) = b(i; j) _ �l ^ r for the Sugeno integral �lter) in parallel;end algorithm.5. ConclusionWe have presented some properties of fuzzy integrals as image processing �lters and developedan e�cient implementation of fuzzy integral �lters on an enhanced mesh processor array withprocessing elements augmented with comparing and counting capabilities. On an enhanced PE,we can �nd the ranks of the K elements in the register �le in O(K) time. The capability forquickly ordering elements is critical for real-time implementation of fuzzy integral �lters, sincethe ordering process dominates the time complexity. The algorithm for fuzzy integral �lters ofsize K takes O(K) time on an enhanced mesh processor array, which is optimal.AcknowledgementE�ort sponsored by the Wright Laboratory/MNGA, Air Force Materiel Command, USAF,under grant number F08630-95-1-0002. The U.S. Government is authorized to reproduce and16

Page 18: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

distribute reprints for Governmental purposes notwithstanding any copyright notation thereon.The views and conclusions contained herein are those of the authors and should not be interpretedas necessarily representing the o�cial policies or endorsements, either expressed or implied, ofthe Wright Laboratory/MNGA or the U.S. Government.References[1] M. Grabisch. Fuzzy integrals as a generalized class of order �lters. In Proceedings of EuropeanSymposium on Satellite Remote Sensing, Rome, Italy, 1994.[2] M. Grabisch and M. Schmitt. Mathematical morphology, order �lters, and fuzzy logic. InProceedings of the International Joint Conference of the 4th FUZZ-IEEE and the 2nd IFES,Yokohama, Japan, 1995.[3] V. Chaudhary and J. K. Aggarwal. Parallelism in computer vision: A review. In V. Kumar,P. S. Gopalakrishnan, and L.N. Kanal, editors, Parallel Algorithms for Machine Intelligenceand Vision, pages 271{309. Springer-Verlag, New York, NY, 1990.[4] S. Yalamanchili and J. K. Aggarwal. Parallel processing methodologies for image processingand computer vision. In P. W. Hawkes, editor, Advances in Electronics and Electron Physics,87. Academic Press, San Diego, CA, 1994.[5] B. H. McCormick. The Illinois pattern recognition computer { ILLIAC III. IEEE Transac-tions on Electronic Computers, 12:791{813, 1963.[6] M. J. B. Du�, D. M. Watson, T. J. Fountain, and G. K. Shaw. A cellular logic array forimage processing. Pattern Recognition, 5(3):229{247, September 1973.[7] M. J. B. Du�. Clip4. In K. S. Fu and T. Ichikawa, editors, Special Computer Architecturesfor Pattern Processing, chapter 4, pages 65{86. CRC Press, Boca Raton, FL, 1982.[8] T. J. Fountain, K. N. Matthews, and M.J.B. Du�. The CLIP7A image processor. IEEETransactions on Pattern Analysis and Machine Intelligence, 10(3):310{319, 1988.[9] S. F. Reddaway. The DAP approach. In C. R. Jesshope and R. W. Hockney, editors, InfotechState of the Art Report: Supercomputers, volume 2, pages 311{329. Infotech, Maidenhead,17

Page 19: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

England, 1979.[10] K. E. Batcher. Design of a massively parallel processor. IEEE Transactions on Computers,29(9):836{840, 1980.[11] M. J. Little and J. Grinberg. The 3-D computer: An integrated stack of WSI wafers. InE. E. Swartzlander, editor, Wafer Scale Integration. Kluwer Academic Publishers, Boston,MA, 1989.[12] E. L. Cloud. Geometric Arithmetic Parallel Processor: Architecture and implementation.In V. K. Prasanna, editor, Parallel Architectures and Algorithms for Image Understanding.Academic Press, San Diego, CA, 1991.[13] M. S. Tomassi and R. D. Jackson. An evolving SIMD architecture approach for a changingimage processing environment. DSP & Multimedia Technology, pages 1{7, October 1994.[14] M. Sugeno. Theory of fuzzy integrals and its applications. PhD thesis, Tokyo Institute ofTechnology, 1974.[15] G. Choquet. Theory of capacities. Annales de l'Institut Fourier, 5:131{295, 1953.[16] P. Maragos and R. W. Schafer. Morphological �lters { part II: their relation to median, order-statistic, and stack �lters. IEEE Transactions on Acoustics, Speech, and Signal Processing,35(8):1170{1184, 1987.[17] A. C. Bovik, T. S. Huang, and D. C. Munson. A generalization of median �ltering usinglinear combinations of order statistics. IEEE Transactions on Acoustics, Speech, and SignalProcessing, 31(6):1342{1350, December 1983.[18] P. D. Wendt, E. J. Coyle, and N. C. Gallagher. Stack �lters. IEEE Transactions on Acoustic,Speech, and Signal Processing, 34(4):898{911, August 1986.[19] E. R. Dougherty and J. Astola. An Introduction to Nonlinear Image Processing. SPIE OpticalEngineering Press, 1994.[20] D. Sinha and E.R. Dougherty. A general axiomatic theory of intrinsically fuzzy mathematicalmorphologies. IEEE Transactions on Fuzzy Systems, 3(4):389{403, November 1995.[21] H. A. David. Order Statistics. John Wiley, 1980.18

Page 20: Hongc hi Shi, P aul D. Gader, and W en tsong Chen · F uzzy In tegral Filters: Prop erties and P arallel Implemen tation Hongc hi Shi, P aul D. Gader, and W en tsong Chen Departmen

[22] P. S. Huber. Robust Statistics. John Wiley, 1981.[23] F. Hampel, E. Ronchetti, P. Rousseeuw, and W. Stahel. Robust Statistics: the ApproachBased on In uence Functions. John Wiley, 1986.[24] T. S. Huang, G. T. Yang, and G. Y. Tang. A fast two-dimensional median �ltering algorithm.IEEE Transactions on Acoustics, Speech, and Signal Processing, 27:13{18, February 1979.[25] E. Ataman, V. K. Aatre, and K. M. Wong. A fast method for real-time median �ltering.IEEE Transactions on Acoustics, Speech, and Signal Processing, 28(4):415{421, August 1980.[26] J. T. Astola and T. G. Campbell. On computation of the running median. IEEE Transactionson Acoustics, Speech, and Signal Processing, 37(4):572{574, April 1989.[27] M. Juhola, J. Katajainen, and T. Raita. Comparison of algorithms for standard median�ltering. IEEE Transactions on Signal Processing, 39(1):204{208, January 1991.[28] J. Gil and M. Werman. Computing 2-D min, median, and max �lters. IEEE Transactionson Pattern Analysis and Machine Intelligence, 15(5):504{507, May 1993.[29] P. C. Co�eld. An architecture for processing image algebra operations. In Proceedings ofSPIE conference on Image Algebra and Morphological Image Processing III, volume 1769,pages 178{189, 1992.[30] M. Maresca and H. Li. Morphological operations on mesh connected architecture: A gener-alized convolution algorithm. In Proceedings of 1986 IEEE Computer Society Conference onComputer Vision and Pattern Recognition, pages 299{304, 1986.[31] S. Y. Lee and K. Aggarwal J. Parallel 2-D convolution on a mesh connected array processor.IEEE Transactions on Pattern Analysis and Machine Intelligence, 9(4):590{594, July 1987.[32] H. Shi, G. X. Ritter, and J.N. Wilson. An e�cient algorithm for image-template product onSIMD mesh-connected computers. In Proceedings of the 1993 International Conference onApplication-Speci�c Array Processors, Venice, Italy, October 1993.19