## 4 Results  
### Benchmarking on Analogous Formation Samples  
To ensure the reliability and precision of our approach, we initiated our workflow by benchmarking it on analogous samples. The porosity values obtained for the set 1 samples were validated with the laboratory values, as shown in Table 4.  
\begin{table}
\begin{tabular}{c c c c} \hline
**Sample Name** & **Porosity Using K-Means (\%)** & **Laboratory (\%)** & **Error (\%)** \\ \hline BB & 19.98 & 21.6 & 7.50 \\ SS & 19.71 & 19.9 & 1.00 \\ L & 19.99 & 20.22 & 1.11 \\ \hline \end{tabular}
\end{table}
Table 4: Comparison of the porosity values obtained using the k-means algorithm with the laboratory-measured values (sample size: 940 \(\times\) 940 \(\times\) 1014 voxels).  
Figure 8: Second workflow applied to samples with comparatively higher clay content.  
Figure 9: (**a–c**) Illustration of sub-volume extraction for fluid flow simulations.  
It can be observed from Table 4 that the k-means-derived porosity is comparable with the laboratory-measured values. In sample BB, the observed high error percentage can be attributed to the presence of the comparatively higher content of clay in that set of samples. Clay minerals have a tendency to occupy the pore space and reduce the overall porosity or rock. Additionally, the different mineral compositions and densities of clays compared to the surrounding matrix results in variations in the grayscale values in the scanned images. This contrast in the images makes it challenging to accurately quantify the pore space.  
Initially, workflow 1 was implemented, which includes contrast adjustment followed by segmentation using the k-means algorithm on all samples. It was observed that the samples with a higher clay content tend to yield very low permeability values as compared to the laboratory-measured values. In response to this observation, workflow 2 was introduced. This refined approach incorporates an additional step: edge detection, following the initial contrast adjustment. This edge detection step serves to delineate the boundaries of pores and grains within the samples, thereby enhancing the reliability of the segmentation procedure. Subsequently, segmentation was performed. The results of workflow 2 indicate that for clay-rich samples, the permeability values align more closely with the laboratory measurements, providing a more accurate representation of the samples' petrophysical properties.  
This was followed by the extraction of sub-volumes and the estimation of porosity for each sub-volume. Subsequently, the LBM simulations were performed in each sub-volume, and their permeability was estimated (Table 5).  
It can be observed from Table 5 that the permeability of each sub-volume and also the average permeability of each sample is comparable to the laboratory-derived value. When dealing with digital images, it is expected that values may differ from laboratory-measured values, which is attributed to the resolution at which the sample is scanned. The resolution is inversely related to the field of view. As the resolution increases, the field of view decreases. In this study, we compared the order of magnitude of permeability, and thus, the error percentage, calculated using the average value of all the sub-volumes, can be considered to be within the acceptable limit [40; 41].