1 Introduction

In the field of geosciences, the application of advanced mathematical methodologies assumes a crucial role. Mathematics is instrumental throughout this study, spanning from image processing to pore network extraction and visualization.

Carbonate reservoir rocks have a complicated pore system as a result of sedimentological and diagenetic processes (Scoffin 1987; Arns et al. 2004; Flügel 2004).

Contrary to siliciclastic reservoirs, where the main component is the chemically resistant quartz, carbonate minerals (calcite and aragonite) are very susceptible to extensive diagenetic change, dissolution, cementation, recrystallization and replacement at ambient conditions in a variety of diagenetic environments or during a succession of diagenetic episodes.

Dissolution of carbonate minerals plays a determining role in the development of the pore system. This intricacy frequently results in a lack of interrelationships between porosity and permeability, making it difficult to characterize fluid flow through carbonates (Arns et al. 2004).

In recent years, the use of micro X-ray computer tomography (micro-XCT) imaging to assess the pore space of reservoir rocks has grown in popularity. This technique depicts 3D pore network at micron scale (Brunke et al. 2010), which can provide valuable information on the complex pore system of rock samples and their interrelationships between porosity and permeability. Prior to the availability of micro-XCT, 3D pore characterization could only be accomplished using statistical models to reconstruct 3D porous media from 2D thin section images (Hazlett 1995) or process-based models (Øren and Bakke 2002). Both statistical and process-based models have merits, but with the recent advancements in X-ray technology, complicated pore-networks in 3D down to sub-micron scale may now be seen (Brunke et al. 2007). Only 3D pore-network representation can improve the understanding of the evolution of porosity and permeability of a rock sample (Youssef et al. 2007a, b).

The efficacy of micro-CT imaging for characterizing pore network in sandstones and carbonates was presented by Al-Kharusi and Blunt (2007) and Chauhan et al. (2016). The authors demonstrated that this technique enables them to visualize the complicated pore network as well as identify different pore types and their interconnectedness. This data can be utilized to gain a better understanding of the processes that affect fluid flow in reservoir rocks. The authors used this technique to investigate the fluid flow in carbonate rocks and showed that the pore network geometry plays a critical role in determining the permeability of these rocks.

Laboratory experiments or well logs can be used to assess the porosity of reservoir rocks. These measurements can provide data on the overall pore space but cannot go farther in characterizing the pore organization, such as connectivity and coordination number. Where, the coordination number of a given pore represents the number of pore throats that are connected to and radiate out from that central pore node. Another limitation of these measures is that they cannot provide a three-dimensional extent of the pore network. Current improvements in micro-XCT enable a solution to this problem by quantifying pore network geometry from high-resolution 3D images (Al-Ansi et al. 2013; Andrä et al. 2013). The use of micro-XCT and image analysis has improved 3D material characterization, particularly for pore network geometry studies in micron scale.

To a large extent the success of pore network models depends on the way they represent the real pore space in terms of its geometrical and topological characteristics for a given application (Xiong et al. 2016). In CT scans, the pore space is segmented from the solid phase, yielding important geometrical properties such as pore size distribution, connectivity and tortuosity. Where, tortuosity is a property that characterizes the complexity of a pore network or flow path through a porous medium. Therefore, accurate image segmentation (separating the pore phase from the solid one) is the first step toward pore network modelling and analysis (Gonzalez and Woods 2008). The literature reports a variety of techniques for image segmentation, nevertheless, no universal segmentation algorithm can produce consistent results for every type of data (Wildenschild and Sheppard 2013). A sensitivity study by Leu et al. (2014) stated that the segmentation stage will determine the success or failure of the final results, demonstrating that a small bias in the accuracy of the binarization may cause a significant error in the calculated permeability (Leu et al. 2014).

In the recent past many articles described several methods of enabling the depiction of pore network in micron scale using mico-XCT measurement for instance. Absolute permeabilities were predicted by Al-Kharusi et al. (2007) through the utilization of newly extracted networks from a representation of Fontainebleau sandstone. Another study by Sok et al. (2010) integrated geological heterogeneity from centimetre (plug) scale to the 100 nm scale. A research conducted by Wang et al. (2012) encompassed the collection of 2D thin sections from carbonate images, undertaken at two distinct scales. These efforts culminated in the creation of detailed 3D digital models, capturing both macro and micro pores. By contrast only a few publications explain the origin of the various pore types while also depicting the pore network (Bauget et al. 2005;Knackstedt et al. 2006; Youssef et al. 2007a, b).

To fully comprehend the hydrocarbon reservoirs, it is crucial to investigate not only the 3D pore network, but also the sedimentological and diagenetic processes that have shaped them. Depicting the pore network in 3D on a micron scale may not provide a complete understanding of the geological processes involved in hydrocarbon exploration. Therefore in our study we employed a combination of micro-CT analyses, lab measurements and facies analyses. Using the methods outlined above, we can elucidate the reasons behind one section of the reservoir yielding productive results while the other remains dry.

The primary goal of this research is to advance our understanding of carbonate reservoir rocks and their intricate pore systems shaped by sedimentological and diagenetic processes. Specifically, this study aims to:

  • Compare productive and dry intervals in carbonate reservoirs using XCT, laboratory analysis, and microfacies characterization to understand productivity differences and gain a comprehensive understanding of pore systems at micron and millimeter scales.

  • Refine pore network models: improve accuracy by enhancing image segmentation for geometric properties extraction.

  • Explore pore types: investigate the origins of pore types and the processes influencing their formation through the application of microfacies analysis

2 Methodology

2.1 Rock sample

The samples investigated originate from an oil well drilled in the Mid-Hungarian Mega-Unit on the Northern part of the Somogy Dráva basin, SW Hungary. The well penetrated 24.5 m Sarmatian (Middle Miocene) limestone (Fig. 1).

Fig. 1
figure 1

a Well location is illustrated on map of Hungary after Pásztor et al. (2016) with the inset map Europe, b Gamma-ray log (TG) & lithological column. The black arrows indicate the position of the cores, porosity permeability logs for the cored interval and sample dimensions used for micro-XCT scan to the right

Fig. 2
figure 2

Workflow for the micro-XCT measurements: a Image acquisition, sampling, and removal of edge artifacts to mitigate effects such as beam hardening, b Utilization of machine learning techniques for image segmentation:—Employing unsupervised methods, including clustering and entropy analysis.—Employing supervised image classification methods, such as naive and k-fold approaches, c comprehensive validation of the segmentation outcomes through a comparative analysis of measured parameters, particularly focusing on the pore size distribution, d utilization of processed images to extract the intricate pore network. Modified after Youssef et al. (2007a, b), e derivation of key pore properties and statistical parameters from the extracted pore network, f a rigorous comparison of productive and unproductive intervals in a well under investigation

The limestone can be divided into two distinct sections based on their porosity and permeability characteristics. The lower (dry) part, which is very dense and tight, exhibits low porosity and practically zero permeability, with some few exceptions, and contains resedimented volcanic rock fragments. In contrast, the upper (productive) part is highly porous and permeable, making it more productive. Several unconformities can be found between the two parts, indicating either uplift or a drop in sea level (see Fig. 1). Our samples were collected from both the upper (1966 m and 1967 m) and lower (1979 m and 1980 m) intervals (see Fig. 2).

The primary goal of our study to understand the differences in the pore networks of productive and dry carbonates by utilizing high-resolution micro-XCT to characterize the pore network geometry at the micron scale. This approach allowed us to identify and implement robust image classification and segmentation techniques that significantly improved the probability of precise image segmentation. Micro-XCT is currently the only method that enables characterization and visualization of pore network geometry at such a small scale (Brunke et al. 2010). This technique facilitated the identification of relationships among different pore network parameters, such as coordination number, pore throat radius, throat length and porosity. Moreover, it allowed us to calculate permeability (Wildenschild and Sheppard 2013).

For all samples, cylindrical plugs were taken from the main cores with a diameter of 2 mm for µ-CT acquisition. The samples were scanned by the YXLON FF35 CT industrial micro-CT. The scanning parameters were: scan type cone beam stop and go, 140 kV accelerating voltage, focus object distance 8 mm, focus detector distance 700 mm. The resulting number of images was 1000/sample. For image segmentation and segmentation evaluation, one tomogram was used. To avoid artifacts occurring on the edges of the scanned sample—such as beam hardening—a sub-volume in the middle part of the image was extracted for segmentation. The resolution of the extracted sub-volume lattice for the four samples was 680 × 660 × 1000.

Our second goal was to compare the petrophysical parameters obtained by micro-XCT with the lab measures on the plugs. We cut standard core plugs (37 × 70 mm) from the same samples and conducted porosity and permeability measurements at the Research Institute of Applied Earth Sciences in Miskolc University. We compared the results of the laboratory measurements with those calculated from the micro-XCT images to verify the accuracy. Finally, we aimed to explain the reasons behind the differences in productivity between the upper and lower parts of the carbonate succession. Hydrocarbon exploration and exploitation require an understanding of the geology of the reservoir to recover more oil and gas with fewer wells and at minimal cost (Slatt 2009). Therefore, our study aimed not only to depict the pore network of the productive and dry carbonates but also to contribute significantly to the characterization of the deposits. We prepared thin sections from the four samples using blue-stained resin and performed microfacies analyses to understand the sedimentological and diagenetic history that made one part of the rock sequence productive and the other dry.

2.2 Morphological image segmentation

In our previous work, we utilized a combination of unsupervised and supervised methods to segment tomographic rock sample images (Atrash and Velledits in press). We briefly discuss these methods, review our results, and then proceed to pore network extraction and analysis.

Unsupervised segmentation involved using K-means clustering, a popular and simple partitional algorithm (Dhanachandra et al. 2015). This technique organizes data by discovering natural groupings, with objects in the same group having high similarity and those in different groups having low similarity. The process involves two phases: initializing K centroids and assigning data points to the closest centroid. Centroids are iteratively updated to the mean of their data points until convergence, ensuring minimum distance between points and their centroids in each cluster. Several methods can be used to define the distance of the nearest centroid. Among them, Euclidean distance is one of the most frequently used approaches.

Fuzzy c-means clustering (FCM) offers advantages over hard clustering due to its tolerance to ambiguity and retention of more original image information (Leu et al. 2014). In FCM, a membership function characterizes each point's similarity to all clusters, with the sum of memberships for each sample totaling unity. High membership values indicate strong similarity to a cluster, while low values suggest little similarity (Zadeh 1965). FCM employs iterative optimization of an objective function based on a membership function (Toz et al. 2019), with local extremums indicating optimal data clustering (Han and Peters 2008). It has been utilized in image segmentation, particularly for images with simple textures and backgrounds (Choudhry and Kapoor 2016). However, FCM falls short when dealing with complex textures, backgrounds, or noisy images, as it only considers gray-level information and not spatial information (Leu et al. 2014).

To address this limitation, an improved FCM algorithm called "fast and robust fuzzy c-means" (FRFCM) was proposed by Leu et al. (2014). FRFCM incorporates morphological reconstruction to enhance noise tolerance and preserve image details. Furthermore, it replaces the membership partition with membership filtering, which depends solely on the spatial neighbors of the membership partition, thereby improving segmentation effectiveness (Leu et al. 2014).

Various entropy-based thresholding methods are discussed in the literature, broadly categorized into three groups: entropic thresholding, cross-entropic thresholding, and fuzzy entropic thresholding (Mahmoudi and El Zaart 2012). Cross-entropic thresholding involves minimizing an information-theoretic distance to determine the threshold (Sezgin and Sankur 2004). Entropy can also serve as a measure of separation, distinguishing information into regions above and below an intensity threshold (Al-Attas and El-Zaart 2006). Entropic thresholding treats the image foreground and background as distinct signal sources, optimizing the threshold when the sum of two-class entropies is maximized (Sezgin and Sankur 2004). The minimum cross-entropy (MINCE) criterion aims to minimize information content before and after segmentation through thresholding.

In Type-2 fuzzy entropy (T2FE), a classical set A consists of elements that may or may not belong to set A. In contrast, fuzzy sets lack clear boundaries or well-defined characteristics. Two types of fuzzy sets exist, with Type-I fuzzy sets represented in Eq. (1) for a finite set X = {x1, x2 …, xn}:

$$ {\text{A }} = \, \left\{ {{\text{x}}, \, \mu {\text{A}}\left( {\text{x}} \right) \, |{\text{ x }}{}{\text{ X}}, \, 0 \, \le \, \mu {\text{A}}\left( {\text{x}} \right) \, \le { 1}} \right\} $$
(1)

where μA(x) is called the membership function, which measures the closeness of x to A and it can only take a single value. In a Type-2 fuzzy set, a range of membership values is used instead of a single value. If A is a Type-2 fuzzy set, then:

$$A=\left\{x,{\mu }_{A}^{High}\left(x\right),{\mu }_{A}^{Low}(x)|\mathrm{x}\in \mathrm{X}, 0\le {\mu }_{A}^{High}\left(\mathrm{x}\right),{\mu }_{A}^{Low}(\mathrm{x})\le 1\right\}$$
(2)

In the above definition \({\mu }_{A}^{High}\) and \({\mu }_{A}^{Low}\) are the upper and lower membership functions respectively. A fuzzy entropy measure is a concept used to assess the amount of vagueness within a fuzzy set. Among the supervised learning classifiers, the Naive Bayes classifier treats the image properties as random variables, and derives a probabilistic model based on Bayesian decision theory (Duda and Hart 1973) that provides the foundation for Bayesian image segmentation. The motivation for the application of a stochastic framework is the assumption that the variation and interactions between image attributes can be described by probability distributions. The histogram, serves as an estimator for the probability associated with a particular gray value and uses (n − 1) thresholds to divide the histogram into n classes {c0… cn−1} (Otsu 1979). The Naive Bayes classifier can minimize the classification error (McCann and Lowe 2012). For given data, we need to estimate P (x|ck), which is the probability of x occurring given evidence ck has already occurred providing that any particular value of vector x conditional on ck is statistically independent of each dimension (McCann and Lowe 2012):

$$P\left(x|{c}_{k}\right)=\mathop\prod\limits _{i=0}^{n}P({x}_{i}|{c}_{k})$$
(3)

where x is a n-dimensional vector. The Naive Bayes classifier can then be calculated as:

$$\mathrm{K}={\mathrm{argmax}}_{\mathrm{k}}\mathrm{ p}({\mathrm{c}}_{\mathrm{k}})\prod_{\mathrm{i}=0}^{\mathrm{n}}\mathrm{P}({\mathrm{x}}_{\mathrm{i}}\text{|}{\mathrm{c}}_{\mathrm{k}})$$
(4)

The suggestion put forth by Dietterich (1998) was to employ 10 k-fold cross-validation as a robust strategy for addressing biases and handling changes in the sizes of training and testing datasets. In this method, the dataset is initially divided into 10 equally sized subsets or folds, ensuring stratification. Then, 10 repetitions of training and validation occur, with each repetition holding out a different fold for validation while using the rest for learning. Our dataset consists of 100 tomograms, with 50 for training and 50 for testing, chosen to best represent the investigated features.

We created ground truth images through manual annotation for validation. To classify image pixels into labeled features (pores and matrix), we applied clustering and entropy algorithms. These features were divided into two groups, each forming a feature vector. We trained a Naive Bayes classifier using these features, calculating mean and standard deviation of posterior probabilities for each cluster in the training set. These values were used to predict posterior probabilities for testing data.

To evaluate our approach, we employed k-fold cross-validation to prevent overfitting and ensure evaluation on diverse data subsets. Various metrics, including AUC, classification accuracy (CA), F1 score, and precision, were used for evaluation. AUC measures overall classification quality, with higher values indicating better performance. CA represents the proportion of correctly classified pixels, while the F1-score is a weighted average of precision and recall. Precision measures the proportion of true positives among positive classifications, while recall assesses the proportion of true positives among actual positive pixels. Figure 3 illustrates the workflow of 10 k-fold cross-validation combined with Naive Bayes.

Fig. 3
figure 3

Schematic of the supervised machine learning approach utilizing Naive Bayes and k-fold cross-validation. To classify image pixels into labeled features (pores and matrix), we employed clustering and entropy algorithms. Features were grouped into homogeneous sets and used to train a Naive Bayes classifier. Performance evaluation was conducted using tenfold cross-validation

2.3 Pore network extraction from the segmented images

Several methods have been attempted to extract pore networks from arbitrary 3D images, with the medial axis and maximal ball algorithms being commonly used. The medial axis transforms the pore space into a reduced medial axis, which serves as a topological skeleton running along the middle of pore channels, introduced by Blum (1967). This transformation can be achieved using thinning algorithms (Baldwin et al. 1996) or pore space burning algorithms (Lindquist et al. 1996). Pore space partitioning along the skeleton helps identify pore throats at local minima along branches and pore bodies at nodes. This method preserves the fundamental topological and morphological properties of the pore space but requires clean-up processes to remove small details caused by sensitivity to image noise (Lindquist and Venkatarangan 1999), which may lead to ambiguous pore identification (Dong and Blunt 2009). In contrast, the Maximal Ball (MB) algorithm avoids information loss by not entirely removing voxels during processing (Silin et al. 2003). Instead, it stores information in an aggregate format. The algorithm calculates the maximal ball radius for each voxel, incrementing the radius until it hits a solid-phase voxel. Redundant balls are then removed, and master–slave relationships are established based on overlapping maximal balls, with the one having the largest radius designated as the master (pore body) and the other as the slave (pore throat). This method efficiently identifies explicit pores but does not guarantee that every throat corresponds to a hydraulic restriction, as noted by Dong and Blunt (2009).

2.3.1 Hybrid method

The Avizo software (http://www.amiravis.com) played a principal role in extracting pore networks and analyzing transport properties in two carbonate rock samples. It employed a hybrid algorithm known as the Distance Ordered Homotopic Thinning (DOHT) method, as proposed by Pudney (1996, 1998).

The DOHT method combines distance map computation using Chamfer methods to find the shortest distance from each void point to the background with a thinning algorithm to skeletonize the pore space while preserving the topology guided by the distance map. This approach marks each skeleton point with its minimum distance to the space boundary. The workflow, illustrated by Youssef et al. (2007a, b) in Fig. 4, involves identifying channel lines (representing central axes of pores) and pore lines (corresponding to pore edges). Dead ends (tips of channels) are also identified. Channel lines are segmented based on their minimum diameter, and pore segments are labeled according to the nearest channel line. Labeled pore segments are reconstructed to estimate pore volume. Subsequently, a "constrained growing algorithm" is used to refine the pore network by filling gaps and holes in the initial segmentation, considering predefined criteria and constraints like voxel intensity, gradient, distance from seed point, and connectivity to existing regions.

Fig. 4
figure 4

Schematic illustration of the workflow of the Distance Ordered Homotopic Thinning algorithm: a initial skeleton of the pore space, b identifying channel line (light blue), pore lines (yellow) and dead ends (dark blue), c identifying thresholds in the channel lines (minimum diameter) and labelled pore segments; d reconstruction of labeled pores for pore volume estimation. Modified after Youssef et al. (2007a, b) (color figure online)

This pore network extraction method retains the topology of void space and allows determination of pore connectivity and tortuosity. Figure 5 illustrates the pore network for samples 1966 and 1967 using these algorithms.

Fig. 5
figure 5

3D pore network representation with corresponding assigned radii for samples: a 1966, and b 1967. In the figure, pore bodies are visualized as white spheres, while pore channels are represented by red channels (color figure online)

2.4 Fractal dimension

The fractal dimension is a parameter used to quantify the complexity of the rock’s pore structure (Zhang and Weller 2014). The fractal dimension can be used in quantifying irregular and complex pore structure (Pavón and Díaz 2023; Xie et al. 2010). One popular method for calculating the fractal dimension is the box-counting method (Russell et al. 1980), which is derived from the following equation:

$$D= \frac{\mathrm{LN}(\epsilon )}{LN(N(\varepsilon ))}$$
(5)

Implementing this method, the binary image is covered with cubic boxes of length ϵ and by counting the number of cubes that contain the pore space using different ϵ values and by fitting the slope of LN (N (ϵ)) versus LN(ϵ) the fractal dimension of the pores is acquired. The 2D fractal dimension is a number higher than 1 and lower than 2. Standard geometric features such as lines and circles take a value of 1, the more complex and irregular the shape, the higher the number.

3 Results

3.1 Segmentation results and accuracy evaluation

We evaluated the performance of segmentation and classification techniques for micro-CT images of reservoir rock samples. A combination of clustering and entropy-based methods was used to preprocess the images and extract morphological features for classification. As shown in Table 1, our approach achieved high accuracy across multiple evaluation metrics including AUC, CA, F1 score, and precision.

Table 1 Comparison of classification accuracy on Naïve Bayes classifier with different feature vectors

The ability of unsupervised (k-means, fuzzy c-means, minimum cross-entropy, type-2 fuzzy entropy) and supervised (Naive Bayes) classification methods to delineate pore phase pixels was also assessed. The resulting binary images from each technique are displayed in Fig. 6a–g. Calculated pore volume fractions and counts from the different segmentation approaches are illustrated in Fig. 7a, b.

Fig. 6
figure 6

2D binary images using unsupervised and supervised classification: a the original image, b–g the resulted binary images from each classification method. Pores appear in black and matrix in white in all binary images

Fig. 7
figure 7

a Porosity values and b pore count obtained using unsupervised and supervised classifiers. The results indicate that pore volume increased when utilizing clustering techniques, suggesting over-segmentation of the pore space. Entropy techniques demonstrated relatively similar results compared to naive and ground truth methods

3.2 Productive interval samples evaluation and comparison

A 2 × 2 mm subsample was extracted from the middle part of each plug at 680 × 660 × 1000 volume as described in detail in chapter 2.

3.2.1 Sample 1966

The average porosity obtained from micro-XCT images is 24%, which is close to the He porosity measured in the lab which was 25%.

For further analysis, the connected porosity, channel, and throat radius of the given samples are investigated (Fig. 8). The 3D pore distribution is shown in Fig. 8a. The binarized images resulting from the segmentation scheme were imported to Avizo software for pore analysis. The pore radius varies between 13 and 131 microns while the throat radius is mainly distributed between 0.6 and 30 microns (Fig. 8b). The coordination number distribution is also plotted (Fig. 8c). Coordination number 7 is the most frequent but up to 35 have also been observed. P10, P50, and P90 values (the pore radius at 10%, 50%, and 90% of the cumulative pore results respectively) were estimated to depict the macro pore contribution to the total pore volume. The P10, P50 and P90 values are shown in Table 2.

Fig. 8
figure 8

Sample 1966: a 3D view of the pore network, b pore radius, channel length and throat radius distribution, c coordination number distribution, d microfacies, blue patches indicate pores The microfacies illustrates the irregularity of the pores and the variations in pore shapes and diameters (color figure online)

Table 2 Pore volume (porosity) and pore / throat sizes

The interrelationship between pore throat and pore radius is shown in Fig. 9a. Fig. 9a also shows the relationship between pore radius and coordination number. The 3D distribution of pore and throat radius smaller than 65 mµ, which is the most common pore and throat value, is shown in Fig. 9b.

Fig. 9
figure 9

Sample 1966, a Correlation between pore radius and coordination number, as well as pore radius and throat radius. Strong correlations are observed when pore sizes are smaller than 0.08 mm, b 3D view of the pore distribution showing sizes smaller than 0.08 mm, which represents the predominant pore size in the sample

3.2.2 Sample 1967

The average porosity obtained from XCT images is 27% which is close to the He porosity (28.04%) measured in the Lab. 3D pore distribution and pore radius, channel length, throat radius and coordination number are plotted in Fig. 10. The pore radius varies between 15 and 160 microns while the throat radius is mainly between 0.6 and 36 microns. The coordination number distribution is plotted in Fig. 10c where 6 was the dominant coordination number and coordination number 25 was also observed. Moreover, P10, P50 and P90 values were estimated and are shown in Table 3. The interrelationship between pore throat and pore radius is shown in Fig. 11a. Fig. 11a also shows the relationship between pore radius and coordination number. The 3D distribution of pore and throat radius smaller than 65 mµ, which is the most common pore and throat value, is shown in Fig. 11b.

Fig. 10
figure 10

Sample 1967: a 3D view of the pore network, b pore radius, channel length and throat radius distribution, c coordination number distribution, d microfacies, blue patches indicate pores The microfacies illustrates the irregularity of the pores and the variations in pore shapes and diameters (color figure online)

Table 3 Pore volumes (porosity) and pore /throat sizes
Fig. 11
figure 11

Sample 1967, a Correlation between pore radius and coordination number, as well as pore radius and throat radius. Strong correlations are observed when pore sizes are smaller than 0.08 mm, b 3D view of the pore distribution showing sizes smaller than 0.08 mm, which represents the predominant pore size in the sample

3.3 Dry interval samples evaluation and comparison

3.3.1 Sample 1979

The average porosity obtained from micro-XCT images is 11.9%, whereas the He porosity measured in the lab is 12.4%. The 3D pore network and pore radius distribution are presented in Fig. 12. The 3D pore distribution and the lack of connectivity of the pore space, with a few exceptions of pore connections found at different locations, is illustrated in Fig. 12a. The pore size distribution and the pore radius at p10, p50 and p90 are illustrated in Fig. 12c. The pore radius varies between 4 and 15 µm and the most dominant pore size is 9 µm.

Fig. 12
figure 12

Sample 1979. a 3D view of isolated pores in one area, highlighting their spatial distribution. Also, a 3D view of the pore space is presented, b Microfacies representation, showing circumgranular desiccation cracks filled by mosaic calcite (indicated by arrows) on the left and right sides, and Microcodium in the middle. The destruction of porosity during diagenesis phases of the pores contributes to low porosity and the presence of scattered isolated pores, c Pore size distribution, pore volume, connectivity, and pore radius percentile

3.3.2 Sample 1980

The average porosity obtained from XCT images is 14%, whereas the He porosity is 11.84%. Figure 13a illustrates the 3D pore distribution and the lack of connectivity of the pore space. Figure 13c shows the PSD and the pore radius at p10, p50 and p90. The pore radius varies between 4 µm and 40 µm and the most dominant pore size is 13 µm.

Fig. 13
figure 13

Sample 1980 a 3D view of isolated pores in one area, highlighting their spatial distribution. Also, a 3D view of the pore space is presented, b Microfacies representation, showing circumgranular desiccation cracks filled by mosaic calcite (indicated by arrows) on the left and right sides, and Microcodium in the middle. The destruction of porosity during diagenesis phases of the pores contributes to low porosity and the presence of scattered isolated pores, c Pore size distribution, pore volume, connectivity, and pore radius percentile

In Fig. 14a the PSD for the four samples in Fig. 14b the p10, p50 and p90 percentiles for all samples are compared.

Fig. 14
figure 14

Comparison of pore size distributions (PSD) for four samples, a The samples from the lower interval exhibit small pore sizes ranging between 0.004 and 0.02. In contrast, the samples from the upper interval display a broader range of pore sizes, varying from 0.002 up to 0.14. b Pore size percentiles, indicating similar distributions of percentiles for the samples within each interval

Figure 15a compares the 2D pore volume fraction against the calculated 2D fractal dimension. The 2D fractal dimension has high values ranging between 1.65 and 1.67 indicating irregular pore shapes and rough pore surfaces. 3D visualization of individual pores through each sample is shown in Fig. 15b. For the samples from the lower part, the fractal values are a bit lower than the samples from the upper part but are still high ranging between 1.61 to 1.63. The pore structure takes complex irregular shapes and no correlation was observed between the pore volume and the fractal dimension. From Fig. 15b it is obvious that the pores have irregular, complicated shapes. This irregularity continues to appear at all depth intervals regardless of pore sizes.

Fig. 15
figure 15

Comparative analysis of porosity fraction and fractal dimension for four samples, a Plotting the 2D porosity fraction against the 2D fractal dimension for each sample. This analysis elucidates the relationship between fractal dimension and porosity fraction, providing insights into the geometric complexity, b 3D visualization of individual pores in each sample, accompanied by their respective 3D fractal dimension values. This visualization highlights the connectivity of pores within the samples from the upper interval, demonstrating a well-connected pore network. In contrast, the samples from the lower interval exhibit isolated pores. The high 3D fractal dimension values indicates to irregular complex pores shapes for all the samples

3.4 Microfacies analysis

The goal of the microfacies analyses was to identify distinctions in depositional and diagenetic conditions between the productive and dry rock intervals.

For microfacies analysis, blue-dyed epoxy was employed. After polishing the rock samples, they were immersed in blue epoxy resin, filling the pores. Under the microscope, pores appeared as blue patches, making them easily distinguishable from the rock's components and matrix.

Diagenesis plays a more significant role in carbonate reservoirs than in siliciclastic ones, mainly due to the presence of chemically unstable aragonite in calcareous sediments. During diagenesis, compaction occurs, and fluids with varying compositions infiltrate the calcareous mud. The chemical composition and CO2 content of interstitial water determine whether dissolution or precipitation of calcareous cement dominates. Undersaturated interstitial water leads to dissolution and increased porosity, while saturated water results in cementation, reducing or eliminating porosity.

Based on infiltrating water composition, marine, meteoric, and deep burial diagenetic environments are differentiated. Cement crystals precipitate in a manner specific to their diagenetic environment. In the marine environment, pores are filled with seawater. Meteoric diagenesis occurs near the water table, with vadose (above the water table) and phreatic (below the water table) zones. Vadose environments have air and fresh water in pores, while phreatic zones contain a mix of fresh and seawater (Scholle and Ulmer-Scholle 2003).

3.5 Samples 1966 and 1967 (productive interval)

Have a porosity of 28% and 25%, respectively. Most matrix and components (fossils, grains) are dissolved, leaving a frame of micritic envelopes. Deposition occurred in a marine environment, followed by organic activity-induced micritization. Diagenesis continued in a meteoric phreatic environment, leading to dissolution due to CaCO3 undersaturation. Only the micritic envelopes remained, coated with phreatic calcite cement.

3.6 Samples 1979 and 1980 (dry interval)

Contain foraminifera, algae, and other fossil fragments in a micritic matrix. The rock consists of glaebules with spar-filled circumgranular shrinkage cracks, along with abundant Microcodium. Presence of foraminifera and algae suggests deposition in a marine environment. Diagenesis began under subaerial exposure, evidenced by Microcodium and dessication cracks. It concluded in a marine environment, filling all pores with mosaic calcite.

Comparing productive and dry rocks highlights the significant influence of diagenetic environment on porosity changes. Both intervals were deposited in marine environments, but diagenesis for productive rocks occurred in meteoric phreatic conditions, while for dry rocks, it began in a meteoric vadose environment and ended in a marine environment.

In summary, diagenesis of productive rocks suggests a considerable decrease in relative sea level, whereas diagenesis of dry rocks initially involved a sea level decrease causing subaerial exposure, followed by a sea level increase, submerging the area in seawater.

4 Discussion

The accurate determination of porosity in image-based measurement systems is a critical step in the characterization of porous media. Various models and methods must be considered to evaluate uncertainty propagation in each step of the system. For instance, a study by De Santo et al (2004) emphasized the necessity of examining how uncertainty propagates in image-based measurement systems. In micro-CT image analysis of porous carbonates, Rezaei et al. (2019) highlighted the crucial evaluation of various thresholding algorithms to avoid distorted outcomes. Additionally, another study by Xiong et al. (2016) highighted that the finite resolution of imaging techniques is the main source of uncertainty in pore space characterization. To overcome these problems, Keller et al. (2013) suggested combining different techniques, such as Focused Ion Beam (FIB)/Scanning Electron Microscope (SEM), nitrogen adsorption and FIB.

Moreover, recent studies have demonstrated the potential of machine learning algorithms for automated analysis of complex geological structures. For example, Dos Anjos et al. (2021) demonstrated the effectiveness of deep learning for lithological classification of carbonate rock micro-CT images. This study highlights the potential of machine learning algorithms in gaining a deeper understanding of the petrophysical properties of rock samples.

Furthermore, the study by Zhang et al. (2021) provided valuable insights into the pore-scale characterization and pore network model simulations of multiphase flow in carbonate rocks. By utilizing advanced imaging techniques and computational simulations, the study shed light on the complex fluid behavior within the pore network, highlighting the importance of considering heterogeneity and connectivity in modeling fluid flow in porous media.

Here the porosity was determined by using different ML techniques. The K-means and FRFCM clustering tend to over-segment the pore volume by 7–12% compared to other segmentation algorithms, where pore volume varies between 25 and 30%. In general, this variability in pore volume can be attributed to the presence of microcrystalline cement formed during diagenetic processes at the microstructural scale and deposited within the void space and on the pore edges, which cannot be resolved by the micro-XCT. This situation leads to images having variable pixel intensities including the pore edges. These pixels of varying intensities would not have been segmented into the same class by different ML algorithms. This microcrystalline cement has been observed by microscopic examination of the thin sections taken from the same samples. Figure 8a, b show that the detected pore count of the K-means clustering and MINCE methods is higher than that of the other methods. In the case of T2FE, the small pores are more frequent than the large ones. In the case of the FRFCM algorithm, the large pores are more dominant.

Overall, the Type 2 fuzzy entropy classifier performed the best, achieving the highest AUC value of 0.984 and the highest CA, F1-score, precision and recall values among all classifiers. The minimum cross entropy classifier also performed well, with an AUC value of 0.974 and a CA of 0.946. The k-means and fuzzy c-means classifiers achieved a slightly lower performance, with CA values of 0.877 and 0.888, respectively. Both classifiers also had a higher number of misclassified pixels than the other two classifiers, with fuzzy c-means having the highest number of misclassified pixels at 403,100. The reported gray intensity range of the misclassified pixels was similar for all classifiers, ranging from 85 to 112. However, the Naive Bayes showed relatively reasonable pore size distribution, and the resulting binarized image was more realistic in comparison to the original image and reference images.

5 Conclusion

The petrophysical properties of four carbonate samples were studied by using micro-XCT imaging, laboratory measurements, and microfacies analysis. This integrated approach effectively characterized the pore networks at multiple scales and provided insights into the geologic processes governing reservoir productivity. Four different machine learning algorithms were applied to segment the micro-XCT image pore space. Among the tested methods, Naive Bayes showed stable and adequate binarization results. However, further studies on accuracy and the misclassification rate can help to better assess the performance of these techniques.

Micro-XCT imaging revealed differences in pore network architecture between the productive and dry intervals. The productive samples exhibited a well-connected pore structure with a wide pore size distribution, supported by their higher measured porosities and permeabilities. In contrast, the dry interval samples contained isolated pores with poorer connectivity, as reflected by their lower porosities. Quantification of pore network parameters such as coordination number, pore throat radius, and tortuosity further highlighted the stratified pore network in the productive rocks.

Comparing the He porosity measured in the lab with that of image-derived porosity results in a close match (25/24%, 28.04/27%. 12.41/11.9%, 11.83/14%), validating the accuracy of the segmentation and pore network extraction techniques.

Microfacies investigation revealed that this can be explained by their different diagenetic environments. Although the sedimentation in both cases happened in marine environments different diagenetic processes altered the upper part of the limestone into productive rocks and the lower part into dry rocks. In the first case diagenesis happened in a meteoric phreatic environment where the influence of fresh water promotes secondary porosity enhancement. Freshwater also has a significant effect on permeability. The dissolution of primary aragonitic components significantly augments permeability.

On the contrary, in the dry interval the meteoric vadose environment was followed by a marine environment leading to pore-filling cementation and porosity destruction. We can conclude that during diagenesis of the productive part the relative sea level decreased considerably. This is in accordance with the results of Palotás (2014), who, based on sedimentological investigation of Sarmatian carbonates in the Buda Hills, revealed a drop of 5–7 m in sea level during the late Sarmatian. Due to this the water become so shallow that fresh water had a considerable influence during diagenesis of the upper part of the investigated succession.

Overall, this study demonstrates the value of an integrated analytical approach to decipher the controls on carbonate reservoir productivity. The ability to characterize pore network architecture at micron scales using micro-XCT combined with geological context from petrophysical and sedimentological data provides valuable insights for optimizing carbonate reservoir assessment and development.