K. ZELI^, M. GODEC: A MODFIED MEAN-LINEAR-INTERCEPT METHOD FOR DISTINGUISHING ... 83–87 A MODIFIED MEAN-LINEAR-INTERCEPT METHOD FOR DISTINGUISHING LAMELLAR AND GLOBULAR EUTECTIC CARBIDES IN METALLOGRAPHIC SAMPLES MODIFICIRANA "MEAN-LINEAR-INTERCEPT" METODA ZA RAZLIKOVANJE LAMELARNIH IN GLOBULARNIH EVTEKTI^NIH KARBIDOV V METALOGRAFSKIH VZORCIH Klemen Zeli~1,2,3, Matja` Godec3 1Faculty of Mechanical Engineering, University of Ljubljana, A{ker~eva 4, 1000 Ljubljana, Slovenia 2Jo`ef Stefan International Postgraduate School, Jamova 39, 1000 Ljubljana, Slovenia 3Institute of Metals and Technology, Lepi pot 11, 1000 Ljubljana, Slovenia klemen.zelic@fs.lj-uni.si Prejem rokopisa – received: 2017-10-11; sprejem za objavo – accepted for publication: 2017-10-26 doi:10.17222/mit.2017.173 A new quantitative metallographic method to distinguish the morphology of lamellar from globular eutectic carbides in micrographs of steel was developed. The analytical image-processing method uses a standard interception method to evaluate the anisotropy of the analyzed surface features. On the basis of the degree of anisotropy the lamellar eutectic carbides the morphology in steel samples can be distinguished from the globular morphology. In comparison to similar existing methods, our method enables the user to uniquely specify the investigated image region. In this way it is especially useful for boundary cases, where both morphological types of carbides are present on the same micrograph and different parts of the image need to be analyzed separately. Keywords: metallography, interception method, micrographs analysis, lamellar eutectic, globular eutectic Opisana je nova kvantitativna metalografska metoda za razlikovanje lamelarne in globularne oblike evtekti~nih karbidov na mikroskopskih posnetkih vzorcev jekla. Slikovno procesiranje mikroskopskih posnetkov, uporabljeno v analizni metodi, je zasnovano na podlagi standardne prese~ne metode, s pomo~jo katere je ocenjena anizotropija vzorcev na povr{ini. Stopnja anizotropnosti je dober parameter za razlikovanje evtekti~ne in lamelarne morfologije karbidov v jeklu. V primerjavi s podobnimi obstoje~imi metodami, na{a metoda ponuja uporabniku edinstven na~in dolo~itve analiziranega podro~ja na sliki. Zaradi tega je metoda uporabna predvsem za mejne primere, kjer se na eni sliki nahajata oba tipa karbidov in je zato izbira obmo~ja analize zelo pomembna. Klju~ne besede: metalografija, prese~na metoda, analiza mikroskopskih posnetkov, lamelarni evtektik, globularni evtektik 1 INTRODUCTION Micrographic analyses are some of the basic forms of investigation used in materials science. In metallurgy, many properties can be explained by a metallographic examination of the metal’s surface. However, the stan- dard metallographic procedure for determining the sur- face morphology from micrographs is usually only qualitative. The techniques used to assess micrographs are not analytical and sometimes only include looking at the micrographs and forming an opinion. A clearer insight into the system can only be obtained through a quantitative characterization. Therefore, it is essential to use analytical methods for the image processing and feature recognition. Such methods usually provide us with one or more parameters that analytically determine the characteristics of surface features such as the average feature size, feature density or anisotropy. A new, quantitative metallographic method has been developed to distinguish the morphology of lamellar from globular eutectic carbides across a range of steel samples. The distinction is based on the degree of anisotropy of the surface features (referred to as the surface texture) determined from micrographs of eutectic carbides. The method is based on the mean-linear-intercept method1,2, but modified for use with eutectic carbides. A small feature is added to the method so as to enable the user to uniquely specify the investigated image region. It was used to distinguish a lamellar eutectic from a globular eutectic. But it can also be used for many other appli- cations where the degree of anisotropy needs to be deter- mined from the surface features of the micrograph. The method is based on the commonly used intercept me- thod3 that is normally used for grain size determinations in metallic materials.4 By obtaining the azimuthal dependence of the intercept number we can estimate the degree of surface texture. The Mean-Linear-Intercept Method uses a principle that is similar to that used for bone-tissue anisotropy determinations.5 The method was applied to images of four different surfaces. Two of them are computer-generated test images that prove the func- tionality of the method. The other two images were scanning electron micrographs of real samples of an Materiali in tehnologije / Materials and technology 52 (2018) 1, 83–87 83 UDK 620.18:669.15-194.5 ISSN 1580-2949 Original scientific article/Izvirni znanstveni ~lanek MTAEC9, 52(1)83(2018) AISI D2 tool steel’s as-cast microstructure. These two samples included two morphologically different types of eutectic carbides: a lamellar and a globular eutectic. The difference between the lamellar and globular eutectic carbides can be seen from a picture by eye (Figure 1a and 1b). With the developed method we can analytically prove that a difference exists and estimate its extent by monitoring the anisotropy parameter (AP). 2 METHOD Our new method uses a standard intercept method to measure how many grain boundaries are intercepted if a straight line is drawn on the image.3 The anisotropy is estimated by performing numerous intercept methods on the same image and then measuring the radial depen- dency of the intercept number.1,2 In our case we chose a point on the image (the intercept point) and then then a family of lines was drawn to intercept the chosen point so that the lines are rotated by a fixed angle relative to each other (Figure 2). In this way the user has some degree of freedom in comparison to the meanlinear-inter- cept method as the intercept point can be chosen. The intercept point should not be put outside the region of the eutectic carbide or on the edge of an image, as could easily occur if the method was fully automatic. For a representative result the intercept point must be placed in the middle of the eutectic carbide region of the micro- graph. This is the main difference compared to the well- known mean-linear-intercept method that is commonly used for an anisotropy determination from micrographs. A schematic demonstration of the method is shown in Figure 2. There are 6 lines that cross the image in different directions and meet at the intercept point. By counting the intercept number for each line and then plotting the radial dependence of the intercept number, we would be able to estimate how anisotropic the image is. The real algorithm includes many more intercept lines. They are one angular degree apart so that every image is processed by 360 lines. In this way the angular dependence of the intercept number is suffciently smooth. The intercept method was applied to processed micrographs. The images were first binarized and then processed by a mode filter. That is commonly used filter for image characteristic enhancements6 that replaces the value of each pixel with the most common pixel value from its surroundings. This type of filtering turned out to be the most effcient for revealing the phase boundaries between the carbide and the austenite. Figure 3 shows the images of the lamellar eutectic carbide before and after the image processing. The texture of the eutectic carbide is clearly seen on the filtered image, as we obtained only the image of the boundaries between the carbide and austenite phases. The image was subsequently transformed into a 1280×1024 matrix of ones and zeros (depending on the colors of the pixels). The intercept method was applied for 360 different azimuthal angles by walking across the matrix in two for loops. The outer loop determined the angle, which was realized by turning the image counter- clockwise around the interception point by Mathlab K. ZELI^, M. GODEC: A MODFIED MEAN-LINEAR-INTERCEPT METHOD FOR DISTINGUISHING ... 84 Materiali in tehnologije / Materials and technology 52 (2018) 1, 83–87 Figure 1: Comparison between micrographs of: a) lamellar and b) globular eutectic Cr7C3 carbides in as-cast AISI D2 tool steel, the images were made on a scanning electron microscope (SEM) using a backscattered-electron detector at a magnification of 4000×. Figure 2: Shows the concept of our method, the intercept point is placed on the desired spot in the image and the anisotropy of the surroundings is evaluated function imrotate. The inner for loop ran across the row of the matrix that intercepts the interception point. The value of pixel corresponding to the running increment was subtracted from the value of its left neighbor. If the difference between two neighboring pixel values was non-zero the change from black to white was met. Every change from black to white (from zero to one) was stored as an intercept. At the end the density of the inter- cepts in every direction was calculated by considering the size of the carbide in different azimuthal directions. This size was determined by saving the pixel coordinates of first and the last intercepts for a given azimuthal angle. The difference between both give us the size of the carbide in terms of pixels. From the magnification of micrographs we knew the exact scaling factor for the transformation of distances measured in number of pixels, to the micro meters. Interception densities for every azimuthal angle were calculated as intercepts per micro meter (units 1/micro meter) and averaged with a moving average to reduce the noise. The moving-average step size was set to 5 % of the whole range. After ave- raging, the intercept density was plotted versus the azimuthal angle. The image processing and the analysis were made with the open-source GNU Octave program. 3 RESULTS The results are obtained in the form of the angular dependence of the intercept density . In order to prove the functionality of our new algorithm, it was first tested on two computer-generated images (Figure 4a and 4b). Figure 4a shows a perfect lamellar structure (parallel stripes). It is the most anisotropic texture that can exist. K. ZELI^, M. GODEC: A MODFIED MEAN-LINEAR-INTERCEPT METHOD FOR DISTINGUISHING ... Materiali in tehnologije / Materials and technology 52 (2018) 1, 83–87 85 Figure 3: Comparison between: a) original SEM micrograph and b) processed SEM micrograph. binarization and filtration were per- formed on the micrograph Figure 5: Results of algorithm performed on: a) test images "Stripes" and b) test image "Random dots". Interception density is exceptionally calculated as number of interceptions along the interception line per kilo pixel since the test images do not have the real scale.Figure 4: a) test image "Stripes" and b) test image "Random dots" We expect that there will be no intercepts in the direction parallel to the lamellas (black stripes). The second figure (Figure 4b) includes randomly distributed, approxima- tely circular dots of random size. No anisotropy exists in this image, so we expect no periodicity and high noise in the dependence of the number of intercepts on the azi- muthal angle. All our expectations were met when the analysis was performed on Figure 4a and 4b, which proves that the method works. Figure 5a shows the results of the analysis of image Figure 4a, and the result in Figure 5b corresponds to the Figure 4b. After proving the functionality of the algorithm, it was run on the real micrographs of the eutectic carbides in Figure 1. Figure 6 shows the comparison between the results for: a) the lamellar and b) globular eutectics. The difference between the two graphs is obvious. In Figure 6a we can see the drop in the intercept density at an angle of 170°. This corresponds to the intersection method performed in the direction parallel to the eutectic lamellas. Also, the periodicity is very obvious. The two peaks at approximately 80° and 260° correspond to the large density of the phase boundaries in the direction perpendicular to the eutectic lamellas. The anisotropy clearly exists in the sample and we can also determine the direction of the texture. Figure 6b, on the other hand, shows no periodicity and the amplitude of the fluc- tuations cannot be distinguished from the noise (note that two maxima and two minima are always obtained in the 360-degree range if anisotropy is present - no more or less than this is theoretically possible). The constant density of the intercepts (inside the standard deviation) in Figure 6b shows us that the analyzed features are iso- tropic. For the full quantification we used the anisotropy parameter (AP). The AP is a numerical value that tells us how anisotropic the investigated surface features are. The amplitude of the intercept density’s angular dependence can be used as the AP, but due to the noise and non-sinu- soidal shape it is hard to estimate without large devi- ations. In analogy with the mean linear method we plotted the inverse of the intercept density data para- metrically and then fitted the parametric plot with an ellipse. This procedure is an exact equivalent of fitting a sinusoidal wave to the intercept density angular depen- dence plot, but fitting the ellipse to a cloud of points of parametric plot is much more elegant. Figure 7 shows the comparison between two parametic plots for the lamellar (a) and globular (b) eutectics. K. ZELI^, M. GODEC: A MODFIED MEAN-LINEAR-INTERCEPT METHOD FOR DISTINGUISHING ... 86 Materiali in tehnologije / Materials and technology 52 (2018) 1, 83–87 Figure 7: Parametric plots of inverse intercept density’s angular dependence for: a) a lamellar eutectic and b) a globular eutectic using an elliptical fit; the plot axis corresponds to the directions of the vertical and horizontal edge of the processed image; coordinates of plotted values of the inverse interception number density are calculated from angular dependence by parametric representation: x=cos/interception density and y=sin/interception density. Figure 6: Angular dependence of the intercept density for: a) a la- mellar eutectic and b) a globular eutectic. Intercept density is defined as number of interceptions along the interception line per length of the interception line in micro meters. The semi-major and semi-minor axes of the ellipse indicate the direction of the largest and smallest intercept densities. The quotient between the lengths of the semi-major and semi-minor axis is used as the aniso- tropy parameter. We calculated the AP for both cases. For the lamellar eutectic APL = 3.00 and for the globular eutectic APG = 1.39. In the case of the lamellar eutectic the average feature in the direction of the semi-minor axis is, on average, three times longer than the average feature in the direction of the semi-major axis. In the case of the globular eutectic this ratio is only 1.39. 4 CONCLUSIONS Our new method for distinguishing lamellar from globular eutectic carbides using micrographs offers a fully quantitative approach. The distinguishing is based on the anisotropy of the eutectic carbide. The software output is an anisotropy parameter (AP). If the AP value is 1 (inside the standard deviation) the analyzed features are isotropic (globular eutectic). Any other value of the AP between one and infinity shows that the investigated surface features are anisotropic, i.e., a lamellar eutectic. The method is very effcient for the boundary cases where we have both types of carbides in the same image. Sometimes one eutectic carbide can be divided into two regions of different morphological carbide types. The main feature of our method in comparison to existing ones is the degree of freedom that the user has. By selecting the intercept point the user can choose the investigated area and in this way our algorithm becomes useful for distinguishing between a lamellar and globular eutectic morphology. The code of the software is open source and can be obtained by contacting the author. 5 REFERENCES 1 J. E. Hilliard, Specification and measurement of microstructural anisotropy, Transactions of the Metallurgical Society of AIME, 224 (1962), 1201– 1212 2 E. M. Philofsky, J. E. Hilliard, On the measurement of the orientation distribution of lineal and areal arrays, Quarterly of Applied Mathematics, 27 (1969) 1, 79–86 3 E. Heyn, Short reports from the metallurgical and metallographical laboratory of the royal mechanical and technical testing institute of charlottenburg, The Metallographis, 5 (1903), 3964 4 H. Abrams, Grain size measurements by the intercept method, Metallography, 4 (1971), 59–78 5 W. J. Whitehouse, The quantitative morphology of anisotropic trabe- cular bone. Journal of Microscopy, 101 (1974) 2, 153–168, doi:10.1111/j.1365-2818.1974.tb03878.x 6 E.R. Davies, On the noise suppression and image enhancement cha- racteristics of the median, truncated median and mode filters, Pattern Recognition Letters, 7 (1988) 2, 87–97, doi:10.1016/0167-8655(88) 90123-7 K. ZELI^, M. GODEC: A MODFIED MEAN-LINEAR-INTERCEPT METHOD FOR DISTINGUISHING ... Materiali in tehnologije / Materials and technology 52 (2018) 1, 83–87 87