Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

25
Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform q Pinaki Ghosh a, * , Bhabatosh Chanda b , Prakash ch. Mali a a Department of Mathematics, Jadavpur University, Calcutta 700 032, India b Electronics and Communication Sciences Unit, Indian Statistical Institute, 203 B.T. Road, Calcutta 700 035, India Received 21 May 1997; received in revised form 21 September 1998; accepted 29 March 1999 Communicated by Azriel Rosenfeld Abstract Computing pattern spectrum is one of the key methods of determining shape-size distribution of objects in the image. Morphological algorithms for computing the pat- tern spectrum by successive opening and pixel-counting are computationally very costly on sequential machines. In this paper a fast algorithm via city-block distance transform with morphological concept for the purpose is proposed. Ó 2000 Published by Elsevier Science Inc. All rights reserved. Keywords: Mathematical morphology; Binary objects; Distance transform; Pattern spectrum 1. Introduction The problem of shape representation and shape-size description is very important in computer vision and image analysis [16–18]. An algebraic system of operators like mathematical morphology is useful for the purpose. Acting on Information Sciences 124 (2000) 193–217 www.elsevier.com/locate/ins q This work was financially supported by University Grants Commission, India. * Corresponding author. Correspondence address: Signal Processing Division, SHL, RCL, Hyderabad 69, India. 0020-0255/00/$ - see front matter Ó 2000 Published by Elsevier Science Inc. All rights reserved. PII: S 0 0 2 0 - 0 2 5 5 ( 9 9 ) 0 0 0 4 3 - 2

Transcript of Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

Page 1: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

Fast algorithm for sequential machine tocompute pattern spectrum via city-block

distance transform q

Pinaki Ghosh a,*, Bhabatosh Chanda b, Prakash ch. Mali a

a Department of Mathematics, Jadavpur University, Calcutta 700 032, Indiab Electronics and Communication Sciences Unit, Indian Statistical Institute, 203 B.T. Road,

Calcutta 700 035, India

Received 21 May 1997; received in revised form 21 September 1998; accepted 29 March 1999

Communicated by Azriel Rosenfeld

Abstract

Computing pattern spectrum is one of the key methods of determining shape-size

distribution of objects in the image. Morphological algorithms for computing the pat-

tern spectrum by successive opening and pixel-counting are computationally very costly

on sequential machines. In this paper a fast algorithm via city-block distance transform

with morphological concept for the purpose is proposed. Ó 2000 Published by Elsevier

Science Inc. All rights reserved.

Keywords: Mathematical morphology; Binary objects; Distance transform; Pattern

spectrum

1. Introduction

The problem of shape representation and shape-size description is veryimportant in computer vision and image analysis [16±18]. An algebraic systemof operators like mathematical morphology is useful for the purpose. Acting on

Information Sciences 124 (2000) 193±217www.elsevier.com/locate/ins

q This work was ®nancially supported by University Grants Commission, India.* Corresponding author. Correspondence address: Signal Processing Division, SHL, RCL,

Hyderabad 69, India.

0020-0255/00/$ - see front matter Ó 2000 Published by Elsevier Science Inc. All rights reserved.

PII: S 0 0 2 0 - 0 2 5 5 ( 9 9 ) 0 0 0 4 3 - 2

Page 2: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

complex shapes they are able to decompose them into meaningful parts andseparate them from extraneous parts [1±3,5,9]. The class of Euclidean gran-ulometries on binary images has been ®rst studied by Matheron [2]. Serra [3]has extensively used these size distributions in image analysis applications topetrography and biology. Later the basic theory of granulometry on completelattices was developed in [4]. Maragos [5] has viewed the size distribution viathe concept of pattern spectrum and has extended the concept of patternspectrum to graytone images and arbitrary multilevel signals. A more com-prehensive treatment of Euclidean granulometry for grayscale function can befound in [14,15]. Morphological operators are inherently parallel becausesimple and identical operations are applied simultaneously to sets of points.Due to the same reason they, including the algorithm for computing the pat-tern spectrum, are usually very slow on sequential machines. Vincent [10] haspresented a fast algorithm for computing pattern spectrum based on openingwith ortho-line segments using image run-length. In this paper, we propose afast algorithm suitable for sequential machine for computing the patternspectrum with respect to a family of discs using the city-block distance trans-form matrix.

This work is the continuation of that of Ghosh and Chanda [12]. Mathe-matical preliminaries and basic concept of pattern spectrum can be found in[3,5,12,13] and are also brie¯y presented in Section 2 of this paper. The pro-posed method is described in Section 3. Section 4 determines the computationalcomplexity. Section 5 is for the discussion on implementation and concludingremarks.

2. Preliminaries

Monochrome image or simply image, refers to a two-dimensional intensityfunction f �x; y�, where x and y denote spatial coordinates and the value off �x; y� at any point (pixel) is proportional to the brightness (or gray value) ofthe image at the point. Here we deal with binary images only. More preciselywe deal with 2-D object represented as a maximal set of connected pointshaving gray value 1.

Let A;B;C; . . . are subsets of R2 or Z2, where R and Z are set of all real andinteger numbers, respectively. We use traditional de®nitions for dilation, ero-sion, opening and closing [8,9], and denote them by A� B, A B, A B, AÓB,respectively.

In Continuous domain, let B be a compact subset of the plane R2. B is calledin morphology as structuring element.

Let B have size one. Then the set

sB � fsb j b 2 Bg �1�

194 P. Ghosh et al. / Information Sciences 124 (2000) 193±217

Page 3: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

de®nes a homotopic pattern of size s, where s is any non-negative real number.The shape of sB is same as that of B.

Proposition 1. If s be any real number ( P 0) then s�A� B� � sA� sB.

Proposition 2. If s be any real number (> 0) then s�A B� � sA sB.

For a ®xed B, consider the functional composition sequenceA! �A sB� ! m�A sB� where A is a compact set, and m denotes the area(Lebesque sense). Since opening is an anti-extensive operation and sB is in-creasing then A sB � A s0B for any s P s0. Hence the real valued functions! uA�s� � m�A sB� is decreasing as s increases. Note that for su�cientlylarge s, uA�s� � 0. Hence the mapping s! �A sB� is termed as granulometryand the function uA�s� is known as size distribution. For working purposes, it isconvenient to normalize uA�s� by introducing the function

f �s� � 1

�ÿ uA�s�

m�A��;

which possesses characteristics of a true probability distribution function.Hence its derivative f 0�s� is a probability density function. This f 0�s� is re-named as pattern spectrum by Maragos [5] and rede®ned as

PSA�s;B� � ÿ d

ds�m�A sB��: �2�

In discrete domain, if B be a binary pattern, i.e., a ®nite connected subset of thediscrete plane Z2, then

nB � B� B� B� � � � � B� B|���������������������{z���������������������}�nÿ1� times

: �3�

Eq. (3) de®nes a family of binary patterns generated by B parameterized bydiscrete size parameter n �n � 0; 1; 2; . . .�. By convention if n � 0; nB � f�0; 0�g.Multiscale opening of A by B at scale n � 0; 1; 2; . . . is the opening of A by nB

A nB � �A nB� � nB: �4�From Eq. (4) and de®nitions of dilation and erosion it follows that

A nB �[

�nB�p��A

�nB� p�: �5�

Hence A nB eliminates from A all objects or their parts inside which nBcannot ®t. That is why, the size n of nB is referred as synonymous to the scale atwhich the ®lter A nB operates. The pattern spectrum provides a measure ofsimilarity between a set and the collection of all structuring elements nB. The

P. Ghosh et al. / Information Sciences 124 (2000) 193±217 195

Page 4: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

Pattern Spectrum PSA�n;B� of a set A in terms of the structuring element B isgiven by Maragos [5] as

PSA�n;B� � card��A nB� ÿ �A �n� 1�B�� for �n P 0�; �6�where n 2 Z and card��� denotes the cardinality of a set. Since opening is ananti-extensive operation and nB is increasing as n increases, then

A �n� 1�B � A nB for �n P 0�: �7�Thus card�A nB� is nonnegative and is decreasing as n increases. Since A is®nite, there exists a positive integer N � maxfn j A nB 6� 0g. Thencard�A nB� � 0 for all n > N .

The city-block distance d4�p; q� between two points p � p�x; y� andq � q�u; v� is de®ned as

d4�p; q� � jxÿ uj � jy ÿ vj;where the distance transform of the points �x; y� 2 A is given by

DT4�x; y� � min�u;v�fd4�p; q�g:

It is evident that1. if DT4�x; y� � n and B � f�ÿ1; 0�; �0;ÿ1�; �0; 0�; �0; 1�; �1; 0�; g, then at most�nÿ 1�B centered at �x; y� can ®t in A. That is we can say

A nB �[

nB��x;y��A

fnB� �x; y�g s:t: DT4�x; y�P n� 1:

2. maxf�x;y�g DT4�x; y� � N � 1.Hence card�A nB� can be computed from the distance transform matrix

DT4 and card�nB�. For brevity, we will henceforth denote DT4 simply by DT.

3. Proposed method

In this section the mathematical basis of the proposed algorithm is pre-sented. Let us recall the de®nition of pattern spectrum which can be rewrittenas

PSA�n;B� � card�A nB� ÿ card�A �n� 1�B� for 06 n6N : �8�Foreground of the binary image A may be considered as union of A1;A2; . . .,etc. We know, if A1;A2;A3; . . . ;Am are m sets then

card�A1 [ A2 [ A3 [ � � � [ Am� �X

card�Ak� ÿX

card�Ai \ Aj��X

card�Ai \ Aj \ Ak� � � �� �ÿ1�mcard�A1 \ � � � \ Am�: �9�

196 P. Ghosh et al. / Information Sciences 124 (2000) 193±217

Page 5: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

In the present context, for a given distance transform value l the set Ai is de-®ned as

Ai � f�x; y� j jxÿ uj � jy ÿ vj < l&DT �u; v�P lg: �10�That is, Ai�16 i6m� consists of the pixels lying within a diamond of size�2l�lÿ 1� � 1� around �u; v�. In the following algorithm, the number of pixelsin the intersection sets (taking di�erent combinations) are found out. First weneed to de®ne two functions h�x� and g�x� as:

h�x� � x=2� �, i.e., the greatest integer not greater than x=2.g�x� � fx=2g, i.e., the smallest integer not smaller than x=2.

First consider the general case, i.e., the rth term of Eq. (9), i.e.,Xcard�Ai \ Aj \ � � � \ Ar�:

Each Ai has �2l�lÿ 1� � 1� pixels and we like to ®nd out the number of pixels inthe intersection of these sets. Let ai � �xi; yi� �16 i6 r� denotes the centralpixels of Ai. These pixels are classi®ed into three sets in the following way:

(a) All pixels whose abscissae are greater than the ordinate (i:e:; x > y) arecollected into one set, say M1.(b) All pixels whose abscissae are less than the ordinates (i:e:; x < y) are col-lected into another set, say M2.(c) All pixels whose abscissae are equal to the ordinates (i:e:; x � y) are col-lected into another set, say M3.We now ®nd out the relative coordinate of each pixel in a set with respect to

the central pixel. For this let us shift ak to origin and denote it by a0k, soa0k � �0; 0� and corresponding pixels of the set change likewise which nowonwards are denoted by primed, i.e., a0i � �x0i; y0j��16 i6 r� where x0i � jxi � xkjand y0i � jyi ÿ ykj 8i. Note that a0i belongs to the same set as ai.

Now de®ne S-ADD;S-SUB1 and S-SUB2 as

S-ADD � f�x0i � y 0i� j 16 i6 rg; �11�

S-SUB1 � fjx0i ÿ y0i j j for a0i 2 M1g; �12�

S-SUB2 � fjx0i ÿ y0i j j for a0i 2 M2g: �13�Let

MAX-ADD � maxfS-ADDg; �14�

MAX-SUB1 � maxfS-SUB1g; �15�

MAX-SUB2 � maxfS-SUB2g: �16�

P. Ghosh et al. / Information Sciences 124 (2000) 193±217 197

Page 6: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

Hence, de®ne R-ADD and C-SUB as follows:

R-ADD � maxf2lÿ 1ÿMAX-ADD; 0g; �17�C-SUB � maxf2lÿ 1ÿ �MAX-SUB1�MAX-SUB2�; 0g: �18�

Then cardinality of

A1 \ A2 \ A3 \ � � � \ Ar � �h�R-ADD� � h�C-SUB�� � �g�R-ADD�� g�C-SUB��: �19�

Now the number of combinations �A1 \ A2 \ � � � \ Ar� considering all i's is mCr. SoXcard�A1 \ A2 \ � � � \ Ar� �

X X� � �

Xh�R-ADD�

��� h�C-SUB� � g�R-ADD�� g�C-SUB�

��: �20�

Now Eq. (20) can be used to determine the second term, third term and so onof Eq. (9).

For example, ®rst three terms and the last term of Eq. (9) are computed asfollows. The ®rst term of Eq. (9) can be directly written asX

card Ak � m� �2l�lÿ 1� � 1�:For ®nding out the second term of Eq. (9), i.e.,

Pcard�Ai \ Aj�, let us take two

di�erent sets each having �2l�lÿ 1� � 1� pixels. Let ai � �xi; yi� and aj � �xj; yj�denote the central pixels of Ai and Aj, respectively. Now it is necessary to ®ndout the relative coordinate of one of them with respect to other. For this let thecoordinate of ai be (0,0) and the coordinate of aj be �jxj ÿ xij; jyj ÿ yij�. NowSÿ ADD and Sÿ SUB will be Sÿ ADD � jxj ÿ xij � jyj ÿ yij andSÿ SUB � jxj ÿ xij ÿ jyj ÿ yij

�� ��.Hence R-ADD and R-SUB will be

R-ADD � maxf�2lÿ 1ÿ �S-ADD��; 0gand

C-SUB � maxf�2lÿ 1ÿ �S-SUB��; 0g:Then the number of pixels in the set �Ai \ Aj� is h�R-ADD��h�C-SUB� � g�R-ADD� � �C-SUB�.

For each Ai�16 i6m� we take Aj�16 j6m� so that the number of Ai \ Aj

considering all i and j �i 6� j� is mC2. SoXcard�Ai \ Aj� �

X Xfh�R-ADD�

h� h�C-SUB� � g�R-ADD�

� g�C-SUB�gi:

198 P. Ghosh et al. / Information Sciences 124 (2000) 193±217

Page 7: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

Now ®nd out cardP�Ai \ Aj \ Ak�. For this case classify the pixels into three

sets exactly as discussed earlier. Formulae (11)±(20) can be implemented heredirectly, using only three terms. Let a0i 2 M1; a0j 2 M2. Thus

S-ADD � f�x0i � y0i�; �x0j � y0j�g;S-SUB1 � fjx0i ÿ y0i jg;S-SUB2 � fjx0j ÿ y0jjgMAX-ADD � max�S-ADD�;MAX-SUB1 � max�S-SUB1� � S-SUB1;

MAX-SUB2 � max�S-SUB2� � S-SUB2:

Hence

R-ADD � maxf�2lÿ 1ÿMAX-ADD�; 0gand

C-SUB � maxf�2lÿ 1ÿ �MAX-SUB1 �MAX -SUB2��; 0g:The cardinality of

Ai \ Aj \ Ak � h�R-ADD� � h�C-SUB� � g�R-ADD� � g�C-SUB�:For each Ai �16 i6m� we take Aj �16 j6m� and Ak �16 k6m�, so thenumber of pixels of �Ai \ Aj \ Ak� considering all i; j and k�i 6� j 6� k� is mC3. SoX

card�Ai \ Aj \ Ak� �X X X

h�R-ADD���

� h�C-SUB�

� g�R-ADD� � g�C-SUB���:

Now for the last term of Eq. (9), i.e., card�A1 \ A2 \ � � � \ Am� can be expressedin the same way as discussed earlier. The cardinality of

�A1 \ A2 \ A3 \ � � � \ Am� � h�R-ADD� � h�C-SUB� � g�R-ADD�� g�C-SUB�:

So the number of pixels of �A1 \ A2 \ � � � \ Am� considering all i's is mCm. SoXcard�A1 \ A2 \ � � � \ Am� �

Xh�R-ADD� � h�C-SUB� � g�R-ADD�

� g�C-SUB�:

4. A di�erent way of interpretation

In our presentation if DT �xi; yi�P l, then Ai may be de®ned asf�lÿ 1�B� �xi; yi�g. With the above algorithm computing the terms of Eq. (9)is very costly because relative positions of many sets are involved. In the

P. Ghosh et al. / Information Sciences 124 (2000) 193±217 199

Page 8: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

following discussion computing cardinality of the combined sets is done in adi�erent way.

We ®nd out the number of additional pixels due to each set Aj given thenumber of pixels added already due to the set Ai. Earlier we usedcard�Ai [ Aj� � card�Ai� � card�Aj� ÿ card�Ai \ Aj�. Now consider for the samepurpose, the relation: card�Ai [ Aj� � card�Ai� � card�Aj=Ai�, where `/' standsfor the set di�erence. But actually we would not directly use this formula. Theidea is that during raster scan of the distance transform matrix as we encounterAj, i.e., DT �xj; yj�P l we search for nearest Ais in the previous rows as well as inthe same row but previous columns. Once found, the number of additionalpixels due to Aj is determined depending on the distances. For each candidatepixel �xj; yj� ®rst ®nd out the following:

x� y � xj � yj � dj �say�;y ÿ x � yj ÿ xj � ej �say�;y � yj � fj �say�;x � xj � gj �say�:

Now we search the nearest Ais in the three zones of the raster scan as shown inFig. 1. If there is only one pixel which has Ai and there exists no other �x; y�such that DT �x; y�P l then the number of additional pixels (i.e., card�Aj ÿ Ai�)is zero. Thus card�Ai [ Aj� � card�Ai� � 2l�lÿ 1� � 1. Before presenting thealgorithm let us see the example shown in Fig. 2 where l � 5.1. If only the candidate pixel is there then card�Aj ÿ Ai� � 0 and

card�Ai [ Aj� � card�Ai� � 41. (Fig. 2(a))2. If there exists neighbouring pixel �xj; yj� such that DT �xj; yj�P l, then

card�Aj ÿ Ai� � 2lÿ 1 � 9. Hence card�Ai [ Aj� � 41� 9 � 50. (Fig. 2(b))3. If there are two neighbouring pixels �xj; yj� and �xk; yk� such that

DT �xj; yj�P l and DT �xk; yk�P l, then the number of additional pixels willbe 5. (Fig. 2(c))

4. If there are three neighbouring pixels �xj; yj�; �xk; yk� and �xl; yl� such thatDT �xj; yj�P l;DT �xk; yk�P l and DT �xj; yj�P l, then the number of addi-tional pixels will be 1 (Fig. 2(d)).

Fig. 1.

200 P. Ghosh et al. / Information Sciences 124 (2000) 193±217

Page 9: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

The general case is treated zonewise (the zones are shown in Fig. 1). In eachzone search is carried out pixel-by-pixel in lines parallel to the direction is setby DIRp���. Every time the search starts from a zone-boundary whose direc-tion is set by DIRs���. Let LIMIT��� calculate the maximum distance along agiven direction. Hence the proposed algorithm may be described as follows.

Algorithm 1. Step 1: Searching in zone-1. To search for nearest Ais in zone-1 westart scanning from pixel �xj ÿ 1; yj� along DIRp(ej) up to LIMIT(DIRp(dj))�� 2lÿ 1�. However, we stop searching along the line as soon as a pixel �xi; yi�with DT P l is encountered, then LIMIT(DIRp(dj))(� �xi ÿ xj� � �yi ÿ yj�) isupdated for the next scan. The direction for changing the starting pixel isDIRs(ÿfj) (i.e., in the opposite direction of DIRs(fj)) and hence the startingpixel changes to �xj ÿ 2; yj�; �xj ÿ 3; yj� and so on. This continues up to LIM-IT(DIRs(gj))(� xj ÿ 2lÿ 1; yj), but scanning of zone-1 may be stopped as soonas we get a pixel of DT P l on y � yj. From each starting pixel we move alongDIRp(ej) up to updated LIMIT(DIRp(dj)). This would reduce the searchingcomplexity enormously. In pseudocode

Step 1: SEARCHING IN ZONE-1xi � xÿ 1;

Fig. 2.

P. Ghosh et al. / Information Sciences 124 (2000) 193±217 201

Page 10: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

yi � y;DIRp(ej);DIRs(ÿfj); (where ÿfj means opposite in direction to fj)LIMIT(DIRp(dj)) :� ��y ÿ yi� � �xÿ xi��f� 2lÿ 1g;LIMIT (DIRs((gj))) :� xÿ xi;

for (LIMIT(DIRp(di))) 6 ��y ÿ yi� ÿ �xÿ xi��6 LIMIT �DIRs��gj��� do

if DT �xi; yi�P l then

if (LIMIT(DIRp(dj))) � LIMIT(DIRs((gj))) then

put �xi; yi� to ND�x; y�EXIT f from search in zone-1g

elseput �xi; yi� to ND�x; y�LIMIT(DIRp�dj)); f� ��y ÿ yi� � �xÿ xi��gDecrement(xi); Decrement(yi);

else

LIMIT(DIRs(gj); f� �xÿ xi�gDecrement(xi); Decrement(yi);

Step 2: Searching in zone-2. Next for searching to nearest Ais in zone-2 westart scanning from pixel �xj ÿ 1; yj� along DIRp(ej) up to LIM-IT(DIRp(dj))(� 2lÿ 1). However, we stop searching along the line as soon as apixel �xi; yi� with DT P l is encountered, then LIMIT(DIRp(dj))(��xi ÿ xj� ÿ �yi ÿ yj�) is updated for the next scan. The direction for changing thestarting pixel is DIRs(dj) and hence the starting pixel changes to�xj � 2; yj ÿ 2�; �xj � 3; yj ÿ 3� and so on up to LIMIT(DIRs(ej�)(��xj � 2lÿ 1�; �yj ÿ 2l� 1�), but scanning of zone-2 may be stopped as soon aswe get a pixel of DT P l on y � x � yj � xj. From each starting pixel we movealong DIRp(ej) up to updated LIMIT(DIRp(ej)). This would reduce thesearching complexity enormously. In pseudocode

Step 2: SEARCHING IN ZONE-2xi � x� 1;yi � yÿ 1;DIRp(ej);DIRs(dj);LIMIT(DIRp(dj)) :� ��y ÿ yi� � �xÿ xi��f� 2lÿ 1g;LIMIT (DIRs((ej))) :� �y ÿ yi� ÿ �xÿ xi�;

for ( LIMIT(DIRp(dj))) 6 ��y ÿ yi� � �xÿ xi��6 LIMIT �DIRs��ej��� do

if DT �xi; yi�P l then

if (LIMIT(DIRp(dj))) � LIMIT(DIRs((ej))) then

put �xi; yi� to ND�x; y�EXIT ffrom search in zone-2g

else

202 P. Ghosh et al. / Information Sciences 124 (2000) 193±217

Page 11: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

put �xi; yi� to ND�x; y�LIMIT(DIRp(dj)); f� ��y ÿ yi� � �xÿ xi��gDecrement(xi); Decrement(yi);

else

LIMIT(DIRs(ej); f� �y ÿ yi� ÿ �xÿ xi�gDecrement(xi); Decrement(yi);

Step 3: Searching in zone-3. We follow the analogous method as discussedearlier but here directions are DIRp(dj) and DIRs(fj) with maximum limit�2lÿ 1� in either direction. In pseudocode

Step 3: SEARCHING IN ZONE-3 (IF STEP-2 IS VOID)xi � x� 2;yi � yÿ 1;DIRp(dj);DIRs(fj);LIMIT(DIRp(ej)) :� ��y ÿ yi� � �xÿ xi��f� 2lÿ 1g;LIMIT (DIRs((gj))) :� �xÿ xi�;

for ( LIMIT(DIRp(ej))) 6 ��y ÿ yi� � �xÿ xi��6 LIMIT �DIRs��gj��� doif DT �xi; yi�P l then

if (LIMIT(DIRp(ej))) � LIMIT(DIRs((gj))) then

put �xi; yi� to ND�x; y�EXIT ffrom search in zone-3g

else

put �xi; yi� to ND�x; y�LIMIT(DIRp(ej)); f� ��y ÿ yi� ÿ �xÿ xi��gDecrement(xi); Decrement(yi);

else

LIMIT(DIRs(gj); f� �xÿ xi�gDecrement(xi); Decrement(yi);

Step 4: Calculation part. Now take all such neighbouring Ais in di�erent setsand with the help of the city-block distance transform discussed earlier we can®nd out the additional pixels due to Aj. The systematic representation of thealgorithm is as follows:

for �16 r6m� do

sum [r] � 0for �16 s6 mCr� do

(i) Pick up a set of r points and check whether x > y or x < y or x � y andput these into M1;M2;M3 accordingly.(ii) Now following the raster scan order to pick up next candidate pixel�xr; yr�.

P. Ghosh et al. / Information Sciences 124 (2000) 193±217 203

Page 12: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

for �16 s6 mCr� do

(i) Pick up a set of r points and check whether x > y or x < y or x � y andput these into M1;M2;M3 accordingly.(ii) Now following the raster scan order to pick up next candidate pixel�xr; yr�.Shift it to the origin. Shift the other pixels accordingly.

if DT �x; y ÿ 1�P l and DT �xÿ 1; y � 1�P l then

sum [r] � sum [r] + 1;else for ��06 i6 x� and �06 k6 y�� do

if DT �x; y ÿ k�P l andDT �xÿ i; y ÿ k�P l and DT �x� i; y � k�P l thensum [r] � sum [r] + [h(Rÿ ADD)� g(Cÿ SUB)] + [g�Rÿ ADD� � h�Cÿ SUB�]

else (from (iii) to (v) as follows:)(iii) Compute Sÿ ADD as in Eq. (11)

and then MAXÿ ADD as in Eq. (14).(iv) if M1 6� 0 then compute Sÿ SUB1 as in Eq. (16)

and then MAXÿ SUB1 as in Eq. (15).if M2 6� 0 then compute Sÿ SUB2 as in Eq. (13)

and then MAXÿ SUB2 as in Eq. (16).(v) Then compute Rÿ ADD as in Eq. (17)

and Cÿ SUB as in Eq. (18).sum [r] � sum [r] + [h(Rÿ ADD) � h(Cÿ SUB)

+ [g(Rÿ ADD) � g(Cÿ SUB)]sum [r] � �2l�lÿ 1� � 1�ÿ sum �r�;enddo;

Card�x; y� � Pmi�1 sum �i�

enddo;enddo;

[Note that, Card�x; y� means the cardinality of each Ais found by the innerloop for each l ].

Finally

PSA�l;B� �X

Card�x; y�:

Algorithm 2.

for 26 l6N ÿ 1 doCl � 0for all �x; y� do

if DT �x; y�P l then

if DT �xÿ 1; y�P l then

204 P. Ghosh et al. / Information Sciences 124 (2000) 193±217

Page 13: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

if DT �x; y ÿ 1�P l then

if DT �x� 1�; �y ÿ 1�P l then

Cl � Cl � 1; [1]else search �u; v� in zone-3if found then

Cl � Cl � �u� v� 1�=2� �; [2]else Cl � Cl � l; [3]

else

if DT �x� 1; y ÿ 1� � l then

Cl � Cl � 1; [4]else

if DT �xÿ 1; y ÿ 1�P l search �u; v� in zone-3if found then

Cl � Cl � �u� v� 1�=2� �; [5]else Cl � Cl � l; [6]

else search �u; v� in zone-2if found then

Cl � Cl � q2�u; v� [7]else search �u; v� in zone-3if found then

Cl � Cl � q1�u; v� [8]else Cl � Cl � 2lÿ 1 [9]

else

if DT �xÿ 1; y ÿ 1�P l then

if DT �x; y ÿ 1�P l then

if DT �x� 1; y ÿ 1�P l then

Cl � Cl � 1; [10]else search �u; v� in zone-3if found then

Cl � Cl � �u� v� 1�=2� �; [11]else Cl � Cl � l; [12]

else

if DT �x� 1; y ÿ 1� � l then

Cl � Cl � 2; [13]else search in zone-3if found then

Cl � Cl � u� v; [14]else Cl � Cl � 2lÿ 1 [15]

else

if DT �x; y ÿ 1�P l then

if DT �x� 1; y ÿ 1�P l then search in zone-1if found then

Cl � Cl � �vÿ u� 1�=2� �; �u < 0�; [16]

P. Ghosh et al. / Information Sciences 124 (2000) 193±217 205

Page 14: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

Note that:

u; v P 0; u P v; x� y � lÿ 1; x� y � u� vÿ l� 1:

1. If u� v > 2lÿ 2 there is no common point of intersection, then

p�u; v� � 2l�lÿ 1� � 1:

2. If 06 u� v6 2lÿ 2, then

else Cl � Cl � l; [17]else search in zone-1if found then search �u1; v1� in zone-3

if found then

Cl � Cl � �v� u� v1� u1�=2� �; [18]else Cl � Cl � l� �vÿ uÿ 1�=2� �; [19]

else search �u; v� in zone-3if found then

Cl � Cl � �vÿ uÿ 1�=2� � � l; [20]else Cl � Cl � 2lÿ 1; [21]

else

if DT �x� 1; y ÿ 1�P l then search �u; v� in zone-1if found then

Cl � Cl � vÿ u; �u < 0� [22]else Cl � Cl � 2l� 1; [23]

else search �u; v� in zone-1if found then search �u1; v1� in zone-2

if found then

Cl � Cl � �p1�u; v� � p2�u1; v1� ÿ 2l�lÿ 1� ÿ 1; [24]else search �u1; v1� in zone-3if found then

Cl � Cl � �p1�u; v� � p1�u1; v1� ÿ 2l�lÿ 1� ÿ 1; [25]else Cl � Cl � �p1�u; v�; [26]

else search �u; v� in zone-2if found the search �u1; v1� in zone-3

if found then

Cl � Cl � �p2�u; v� � p1�u1; v1� ÿ 2l�lÿ 1� ÿ 1; [27]else Cl � Cl � �p2�u; v� [28]

else search �u; v� in zone-3if found then

Cl � Cl � p1�u; v�; [29]else Cl � 2l�lÿ 1� � 1; [30]

enddo;enddo;

206 P. Ghosh et al. / Information Sciences 124 (2000) 193±217

Page 15: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

p1�u; v� � �2l�lÿ 1� � 1� ÿ 12�2lÿ 1ÿ uÿ v��2lÿ 1ÿ u� v�

i:e: �2lÿ 1�uÿ 12�u2 ÿ v2� � 1

2if juÿ vj odd:

� �2lÿ 1�uÿ 12�u2 ÿ v2� if juÿ vj is even:

q1�u; v� � u� 1 if �uÿ v� is odd; u P v

� u if uÿ vis even; u P v

p2�u; v� � �2lÿ 1�v� 12�u2 ÿ v2� � 1

2if �vÿ u� is odd; v > u > 0

� �2lÿ 1�v� 12�u2 ÿ v2� if �vÿ u� is even; v > u > 0

q2�u; v� � �2lÿ uÿ 1� if �vÿ u� is odd

� �2lÿ uÿ 2� if �vÿ u� is even; where fu� v � 2lÿ 2g3.

u� v� 36 2l; u6 v

No. of points to be observed

d�u; v� � 2lÿ uÿ vÿ 3

2

� �� 1

� 2lÿ uÿ vÿ 3

2

� �� lÿ u� v� 1

2; �vÿ u� is odd

� lÿ u� v2ÿ 1; �vÿ u� is even:

q2�u; v� � l� uÿ vÿ 1

2if �vÿ u� is odd

� lÿ uÿ v2ÿ 1; if �vÿ u� is even:

�p1�u; v� � ÿ �2lÿ 1�uÿ 12�u2 ÿ v2� � 1

2if juj ÿ v is odd

� ÿ �2lÿ 1�uÿ 12�u2 ÿ v2� if juj ÿ v is even

�p2�u; v� � ÿ �2lÿ 1�vÿ 12�v2 ÿ u2� � 1

2if vÿ juj is odd

� ÿ �2lÿ 1�vÿ 12�v2 ÿ u2� if �vÿ juj� is even

5. Computational complexity

It may be of interest to compare the computational complexities of theconventional method, the algorithm suggested by Bronskill and Venetsanop-oulos [6] and our algorithm for computing the pattern spectrum. Before going

P. Ghosh et al. / Information Sciences 124 (2000) 193±217 207

Page 16: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

to the detailed discussion let us categorize the foreground or the objects in twotypes: S1 and S2. The object in which the pixels having same distance transformvalue are connected is called S1 type object, otherwise it is called S2 type object.Examples are shown in Fig. 3(a) and (b). Computational complexity for pat-tern spectrum is invariant to the types of object when conventional or Bron-skill's method is considered. In our case, however, the type of the object isimportant.

First we study the computational complexity for the various algorithms forS1 type objects. Let A be one such object. Number of pixels in A be Q and thenumber of pixels having distance transform value l is nl (for 16 l6N � 1).Then obviously,

n1 > n2 > n3 > � � � > nN > nN�1;

n1 � n2 � n3 � � � � � nN � nN�1 � Q�21�

Radius of a maximal disc centered at �x; y� that can ®t in the object is equal to�DT �x; y� ÿ 1� � �lÿ 1� if DT �x; y� � l and the number of pixels in the disc is�2l�lÿ 1� � 1�.

In conventional method the number of operations to erode with a disc ofradius �lÿ 1� is �2l�lÿ 1� � 1� � Q and the number of operations to dilatewith the same disc is �2l�lÿ 1� � 1� �PN�1

k�l nk.So the number of operations to open with a disc of radius �lÿ 1� is

�2l�lÿ 1� � 1� � Q

"�XN�1

k�l

nk

#:

Finally the total number of binary operations to compute the pattern spectrumis XN�1

l�1

�2l�l"

ÿ 1� � 1� � Q

(�XN�1

k�l

nk

)#: �22�

Fig. 3.

208 P. Ghosh et al. / Information Sciences 124 (2000) 193±217

Page 17: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

Hence the order of computational complexity of the conventional algorithm isO��N � 1�5�.

In the modi®ed algorithm suggested by Bronskill et al. [6], the structuringelement is a disc of radius one. The number of pixels of this disc is 5. Now thenumber of operations to erode with this disc is �5�PN�1

k�l nk� and the number ofoperations to dilate with a disc of radius �lÿ 1� is ��2l� �lÿ 1� � 1��PN�1

k�l�1 nk�.Thus the number of operations to open with a disc of radius �lÿ 1� is

5�XN�1

k�1

nk � �2l� �lÿ 1� � 1� �XN�1

k�l�1

nk

� 5� nl � �2l�lÿ 1� � 1� �XN�1

k�l�1

nk:

Hence the total number of operations to compute the pattern spectrum is

XN�1

l�1

5

"� nl � �4l2 ÿ 2l� 1� �

XN�1

k�l�1

nk

#�23�

and the order of computational complexity of the modi®ed algorithm isO��N � 1�5�.

Before ®nding the complexity for our algorithm it is necessary to mentionthe computational complexity of the city-block distance transform. The se-quential algorithm to compute this distance transform requires ®ve logicaloperations and one addition operation per pixel.

Complexity of Algorithm 1. In our proposed algorithm we mention clearlythe searching part and the computational part. In step-1 searching part is toscan in two di�erent directions at a time, i.e., DIRs(�) and DIRp(�). From eachstarting pixel (which changes in DIRs(�)) we scan along DIRp(�). For the worstcase, i.e., when we do not get any pixel of DT P l in these two directions, thesearch is up to �2lÿ 1� in either direction and hence the searching complexitywill be O��2lÿ 1� � �2lÿ 1�� � O�l2� for each l. So for 16 l6N � 1 thecomplexity will beXN�1

l�1

�2lÿ 1�2 � O��N � 1�3�: �24�

Analogously in step-2 the complexity is O��N � 1�3� and that of step-3 isO��N � 1�3�. Hence the total searching complexity is O��N � 1�3�.

In step-4 we compute the cardinality due to each candidate pixel. Here wehave maximum m�� nl� pixels for which DT P l. With these nl we calculate the

P. Ghosh et al. / Information Sciences 124 (2000) 193±217 209

Page 18: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

pattern spectrum and for 16 l6N � 1 the complexity in the worst case isO�N � 1� because it needs only arithmetic operations from the one-dimensionalarray.

Hence, combining these step wise complexity, the order of ComputationalComplexity of this proposed algorithm is O��N � 1�4�.

Next we will study the computational complexities for the various algo-rithms for S2 type objects. Let B be such a type of object. Let the number ofpixels in B be Q and the number of pixels having distance transform l frombackground be nl (for 16 l6N � 1). Then a similar approach as above sug-gests that the computational complexity of proposed algorithm for S2 typeobject is also order of O��N � 1�4�.

Hence for both S1 and S2 type of objects the computational complexity ofthe proposed algorithm is O��N � 1�1�. From this it can be adjudged that thetime complexity of the algorithm is much less than the conventional andmodi®ed algorithms.

Complexity for Algorithm 2. We ®rst apply the city-block distance transformalgorithm to the binary image and then apply the proposed algorithm for®nding the pattern spectrum. Before ®nding the complexity for the algorithm itis necessary to discuss the computational complexity for the city-block distancetransform. The sequential algorithm to compute city-block distance transformrequires ®ve binary operations and one addition operation per pixel. We havenumbered the di�erent steps of the proposed algorithm on the right-hand side.Let j be such a step. Let the probability of action j due to distance transform lbe denoted by Pl�j�.

Then both experiments and intuition suggest that, for S1 type object,Pl�18� � Pl�19� � Pl�20� � Pl�24� � Pl�25� � Pl�26� � Pl�27� � Pl�28� � Pl�29� � 0for all l.

Pl�2�; Pl�5�; Pl�7�; Pl�8�; Pl�11�; Pl�11�; Pl�14�; Pl�16� are very small.Before going to discuss in detail let us assume Pl�1�; Pl�3� and Pl�4� are equally

likely for the distance transform l. Similarly assuming Pl�6� andPl�9�; Pl�10�; Pl�12�; Pl�13� and Pl�14�; Pl�17� and Pl�21�; Pl�22� and Pl�23� areequally likely.

The complexity of checking in each zone for the worst case for distancetransform l is, �2lÿ 1�2, i.e., O�l�2. Now the number of binary operations fordistance transform l is

2Pl�1�;XN�1

k�l

nk

( )� �2l

(ÿ 1�2Pl�2� � �1ÿ Pl�1��

XN�1

k�l

nk

)

� �2l

(ÿ 1�2 � Pl�3��1ÿ Pl�1� ÿ Pl�2��

XN�1

k�l

nk

)

210 P. Ghosh et al. / Information Sciences 124 (2000) 193±217

Page 19: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

� Pl�4� � �1(

ÿ Pl�1� ÿ Pl�2� ÿ Pl�3��XN�1

k�l

nk

)

� ��2l

(ÿ 1�2Pl�5��1ÿ Pl�1� ÿ Pl�2� ÿ Pl�3� ÿ Pl�4��

XN�1

k�l

nk

)

� ��2l

(ÿ 1�2Pl�6��1ÿ Pl�1� ÿ Pl�2� ÿ Pl�3� ÿ Pl�4� ÿ Pl�5��

XN�1

k�l

nk

)

� ��2l

(ÿ 1�2Pl�7��1ÿ Pl�1� ÿ Pl�2� ÿ Pl�3� ÿ Pl�4� ÿ Pl�5� ÿ Pl�6��

XN�1

k�l

nk

)

� � � � � ��2l

(ÿ 1�2Pl�30��1ÿ Pl�1� ÿ Pl�2� ÿ Pl�3� ÿ Pl�4� ÿ Pl�5� ÿ � � �

ÿ Pl�23��XN�1

k�l

nk

):

Now for the worst case

� �2lÿ 1�2XN�1

k�l

nk:

Hence for 16 l6N � 1 we get

�XN�1

l�1

�2l

(ÿ 1�2

XN�1

k�l

nk

)� O�N � 1�4: �25�

Hence the total Computational complexity is O��N � 1�4�.Next we study the computational complexity for the various algorithms for

S2 type objects. For S2 type objects Pl�18�; Pl�19�; Pl�20�; Pl�24�; Pl�25�; Pl�26�;Pl�27�; Pl�28�; Pl are not zero. Note that in most of the cases each j step has thecomplexity O�N � 1�2, but Pl�24�; Pl�25�; Pl�26�; Pl�27�; Pl�28�; Pl�29� has thecomplexity O�l� 1�3 and thus we only calculate these steps in the following. Sothe number of binary operation for these steps are

��2ln

ÿ 1�3�Pl�24��1ÿ Pl�1� ÿ Pl�2� ÿ Pl�3� ÿ � � � ÿ Pl�23��� ��2lÿ 1�3�Pl�25��1ÿ Pl�1� ÿ Pl�2� ÿ Pl�3� ÿ Pl�4� ÿ � � � ÿ Pl�24��� ��2lÿ 1�3�Pl�26��1ÿ Pl�1� ÿ Pl�2� ÿ Pl�3� ÿ � � � ÿ Pl�25��� ��2lÿ 1�3�Pl�27��1ÿ Pl�1� ÿ Pl�2� ÿ Pl�3� ÿ � � � ÿ Pl�26��� ��2lÿ 1�3�Pl�28��1ÿ Pl�1� ÿ Pl�2� ÿ Pl�3� ÿ � � � ÿ Pl�27��

P. Ghosh et al. / Information Sciences 124 (2000) 193±217 211

Page 20: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

� ��2lÿ 1�3�Pl�29��1ÿ Pl�1� ÿ Pl�2� ÿ Pl�3� ÿ � � � ÿ Pl�28��oXN�1

k�1

nk �

O��N � 1�5�: �26�Then a similar approach as above suggests that the computational complexityfor S2 type object of proposed algorithm is also of the order of O��N � 1�5�.

Hence for S1 and S2 types of objects the computational complexity of al-gorithm are O��N � 1�4� and O��N � 1�5�, respectively.

Now let us compute the fractional advantage of our proposed algorithm.For that, the computation of the coe�cients are necessary. Let us assume thatn0is (for i � 1; . . . ;N � 1� be in decreasing A.P. series (which obey Eq. (21) suchthat ni � aÿ ib where a and b are positive integers and i � 1; . . . ;N � 1.

Hence Eq. (22) can be written as

XN�1

l�1

�2l�lÿ 1� � 1� �XN�1

i�1

�a(

ÿ ib� �XN�1

k�l

�aÿ kb�)

�XN�1

l�1

�2l�l(

ÿ 1� � 1� �XN�1

i�1

�aÿ ib� � �2l�lÿ 1� � 1� �XN�1

k�itl

�aÿ kb�)

�XN�1

l�1

�2l�l(

ÿ 1� � 1� � �N"� 1�aÿ �N � 1��N � 2�b

2

#

� �2l�lÿ 1� � 1� � �N"ÿ l�aÿ �N ÿ l��N ÿ l� 1�b

2

#)

�XN�1

l�1

�2lÿ 1�2 � �2N�

� 1�aÿ b�N � 1�2 ÿ a�ÿ bN ÿ b

2

�lÿ b

2l2

�XN�1

l�1

�2l�lÿ 1� � 1� � f�2N � 1�aÿ b�N � 1�2g

ÿXN�1

l�1

�2l

(ÿ 1�2 � a

�ÿ bN ÿ b

2

�l

)ÿ

XN�1

l�1

�2l�l(

ÿ 1� � 1� � b2

l2

)� C1 ÿ C2 ÿ C3 �say�:

Now

C1 � f�2N � 1�aÿ b�N � 1�2g1

3�N

�� 1��N � 2��2N � 3� ÿ �N � 1�2

�� ÿ 2b

3N 5; neglecting the rest lower order terms;

212 P. Ghosh et al. / Information Sciences 124 (2000) 193±217

Page 21: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

C2 � �2l�

ÿ 1�2 � a�ÿ bN ÿ b

2

�l�

� ÿ b2

N 5; neglecting the rest lower order terms;

C3 � b2

XN�1

lÿ1

�2l4 ÿ 2l3 � l2�

� ÿ b5

N 5; neglecting the rest lower order terms:

Hence the coe�cient of N 5 (taking the positive value) is

zcon � 2b3� b

2� b

5� 51b

30: �27�

Now let us calculate the same Eq. (23), i.e.,XN�1

l�1

5

"� �nl � �l2 ÿ l�� �

XN�1

k�l�1

nk

#

� 5�XN�1

l�1

��aÿ lb� � �l2 ÿ l�� �XN�1

k�l�1

�aÿ kb�

� 5�XN�1

l�1

�l2 ÿ l�b� 1� � a�

� �N"ÿ l� 1�aÿ �N ÿ l� 1��N ÿ l� 2�b

2

#:

Hence the coe�cient of N 5 (taking the positive value) is

ZBronskill � 5b4: �28�

By similar way the coe�cient of N 5 of Eq. (24) isPN�1

k�l �aÿ kb�zS2

proposed � b: �29�Hence from Eqs. (27)±(29) zcon > zBronskill > zS2

proposed. From these it can be ad-judged that the time complexity of the proposed Algorithm 2 will be less thanthe conventional and Bronskill's modi®ed algorithms.

6. Implementation and conclusion

In this paper, we present two algorithms based on the distance transformusing city-block distance metric. It is experimentally found that the proposedalgorithms are much more e�cient than the conventional morphological al-

P. Ghosh et al. / Information Sciences 124 (2000) 193±217 213

Page 22: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

gorithm and the modi®ed algorithm proposed by Bronskill and Venetsanop-oulos [6] for computing the pattern spectrum. Since the structuring element B isconvex, it can be decomposed to smaller discs or to more simpler structures. Inthat case computational e�ciency of conventional method is greatly improvedas in [7,11]). However, this approach is not attempted because the order is stillnot better compared to the proposed method.

The pattern spectrum, as de®ned in Eq. (9), is computed in two steps. First,distance transform DT �x; y� is computed using the two-pass algorithms de-signed for sequential machines as in Rosenfeld and Kak (1982). Second, theCardinality of the combined sets corresponding to DT �x; y�P l are computed

Fig. 4.

Fig. 5.

214 P. Ghosh et al. / Information Sciences 124 (2000) 193±217

Page 23: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

Fig. 6.

Fig. 7.

Fig. 8.

P. Ghosh et al. / Information Sciences 124 (2000) 193±217 215

Page 24: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

using the proposed algorithm. Finally, the pattern spectrum PSA�n;B� is de-termined. During implementation of the algorithm, a look-up table is usedinstead of computing the addendum for di�erent local spatial distribution ofthe pixels �xi; yi�. The algorithm is tested on a large number of images con-taining S1 or S2 or both types of objects. Computer programs for the proposedalgorithms are written (in C) and are executed on aPC-AT-286 on 15 MHz.Some examples are shown in Figs. 4±8, where (a) shows the input image and (b)shows its pattern spectrum. Time requirements due to di�erent algorithms arelisted in Table 1.

References

[1] C.R. Giardina, E.R. Dougherty, Morphological Methods in Image and Signal Processing,

Prentice-Hall, Englewoods, NJ, 1990.

[2] G. Matheron, Random Sets and Integral Geometry, Wiley, New York, 1975.

[3] J. Serra, Image Analysis and Mathematical Morphology, vol. 1, Academic Press, London,

1982.

[4] J. Serra, Image Analysis and Mathematical Morphology, vol. 2, Academic Press, London,

1988.

[5] P. Maragos, Pattern spectrum and multiscale shape representation, IEEE Trans. Patt. Anal.

Machine Intell. 11 (7) (1989) 701±716.

[6] J.F. Bronskill, A.N. Venetsanopoulas, Multidimensional shape description and recognition

using mathematical morphology, J. Intell. Robotic Sys. 1 (1988) 117±143.

[7] X. Zhuang, R.M. Haralick, Morphological structuring element decomposition, Comput.

Vision Graphics Image Process. 35 (2) (1986) 370±382.

[8] R.M. Haralick, S.R. Sternberg, X. Zhuang, Image analysis using mathematical morphology,

IEEE Trans. Patt. Anal. Machine Intell. 9 (4) (1987) 532±550.

[9] R.M. Haralick, L.G. Shapiro, Computer and Robot Vision, Academic Press, New York, 1992.

[10] Vincent Luc, Fast opening functions and morphological granulometries, SPIE 2300 (1994)

253±267.

[11] J. Xu, Decomposition of convex polygonal morphological structuring elements into

neighbourhood subsets, IEEE Trans. Pattern Anal. Machine Intell. 13 (2) (1991) 153±162.

[12] P. Ghosh, B. Chanda, A fast algorithm for sequential machines to compute pattern spectrum

via chess-board distance transform, Pattern Recognition Letters 16 (1995) 49±58.

Table 1

Figure no. Fig. 4 Fig. 5 Fig. 6 Fig. 7 Fig. 8

Type S1 S1 S2 S1 &S2 S1

Size 64� 64 64� 64 64� 64 64� 64 64� 64

Proposed Algorithm 1(s) 2.8 2.5 0.21 7.01 1.63

Proposed Algorithm 2 (s) 2.5 2.3 0.55 7.21 1.04

Conventional (s) 14.51 14.54 10.7 18.3 6.12

Modi®ed (Bronskill) (s) 8.43 8.72 3.61 14.1 4.3

216 P. Ghosh et al. / Information Sciences 124 (2000) 193±217

Page 25: Fast algorithm for sequential machine to compute pattern spectrum via city-block distance transform

[13] P. Ghosh, B. Chanda, Two fast algorithms for sequential machine to compute pattern

spectrum with morphological concept, in: Proceedings of the Third International Conference

on Advances in Pattern Recognition and Digital Techniques, Calcutta, India, 1993, pp. 28±31.

[14] E. Kraus, H.J. Heijmans, E.R. Dougherty, Grayscale morphological granulometries compat-

ible with spatial scaling, Signal Process. 34 (1993).

[15] E.R. Dougherty, Euclidean grayscale granulometries representation and umbra inducement,

Math. Imaging Vision 1 (1) (1992) .

[16] E.R. Dougherty, Y.C. Cheng, Morphological pattern spectrum classi®cation of noisy shapes:

exterior granulometries, Pattern Recognition 28 (1) (1995) 81±98.

[17] E.R. Dougherty, J.T. Newell, J.B. Plez, Morphological texture based maximum-likelihood

pixel classi®cation based on local granulometric moments, Pattern Recognition 25 (10) (1992)

1181±1198.

[18] L. Vincent, E.R. Dougherty, Morphological segmentation for textures and particles, in: E.R.

Dougherty (Ed.), Digital Image Processing Methods, Marcel Dekker, New York, 1994.

P. Ghosh et al. / Information Sciences 124 (2000) 193±217 217