Geometrical and morphometrical tools for the inclusion analysis of metallic alloys

The mechanical and use properties of metal alloys depend on several factors, including the amount and the geometry of impurities (inclusions). In this context, image analysis enables these inclusions to be studied from digital images acquired by various systems such as optical/electron microscopy or X-ray tomography. This paper therefore aims to present some geometrical and morphometrical tools of image analysis, in order to characterize inclusions in metal alloys. To achieve this quantification, many geometrical and morphometrical features are traditionally used to quantitatively describe a population of objects (inclusions). Integral geometry, viaMinkowski’s functionals (in 2D: area, perimeter, Euler-Poincaré number), has been particularly investigated in image analysis. Nevertheless, they are sometimes insufficient for the characterization of complex microstructures (such as aggregates/agglomerates of objects). Other quantitative parameters are then necessary in order to discriminate or group different families of objects. In particular, shape diagrams are mathematical representations in the Euclidean plane for studying the morphology (shape) of objects, regardless of their size. In addition, this representation also makes it possible to analyze the evolution from one shape to another. In conclusion, image analysis using integral geometry and shape diagrams provide efficient tools with known mathematical properties to quantitatively describe inclusions (providing separate information on size and shape). The geometrical characteristics of these inclusions could thereafter be related to the mechanical properties of the metal alloys.


Introduction
The mechanical and use properties of metal alloys depend on several factors, including the amount and the geometry of impurities (inclusions). In this context, image analysis enables these inclusions to be studied from digital images acquired by various systems such as electron microscopy or X-ray tomography.
This paper therefore aims to present some geometrical and morphometrical tools of image analysis, in order to characterize inclusions in metal alloys. To achieve this quantification, many geometrical and morphometrical features are traditionally used to quantitatively describe a population of objects (inclusions) [1,2].
Integral geometry [3][4][5], via Minkowski's functionals [6] (in 2D: area, perimeter, Euler-Poincaré number), has been particularly investigated in image analysis. Indeed, integral geometry [3][4][5] has generalized convex geometry to finite unions of convex sets. This concept well applies to digital image analysis, since the smallest element (2D pixel) is indeed a convex set [7]. Nevertheless, they are sometimes insufficient for the characterization of complex microstructures (such as aggregates/agglomerates of objects) [8]. Other quantitative parameters are then necessary in order to discriminate or group different families of objects. In particular, shape diagrams [9][10][11] are mathematical representations in the Euclidean plane for studying the morphology (shape) of objects, regardless of their size. In addition, this representation also makes it possible to analyze the evolution from one shape to another. It also enables a convexity discrimination to be done with a direct visualization of the shape diagrams. For very complexe structures, such as fractal objects, other descriptors could be required. Indeed, these geometrical and morphometrical descriptors could be insufficient (as it stands) to analyse such strutures but the proposed measurements can be computed on some geometrical transformations of the object to be studied, providing some measurements functions and not only scalars. This kind of approach has been particularly studied in [12]. Other descriptors are based on computational geometry and stochastic geometry [13] but they will not be studied in this paper.
The following of the paper is organized as follows: Section 2 gives the fundamentals notions of the Minkowski functionals. The computational aspects as well as the properties and the limitations of these functionals are done. Section 3 presents the shape diagrams and some illustration of the properties of continuity and convexity discrimination are done. The last section concludes this work. The objective of this paper is not to give an exhaustive list of geometrical and morphometrical tools, but rather to focus on specific descriptors with a compact representation and good mathematical properties and which are easy to compute.

Geometrical tools via integral geometry
Convex geometry, based on Minkowski functionals [6], allows to geometrically characterize a convex set in ℝ n . There are exactly n + 1 Minkowski functionals, satisfyinging certain properties (additivity, continuity, invariance by displacements). For example on ℝ 2 , these functionals are the area, the perimeter and the Euler number. The two first functionals are related to well-known geometrical characteristics while the Euler number is a topological characteristic corresponding to the number of connected components minus the number of holes inside the set. The Minkowski functionals provide a basis of measurements in ℝ n [14]. They are therefore linearly independent and any other functional satisfying these properties is a linear combination of these properties. Integral geometry [3][4][5] has generalized convex geometry to finite unions of convex sets. This concept well applies to digital image analysis, since the smallest element (2D pixel) is indeed a convex set [7]. In the following, an efficient method (based on discrete geometry) for computing these Minkowski functionals from a 2D binary image is given [12]. Thereafter, the properties of the Minkowski functionals and their limitations will be presented.

Notions of discrete geometry 2.1.1 Digital topology
Let X be a two-dimensional binary image of size , is the value of the intensity of the pixel (abbreviated as "picture element", the most small image element) of coordinates x ∈ D. By convention, the object and background of the image are represented by pixels of intensity b x = 1 and b x = 0, respectively. In particular, a set of connected pixels included in the object is a hole. The notion of neighbourhood induces topology on D: two pixels of the object (or background) with coordinates x 1 ¼ ðx 1 1 ; x 1 2 Þ and x 2 ¼ ðx 2 1 ; x 2 2 Þ are 4-adjacent if and only if jx 1 1 À x 2 1 j þ jx 1 2 À x 2 2 j ¼ 1; two pixels of the object (or background) with coordinates The p-neighbourhood (p = 4 or p = 8) of a pixel is therefore defined as the set of pixels p-adjacent to this one [Ros74]. The notion of neighbourhood makes it possible to establish the notion of connectedness [15]. Indeed, two pixels of the object (or background) are p-connected (p = 4 or p = 8) if there is a path of p-adjacent pixels connecting them. Similarly, a related component in a two-dimensional binary image is a set of adjacent pixels forming a path in the image. In order to satisfy Jordan's theorem, the connections must be different for the background pixels and for the object pixels. Therefore, these two-dimensional image connections are noted (4,8) or (8,4), the first coordinate corresponding to the object, and the second one at the bottom [16].

Cell configuration
The "physical" spatial support of the image (i.e. the "continuous" spatial support) is covered by cells associated with pixels. A cell (size square the interpixel distance) is composed of one face, four edges and four vertices. Either a cell is centered in a pixel (cell intrapixel), or a cell is built by connecting pixels (interpixel cell). Figure 1 illustrates the overlapping of an image consisting of sixteen pixels, and its two possible representations.
4-and 8-adjacence are associated with the cell representation: using intrapixel cells, two pixels of the object (background) are adjacent if and only if their respective cells have a common vertex (8-adjacence); using interpixel cells, two pixels of the object (background) are adjacent if and only if they share the same edge (4-adjacence). Figure 2 shows the two cell representations of the twodimensional binary image X associated with matrix B.

Neighborhood configuration
In order to efficiently calculate the number of vertices v, edges e and faces f of the object (pixels of intensities equal to 1), the different neighbourhood configurations (size two by two pixels) of the original image X are determined [1,2,[17][18][19][20][21][22]. Thus, to each pixel corresponds a neighborhood. In addition, sixteen configurations are possible (Tab. 1 where the values 0 and 1 represent the intensity of the pixels (1: object, 0: background).
Then, each configuration contributes for a known number of vertices, edges and faces (Eqs. (1-3)). To determine the neighborhood configurations of all pixels, an efficient algorithm consists in convolving the binary matrix B (associated with the image X) by a mask F of dimension two, whose values are powers of two, and whose origin is the pixel at the top left with value 1: Each value a∈½0; 15 ∩ ℕ of the resulting matrix B * F, where * denotes the convolution operator, corresponds to a known neighborhood configuration. Table 1  where for a∈½0; 15 ∩ ℕ , v a , e a and f a are the coefficients of the linear combinations, depending on the image overlap, given in Table 2.

Minkowski functionals
Based on these notions of discrete geometry, the different Minkowski functionals can be computed from the number of vertices v, edges e and faces f.

Euler number
The Euler number, denoted x, corresponding to the number of connected components minus the number of holes, can be computed from the image overlap by cells: where v , e and f are the number of vertices, edges and faces, respectively.
It is important to note that equation (4) gives different numbers of Eulerx, depending on the representation of cells. The representation of intrapixel (or interpixel) cells gives the result with (8, 4)-connexity (respectively (4, 8)connexity). Each configuration of neighbourhoods contributes to a known number of vertices, edges and faces, and therefore for the number of Euler. Thanks to equations (1)(2)(3)(4), the number of Euler is calculated as follows: where x a = v a À e a + f a is given in the Table 2. The Euler number is then efficiently computed by using the coefficients associated to each configuration, depending on the image overlap.

Perimeter
Two methods, giving different results, allow to estimate the perimeter of an object. Using intrapixel cells, the perimeter, denoted P is determined by counting the number of edges common to two pixels of different intensities, thanks to the following formula: The discretization implies that this perimeter is underestimated. Following the equations (1-3), P is computed as: where P a = v a À e a + f a is given in the Table 2. The Crofton perimeter, denoted P independent of the representation of the cells used, gives a better estimation. It associates the length of a curve with the number of times a "random" line intersects the set [23]. Let g be a planar curve, l a line oriented in direction ' and of length p, n g (l) the number of points at which g and l intersect. Crofton's formula expresses the arc length of the g curve in terms of the spatial integral of all oriented lines: In the discrete case, only the angle orientations 0, p 4 , p 2 , and 3p 4 are considered; they are chosen according to the connectivity. The number of intercepts for each of these lines is counted, and denoted respectively i 0 , i p/4 , i p/2 and i 3p/4 . They are then standardized by 1 or ffiffi ffi 2 p depending on the orientation. The average is finally calculated by multiplying by p, a value representing the integral of the orientations, and by dividing by the number of orientations used. The Crofton perimeter is then calculated as follows: This perimeter is computed thanks to the following linear combinations that provide coefficients to the different numbers of intercepts.   Table 2. For wired objects, considered as objects of dimension one, the two previously defined perimeters do not give robust results, since they double the length of a line.

Area
The area (or surface), denoted A, of the set is generally defined by the number of pixels of the set. According to the representation of the cells, it is then equal to the number of vertices v (interpixel cells) or the number of faces f (intrapixel cells), the result being always the same. Generally, this overestimates the area. Thanks to equations (1-3), the area A is calculated as follows: where the coeffcients A a are given in Table 2.   Table 2. Coefficients of the linear combinations, depending or not on the cell representation [12]. The lines highlighted with the gray color correspond to the direct computation of the Minkowski functionals.
It is also possible to count the number of faces f obtained with the representation of the interpixel cells. In this case, the area is generally underestimated, but the wired objects have no area (they are therefore considered as objects of dimension one), this result being more robust.

Properties
The n + 1 Minkowski functionals MF satisfy the following properties, for all compact convex sets X and Y in ℝ n : where X t denotes the transformation of X by the rigid operator t (translation and rotation); Among these five properties, three are still valid for the finite unions of convex sets: invariance by rigid transformation, homogeneity and additivity.
Regarding Hadwiger's theorem [14], one other main important property is that any homogeneous and continuous functional that is invariant under rigid motions can be represented as a sum of the n + 1 Minkowski functionals. In ℝ 2 , it means that such a functional m computed on a set X can be expressed as: where c 0 , c 1 and c 2 are real-valued coefficients.

Limitations
Integral geometry provide useful and efficient tools for the geometrical characterization of sets via the Minkowski functionals. Neverthess, they are not enough to discriminate complex spatial structures [8], as shown in Figure 3. It is then necessary to provide other characteristics to be able to discriminate these spatial structures. In the literature, there exists a lot of other characteristics. In the following, morphometrical functionals, and more particularly shape diagrams, will be presented. The advantage is that they have a compact representation, some good mathematical properties and a low computational cost.

Morphometrical tools via shape diagrams
Shape diagrams [9][10][11] are representations in the Euclidean plane introduced to study the morphology of 2D connected compact sets. Such a set is represented by a point within a shape diagram whose coordinate axes are morphometrical functionals defined as normalized ratios of geometrical functionals. In this section, the construction of the shape diagrams will be firstly given. The second part will be focused on some properties of continuity and convexity discrimination.

Morphometrical functionals
In addition to area A and perimeter P, other geometrical functionals have been studied such as the radii r and R of the inscribed and circumscribed circles respectively, and the minimum and maximum Feret diameters and d respectively [24]. The Feret diameter is a measure of an object size along a specified direction. In general, it can be defined as the distance between the two parallel planes restricting the object perpendicular to that direction. It is therefore also called the caliper diameter, referring to the measurement of the object size with a caliper. v and d are the minimal and maximal diameter on the different possible orientations. Figure 4 illustrates these four additional geometrical functionals.
In practice, the Feret diameters are easily determined by firstly computing the convex hull of the object. Indeed, the Feret diameters for an object and for its convex hull are equal. The convex hull being a polygon, one can use the "rotating callipers" algorithm [25] to directly determine the largest and smallest projections.
For a connected compact set, the relationships between these geometrical functionals are constrained by geometric inequalities [26,27]. These geometric inequalities link geometrical functionals by pairs. Futhermore, they allow to determinate the morphometrical functionals (Tab. 3). The morphometrical functionals are invariant under similitude transformations (consequently, they do not depend on the global size of the set) and are defined as ratios between two geometrical functionals. In these ratios, the units of the numerator and the denominator are dimensionally homogeneous and the result has therefore no unit. Moreover, a normalization by a constant value (scalar multiplication) allows to have a ratio that ranges within [0,1]. For each morphometrical functional, the scalar value depends directly on the associated geometric inequality [28]. In total, there are fifteen morphometrical functionals for a connected compact set. 4pA=P 2 , r/R, v/d and 4R/P are four examples of these morphometrical functionals. Their concrete meanings are the roundness, the circularity, the diameter constancy and the thinness, respectively.

Shape diagrams
Shape diagrams can be defined by these fifteen morphometrical functionals. Each shape diagram enable to represent the morphometry of any connected compact set from two morphometrical functionals (that is to say from three geometrical functionals because the two denominators use the same geometrical functionals).
Let be any triplet of the considered six geometrical functionals (A, P, r, R,v, d) and (M 1 , M 2 ) be some particular morphometrical functionals valued in [0.1] 2 . A shape diagram D is represented in the plane domain [0.1] 2 (whose axis coordinates are the morphometrical functionals M 1 and M 2 ) where any connected compact set S is mapped onto a point (x, y). Mathematically, a shape diagram D is obtained from the following mapping: where KðE 2 Þ denotes the compact sets of the Euclidean 2D plane. Using all the fifteen morphometrical functionals, twenty-two shape diagrams are defined, denoted D k ð Þ k∈½1;30\ð½7;10∪½17;20Þ , respectively (Tab. 4).
Some geometric inequalities, and consequently some shape diagrams, are restricted to convex shapes [29], that are not considered in this paper. A detailed comparative study has been performed in order to analyze the representation relevance of these twenty-two shape diagrams [29][30][31].  Table 3. Shape functionals for simply connected compact sets. A, P, r, R, v, d, denote the area, perimeter, radii of the inscribed and circumscribed circles, minimum and maximum Feret diameters [24], respectively.

Geometric inequalities
Morphological functionals Extremal sets Extremal sets are the sets for which an inequality becomes an equality. C: the disks; W: the constant width compact convex sets; L: the line segments; X: many compact convex sets; Y: many simply connected compact sets; Z every compact convex set of diameter d containing an equilateral triangle of side-length d.
For example, the shape diagram D 24 : ðA; R; P Þ is obtained from the following mapping. D 24 ðA; R; PÞ : The concrete meanings of the morphometrical functionals 4pA/P 2 and 4R/P are the roundness and the thinness, respectively. Figure 5 illustrates three shape diagrams where some elementary sets are mapped.

Properties
The properties of the different shape diagrams have been studied in [29][30][31]. In the following, the properties of continuity and convexity discrimination are presented in order to show the better relevance of some shape diagrams.

Continuity
Let two 2D connected compact sets and the connected compact set class allowing to switch from one to the other using a degree of freedom of the set. For example, the semicircle goes to the semi-disk through semi-rings whose the cavity radius decreases (Fig. 6).
For each pair i of sets, a class C i of connected compact sets with one degree of freedom could be defined. Thus, a curve denoted C i;k from each simply connected compact set class C i is created in each shape diagram D k . These curves are related to the continuity of the shape diagram with respect to a small deformation of the set. This process can be used for elementary some pairs of connected compact sets.
In the following Figure 7, eight classes of connected compact sets are illustrated on three shape diagrams. It shows the location of the continuity curves from one shape to another.
A detailed study of this property can be found in [29][30][31].

Convexity discrimination
The convexity discrimination first requires the definition of the shape convexity. A set is convex when the line segment which joins any two points in it lies totally within the set. In other terms, the shape convexity could be quantified with the probability that two points in the set lies totally within it. Convexity parameters are commonly used in the analysis of shapes. The measurement value of the shape convexity of any set ranges between 0 and 1 (it is a probability). A convex set gives the value 1. Futhermore, the less the parameter value is high, the less the shape is convex. The convexity measurement can be computed, for instance, by the ratio c = A/A c where A c is the area of the convex hull of the set. This convexity parameter c has the following desirable properties: its value is always a number within [0,1]: its value is 1 if and only if the set is convex; it is invariant under similitude transformations; there is a simple and fast computing algorithm. Figure 8 shows this convexity parameter for some specific sets. The colormap corresponds to the different values of this parameter from 0 (black) to 1 (dark red), i.e from non-convex sets to convex sets.  Figure 9 illustrates three shape diagram where 1370 various discrete sets are mapped, and on which the boundaries of the convex domain are superimposed (the domain where all compact convex sets are located [11,28]).
One can see that the shape diagram D 24 presents a good convexity discrimination [31]. The sets mapped at the bottom left (sets with both low roundness values and low thinness values) are strongly concave, whereas the sets mapped at the top (sets with high thinness values) are stongly convex. In the two other shape diagrams, it would be more difficult to discriminate the convexity of the sets since the different color points are much more mixed.
A more detailed study, including other properties of the shape diagrams, can be found in [29][30][31]. Among the different shape diagrams, it has been shown that the shape diagram D 24 : ðA; R; P Þ is a good candidate for shape analysis regarding its representation relevance and discrimination power.

Conclusions
The purpose of this paper was to propose geometrical and morphometrical tools for characterizing inclusions in metal alloys from digital images acquired by various systems such as electron microscopy or X-ray tomography. The objective Fig. 5. Illustration of three specific shape diagrams where 24 elementary sets are mapped. It shows that some diagrams (using some specific morphometrical functionals) are not suitable for shape discrimination and classification. For example, different shapes can be located on the same place within the diagram D 12 , highlighting the non-unicity of such a representation. Fig. 6. Illustration of the sets (represented by a curve on the shape diagrams) coming from a transformation (using a degree of freedom of the set) from one set to another [12].
was not to give an exhaustive list of geometrical and morphometrical tools, but rather to focus on specific descriptors. In this context, the Minkowski functionals (geometrical tools) and the shape diagrams (morphometrical tools) have been presented. It has been shown that these descriptors have a compact representation, are computationnaly effective and have some good mathematical properties. For sure, they could be insufficient (as it stands) to analyse very complex strutures but the proposed measurements can be computed on some geometrical transformations of the object to be studied, providing some measurements functions and not only scalars. This kind of approach has been particularly studied in [12]. In conclusion, image analysis using integral geometry and shape diagrams provide efficient tools to quantitatively describe inclusions (providing separate information on size Fig. 8. Illustration of the convexity parameter for some specific sets. The colormap corresponds to the different values of this parameter from 0 (black) to 1 (dark red), i.e from non-convex sets to convex sets [12]. Fig. 7. Illustration of eight continuity curves (representing the locations of the transformed sets from one set to another) onto three shape diagrams [12]. Fig. 9. Family of 1370 discrete sets which are mapped onto three shape diagrams. The colormap corresponds to the different values of the convexity parameter from 0 (black) to 1 (dark red) of the sets, i.e from non-convex sets to convex sets [12]. and shape). The geometrical characteristics of these inclusions could thereafter be related to the mechanical properties of the metal alloys.