Global and Local Thresholding Methods Applied to X-ray Microtomographic Analysis of Metallic Foams

X-ray based computed microtomography is a non-destructive, well established tool for a three-dimensional characterization of open-cell metallic foams. Macroscopic physical and chemical properties of these materials stay in close relation to their micro-structure parameters. The purpose of the paper is to present two types of thresholding methods so-called global and local thresholding for evaluating the structural parameters of open-cell metal foams based on X-ray microtomography data. Two different methods were chosen: automatic Otsu thresholding (global) and adaptive (mean of minimal and maximal grey values of grayscales within a selected radius). The key parameters of aluminum and nickel-chromium foams fine structure calculated using Otsu and locally thresholded images were significantly different. The proper image segmentation is the key point in metallic foam morphometry. The influence of a radius of the image processing region on the results obtained is discussed for the local thresholding method. Examples of the images artifacts generated by local thresholding method to demonstrate possible results misinterpretation are also given. The optimization of local thresholding parameter (radius of the image processing region) was presented.


Introduction
Physical and chemical properties of the foams as well as their desired technological and biological applications are closely related to their structural and morphological parameters. Solid foams may be manufactured from many different materials like metals or their alloys (Al, Ni, Cu, kanthal, NiCr), ceramics (Al 2 O 3 , ZrO 2 , SiC, mullite, cordierite etc.), plastics (polyether, polyethylene), glass or carbon [1][2][3][4][5]. Morphological parameters of foams are unique and can be changed within extremely wide ranges. To achieve the detailed knowledge of these parameters different research methods like magnetic resonance imaging (MRI), optical analysis and Xray computed microtomography (micro-CT), are used. The last method is becoming increasingly popular in the area of foam analysis [6][7][8][9][10][11][12].
Micro-CT is a tool which provides high-resolution 3D analysis of small objects in a non-destructive way. The general principle of this method is based on detecting differences of linear attenuation coefficient of X-rays passing through a sample. Two possible ways of X-ray producing could be applied: X-ray tube or synchrotron [13,14]. In this paper all results have been obtained using desktop type micro-CT with X-ray tube. The sample is scanned at different angles and the intensity of transmitted X-rays is detected. Micro-CT is not a measurement method which supplies directly the final characterization of the investigated sample. X-ray projection yields a set of grey level cross-sectional images of the sample but to obtain whole quantitative sample characterization in 3D space, as e.g. shape, volume, porosity, an image segmentation procedure i.e. setting of the boundaries between the sample material and its surrounding has to be performed. It should be noticed that it is probably one of the most important steps in the image analysis [1]. There are many methods of the image binarization reported in the literature [15]. Depending on the method, it is very important to determine the correct image processing parameters, as e.g. the optimal threshold value, the measurement resolution [8]. On the basis of the existing literature, it is difficult to conclude which of the thresholding methods is optimal to determine the morphometric parameters of solid foams [15]. In the microtomographic practice two main approaches are used to set the threshold level: global and local. This paper is focused on two particular binarization methods used for microtomographic characterization of metallic foams. We applied widely used full automatic Otsu method as the global [16] one and highly customizable adaptive thresholding method with mean of minimal and maximal values of grayscales within a selected radius. By comparing parameters obtained with the use of the Otsu and adaptive thresholding, we got insight into applicability of the thresholding methods for the investigation of solid state foams.

Materials and Methods
Metal foams, in the form of 10 mm cylinders, have been selected for the present study: aluminum alloy foam samples with three pore concentrations: 10, 20 and 40 pore per linear inch (PPI), and NiCr foam sample with PPI of 27-33. Recemat BV, the nickel-chromium foam manufacturer simply denotes the number of pores per inch while ERG Aerospace Corporation for aluminum foams specifies the number of windows per inch. 10 PPI for aluminum foam corresponds roughly to 5-7 for nickel-chromium foam. The aluminum foams are produced from the liquid metal, which is foamed directly, and then reticulated [2,17]. The nickelchromium foams are produced from the powdered metal that is electrically deposited onto a polymer foam with open cells which are later removed by pyrolysis [2,18].
Comprehensive quantitative analysis was performed based on the micro-CT data. In this work, SkyScan 1172 micro-CT scanner (Aartselaar, Belgium) was used. The scanner is equipped with 80 keV X-ray tube (current of 100 µA). The shadow projection images are detected with the CCD camera fiber-optically coupled to the scintillator (4024 × 2680 pixels). During the scanning process the sample rotates slowly (to 180 • or 360 • ) with a tiny rotation step (usually under 1 • ). Simultaneously, the cone-beam X-rays are attenuated in the sample. For each rotation angle, the shadow projection is acquired. After scanning procedure, collected data are used in the computed 3D reconstruction process using NRecon, SkyScan software. This application applies modified Feldkamp reconstruction algorithm [19].
The foams were scanned with the energy 80 keV and 0.5 mm aluminum filter applied. Such set up provided optimal signal to noise ratio and minimalized beam hardening effect for all samples. The image pixel size was set to 11.9 µm. The reconstructed image data were subsequently binarized with the CTAnalyser software by SkyScan. Otsu method and adaptive (AT) method with a radius r of the image processing region equals to 8 pixels, were then used to obtain black and white images. In the next step, 3D morphometric analysis was performed for both Otsu and AT methods.

Fundamentals of the Otsu and Adaptive Thresholding
Global thresholding is the basic image binarization method. In this case, a threshold level is set based on the histogram of the whole reconstructed image or the set of images. Pixels corresponding to grey levels below the threshold become black (background), while the pixels corresponding with the given object become white (foreground). The global method is appropriate when the grey level histogram is bimodal. In case of small differences of the linear attenuation coefficients and high noise level, the background and foreground peaks can overlap. Global thresholding method is commonly used for solid foams characterization [7,11,12]. Otsu thresholding method is a highly applicable fully automatic global thresholding algorithm. It is based on separability maximization in the grey level classes. As a result one threshold value is determined for whole dataset [16].
AT method seems to be more precise. This method uses quite another algorithm. The threshold is derived for each pixel (voxel) separately. Grey level value in the given pixel is calculated as a mean of minimal and maximal values of grey levels within a sphere with an arbitrary chosen radius r (given in pixels). The sphere determines the image processing region, its center is placed in the considered pixel. If the calculated threshold level is lower than the grey level of an analyzed pixel, it becomes white, otherwise it becomes black.
AT method is commonly used to investigate, among others, a wide range of aspects related to the biology of bones and other calcified tissues, e.g. for trabecular bone morphometry [20]. Therefore, it would be interesting to determine whether this method of thresholding can be successfully applied to determine morphometric parameters of solid foams, as described elsewhere [8,12].
The contrast of all reconstructed images in the paper has been optimized to maximized image dynamic range. Based on the foam images obtained with the use of both thresholding methods the following geometrical parameters were determined: total volume, object volume and object surface. Besides geometry also morphology of the foams was determined by calculating the strut and pore diameters (Structure Thickness and Structure Separation respectively), total porosity and specific surface area. The mentioned parameters were calculated within the so-called volume of interest (VOI) using CTAnalyzer software (SkyScan, Bruker-MicroCT). We applied cylindrical VOIs in the present studies. The VOIs were completely filled with the investigated foams. Dimensions of the VOIs were approximately 5 % smaller than the samples sizes. The geometrical parameters are defined as: total volume is simply the volume of VOI, object volume is the volume of all struts within the VOI and object surface is the struts surface. Specific surface area means the ratio of the object surface to object volume measured within the VOI. Pore and strut dimensions are indicated in Fig. 1. The figure presents main components of a typical foam structure, i.e. cells (approximately spherical or elliptical voids), win-

Results
In Fig. 2 we present 3D volume rendering models of Al-10, Al-40 and NiCr foams used in the present study. As it is clearly seen, the sample structures are significantly different in respect to pore and strut size. The Otsu and AT image segmentation yield very similar pore diameter distributions in the case of NiCr foam. This is seen in Fig. 3. The analogous distributions measured for the Al-20 and Al-40 foam are presented in Fig. 4. Although in this case the distributions are not as smooth as those in Fig. 3, a close similarity between the pore diameter distributions obtained with Otsu and with AT thresholding is seen as well. The same similarities were found for Al-10 foam.    In contrast to the pore size distributions, strut diameter distributions of the foams are sensitive to the thresholding method. These distributions are given in Figs. 5 and 6 respectively for NiCr and Al-10, Al-40 foams. A large impact of the thresholding method on the strut diameters is especially visible for Al-X foams. In Fig. 6, the thresholding method affects both the distribution shape and strut diameter values for each Al-X sample.
In Tables 1 and 2, the average values of geometrical and morphological parameters studied are collected respectively for NiCr and Al-X foams respectively. The results for both binarization methods are given with their relative difference D equal to (Otsu-AT)/Otsu . 100 %.
Morphological parameter of NiCr foams are only weakly dependent on the thresholding method applied. This conclu-sion stems from the results given in Figs. 3, 5 and in Table  1. Figure 5 shows that the strut diameter distribution of NiCr foam, calculated with AT algorithm (Fig. 5) is slightly shifted towards smaller diameters with respect to the Otsu distribution. Therefore, in Table 1 the average diameter obtained with AT algorithm is smaller than this one obtained with Otsu thresholding. The remaining parameters possess similar values regardless of whether AT or Otsu procedure was applied.
The choice of the thresholding method has an particularly strong influence on certain morphology parameters of Al-X foams. It is clearly visible in Fig. 6 that, unlike the pore diameter, the AT algorithm leads to the strut diameter reduction compared to the Otsu method. In addition, the shape of strut diameter distribution significantly differs between the Otsu and AT approaches. These two facts results in so great difference in the corresponding average strut diameters in Table  2. Table 2 also shows increased values of the object surface and of the specific surface area for AT in comparison to Otsu algorithm.

Discussion
To establish an influence of thresholding procedures applied, we analyzed the raw reconstruction and the single crosssection image binarized with Otsu and AT methods for each investigated foam. This analysis is shown for Al-10 in Fig.  7. The small white areas in the figure are cross-sections of the foam struts. Fig. 7c displays that the use of AT method discloses black dots inside some, mostly large size, struts. The black spots in Fig. 7c suggest that real fine pores inside the struts exist. However, it should be stressed that the spots neither exist in the original non-binarized image (Fig. 7a) nor were found in the image achieved by Otsu method (Fig. 7b). This fact allows us to make an assumption that the detected spots are rather virtual objects.
The appearance of the spots affects strut diameter calculations with AT algorithm as explained in Fig. 8. The figure presents in a simplified way the principle of the strut diameter calculations used in the present work. The circles denote cross-sections of spheres inscribed inside struts [21]. It is evident that the spots appearing in the strut interior reduce their outer dimensions. The former and the latter case reflect respectively in Fig. 7c, b. It is comprehensible now why the strut diameter distributions given in Fig. 6 differ between the Otsu and AT approaches. The pores have also a serious impact on two other quantities characterizing foams, i.e. on the object surface and the specific surface area. This is clearly visible for the Al-X foams ( Table 2). Of course, the internal microstructure of struts does not have any influence on the pore dimensions.
Using Fig. 9, an analysis like described above can be performed for NiCr foams. In contrast to Al-X case, the figure shows that the black dots are visible in the raw image and in both Otsu and AT images. These findings, especially the presence of the spots in the original non-binarized picture (Fig.  9a), strongly point out the presence of real fine pores localized inside the NiCr struts. Thus, the distribution of the struts   outer dimensions (Fig. 5) obtained with Otsu algorithm may be distorted by the pores present within the struts. This corresponds to right part of the Fig. 8. The outer dimensions can be roughly estimated only from a high diameter side of the Otsu distribution. AT thresholding is more sensitive method to detect low size pores than Otsu thresholding (see Sect.2.1). These fine pores, together with the pores detected under Otsu thresholding, are responsible for the strut diameter distribution obtained with AT algorithm (Fig. 5). As expected, the low size pores make very low contributions into the object surface and the specific surface area (Table 1). Summarizing the discussion presented, black spots within struts may indicate artifacts created by the thresholding method, or they can represent truly existing closed/open fine pores inside the struts. Only the accurate comparison between the thresholded and non-thresholded raw images may give the unequivocal answer. The spots inside the Al-X foams were generated only by the adaptive thresholding method. As mentioned above, they were rather virtual objects than real pores.
From the point of view of micro-CT application to cellular structures characterization, it is important to answer two questions. Firstly, what is responsible for the spots production inside Al struts and secondly, what is an impact of the radius of the image processing region used in binarization with the AT method on results obtained with this method.
To answer these questions a simple experiment was performed. The solid homogenous aluminum cylinder of 1.6 mm in diameter and 1.6 mm in high was used as the phantom of single separated foam strut. The pixel size was set to 11.9 µm, like for the measurements presented in Sect. 3. After the scanning and reconstruction procedures, the images obtained were binarized with the AT method using various r radius (1-50 pixels) of the image processing region. The results are given in Fig. 10. For a comparison, the Otsu method was applied. Again, the AT procedure has generated a number of spots inside the phantom images obtained for r below 50 pixels. The area occupied by spots is encircled by a homogenous ring of well-defined thickness, R, which depends on the radius of image segmentation (Fig. 10a). The ring area is dots-free, therefore the diameter distribution plot is expected to be dominated by a peak localized at the diameter equal to the ring thickness (see also Fig. 8). The distributions obtained for different r values are given in Fig. 10b. For r below 50 pixels, they reach maxima at the ring diameters pictured in Fig.  10a. For r equal to 50 pixels, R reaches 0.8 mm, the crosssection image is dots-free and the strut distribution peaks at 2R, which is at 1.6 mm. The ring thickness scales linearly with the radius r applied in the AT method. As expected, the effect of spots generation by AT procedure has a large influence on the calculated volume of the sample. This is exposed in Fig. 11. For instance, it may be estimated from the figure, that for r equal to 10 pixel for instance, the calculated volume includes only about 70 % of the real sample volume. The remaining part is filled by the artifacts generated by the applied thresholding procedure.
The tests with Al phantoms lead to the conclusion that the maximum strut diameter which can be correctly calculated based on the AT images is equal to 2R, where R is determined by the applied radius of the image processing region. It would be instructive to confront this criterion with the results given in Sect. 3. The measurements in Sect. 3, performed for r equal to 8 pixels and the corresponding R is about 0.17 mm as follows from Fig. 10. Thus, in case of Al-X foams, only the struts with diameters less than or equal to 0.34 mm could be measured correctly. The imposed limitation is not fulfilled, it is clearly seen in Fig. 6 that the strut distributions obtained with Otsu procedure, extends up to about 1 mm.
To search strut diameters of 1 mm or even larger, R value must equal at least 0.5 mm. This implies, according to the plot in Fig. 11, r value exceeding 30 pixels. Less than 10 % of the sample volume is occupied in this case by the artifacts (Fig.  11). We repeated the measurements of the Al-X foams using AT binarization with r equal to and exceeding 30 pixels. In Fig. 12, we present the obtained cross-section images binarized by AT method for the Al-10 foam. The dots are observed only inside the strut of largest size. The dots concentration gradually decreases with increasing r value. For r equal to 45 Fig. 11 The impact of the radius of the image processing region on the calculated volume of Al phantom. The volume calculated with global thresholding is also included for completeness. The line is drawn to guide the eye Fig. 12 The cross-section images of the Al-10 foam, received for four different regions of image processing, applied in adaptive thresholding. From a number of analyzed images, the cross-section that reveals the strut of largest size at r equal to 30 pixels, is chosen for presentation. The white areas are the cross-sections of the foam struts. Circles represents the region of interest pixels, the artifacts disappear. The obtained pore distributions are independent on applied r value. The strut diameter distributions are very similar to the distribution obtained with the use of Otsu method (Fig. 6). The average strut diameter agrees, within the measurement accuracy, with the value given in Table 2 for Otsu method. In future investigation Xray simulations will be considered to make the observations clearer and to distinguish different sources of artefacts.

Conclusions
In this work we performed basic size characterization of pores and struts of open-cell metallic foams, using microcomputed X-ray tomography. To exhibit a wide range of pore and strut size, different types of aluminium alloy foam and nickel-chromium foam were chosen. The 3D images obtained were processed and analyzed. The final processing step is the image segmentation procedure which establishes the separation between the voxels belonging to strut network and to the gaseous phase in pore-cells. The carried out segmentation determines access to detailed morphometry of foams. For each foam sample studied, we performed the image segmentation by global and adaptive thresholding.
It turns out that both the thresholding techniques yield almost identical pore diameter distributions of the nickelchromium foam. The pore distributions in all types of aluminum alloy foams also show a close similarity for the Otsu and adaptive thresholding. In contrast to the pore size distributions, strut diameter distributions of the foams are sensitive to the thresholding method. A large impact of the thresholding method on the strut diameter distributions was observed for aluminum alloy foams especially. This effect was caused by black dots production inside the struts by adaptive thresholding. To obtain a closer insight into the observed effect, we performed the measurements with the solid homogenous aluminum phantoms using the adaptive threshold with different radius of the image segmentation region. Finally, based on the obtained results, we established the radius value at which the Otsu and adaptive thresholding supply very similar size characterization of pores and struts of aluminum alloy foams.