Introduction

Among the methods for determining porosity, density measurement and x-ray radiography (2D) are mainly used in industrial quality control. In contrast, the analysis of 3D CT and 2D microscopic images is used in technological developments. Each of the methods has its own characteristics, so the scope of the investigation (2D, 3D), the measurement accuracy, the equipment and time requirements, the costs, and the complexity of the tests are different (Table 1).

Table 1 Advantages and disadvantages of the methods

Due to the short time required, the density measurement according to Archimedes’ principle [1] is the most commonly used method for quality control. The porosity of a specimen can be calculated from the density using Eq 1.

$$ V_{{\text{V}}} = \left( {1 - \frac{{\rho_{{{\text{specimen}}}} }}{{\rho_{{{\text{alloy}}}} }}} \right)100 $$
(1)

where VV is the porosity (or volume fraction) (%), ρspecimen is the density of the specimen to be tested (g/cm3), and ρalloy is the density of the alloy (g/cm3) [2]. With this method, the total pore volume of a sample can be calculated in a short time. However, when measuring the density, the pore openness, the fluid medium used for measurement, and the surface quality of the sample affect the result. Liquid (e.g., distilled water, ethanol, or acetone) can flow into the open pores, which is affected by the openness of the pores and the surface tension between the liquid and the specimen. To increase measurement accuracy, samples can be cleaned by heating, and when immersed in water, air bubbles on the surface should be removed mechanically [1, 3, 4]. The measurement method is time and cost-efficient. During the radiographic examination, which is also often used in quality control, the samples are transilluminated with x-rays. The projection x-rays of the test specimens show cracks and pores, but the location of voids in 3D cannot be accurately identified, and the resulting image is less detailed [5, 6].

Like the previous methods, computed tomography (CT) is also non-destructive. The projection x-ray images of the examined sample are reconstructed to create a virtual 3D equivalent of the specimen. With this method, the distribution, spatial extent, size, and morphology of the pores can be better observed, and their volume more accurately determined [4, 5, 7,8,9,10,11,12]. The accuracy of the examination is influenced by the quality and resolution of the images and the process of computer analysis (filters, image transformations, detection threshold). The quality of the image is determined by the contrast between the phases and artifact reduction. The contrast of the image is influenced by the quality of the material, the thickness of the specimen, and the scanning parameters. The more detailed the image, the more accurately the pore characteristics can be determined, and the phases can be better separated [13]. The time required for the scan depends on the type of scan and the evaluation process, but is moderate overall compared to the other methods. The disadvantage of this method is that it requires expensive equipment [3, 4, 6, 10, 14].

The phases can also be characterized by analyzing 2D x-ray images of the 3D reconstructed specimen. Sectional analysis can be performed in two ways: either using the same evaluation parameters as the 3D image [4, 13, 15] or by analyzing the sectional image with image analysis software. The method can be used to examine the entire cross or longitudinal section of the sample. The accuracy of the measurement is affected by the resolution of the image, the degree of magnification, and the number of sections. The resolution of 2D images depends on the image format used. The images must represent the spatial structure in order to obtain statistically correct results. The accuracy of the measurement is also affected by the choice of detection threshold, the contrast of the image, and the complexity of the structure. The time required for the test is moderate [14].

There are exact correlations between the area fraction (AA) and the volume fraction (VV) measured in 2D and 3D, and their average values are the same (AA = VV), so the values measured in 2D can be compared with the 3D results. The 2D test is statistically representative of the 3D structure if the phase examined is randomly located and there is no orientation. If its location is oriented, it is necessary to take sections in several directions for examination [16,17,18].

In addition to computed tomography, the conventional method of examination is image analysis of microscopic images of metallographic sections, which is a destructive procedure. The method does not require such expensive equipment as, e.g., CT, but the images are much more detailed. The disadvantage of this procedure is that it is time-consuming to take and analyze a statistically sufficient number of images. In this case, more graphs are required than with the 2D CT method. If the pore distribution is inhomogeneous, it is worthwhile to perform the test on a multidirectional section. When microscopic images are analyzed, it is more difficult to determine the characteristics of the pores, as only their 2D extent is visible. The test result depends on the quality of the preparation and the location of the section. In the case of a spherical phase (e.g., gas porosity), the section’s directional dependence is much lower than in the case of a phase with complex morphology (e.g., shrinkage porosity). A phase with a complex morphology may appear on the section in several smaller parts, even with a circular cross-section morphology [1, 3, 4, 6, 10].

The porosity testing methods presented (with the exception of the radiographic test) were compared from different aspects. Most commonly, studies were performed on laser-melted powder samples [1, 4, 9, 15, 19,20,21,22] but pressure [6] and gravity die castings [14] as well as 3D printed cementitious materials [23] and plasma-sprayed alumina coatings [24] were also included. In the density measurements, in addition to porosity, the results were expressed in relative density and compared with other methods (3D CT; 2D CT; OM). The research results are summarized in Tables 2, 3 and 4. The tables detail the material, the technology used, the methods, the comparison of the results obtained, and the possible reasons for the differences.

Table 2 Comparison of porosity results measured by analytical methods
Table 3 (Continued) Comparison of porosity results measured by analytical methods
Table 4 (Continued) Comparison of porosity results measured by analytical methods

Experiments

In order to compare the different testing methods (3D CT, 2D CT, OM), the porosity results of cast aluminum specimens with different densities were determined. A schematic flowchart of the tests performed is presented in Fig. 1, where the directly compared methods are marked.

Fig. 1
figure 1

The schematic diagram of the tests carried out. The tests are indicated by numbers (1–7) with abbreviations, which are also shown pictorially in Figs. 5 and 6. The lines on the right indicate the testing methods compared, highlighted in gray where morphological transformation was examined and in red where volume or area size was changed

Due to the open pores, porosity could not be determined by method 1. For this reason, the morphological transformation was performed on the images, and we studied the effects of this transformation (methods 3 and 4). According to the literature [1, 20], the volume examined affects the porosity results of the CT scans. Therefore, we investigated the effects of volume (methods 2 and 4) and area variation (methods 5 and 6). Finally, the results were compared with those obtained by analyzing OM images.

Materials

In industrial practice, the dissolved hydrogen content of melts is detected by casting reduced pressure test (RPT) samples that solidify at 8 × 10–3 MPa. During solidification, the solubility of hydrogen decreases. Under vacuum, the low hydrogen content and density differences become more detectable due to the expanding pores. In addition to the hydrogen-induced pores, inter-dendritic porosity and air bubbles trapped during the casting are also present [11, 25, 26].

In our research, we tested RPT specimens of AlSi7MgCu0.5 alloy. A total of 6 specimens were cast from different dissolved hydrogen-containing melts, so they have different porosity levels and different densities. The density of the specimens was measured according to Archimedes’ principle using an MK3000 type equipment. The mass of the test specimens was measured both in air and immersed in distilled water, and the density was calculated using Eq 2. The densities of the test specimens are the following: 2.661; 2.659; 2.593; 2.554; 2.496 and 2.468 g/cm3. Images related to sample casting and density measurement are shown in Fig. 2.

$$ \rho_{{{\text{specimen}}}} = { }\frac{{m_{{{\text{in}}\;{\text{air}}}} }}{{m_{{{\text{in }}\;{\text{air}}}} - m_{{{\text{in }}\;{\text{water}}}} }}\rho_{{{\text{water}}}} $$
(2)
Fig. 2
figure 2

(a) Preparation of the melt, (b) the RPT specimen (the red line indicates the location of the longitudinal section to be polished), and (c) the MK3000 density meter

where ρspecimen is the density of the specimen (g/cm3), min air is the mass of the specimen in air (g), min water is the mass of the specimen in distilled water (g), and ρwater is the density of distilled water (g/cm3).

Structural Testing Methods

Computed tomography scans were performed using an YXLON FF35 micro-CT with a double x-ray tube in the 3D Fine Structure Testing Laboratory. Specimens were projected by axial helical rotation (553°, 1383 images/specimen) using a transmission x-ray tube and a 0.1 mm Cu filter. The accelerating voltage was 125 kV, and the tube current was 70 μA, resulting in a power of 8.8 W. The focus detector distance (FDD) was 700 mm, and the focus object distance (FOD) was 105 mm. The resolution was 20.9 μm, corresponding to a magnification of 6.67x. VGStudio MAX version 3.3 (abbreviated VGS) was used for reconstruction and evaluation.

Examination of the Complete Volume

The 3D evaluation process is shown in Fig. 3. In order to improve the quality of the image, an Adaptive Gaussian noise filtering was applied, which adapts to both bright and dark parts. With this type of filtering, the noise in the image was smoothed out, but the pores remained well defined. In the filtering process, the spatial kernel matrix used by the software averages the gray levels according to their distribution by adaptively varying the weights in it [17]. This average value becomes the new smoothed gray level of the voxel in the center of the spatial matrix. The smoothing is shown in Fig. 4a and b. Then, the surface area of the pores was determined, as shown in Fig. 4d, by defining the grayness level of the voxels at the boundary between the pores and the aluminum phase. Next, the pores were detected using the OnlyThreshold computer algorithm based on the grayness threshold value alone, as shown in Fig. 4e. Finally, the volume of the pores was determined using the software.

Fig. 3
figure 3

The schematic diagram of the evaluation of 3D CT images. The steps are illustrated in Figs. 4 and 5

Fig. 4
figure 4

The analysis steps of 3D CT images: (a) the original, noisy image; (b) noiseless image with Adaptive Gaussian filtering; (c) pore structure with closing (pores are dark with lower grayness level); (d) determination of pore surface area; (e) detection of pores

After the analysis, the internal pore structure was visible in space. The pores in the test specimens had a complex morphology, and the larger pores were interconnected by narrow pore channels and extended to the surface of the specimens. They were open. As a consequence, they were interconnected with the air around the specimen during the analysis. This is shown in Fig. 5a. To eliminate the openness of the pores, an additional transformation was performed on the Adaptive Gaussian smoothed gray image. The channels connecting the pores were closed by morphological transformation (closing) in 5 steps (5 × 5), which involves five steps of dilatation and five steps of erosion of the aluminum phase. During the morphological transformation, the gray level of each voxel (pixel in 2D) is changed according to the gray level of the neighboring voxels by minor/major contact. Erosion and dilatation are complementary operations. The size and shape of the neighborhood under consideration is defined by a structural element, such as a 3 × 3x3 voxel cube (in 2D, a 3 × 3 pixel square). Thus, the dilatation of the grayscale is the substitution of the value of a voxel by the maximum of the grayscale values of the group formed by itself and its 26 neighbors, whereas during erosion it is the minimum [17]. Upon dilatation, the grayness level of the boundary voxels of the selected objects (in this case, the aluminum) increases, so the number of voxels characterizing aluminum increased. During erosion, the gray level of the boundary voxels decreases, i.e., the number of voxels characterizing aluminum decreased. The closing is an irreversible image transformation and can therefore be used to close pore channels. The closing effect is shown in Fig. 4b and c. After the transformation, the pores were less interconnected and had little or no contact with the air around the specimen, so the amount of porosity could be determined. The change in the analyzed pore volume is shown in Fig. 5b.

Fig. 5
figure 5

Analysis with VGStudio MAX 3.3: (a) analysis without closing – open pores running out to the surface (CT_VGS); (b) analysis with closing – closed pores (CT_VGS 5 × 5 Closing); (c) analysis of cylinder volume without closing (CT_VGS Cylinder); (d) analysis of cylinder volume with closing (CT_VGS Cylinder 5 × 5 Closing)

The smallest pore volume considered in the evaluation was 0.001 mm3. The volume fraction of pores in the specimen was calculated as a percentage (3).

$$ V_{{\text{V}}} = { }\frac{{V_{{{\text{pores}}}} }}{{V_{{{\text{specimen}}}} }}100{ } $$
(3)

where VV is the porosity of the specimen (%), Vpores is the total pore volume (mm3), and Vspecimen is the specimen volume (mm3).

Examination of Virtually Modified Volume

In order to investigate the effect of morphological transformation (closing) on the porosity content (3), the cylindrical volume of the specimens with and without closing of the pore structure was also analyzed. The pores in the volume were open, but this was no longer a problem, because there was no air volume around the volume examined. An analyzed cross-sectional image of the cylinder volume without morphological transformation is shown in Fig. 5c, and another image of the cylinder volume with morphological transformation is shown in Fig. 5d.

The results of the analysis of the morphologically transformed cylinder volume were compared with the results of the complete volume in order to determine the effect of the size of the volume under analysis.

Image Analysis of 2D Images

The publicly available ImageJ (abbreviated IJ) image analysis software [27] was used for the image analysis of 2D images. To determine porosity, pores were detected on the images by selecting the appropriate grayscale threshold value and then the area fraction of pores was calculated as a percentage (4).

$$ A_{{\text{A}}} = { }\frac{{A_{{{\text{pores}}}} }}{{A_{{{\text{specimen}}}} }}100{ } $$
(4)

where AA is the porosity of the specimen (%), Apores is the total pore area (mm2), and Aspecimen is the total area of the examined longitudinal sections (mm2).

From the complete 3D x-ray images, 18 longitudinal serial sections were obtained at 2 mm intervals in each specimen and subjected to Adaptive Gaussian filtering. The resolution of the 2D images was 70.4 μm. Figure 6a shows a detected image of a longitudinal section of the complete specimen. The evaluation was also carried out on the cylindrical volume parts of the same sections. The extent to which the modification of the test area affects the measured porosity value was determined. Figure 6b shows the same longitudinal section but for the cylindrical volume. Here, only 13 images were analyzed per specimen due to the reduction in volume.

Fig. 6
figure 6

Image analysis with ImageJ: (a) the longitudinal sections of complete volume (CT_IJ) and (b) the longitudinal sections of the cylindrical volume (CT_IJ Cylinder section); (c) the microscopic images (OM_IJ)

For optical microscopy (OM), samples were prepared by grinding (220, 320, 500, and 800 grit sandpaper) and polishing (3 μm diamond paste). Ultrasonic cleaning was also performed to ensure pore cleanliness. One longitudinal section was made of each specimen; then, 60–70 optical micrographs at 50 × magnification were taken using a Zeiss Axio Imager M1m microscope. The resolution of the images was 1.8 μm. Figure 6c shows the detected pores.

The parameters of 2D and 3D analyses used to determine porosity, as detailed in the text and illustrated with figures, are summarized in Table 5.

Table 5 Measuring parameters

Results and Discussion

The aim of the studies carried out in this investigation was to compare methods for determining porosity from different points of view. The structure of the pores in the specimens is presented, as well as the effect of morphological transformation and variation in the volume or area under investigation (ROI) on the measurement results. The factors affecting the measurement results, such as the size, shape, distribution, and openness of the pores, are described for each method. Then, the porosity results obtained with the methods and their correlation with each other are presented.

Characterization of Pores

Structural observations of the pores are presented on the cylindrical volume without morphological transformation (CT_VGS Cylinder). Specimen densities, measured porosity values, and descriptions of pore structure are summarized in Table 6. 3D CT images of the pore structures are shown in Fig. 7.

Table 6 Relation between density, porosity and pore structure
Fig. 7
figure 7

Showing pore structures in the 3D analysis of the cylindrical volumes without morphological transformation (CT_VGS Cylinder). Samples with a density of (a) 2.661 g/cm3; (b) 2.659 g/cm3; (c) 2.593 g/cm3; (d) 2.554 g/cm3; (e) 2.496 g/cm3; (f) 2.468 g/cm3

Specimens with a porosity of 2–3% contain inter-dendritic pores with complex morphology, connected by pore channels. The volume of the sample with a density of 2.661 g/cm3 contains one smaller complex pore and several smaller separate pores. The volume of the sample with a density of 2.659 g/cm3 contains one larger complex pore and a few smaller, more or less separate pores. Samples with a porosity of 6–7% contain, similarly to specimens with a porosity of 2–3%, inter-dendritic pores of complex morphology connected by pore channels. One large complex and several smaller, individual pores occur in the volume. In samples with a porosity of 12–13%, more spherical pores connected by thicker pore channels occur. Thus, the specimens contain one large, full-volume complex and a few medium-sized but simpler pores.

Effect of Morphological Transformation (Closing)

The effect of closing-type morphological transformation was investigated because this grayscale transformation was needed to determine porosity when analyzing 3D CT images, and because it is one of the most commonly used image transformation methods. With a closing-type morphological transformation, the pore channels in the pore structure are closed, thereby reducing the volume of the pores. In examining the effects of morphological transformation, we have determined the percentage of pore volume lost by the closing.

The amount of porosity and the size, shape, and complexity of the pores impact the amount of porosity reduction that occurs with closing. Since the sealing process occurs at the interface of the phases, the specific surface area of the pores will affect the rate of reduction.

The structural observations of the pores and the measured porosity values are summarized in Table 6. Figure 8a shows the measured porosity values (3) and the relative porosity difference (5). The morphologically transformed pore structures are shown in Fig. 9. The initial pore structure is already shown in Fig. 7.

$$ \Delta V_{{{\text{V}}\;{\text{rel}}}} = \left| {100 - \left( { \frac{{V_{{{\text{V}}\;{\text{ closed }}\;{\text{cylinder}}}} }}{{V_{{{\text{V}}\;{\text{original }}\;{\text{cylinder}}}} { }}}} \right)100} \right| $$
(5)

where ∆VV rel is the relative porosity difference (%), VV original cylinder is the porosity of cylinder volume without morphological transformation (CT_VGS Cylinder) (%), and VV closed cylinder is the porosity of cylinder volume with morphological transformation (CT_VGS Cylinder 5 × 5 Closing) (%).

Fig. 8
figure 8

The measured porosity values and the relative porosity differences: (a) the effect of morphological transformation, (b) the effect of changes in examined volume and (c) the effect of changes in analyzed longitudinal section area on porosity results (The porosity value in the specimen with a density of 2.659 g/cm3 measured by the OM_IJ method was an outlier and was not plotted.)

Fig. 9
figure 9

Showing pore structures in the 3D analysis of the cylindrical volumes with morphological transformation (CT_VGS Cylinder 5 × 5 Closing). Samples with a density of (a) 2.661 g/cm3; (b) 2.659 g/cm3; (c) 2.593 g/cm3; (d) 2.554 g/cm3; (e) 2.496 g/cm3; (f) 2.468 g/cm3

The rate of relative porosity reduction by morphological transformation is due to the porosity content, pore volume, and morphology of the samples. At approximately the same porosity level, porosity decreased to a greater extent where the pore morphology was more complex. Thus, for specimens with a porosity of 6–7% (2.593 and 2.554 g/cm3), the pores in the 2.554 g/cm3 specimen were more complex, and for specimens with a porosity of 2–3% (2.661 and 2.659 g/cm3), the pores in the 2.659 g/cm3 specimen were more complex. The pore morphology of the specimens with a porosity of 12–13% was similar to that of the previous samples based on the 3D images, but less complex, and there were less fine pore channels in their pore structure. There was a difference in the size of the pores between the samples with a porosity of 12–13%.

Among the specimens with involved pores (2%, 3%, 6%, and 7%), those with lower porosity showed a lower relative porosity reduction. The more the amount of thin pore channels in the test sample, the greater the reduction in the volume of the measured pores due to the closing. At the same time, the closing is also suitable for characterizing the morphology of the pore structure. If there is a slight reduction in porosity due to the closing for the same porosity, spherical pores are more likely to be present in the structure.

Effect of Volume and Area Changes

When examining the effect of volume reduction, the results for the complete specimen volume and the modified cylindrical volume were compared. As the complete volume analysis was only possible by morphological modification (closing) of the gray image, it was compared with the morphologically transformed cylindrical volume. The cylindrical volume was 55–62% of the total volume. Figure 8b shows the measured porosity values (3) and the relative porosity difference (6), while Fig. 10 shows the pore structures in the total volume. The pore structures in the cylindrical volume are shown in Fig. 9.

$$ \Delta V_{{V\;{\text{rel}}}} = \left| {100 - \left( { \frac{{V_{{V\;{\text{closed}},{ }\;{\text{cylinder}}}} }}{{V_{{V\;{\text{closed}},{ }\;{\text{complete}}}} { }}}} \right)100} \right| $$
(6)

where ∆VV rel is the relative porosity difference (%), VV closed, total is the porosity of complete volume with morphological transformation (CT_VGS 5 × 5 Closing) (%), and VV closed, cylinder is the porosity of cylinder volume with morphological transformation (CT_VGS Cylinder 5 × 5 Closing) (%).

Fig. 10
figure 10

Showing pore structures in the 3D analysis of the complete volumes with morphological transformation (CT_VGS 5 × 5 Closing). Samples with a density of (a) 2.661 g/cm3; (b) 2.659 g/cm3; (c) 2.593 g/cm3; (d) 2.554 g/cm3; (e) 2.496 g/cm3; (f) 2.468 g/cm3

The porosity value measured in the cylindrical volume was more significant than for the total specimen volume, but the rate of increase was different for each specimen. The increased porosity due to the decrease in volume is related to the inhomogeneous distribution of pores observed in the 3D pore structure. Previous publications have also mentioned that the size of the volume under investigation causes porosity deviation when the pore structure is inhomogeneous [1, 20].

The pore structures of the two specimens with the highest density are similar. Inside the specimens, a single, continuous interconnected dendritic pore structure, surrounded by several smaller pores is visible. Based on the 3D images, the distribution of porosity is inhomogeneous. By modifying the volume, a significant fraction of the smaller pores around the interconnected larger pore were not taken into account in the measurement. Of the two specimens with the highest density, the 2.661 g/cm3 specimen had a smaller increase in porosity because the size of the continuous pore inside the specimen was smaller than the pore inside the 2.659 g/cm3 specimen (Figs. 8b and 10).

The pore structure of the two medium-density specimens differs, although the measured porosity values are almost identical. The sample with a density of 2.554 g/cm3 has a less connected pore structure with several smaller pores and covers almost the entire volume. Only a few tiny discrete pores are visible on the upper 1/6 of the specimen and on the lateral edge. The distribution of porosity is relatively homogeneous. A continuous interconnected dendritic pore structure with pore channels is visible inside the specimen with a density of 2.593 g/cm3. This is surrounded by a few smaller pores, which occur in places, and are located in the upper 1/3 of the specimen. The pore distribution is inhomogeneous. The change in volume has not significantly altered the pore structure and the size of the contiguous pore. Discrete pores occurring at the edges were not taken into account in the measurement.

The pore structures of the two specimens with the lowest density are similar, both are complex. The spherical pores are interconnected through pore channels and form a large volume. This structure covers the entire volume and is surrounded by a few smaller pores. The 3D images show a relatively homogeneous distribution. As a result of the volume change, the volume of the pores with complex structure was reduced and some of the smaller pores were not taken into account in the measurement.

Based on these observations, the pore structure in the three specimens with the lowest density tends to be homogeneous, while the pore structure in the three specimens with the highest density is rather inhomogeneous. In the case of a relatively homogeneous pore distribution, the relative increase in porosity due to volume reduction is slight. The more inhomogeneous the distribution, the greater the increase in the rate of porosity. In absolute terms, the difference in porosity is similar, but as the density increases, the relative porosity difference increases (Fig. 8b).

For the 2D studies, the effect of the change in the longitudinal area of the total and cylindrical volumes was investigated using ImageJ image analysis software. The pore structures were only subjected to Adaptive Gaussian filtering.

The measured porosity values (4) and the relative porosity difference (7) are shown in Fig. 8 (c). These results show a similar trend to the volumetric results. As the density increased, the porosity decreased. The cylindrical volume sections had higher porosity than the entire specimen sections, which is also related to the distribution of pores. The increase in porosity due to area modification was smaller than that of volume modification.

$$ \Delta A_{{{\text{A}}\;{\text{rel}}}} = \left| {100 - \left( { \frac{{A_{{{\text{A}}\;{\text{cylinder}}\;{\text{section}}}} }}{{A_{{{\text{A}}\;{\text{complete}}\;{\text{section}}}} }}} \right)100} \right| $$
(7)

where ∆AA rel is the relative porosity difference (%), AA original complete section is the porosity from the longitudinal sections of complete volume (CT_IJ) (%), and AA original cylinder section is the porosity from the longitudinal sections of cylinder volume (CT_IJ Cylinder section) (%).

A change in the size of the test volume or section in the direction of higher or lower porosity values may affect the measured results, depending on the homogeneity of the porosity and the location of the test volume or section within the sample. Furthermore, the size of the pores also affects the results. If there is a larger pore inside, a significant difference in porosity may occur due to the changing in volume (as shown in the samples with a density of 2.661 and 2.659 g/cm3 in Figs. 8b, 9 and 10). In different ways, it has been stated in a number of publications that the determinable porosity is influenced by the size of the volume and the area under investigation [1, 9, 20, 23].

The experiments can be used to determine the distribution of porosity by varying the size of the test volume or area. If the porosity is the same in the smaller and larger regions examined, the distribution of pores is homogeneous.

Correlation Between Porosity Determination Methods

In this study, the observed pore structure (size, morphology, distribution) influenced the applicability of the different methods, and we found advantages and disadvantages. Therefore, in Table 7, we have summarized the influence of pore structure on the measurements, i.e., whether they are well measurable, measurable, or less measurable.

Table 7 Possibility of examining the structure for the different methods

Pores connected by smaller, thinner pore channels can be measured well on optical microscopy images (OM_IJ) but less well on 2D (CT_IJ) and 3D (CT_VGS) CT images due to their lower resolution. For this reason, thin channels are not visible or are of poor quality. As pore channels become thinner, they are less measurable. Pores connected by a larger, thicker pore channel can be measured by all three methods. For OM images, the magnification has to be chosen according to the size of the pores so that the pores fit as well as possible in the field of view and the smaller ones are clearly visible. For CT scans, the resolution may affect the result. In the case of separate, small pores, porosity can be measured well by analyzing OM images, but less well in 2D and 3D x-ray images due to the resolution. For large pores, the magnification of OM images significantly impacts the results, while the resolution of 2D x-ray images has less impact. In the case of inhomogeneous pore distribution, porosity is most difficult to determine by analyzing OM images, and 3D CT scans are the most suitable. Open pores running through the sample can be a problem when analyzing 3D CT scans if the air volume around the sample cannot be ignored in the analysis. Closing the pore channels that run out to the surface may be a solution, but this reduces the measurable porosity.

The highest porosity values were obtained by image analysis of optical microscopy images (OM_IJ) and by analysis of the cylindrical volume without morphological transformation (CT_VGS Cylinder) (in the OM method, the porosity result of the specimen with a density of 2.659 g/cm3 was out of range and is not shown in the diagram). These values were followed by the values obtained by image analysis of 2D x-ray images of the cylindrical volume (CT_IJ Cylinder section). Subsequently, even lower porosities were determined by measuring the morphologically transformed (CT_VGS Cylinder 5 × 5) pore structure of the cylindrical volume, except for the two highest density specimens. In all cases, the results measured on the cylinder volume were larger than the results on the total volume due to the reduction in the size of the volume (in 3D) and the area (in 2D). For the cylinder volume, the porosity was reduced by the effect of the closing.

The results obtained from the analysis of morphologically transformed images of the complete specimen (CT_VGS 5 × 5 Closing) and from the image analysis of entire longitudinal sections (CT_IJ) are the lowest. They are variable concerning each other. This is due to a combination of the resolution of the images, the reduction in pore volume with closing, and, to a lesser extent, the distribution of the pores.

The analysis of optical microscope images showed higher porosity than the analysis of 3D CT images. Similar observations have been made in the literature [15], but the data are not consistent in this area [6, 14, 20]. Analysis of the optical microscope images also revealed higher porosity than the 2D x-ray images. Similar results have been presented in previous publications [4, 23], although, in the case of [4], 2D x-ray images were analyzed with the same parameters as the 3D analysis. A specific analysis of 2D x-ray images was not found in the literature. However, in our study, we have found that the resolution of the images makes the method less suitable than other methods of analysis.

The differences observed are not only due to the methods used, but also to the pore structure of the specimens (as discussed previously). Considering the observed relationship between the methods and the pore structure (Table 7) and the measured porosity values, we conclude that the resolution has a significant effect on the results, especially for structures with thin pore channels. The higher the resolution of the images, the more accurate the results can be determined. The least accurate method of analysis is the image analysis of the 2D x-ray images, where the resolution is not sufficient.

Figure 11 shows the porosity values measured in specimens of different densities as a function of the resolution of the images (1.8, 20.9, and 70.4 μm). For a given specimen density, the highest porosities were obtained for optical micrographs with a resolution of 1.8 μm. The lowest porosity values were obtained when analyzing 2D x-ray images with a resolution of 70.4 μm (CT_IJ). The porosity obtained from the analysis of 20.9 μm medium resolution 3D CT images (CT_VGS 5 × 5 Closing) is medium. Considering the fact that the structure investigated underwent a morphological transformation, thus reducing the measurable pore volume, it explains that the porosity values for the specimens with a density of 2.554 and 2.593 g/cm3 are slightly lower and for the specimens with the highest density of 2.659 and 2.661 g/cm3 are almost the same.

Fig. 11
figure 11

Measured porosity values in specimens of different densities as a function of resolution. (The porosity value in the specimen with a density of 2.659 g/cm3 measured by the OM_IJ method was an outlier and was not plotted.)

Conclusion

In industry, density measurement and radiography are used to determine porosity for quality control, but microscopy and computed tomography are the most commonly used techniques for technological development. The pore structure (size, morphology, distribution) influences the applicability of the methods. In this study, the practical usability and measurement accuracy of the methods were compared and we came to the following conclusions:

  1. 1.

    In the case of pore structures with open pores, thin pore channels running out to the surface can be morphologically transformed into closed ones. The amount of porosity, the size, and the complexity of the pores influence the amount of porosity reduction that occurs. The more complex the pore structure, the more significant the reduction in pore volume. Nevertheless, the closing-type morphological transformation is suitable for characterizing pore structures. With a slight decrease in porosity, pores with less complex morphologies occur in the structure.

  2. 2.

    By changing the size of the test volume or area, the porosity distribution can be characterized since, in the case of an inhomogeneous distribution, the location of the test volume or section in the test specimen affects the result. In contrast, if the distribution is homogeneous, the result is unaffected.

  3. 3.

    By analyzing optical microscopy images, small pores and thinner pore channels can be measured well due to the excellent detail resolution, while larger pores and thicker pore channels can be measured by choosing the right field of view and magnification. The presence of open pores is not a problem for the accuracy of the measurement. The inhomogeneous distribution can be determined by taking a time-consuming series of sections, and a large amount of image processing is required within a single section. The maximum porosity values (for identical specimens) were determined by analyzing the OM images.

  4. 4.

    The inhomogeneous pore distribution is best assessed by 3D CT. However, this method can determine small pores and thinner pore channels with less accuracy. When open pores are present, the accuracy of the procedure depends on the degree of openness.

  5. 5.

    With 2D CT, larger pores and thicker pore channels can be measured well, while smaller and thinner ones are less so. The analysis of the distribution of the pores is not as time-consuming as the analysis of OM images, and the preparation of serial sections is simplified. The porosity values measured by 2D and 3D CT methods (the latter with 5 × 5 Closing) are identical, but with a maximum difference of 1%.