Recursive Morphological Operators for Gray Image Processing. Application in Granulometry Analysis 0. Deforges *, N. Normand** * ARTIST laboratory, INSA Rennes, 20 av. des buttes de Coesmes, 35043 Rennes, France
** SEI laboratory, IRESTE, rue C. Pauc - La Chantrerie, BP60601,44036 Nantes C6dex 3, France E-mails : odeforge @insa-rennes.fr.
[email protected]
architectures implementations [2] [3]. Indeed, the operations with a large structuring element B can be replaced by a series of operations with elementary ones : A @ B = (...(A @ B,) @ B2) ... @ BN (1) where B = BI @ B2 @ ... @ BN In [4], a new decomposition has been presented for binary images leading to a single scan for morphological operations, whatever the structuring element size. In this paper, we will present an extension of this algorithm for grayscale images.
ABSTRACT This paper presents a new algorithm for an efficient implementation of morphological operations for gray images. It defines a recursive morphological decomposition method of convex structuring elements by only causal two pixels structuring elements. Whatever the element size, erosion orland dilation can then be performed during a unique raster-like image scan, involving a fixed reduced analysis neighborhood. The resulting process offer a low computation complexity, combined with an easiness for describing the element form. The algorithm is exemplified with granulometry. Quantum Dots are segmented using a Multiscale Morphologic Decomposition. Our new algorithm is particularly well suited for this type of morphological treatments, as they use structuring elements with both a large size and a form fitting the object to extract, that is to say depending on the application.
2 : Causal Recursive Decomposition of structuring elements The four Two-Pixel Structuring Elements (2PSE) depicted in figure 1.a are sufficient to build any 8-convex element as a series of both set unions and dilations [5]. These 2PSEs draw up a restricted causal neighborhood of analysis, defined by four elementary translations Pk, with k E { 1..4} (see figure 1.b).
Key-words : gray scale morphology - structuring element decomposition - recursive erosion - multiscale morphologic decomposition
1 :Introduction Mathematical morphology was first introduced as a method to measure binary objects. From practical concerns in the granulometry domain, it soon became a complete theory based on set operations [ 11. Elementary morphological operators can be combined in powerful methods such as skeleton extraction. However, since basic operators (erosion and dilation) are usually time consuming when using large structuring elements (as in actual applications), the combination of such operators could lead to inefficient algorithms. Fortunately, mathematical morphology flexibility can be used with profit to decompose a large structuring element into smaller ones suitable for dedicated
0-8186-8183-7/97$10.00 0 1997 IEEE
P2
P3
P4
PI Figure 1 : a) 2PSEs used for the decomposition, b) causal analysis neighborhood Thus, an element B j is constructed from previous elements according to :
672
The opening and closing of f ( x ) by h(x) are defined respectively as :
(B;};=O,.N form a growing structuring elements family. Zk(i) (Ik(i) < i ) denotes which previous element belonging to the family, dilated by Ek, is used to build Bi. Figure 2 shows an example of such decomposition, with the successive elements of the family.
O p e n i n g : f o h = v e h ) O h" (10) Closing : f * h = h) eh" (1 1) where h" is the symmetric of h If the structuring element is a set B in EN such as h(x)=O for x E B , then h(x) is called a plane structuring element, and the previous expressions are simplified : B)(x) = rnin If(x+z) I z E B} (12) (f@ h)(x) = max ( f x - z ) I z E B} (13)
(fe
BO
B,=BO@E2 B,=B,@E,
foB=(feB)@ (14) f*h=(f@B)8 (15) where is the symmetric of B Practically, erosion (resp. dilation) consists only in extracting the minimum (resp. maximum) value over B. A gray image A is a subset of the two dimensional digitized space ZXZ. For any point P E ZxZ, the translation of A by p is defined as : (A), = (a + p I a E A } (16) and the erosion and dilation become : A 8 B = min((A), I p E B} = m i n ( A ) p (17)
B3=B2@E,U B,@E,
Figure 2 : Example of recursive decomposition Due to the causal characteristic of the 2PSEs, the origin of the generated elements is always the last pixel in the raster scan order. Performing an operation with a translated element origin is possible by translating the overall image after the operation, according to the property : A 63 (B)p= ( A 63 B), (3) A e (B), = ( A e B),, (4) where (X), is the translated of X by p . In practice, most of the structuring elements used are symmetrical ones. Almost of them can be obtained when restricting formulae ( 2 ) to only elementary dilations. Then, the new simplified expression becomes : Bi = Bi.1 @ Ei (5) E; E (El, E2, E3, E4} denotes the 2PSE used to build B; from Bi.,. In that case, elements are very easy to describe as at each step of the decomposition, only the index of the E; used for the dilation has to be specified.
PPB
A @ B = max{(A), I p
E
B} = m a x ( A ) ,
(18)
PEB
4 :Description of the gray scale recursive erosion The first remark is that, as the four 2PSEs contain the origin, an elementary dilation by Ek is equivalent to the union of the element and the element translated by P k : B @ Ek = B v (BjPk (19) Let ( B ; } ; = o , .be ~ a family of growing structuring element, constructed recursively by union sets and elementary dilations using the four causal 2PSEs : In the following, EBi is the erosion of A by B;. It can be shown easily that EBj can be computed
3 : Grayscale morphology All binary structuring operators are naturally extended to gray scale by using the Umbra and Top operators. Let function f ( x ) E E be defined on a subset of N dimensional Euclidean space EN. The umbra offlx) is an ( N + l ) dimensional set defined as : = (x,a) I a Sfl.4 1 (6) The function can be reconstructed from its umbra by its top since : f ( x ) = T M . t l l ( x ) = max l a I ( x 4 ) E U(f)l (7) If the function h(x) E E is a structuring element defined on a subset B of EN,eroding or dilating the umbra of f ( x ) by the umbra of h(x) yields the umbra of a new function : the erosion or dilation offlx) by h(x). Erosion I (f0h ) f x ) = min lf(x+z) - hfz) I z E B} ( 8 ) Dilation :(f@ h)(x) = max (f(x-z) + h(z) I z E B} (9)
recursively from EB,,j