Color Hit-Or-Miss Transform (CMOMP)
Total Page:16
File Type:pdf, Size:1020Kb
20th European Signal Processing Conference (EUSIPCO 2012) Bucharest, Romania, August 27 - 31, 2012 COLOR HIT-OR-MISS TRANSFORM (CMOMP ) Audrey Ledoux, Noel¨ Richard and Anne-Sophie Capelle-Laize´ University of Poitiers, XLIM-SIC JUR CNRS 7252, Poitiers, France Telephone: +33 (0)5 49 49 74 92 Fax: +33 (0)5 49 49 65 70 ABSTRACT 2. HIT-OR-MISS TRANSFORM Often, the mathematical morphology is reduced to the orde- The Hit-or-Miss Transform (HMT ) allows to find specific ring construction and the structuring elements are limited to shapes in images. It was initially developed for binary images flat shapes. In this paper, we propose a new method based on by Matheron and Serra [7]. The searched shapes are defined concept of convergence. Within this proposition, the defini- with a pair of disjoint Structuring Elements (SE) that frame tion of non-flat structuring element is now possible. By ex- it, one for the foreground shape and one for the background tending the mathematical morphology hit-or-miss transform shape. The mathematical expression of the HMT for an ima- to the color, we show that these formalisms are well adapted ge f and its structuring elements g = fg0; g00g is: for complex color images, as skin images for dermatological 0 c 00 purposes. We give and comment results on synthetic and real HMTg(f)(x) = (f b g )(x) \ (f b g )(x) (1) images. where f c is the complement of f, f c = fxjx2 = fg. Index Terms— color mathematical morphology, non-flat Several variations exists around the definition in grayscale structuring element, hit-or-miss [8, 9, 10, 11]. In the following we explain the Barat pro- posal [6], called MOMP (Multiple Objects Matching using Probing). The MOMP transform is an image surface pro- 1. INTRODUCTION bing with two SEs, one above the surface (g00) and the second below (g0). The mathematical expression of the MOMP is: The extension of Mathematical Morphology (MM) to color 00 r 0 images is not straightforward, due to the complexity of vec- MOMPg(f)(x) = (f ⊕g (−g ) )(x) − (f g g )(x)(2) torial data ordering. The abundance of color spaces [1] and possible color ordering methods [2] allow a near infinity of expressions for color MM. Some authors define a total order Table 1: Notations in multivariate values [3]. But none deals with the question of color Non-Flat Structuring Element (NF SE) that are used in f, Df Image function and his spatial domain of definition some morphological operations in grayscale functions or ima- SDf Color coordinates domain of definition from the f function ges (filtering [4], estimation of the fractal dimension [5] ...). x = (i; j) Spatial coordinates for a pixel x In this paper we propose a new color MM in the CIELAB f c, f r Complementary and reflectivity of the f function color space that permits the definition of non-flat structuring g,Dg Structuring Element function and his spatial domain element. We evaluate this new method using the color Hit-or- of definition g0, g00 Inferior and superior Structuring Element function Miss Transform (HMT ) to extract complex color structures for the MOMP Transform 0 00 in natural images, like skin images. hg0 ; hg00 Value of g and g function located at the spatial 0 The first part of this paper is a quick recall on the Hit- origin o: g (o) = hg0 Cx Color coordinates of the x pixel or-Miss Transform in binary and grayscale, with focus on the −−−! jCxCyj ∆ color distance between the Cx and Cy Barat’s proposal [6] (section 2). Then, we present our color E −−−! coordinates (CxCy vector norm) MM construction to obtain a total order allowing NF SE O+1, O−∞ Color convergence coordinates for the dilation writing (section 3). We explain how to solve questions about and the erosion a valid construction of color addition/subtraction. Finally, we ⊕b, b Dilation and erosion for binary images show results on synthetic images to evaluate the approach ⊕g, g Dilation and erosion for grey-level images ⊕c, c Dilation and erosion for color images interest for color images (section 4) and we apply and vali- +, − Addition and subtraction for color coordinates date this approach in our applicative context (section 5). c c © EURASIP, 2012 - ISSN 2076-1465 2248 based on distance ordering. If the first condition did not reach a unique coordinate, they use a classical lexicographic cons- truction. In addition, such approaches never define the re- quired complementary color in terms of perception or physic property. The basic order relation between two color coordinates is built according to the distance from the convergence color −∞ (a) SEs points. The convergence color points are O for the ero- (b) Probing of function sion and O+1 for the dilation. Then the relations for the erosion (5) and the dilation (6) between two colors, C and Fig. 1: Principle of the MOMP transform 1 C2, could be: −−−−−! −−−−−! −∞ −∞ where g(x)r = g(−x). The result value is the distance bet- C1 C2 , jC1O j ≤ jC2O j (5) −−−−−! −−−−−! +1 +1 ween both SE computed at the SE origin. The shape is found C1 C2 , jC1O j ≤ jC2O j (6) when the result is lower than δ (figure 1). This template construction with two different SE allows In equations (5) and (6), the vector norm j:j uses the per- to extract structures with some shape and/or of contrast varia- ceptual distance ∆E computed in CIELAB. In a previous tions and to be few sensitive to noise in the image. To extend work, we showed that the ∆E color distance is most accu- this construction to color, the definition of color NF SE must rate than the other formulations or expressions in other color spaces [17]. The (5) and (6) expressions ensure the linear con- be defined. So, the next section is dedicated to our adapted vergence in a perceptual sense toward the color coordinates proposal for non-flat structuring elements construction. chosen. But they don’t construct a total order as required. The complete description and the validation of a total order 3. COLOR MATHEMATICAL MORPHOLOGY are not the subjects of this article, then they will not be de- tailed here. The definition of the maximum color coordinates The most widely used methods to define minimum (W) and on the image support Df and the structuring element support maximum (V) operations in color spaces are two equivalent Dg, for the dilation is: approaches, the lexicographic order or order based on prio- ( ) _ _ n β o rity expressed between color axis [12, 13, 14]. Usually, the ff(x)g = Cy;Cy = Cx (7) dilation and erosion operators by the structuring element g, in x2(Df \Dg ) 8Cx2SD9 ( ) n-dimensional space, can be expressed by (equations 3 and 4): _ n αo with SD9 = Cy : Cy = Cx ; _ 8Cx2SD8 (f ⊕c g)(i; j) = f(i + k; j + l) (3) ( −−−−−! −−−−−! ) (i;j)2Df ;(k;l)2Dg −∞ _ n −∞ o SD8 = Cy : jCyO j = jCxO j ; ^ (f c g)(i; j) = f(i + k; j + l) (4) 8Cx2SD7 (i;j)2D ;(k;l)2D ( ) f g −−−! _ n −−−! o SD7 = Cy : jCyCij = jCxCij ; where Df and Dg are respectively the spatial image support 8Cx2SD6 and the spatial structuring element support. ( −−−−−! −−−−−! ) +1 ^ n +1 o Due to the natural extension from grayscale domain, and and SD6 = Cy : jCyO j = jCxO j the choice of simple color order the morphological result con- 8x2(Df \Dg ) verges towards the black or white coordinates upon the iter- β α ation scheme. As for color images the convergence coordi- where Cx and Cx are respectively the second and the third CIELAB coordinates of Cx after a translation and a rotation nates could not be reduced to black or white, we propose a 1 new method, called ”Convergent Color Mathematical Mor- around the origin of the coordinates and Ci is the colour at phology” (CCMM), to associate color morphological oper- the SE coordinates origin. ators on this concept of convergence. Two convergence co- ordinates are defined according to the morphological objec- 3.1. Non-flat structuring element tives. For example, the color convergence coordinates could Since there is no valid definition of addition/subtraction in be associated to the color set statistics [15]. Then after an color domain, we define an adapted expression to the particu- infinity number of iterations the remaining color coordinates lar case of the CCMM. We impose that color pixel displace- of all pixels are the closest to the color convergence coordi- ment stills in relation with the notion of convergence. Color nate. Some authors have tried to construct a total ordering addition (+)/subtraction (−) induces the displacement of the scheme integrating distance functions and the notion of refe- c c rence colour [16]. But such approaches are not completely 1In order to the theoretical validation of the duality property. 2249 Fig. 3: 3D view of the template Fig. 2: Example of vector displacements with color addition + ( c ), the convergence color is the white and the divergence color is the black; (a) Original set of colors; (b) Non-flat struc- (a) Original image (b) Detection of red crosses turing element; (c) New set of colors; (d) Calculation of new coordinates of the set of colors pixels in the color space. The color vector displacement is defined by its magnitude and its orientation. Dealing with color representation, we associate the magnitude to specific color metric and we propose to use ∆E metric. The orienta- (c) Detection of green crosses (d) Detection of blue crosses tion depends on the morphological operation: with addition the displacement is oriented toward convergence color coor- Fig.