Image Anal Stereol 2004;23:33-44 Original Research Paper MODELLING A FOOD MICROSTRUCTURE BY RANDOM SETS Frederic Bron1 and Dominique Jeulin2 1Ecole des Mines de Paris, Centre des Matériaux, BP 87, 91003 Evry Cedex, France; 2Ecole des Mines de Paris, Centre de Morphologie Mathématique, 35, rue Saint-Honoré, 77305 Fontainebleau Cedex, France e-mail: dominicue.jeulin@ensmp.fr (Accepted March 1, 2004) ABSTRACT Starting from scanning electron microscope images of some food products, we generate binary images of composite materials. After measuring the covariance and the probability for segments and for squares to be included in the dominant component, we develop a modelling of the microstructure from random sets obtained by thresholding Gaussian random functions. The covariance function of the underlying Gaussian random function is estimated from the experimental covariance of the food products. The validity of the model is checked by comparison of the probability curves for segments and for squares, measured on simulated and on initial images. The approach enables us to generate 3D realisations of the microstructure. Keywords: 3D simulations, food microstructure, mathematical morphology, random sets, truncated Gaussian random function. INTRODUCTION Some food materials represent interesting classes of composite materials. In the present study, two-phase food materials are characterised by image analysis. Then a random set modelling of the microstructure is proposed, based on image analysis measurements on 2D images. Two dimensional scanning electron microscope (SEM) images of the food microstructures are used to make quantitative analysis of the spatial arrangements of the phases. The primary tool used in this analysis is the set covariance (also known as the two point probability function) that quantifies for a range of distances the probability that two points will both land within the phase of interest. In this study, we used a Gaussian random field model that seems capable of capturing a great deal of pertinent morphological information in a very compact manner. Once the model has been fitted, we are free to make any number of simulations (in both two and three dimensions) of structures. We show that the set covariance and other morphological functions of the 2D and 3D simulations suit very well the experimental ones. FOOD MICROSTRUCTURE The food material studied here is a two-phase material composed of a second phase and of a matrix phase. To observe the microstructure, we used the following procedure: the samples are quickly cooled at -110 °C to congeal the microstructure and cut to observe an internal surface. Then, a projection of argon ions (Ar+) is used to etch the surface and to reveal the microstructure. Micrographs are taken with a cryogenic SEM. We based our work on four micrographs taken from the same sample (cf. Fig. 1). At the magnification used (×200), one pixel corresponds to 585 nm; the size of the images is 992×688 pixels, and the dark phase is the matrix while the bright one is the second phase. 33 200 µm image 1 - ×200 200 µm image 3 - ×200 Fig. 1. The 4 micrographs taken from the sample. IMAGE SEGMENTATION A difficult problem with experimental micrographs is to separate the two different phases. We need to transform grey level images into binary ones. To do this, we applied three consecutive morphological operations. The first step is an “opening top hat”: an erosion is followed by a dilation (this is an opening). This value (one at each pixel) is then subtracted from the image so that the dark phase becomes homogeneous on the whole image. The structuring element used to perform the top hat must be larger than the cluster size, to be sure to capture the local background, but not too large if we want this operation to be useful. Bron F et al: Food microstructure 200 µm image 4 - ×200 For the four images, the same parameters were used: the structuring element is a hexagon with a radius of 50 pixels. The second step is a threshold. It is selected on the histograms of the images, from the local minimum between the two peaks representing the two phases. Finally, to remove small white dots in the black phase, a small opening by a hexagon of radius 2 pixels was performed on the binary image. The result of the segmentation for Image 2 can be seen in Fig. 2. For each image, we can measure the volume fraction of the second phase. The mean value 75% is a good estimation for the sample. The results are given in Table 1. Image Anal Stereol 2004;23:33-44 Fig. 2. Segmentation of image 2. MORPHOLOGICAL MEASUREMENTS of ergodicity or stationarity that allows us to replace expectations by averages over the space. THE SET COVARIANCE The covariance C(h) is the probability for two points A and B with a given distance h to be in the same phase cp. C(h)=P(A^B^cpAB=h) (2) We recall here some properties of this function: 0 1 because the slope at the origin must be strictly negative (n > 1 would produce a null slope). When the slope is infinite (n < 1), we get a fractal microstructure. When n = 1, we get: dC dh 10) Sv 4 <0, (12) where Sv is the specific surface area of the phase divided by the total volume (Stoyan et al, 1995). In addition, a necessary condition for a function C(h) to be the covariance of a random set is that the variogram C(0) - C(h) should satisfy the triangular inequality (Matheron, 1987). It is easy to check that this inequality is violated when 1 < n < 2. When n = 1, the covariance is exponential, and is permitted for a random set. For n < 1, this point can be proved as follows: consider realisations of random sets with an exponential covariance, and with a random coefficient c following a stable distribution with parameter 0 < n < 1. The resulting (non ergodic) random set has a stable covariance with parameter n. 2 0 0 0 0 36 Image Anal Stereol 2004;23:33-44 0.8 C(h) 0.7 0.6 0.5 16 32 h (pix.) 48 Fig. 6. Fitting of the Corson model for C(h) of the 4 images; symbols indicate experimental values with the corresponding Corson fitted model as a smooth line. TRUNCATED GAUSSIAN RANDOM SET MODEL We will try now to build a 3D structure that has the same morphology as the sample. The first step is to identify the morphology of the sample on a 2D image. This will be done with the covariance function. The second step consists in building a model of a 3D structure that has the same correlation function as the 2D images. Then, one can simulate multiple 3D structures by using this random set model. This method provides a way to reflect the variability of the morphological properties in the simulations. We use simulations based on Gaussian random functions, following the approach proposed in (Quiblier, 1984; Berk, 1987; Teubner, 1991; Roberts and Knackstedt, 1996; Roberts and Garboczi, 1999). A wide range of truncated Gaussian random sets models is given (Lantuéjoul, 2002). In the present part, we detail the derivation of the model. Let N be the number of dimensions of the simulation space (N = 1, 2 or 3) and let Ni be the width of the simulation in the dimension number i. Then let Q be the simulation field, a subset of ZN, which is a line [0; N 1 - 1] or a rectangle [0; N1 - 1]x[0; N2 - 1] or a parallelepiped rectangle [0; N1 - 1] x[0; N2 - 1]x [0; N3 - 1]. So, we have: n = fJ[0;Ni-1] (13) i=1 Later, we will deal only with periodic boundary conditions. We can define the set of all translations T on the network: T = Y\NiZ (14) i=1 For example, if we are in 2D (N = 2) with N1 10 and N2 = 13, T is defined as follows: T = (t = (t1, t 2 ), with 1 t 1 G V • • -10 0 10 20 t 2 G V • • -13 0 13 26 n (15) Then, if g is a function of r g Q we have: \/rGQ,\/tGT,g(r+t)=g(r). BUILDING THE SIMULATION (16) The principle of the simulation is to generate realisations of Gaussian random functions by convolution of Gaussian noise with a weight function. A convenient way to produce these simulations is to work in Fourier space: in that case, it is easy to generate realisations with a given experimental covariance. Other methods could be used, like the Turning Bands method (Matheron, 1973; Dietrich, 1995; Lantuéjoul, 2002), involving simulations of Gaussian random functions in a lower dimensional (like 1D) space, with an appropriate covariance derived from a model of covariance in 3D. We now describe how we build the simulation. Table 1. Volume fraction of the second phase from the 4 images and Corson parameters for the covariance. Image f c (h in p ixels) n r2 Interval used (pix.) 1 0.7795 0.1691 0.9820 0.9999 he[l 14] 2 0.7397 0.1521 0.9984 0.9999 he[l 10] 3 0.7290 0.1406 0.9942 0.9999 he[l 19] 4 0.7501 0.1612 0.9983 0.9999 he[l 19] Average C(h) 0.7496 0.1543 0.9948 0.9999 he[l 18] 37 Bron F et al: Food microstructure Non-correlated Gaussian random field For each point reQ, we define a random variable U(r), which is a standard Gaussian with null expectation and unit variance: Wen, U(r) ~N(0;1) (17) Because this Gaussian random field is noncorrelated: Wr 1, r2 en, r^r2 => U(r1) and U(r2) are independent (18) => Cov[U(r1; U(r2))] = 0 where Cov(X;Y) = e[(X-E(x))(Y-E(Y))] (19) The non-correlated Gaussian random field U can be easily generated by a computer and is the starting point of every simulation. Introducing a correlation In order to model a realistic microstructure, a correlation is imposed by the convolution with a weight function w (defined on Q): VrGQ,Z(r) = (w*U\r)=YJw(h)xU(r-h) (20) There are two conditions on w that will help us to give an interpretation later: Wen,Z(r)~N(0,1) (24) [£w2(h)=1 (normalisation) i reQ [W e n, w(- r) = w(r) (symmetry) (21) Thresholding Finally, the correlated Gaussian field Z is thresholded to get the binary simulation B: B(r) = 1iZ(]>] 1,if Z(r)> z 0,if Z(r) z) (23) Z(r) is Gaussian, as a sum of Gaussian variables (by construction, it is also standard): and then f = P(N(0,1)>z) = 1-P(N(0,1) r * r+h Fig. 21. Periodic boundary conditions for covariance. The following lines prove the previous equation: E(B(r)B(r + h)) N N N N NW ±B(r)B(r + h) r=0 N 1-1-h 2] B(r)B(r + h) + J] B(r)B(r + h) r=0 r=N1-h N^B{r)B{r+h)+ fB(r)B r+h-N 1) r=0 r=N1-h N1-1-h h-1 (36) r=0 r=0 [(N 1 -^EB^^r + h^+hE^r^r + N 1 - h))\ N 1 N-h h C{h)+ N C(N1-h) We have a similar expression in 2D and in 3D. REFERENCES Berk NF (1987). Scattering properties of a model bicontinuous structure with a well defined length scale. Phys Rev Lett 58(25):2718-21. Corson PB (1974). Correlation functions for predicting properties of heterogeneous materials. J App Phys 45(7):3159-64. Dietrich CR (1995). A simple and efficient space domain implementation of the turning bands method. Water Resour Res 31:147-56. Jeulin D (1991). Modèles morphologiques de structures aléatoires et de changement d’échelle. Thèse de Doctorat d’Etat ès Sciences Physiques, University of Caen, France, 1991. Jeulin D (2000). Random texture models for material structures. Statistics and Computing 10(2):121-32. Lantuéjoul Ch (2002). Geostatistical Simulation. Models and Algorithms. Berlin: Springer Verlag. Marcotte D (1996). Fast variogram computation with FFT. Comp Geos 22:1175-86. Matheron G (1973). The intrinsic random functions and their applications. Adv Appl Probab 5:439-68. Matheron G (1975). Random sets and integral geometry. New-York: Wiley. Matheron G (1987). Suffit-il, pour une covariance, d’être de type positif? Sci de la Terre, Série Informatique Géologique 26: 51-66. Quiblier JA (1984). A new three-dimensional modeling technique for studying porous media. J Colloid Interface Science 98:84-102. Roberts AP (1997). Statistical reconstruction ot three-dimensional porous media from two-dimensional images. Phys Rev E 56(3):3203-12. Roberts AP, Knackstedt MA (1996). Structure-property correlations in model composite materials. Phys Rev E 54(3):2313-28. Roberts AP, Garboczi EJ (1999). Elastic properties of a tungsten-silver composite by reconstruction and computation. J Mech Phys Sol 47:2029-55. Serra J (1982). Image analysis and Mathematical morphology. London: Academic Press, Vol. 1. Serra J (1988). Image analysis and Mathematical morphology. London: Academic Press, Vol. 2. Stoyan D, Kendall WS, Mecke J (1995). Stochastic geometry and its applications, second edition. Wiley series in probability and mathematical statistics. Chichester: Wiley. Teubner M (1991). Level surfaces of Gaussian random fields and microemulsions. Europhys lett 14(5):403-8. Wackernagel H (1998). Multivariate Geostatistics. Berlin: Springer Verlag, second edition. Wilson RJ, Nott DJ (2001). Review of recent results on excursion set models. Image Anal Stereol 20:71-8. 1 1 1 1 44