Image Anal Stereol 2002;21:139-144 Original Research Paper AUTO-SHAPE ANALYSIS OF IMAGE TEXTURES IN FRACTOGRAPHY Hynek Lauschmann and Ivan Nedbal Czech Technical University, Faculty of Nuclear Sciences & Physical Engineering, Dept. of Materials, Trojanova 13, 12000 Praha 2, Czech Republic e-mail: lausch@kmat.fjfi.cvut.cz (Accepted. May 29, 2002) ABSTRACT The aim of this study is to estimate the velocity of fatigue crack growth (crack growth rate - CGR) from the texture in SEM images of crack surfaces. A simple and quick method is based on fitting training images as a linear combination of several small subimages selected from the images themselves. The size of basic subimages is derived from autocorrelation functions of the image in row and column direction. The selection of basic subimages is based on two indicators: "appeal" evaluating their shape content, and mutual coefficient of correlation. The method is easy to implement and quick in computations, while results of testing application are fully comparable with best ones obtained within textural fractography of fatigue failures. Keywords: decomposition, fatigue, fractography, image texture, regression. INTRODUCTION Within the quantitative fractography of fatigue fractures (Beachem, 1968), the traditional source of information on the crack growth rate (CGR) is striations (Nedbal et al, 1989; 1997a,b, 2000; Siegl and Matocha, 1997). As an alternative solution of the reconstitution of fatigue crack history, textural methods are being developed (Lauschmann et al, 2001). For the application of a textural method, the mesoscopic area with SEM magnifications between macro- and micro-fractography (about 30 ¦*¦ 500 x) is especially suitable. These low magnifications were not frequently used in the past because of the absence of measurable objects in images. Examples of typical image textures are shown in Fig. 1. Three textural methods have been yet worked up to the practical application: 2D spectral analysis (Lauschmann et al, 2000), analysis of the texture as a Gibbs random field (Lauschmann and Raček, 2001) and extraction and analysis of a fibre structure (Lauschmann, 2001). Very good results have been obtained also with 2D wavelet transform. Subsequently, other methods of textural analysis (Parker, 1997, see for an overview e.g.) are being tested. All methods based on decomposition of the image use pre-defined basic functions. In the case of Fourier transform, the trigonometric basis is used, in wavelet transform some type of wavelets, etc. The idea of this paper is to extract the basis directly from the training images. 0.1 mm Fig. 1. Examples of typical textures in images of fatigue crack surface. Low (a) and high (b) crack growth rate. Stainless steel AISI 304L. 139 Lauschmann H et al: Auto-shape analysis of image textures METHOD Methods based on decomposition of image textures into a linear combination of basic objects (planar waves, wavelets, etc.) meet a problem caused by a large amount of output data. For example, the spectral matrix contains a number of values, which equals half the number of pixels of the original image. Consequently, a special task must be solved: to analyze and express the relation between this large set of spectral coefficients, and the known value of CGR. Within the wavelet transformation, the problem is similar. The idea of auto-shape decomposition is simple: The decomposition will be "tuned" especially for the given set of images so that the basis will not be enforced a priori but will originate from training images. Training images will be analyzed to find several special small subimages, so that the whole images could be fitted by linear combinations of them. A measure of the presence of single basic subimages within the decomposition will be taken for textural parameters. The advantage of this approach is that the output of the decomposition is a small set of coefficients, which can be simply related to the value of CGR. These coefficients reflect the occurrence of some inherent configurations of pixels in the set of images and so they are expected to reflect also the dependence on the CGR. The set of basic subimages cannot create an orthonormal basis in a strict algebraic sense. However, this is also not necessary. The approach ought to be expressed in terms related to regression instead of decomposition. Nevertheless, to keep the continuity with usual methods, we will hold the term basic subimages, but they should be understood as a multilinear regression function. The whole approach can be applied in the following steps: 1. The image matrix should be resized into smaller dimensions. The care should be taken of conserving the main textural structure. 2. Mean autocorrelation functions in the row and column direction of training images are computed. In both directions, the lengths of correlation, dx and dy, are estimated. They should be several pixel distances. If their values are not appropriate, the ratios of resizing images (step 1) can be changed. 3. Training images are divided in a Cartesian manner into elementary subimages of the width dx and height dy. Let us denote the i-th elementary subimage of the j-th image xij . The sequence of elementary images is not relevant. Let the number of all elementary subimages within one image be p. Not whole subimages around margins of the image are excluded. 4. From the whole set of elementary subimages of all training images, several ones are chosen to form the basis. The rules for selection of this set will be discussed later. A non-zero constant subimage of the same size should be added. Let us denote the set of basic subimages {bk}, k =1,2,…,. nb. 5. All elementary subimages are fitted as linear combinations of the basis {b} k=1 Here fy denotes the error matrix of the same size dx x dy, arising from the fact that the decomposition is not total. 6. For every training image, mean absolute values of regression coefficients are computed: 1^1 7. Within the whole set of training images, the relation between CGR (CGRj for the j-th image), and the image texture, may be expressed by linear regression: »t CGR]=c0+Y,cka]k+e], (3) k=1 where ck, k = 0,…,. nb are regression parameters and Ej denotes the residual deviation. For a special case of analysis of textures, the simple general algorithm is completed with particular data optimized for the collection of training images: the set of basic subimages, and values of parameters ck, k = 0,…,. nb. Within fractography, CGR may be estimated from images of fatigue crack surfaces that originated under comparable conditions as training ones. In a general texture-based classification, the set of parameters a$ (related to the j-th training image and k-th basic subimage) can be used directly to distinguish classes of textures. Now, we can focus on the selection of basic subimages. The frequency of occurrence of any similar brightness structures is not a suitable indicator. 140 Image Anal Stereol 2002;21:139-144 The most frequent structures do not contain shapes, being close to white noise. The intuitive requirement on basic subimages, that they should reflect typical inherent structures, may be expressed by two qualities: the variation of brightness within the subimage is large (it means that it contains great differences of brightness, making possible the presence of any objects on a background), the sum of differences between brightness in all neighbouring pixels is small (it means that pixels which are close in brightness are close in space -in other words, that the image contains rather objects than noise). To express both qualities together, an indicator called appeal was proposed. It is defined as A(x) Var(x) ^/?|Diff(x)| (4) Here Var(x) denotes the variance of brightness within image x and ?? Diff(x) ? denotes the sum of all absolute differences between brightness in the neighbouring pixels. The form of a ratio with the square root in the denominator was found empirically by testing a number of cases. The selection of the set of basic subimages should ensure that they are as much different as possible. Not only for the reason to generate a rich space of variability of their linear combinations, but also to get a linear system (1) that is far from being singular. It is obtained by checking mutual correlation coefficients of single basic subimages (in the sense of brightness in the corresponding pixels) while setting the basis together. Finally, the set of basic subimages may be set in two steps: 1. Elementary subimages of all training images are sorted in decreasing order according to the value of appeal (4). The first one (with largest value) is accepted for the basis. 2. Further elementary subimages from the sequence are tested. The subimage is added to the basis, if absolute values of correlation coefficients with all subimages accepted so far are smaller than a selected limit. With the increasing number of subimages involved in the basis, the quality of results becomes better. However, their number must not be larger than the number of pixels in the elementary subimage, nb ? dxdy . APPLICATION Three specimens (C16ä18) of stainless steel AISI 304L were loaded in the same laboratory conditions and the process of fatigue crack growth was recorded. From each fracture surface, about 45 SEM images in the magnification 200 × (the field of view of 0.6 × 0.45 mm) were obtained, and a value of the experimentally rated CGR was assigned to every image. Images were normalized (Lauschmann, 2000) to exclude large-scale fluctuations of mean brightness and contrast, by using the brightness transformation 0 for u<0 u for 0?u?255 255 for u>255 x. . - mean, (x) i,j S v y (5) u=128 + 50 stdS (x) where meanS(x) and stdS(x) are the mean value and standard deviation of the brightness in the neighbourhood S of the point [i,j]. The size of S has been set 33 × 33 pixels with [ i,j] in the middle. As an example of application, we select training images as every second image from the set C16 (23 images). To get a reasonably small elementary subimage, we have resized the images into the size 300 × 400 pixels. The autocorrelation functions for row and column directions are plotted in Fig. 2. The lengths of correlation defined by |px (d > dx | < 0.05, | py (d > dy | < 0.05 ? are dx = 3 and dy = 5 pixel distances. Therefore, the dimension of elementary subimages is 5 × 3 pixels and images are divided into (300/5).integer(400/3) = 7980 elementary subimages. The operation "integer" expresses excluding of not whole ones around margins. The condition for selecting a subimage for the basis was set by the limit of correlation coefficients || < 0.44. Twelve basic subimages were selected from the training images. Their position in the sequence of the largest values of appeal A is evident from Fig. 3, and they are shown in Fig. 4. The basis was supplemented with a non-zero constant image to the total number of nb = 13 basic subimages. 141 Lauschmann H et al: Auto-shape analysis of image textures ^ Autocorrelation \ function \ p(d) [1] \ ----- row dir. \\ — col.dir. v V\ 1 0.8 0.6 0.4 0.2 0 -0.2 0 2 4 6 8 10 Distance d [pixels] Fig. 2. Mean autocorrelation function of image brightness in row and column direction. 190 180 170 160 150 140 130 120 0 500 1000 Order [1] Fig. 3. The sequence of the largest values of appeal A; cases selected for the basis (see Fig. 4 by rows). MM Fig. 4. Basic subimages selected from training images. (a) (b) Fig. 5. Comparison of an original (a) and recomposed (b) image (sections 256 × 256 pixels). 142 Image Anal Stereol 2002;21:139-144 A comparison of an original image and its recomposition by elementary subimages according to (1) is shown in Fig. 5. The agreement is very good. Final results are documented in Fig. 6. The accuracy of estimates is fully satisfactory for a practical application. The width of the strip of the estimated values of the CGR is comparable to results of textural methods that are much more sophisticated and have significantly greater requirements on computational time. dimensional components of the texture (high frequencies) is more or less lost. The division of the image into a set of elementary subimages, which are analyzed separately, introduces special limitations. The number of subimages must be large, so that they can be regarded as a random sample. It means that the dominant texture must be small in relation to the image dimensions. CONCLUSIONS CGR - velocity of crack growth [|lm/cycle] ¦ u / o o / o // /X 0 Estimated DO , from images - Äs x %