Morphological Normalized Binary Object Methamorphosis - CiteSeerX

Report 3 Downloads 28 Views
MORPHOLOGICAL NORMALIZED BINARY OBJECT METHAMORPHOSIS Marcin Iwanowski Warsaw University of Technology, Institute of Control and Industrial Electronics ul.Koszykowa 75, 00-662 Warszawa POLAND [email protected]

Abstract

The paper describes a method for binary 2D and 3D object methamorphosis using a normalized morphological interpolation function and a mask. Comparing with the existing methods the proposed one has two important advantages: the normalization of the interpolation function and the new formulation of the interpolator. The first one allows obtaining steady and smooth transfomation of the area (volume) of the interpolated objects. The new formulation of the interpolator introduces a mask inside which the interpolation is performed. Owing to the the mask one can define the area inside which the interpolation is performed. The new kind of mask is also proposed - it is equal to the convex hull of both input objects. In the paper also two examples of the interpolaton of 2D and 3D objects are given. The method can be applied to image reconstrucion, as well as for the computer-aided animations.

Keywords:

mathematical morphology, image methamorphosis, computer animations

1.

Introduction

This paper describes a method for binary object methamorphosis [6, 14], by means of morphological intepolation [1, 3–5, 7, 10, 12]. Interpolation between two object (compact sets of pixels) consists in generating a sequence of intermediary objects, shape of which is transformed from the shape of first input object (initial) object into the shape of the second one (final). A method proposed in the paper is based on the method introduced in [7], where a shape of the interpolated object is obtained by a thresholding of the interpolation function, which is computed from the morphological geodesic distance functions. In the paper two principal improvements are proposed: the first one is normalization of the interpolation function, which allows stabilizing the change of the area (or volume in case of 3D objects) for increasing interpolation levels. Due to that fact the interpolation sequence is characterized by stable and constant transformation. Second improvement allows performing the interpolation in-

2 side a user-defined mask. Due to that fact the interpolated object don’t have to be included in the union of both input ones, as proposed in [7], which was a problem especially when an intersection of input objects was relatively small. The new formulation of the interpolator allows applying a mask which defines the area inside which the interpolation is performed. A new type of mask is also proposed - a convex hull of both input objects. Two examples show the interpolation results obtained by applying the proposed method on two- and three-dimensional input objects.

2.

Basics of the morphological interpolation

2.1

The interpolator

An interpolator provides a transformation which produces an interpolated object. It is a function of three principal arguments: two input objects (initial and final) and an interpolation level α. An interpolation level is a real number α such that 0 ≤ α ≤ 1. In this paper the interpolator is denoted as: IntR P →Q (α), where P represents the initial object, Q - the final one. A parameter R (such that P ∪ Q ⊂ R) denotes a mask inside which interpolation is performed. Shapes of interpolated objects are turning from a shape of the object P to s shape of the object Q. For α = 0, the interpolated object is equal to the initial R object (IntR P →Q (0) = P ); for α = 1 - to the final one (IntP →Q (1) = Q). A sequence of interpolated objects produced for increasing values of α is an interpolation sequence.

2.2

Distance function calculation

The definition of the distance depends on the underlying image grid [11]. In case of 2D images, usually the 4- and 8-connected grid are used, in some application also a 6-connected grid is considered. For 3D images three types of connectivity are usually considered: 26-,18- and 6- connctivity, depending which neighbors are being taken into account. To obtain an interpolation function for nester objects, geodesic disctances are computed. They describe the distance to one object (inner, X) inside the other one (outer, Y ), as the shortest path connecting a given point p ∈ Y \ X with the closest point of inner object X, such that every point of this path belongs to Y . A geodesic dilation [8, 9, 11] of image X with mask Y of a size 1 equals (1) an intersection of dilated image X with the mask Y : δY (X) = δ(X)∩Y . The (λ) (1) (1) (1) geodesic dilation of a given size λ is given by δY (X) = (δY (δY (. . . δY (X))). |

A geodesic distance is defined than as: dY (X)[p] = inf{i : p

{z

λ−times (i) ∈ δY (X)}

}

Morphological normalized binary object methamorphosis

Figure 1.

3

Elementary structuring elements in: 4(a), 8(b), 6(c), 18(d) and 26(e) - connectivity

The dilations are performed with the elementary structing element, shape of which influences the values of the distance function. Elementary structuring elements, containing the closest neighbors are shown in Fig. 1. Although the distances based on the image grid are not Euclidean ones, they are sufficient for the interpolation purposes. It is, however, possible to compute the Euclidean distance - in such a case one has to use more sophisticated algorithms proposed e.g. in [12, 13].

2.3

Interpolation betwen nested objects

Let X and Y be nested object, inner and outer, respectively (X ⊂ Y ). The interpolation function proposed in [7] is defined as: intY (X)[p] =

dY (X)[p] dY (X)[p] + dX C (Y C )[p]

(1)

where X C and Y C stand for the complements of objects X and Y respectively. The interpolator based on the Eq. 1 is defined as (T[α] stands for the thresholding operator at level α): IntYX→Y (α) = T[α] (intY (X))

3.

Proposed method

3.1

Normalization

(2)

A disadvantage of the interpolator defined by the Eq. 2 is that throughout the interpolation process the area (or volume in case of 3D objects) increases irregularly, while the interpolation level α grows steady. A speed of growth of the area/volume of the interpolated object is not constant. This feature is remarkable especially when one of the sets (the outer one) is elongated (see Fig. 2d). In such a case the object grows slower for lower α values and much faster for higher ones, the ∆S/∆α factor is not a constant one. In order to stabilize a process of growing of the interpolated object IntYX→Y (α) for increasing α, an additional step of normalization is proposed. An impression of the constant growth of the interpolated object depends on a relative

4

Figure 2. Nested objects: outer (a), inner (b), the area of the interpolated objects (c), interpolation sequence (d), interpolation function (e), normalized function (f), area function after normalization (g) and sequence obtained from normalized interpolation function (h).

difference of the area (volume) of the objects between each of two consecutive interpolated ones, which should be constant. To obtain it, the distance function IntYX→Y (α) is normalized using a normalizing factor n defined as: n(α) =

S(IntYX→Y (α)) − S(X) S(Y ) − S(X)

(3)

where S stands for an area (or volume in 3D case) function of its argument. A normalized interpolation function is than defined as: int0Y (X)[p] = n(intY (X)[p]) . The interpolated object is obtained by applying this to Eq. 2 which gives: 0 Int0Y X→Y (α) = T[α] (intY (X)) = T[α] (n(intY (X)))

(4)

The above equation defines the normalized interpolator. An example of normalization is shown on Fig.2. Contrary to a sequence obtained by means of the Eq. 2 (see Fig.2a), an increase of the surface area of consecutive sequence frames obtained from the Eq. 4(see Fig.2g) is constant, which gives an impression of steady and stable shape methamorphosis. The stair-casing effect visible on fig. 2g comes from the limited number of levels of interpolation function before normalization. This function, defined as a real number is computed for this example as an integer beween 0 and 255. For larger number of posible values the stair-case effect would be less remarkable or even invisible. In this example the 8-coectivity was used.

Morphological normalized binary object methamorphosis

3.2

5

General case

Let P and Q be the initial and final objects (any, not only the nested ones as in the previous section). They can either be nested, intersected or disjoint. In the proposed method, the interpolation is performed inside an auxiliary object R- a mask. A final result of the interpolation at given level α is obtained as an intersection of two interpolations of nested objects: 0R 0R IntR P →Q (α) = IntP →R (α) ∩ IntQ→R (1 − α)

(5)

R where IntR P →R (α) and IntQ→R (1−α) are the interpolated objects between P and R; and between Q and R respectively. The normalization in this case is performed separately for each of two interpolators of nested objects.

3.3

The mask

The mask R from the Eq. 5 defines the region, inside which the interpolation is performed. It means that every interpolated object as well as both input ones must be included in the mask. The object, which is intended to be a mask should fulfill two general conditions: it must be an object (a single connected component), and it must include both objects P and Q : P ∪ Q ⊂ R. Different definitions of the mask are possble. One of them is a union of the input objects [7]. This solution - R = P ∪ Q - can be applied only in the case of two input sets with non-empty intersection (P ∩ Q 6= ∅). This mask cannot be applied to the interpolation of disjoint objects. Also results of interpolation of objects with a relatively small intersecting area are often not satisfactory the pixles belonging to the interpolated object made an impression of pouring from the initial into final object [4]. Owing to the new definition (5), a new kind of mask is proposed. It is equal to the convex hull (CH) - the smallest convex object of both input ones: R = CH(P ∪ Q)

(6)

An algorithm of its generation is described in [11]. For 3D objects the convex hull computation was investigated in [2].

4.

Results and conlusions

The interpolator described in the paper works on both two- and three-dimensional objects. The only difference is the structuring element used. In the first case it was a square one (8 neighbors, Fig. 1b), in the second one - a cube stucturing element (26 neighbors, Fig. 1e).

6

Figure 3.

Figure 4. c and d

The interpolation sequence between 3D objects (initial - (a), final - (i).

2D shapes - a and b, contur represents the convex hull; the interpolation fuctions -

Figure 5.

The interpolation sequence between objects from Fig. 4

A first example of the interpolation is presented on Fig.3. It is a of 3D objects interpolation. A sequence of 3D objects was produced with the normalized interpolation function and a mask equal to the union of both input objects. A second example interpolates between two 2D shapes. In this case also the normalized functions was applied, but the mask was equal to the convex hull of union of both input objects. The proposed method has two important advantages: the normalisation of the interpolation function and the new formulation of the interpolator. First

Morphological normalized binary object methamorphosis

7

feature allows obtaining constant change of the area (volume) of the interpolated objects. The new formulation of the interpolator introduces a mask inside which the interpolation is performed. Owing to this mask one can define the area inside which the interpolation is performed. The new kind of mask is also proposed - it is equal to the convex hull of both input objects. Two examples of the interpolaton with the normalized interpolation function were given. The proposed method can be applied to area and volume modelling. The 2D interpolation can be used to the generation of 2D slices being part of the 3D volumic object beginning from the existing slices. The method can be also efficiently applied to the computer-aided animations of 2D- and 3D-images.

References [1] Beucher S. Interpolation of sets, of partitions and of functions In H.Heijmans and J.Roerdink Mathematical morphology and its application to image and signal processing, Kluwer, 1998. [2] Borgefors G., Nyström I., Sanniti di Baja G. Computing covering polyhedra of non-convex objects In Proceedings of 5th British Machine Vision Conference, York, UK, pp. 275-284, 1994. [3] Iwanowski M.,Serra J. Morphological-affine object deformation In L.Vincent and D.Bloomberg Mathematical morphology and its application to image and signal processing, pp.82-90, Kluwer, 2000. [4] Iwanowski M. Application of mathematical morphology to interpolation of digital images Ph.D. thesis Warsaw University of Technology, School of Mines of Paris, WarsawFontainebleau 2000 [5] Iwanowski M. Morphological binary interpolation with convex mask Proc.of Int.Conf.on Computer Vision and Graphics, Zakopane, Poland 2002 [6] Lazarus F., Verroust A. Three-dimensional metamorphosis: a survey The Visual Computer vol.14, pp.373-389, 1998 [7] Meyer F. Morphological interpolation method for mosaic images In P. Maragos, R.W.Schafer, M.A.Butt Mathematical morphology and its application to image and signal processing, Kluwer, 1996. [8] Serra J. Image Analysis and Mathematical Morphology vol.1 Academic Press, 1982 [9] Serra J. Image Analysis and Mathematical Morphology vol.2 Academic Press, 1988 [10] Serra J. Hausdorff distance and interpolations In H.Heijmans and J.Roerdink Mathematical morphology and its application to image and signal processing, Kluwer, 2003. [11] Soille P. Morphological Image Analysis - Principles and Applications Springer Verlag, 1999, 2003 [12] Soille P. Spatial distributions from the contour lines: an efficient methodology based on distance transformation J.of Visual Communication and Image Representation 2(2), June 1991, pp. 138-150 [13] Vincent L. Exact Euclidean distance function by chain propagations Proc. IEEE Computer Vision and Pattern Recognition, 1991, pp. 520-525 [14] Wolberg G. Image morphing: a survey The Visual Computer vol.14, pp.360-372, 1998