DIGITAL ROCK ANALYSIS: AN ALTERNATIVE METHOD TO PREDICT PETROPHYSICAL PROPERTIES, CASE STUDY FORMATION FROM MISHRIF

The digital core analysis of petrophysical properties replace the use of conventional core analysis by reducing the required time for investigation. Also, the ability to capture pore geometries and fluid behavior at the pore-scale improves the understanding of complex reservoir structures. In this work, 53 samples of 2D thin section petrographic images were used for analyses from the core plugs taken from the Buzurgan oil field. Each sample was impregnated with blue-dyed epoxy, thin sectioned and then was stained for discrimination of carbonate minerals. Each thin section has been described in detail and illustrated by photomicrographs. The studied samples include a variety of rock types. Packstone is the most common rock type observed followed by grainstone and packstone – wackestone. Floatstone and dolostone are noted rarely in the studied interval. However, the samples of thin section images are processed and digitized, utilizing MATLAB programming and image analysis software. The entire workflow of digital core analysis from image segmentation to petrophysical rock properties determination was performed. A focused has been made on determining effective and total porosity, absolute permeability, and irreducible water saturation. Absolute permeability is estimated with the Kozeny-Carman permeability correlation model and Timur-Coates permeability correlation model. Irreducible water saturation simply is derived from total and effective porosity. Also, some pore void characteristics, such as area and perimeter, were calculated. The results of Digital 2D image analysis have been compared to laboratory core measurements to investigate the reliability and restrictions of the digital image interpretation techniques.


INTRODUCTION
The Mishrif Formation contains up to 40% of the Cretaceous oil reserves in Iraq, and about 30% of the total Iraqi oil reserves (Mohammed et al., 2020).Petrophysical properties like porosity, saturation, and permeability are essential reservoir rock properties used in the determination of hydrocarbon volume in place.Carbonate sediments and rocks are characterized by a wide range of physical parameters which are affected by variable deposition conditions and diagenesis processes (Al-Baldawi, 2020).There are different methods to measure these properties such as core analysis, well log analysis and well testing.However, there can be uncertainties associated with core measurements, especially when laboratory conditions are ignored under which core measures made.Al-Mimar et al. (2018) used a gamma ray tool and geochemical data to distinguish facies associations in the studied succession.The stratigraphic succession was generally divided into eleven zones based on lithology and petrophysical properties.Four facies associations were distinguished by Abbas et al. (2020,) each of which represents a distinct depositional environment.
Certain factors control the petrophysical properties of a reservoir such as; pore size distribution, grain size distribution, mineralogy and sorting, etc.To reduce some of these differences, digital image analysis of thin sections is presented as this alternative technique to analyze petrophysical properties.Digital image analysis can estimate total porosity, effective porosity, absolute permeability, irreducible water saturation, mineralogy, pore size distribution and sorting (Fens, 2000;Heilbronner and Barrett, 2014;Lawrence andJiang, 2017 andVarfolomeev et al., 2016).
The studied interval comprises limestones and dolostone of the Middle Miocene Lower Fars Formation.The studied samples are dominantly Packstone, followed by grainstone, packstone, wackestone, rare floatstone and dolostone.Historical digital image analysis techniques have established porosity from manual thresholding (Fens, 2000 andZerabruk et al., 2017), which was somewhat subjective, so automated thresholding and clustering techniques were introduced in the current study.Absolute permeability is estimated with the Kozeny-Carman correlation (Carman, 1937 andDvorkin, 2009) and Timur-Coates (Coates and Dumanoir, 1973) correlation.The current study aims to determine porosity, absolute permeability, and irreducible water saturation.
Irreducible water saturation is simply derived from total and effective porosity.Hence, the determination of these properties from digital image analysis of the thin section can be termed as an indirect method.

General Information
The Buzurgan oil field is located in the South-Eastern part of the Iraq, close to the Iran boundary, 40 Km North East of Amara.The oil field was discovered in 1970, and in November 1976 its development was started.The oil field development was carried out by the General Organization of South Oil -Missan Oilfield.Buzurgan geological structure is composed of Tertiary and Upper Cretaceous deposits.Lower deposits were not penetrated.Stratigraphy description is made according to data, given in final geological reports for Buzurgan wells (Fig. 1).Fifty-three (53) samples were selected for thin section as a part of the petrographic study, (Fig. 2).

Fig. 2. Grainstone sample shows calcite cement (Cc) and intergranular porosity (Ig)
The studied interval comprises limestones and dolostone of the Middle Miocene Lower Fars Formation of unit MB21.The studied samples are dominantly packstone, followed by grainstone, packstone, wackestone, rare floatstone and dolostone.Each sample was impregnated with bluedyed epoxy, thin sectioned and then was stained for discrimination of the carbonate minerals.The benefit of using blue epoxy is that it usually does not occur in rocks and occupies the pore space within the grains; hence, the detection of blue color allows analysis of sample porosity.The scanned image has a resolution of about tenm/pixel.This procedure of scanning and digitizing the image is called 'optical microscopy' and is of lower resolution as compared to digital images obtained from scanning electron microscopy.The advantage of the former is that it is a fast technique to get digital images and a disadvantage that pore sizes of less than tenm cannot quantitatively be resolved with optical microscopy.Digital images made of elements called pixels, which are the building blocks of an image.The image width is the number of pixel columns (M), and the image height is the number of pixel rows (N) in the array.Each pixel has its intensity value or brightness.Black and white images only have intensity from the darkest gray (black) to lightest gray (white).Color images, on the other hand, have intensity from the darkest and lightest of three different colors, red, green, and blue.Thus, the two most basic types of digital images, black and white (known as the binary image) and color images.Intensity values in the digital images are defined by bits.Bit depth (or color depth) represents the number of different colors that can be represented by a pixel depends on the number of bits per pixel (bpp).The pixel in the binary image can be either (0, black) or (1, white), representing the darker and brighter areas of the image, respectively, while pixel in RGB image are between 0-255 for each band, red, green, and blue.
The main advantage of converting RGB image to binary image is that binary images are much easier to work within many operations, such as image segmentation processes and distinguish features of an image (Wilhelm and Mark, 2010).Binary images are often the result of segmentation where the pixels have been separated into two categories: the objects of interest (pores) and the background (grains or matrix).Binary images have special topological properties, which allow operations such as filling holes, removing edge objects, and rebuilding from two images.

Color Analysis of Image Under Study
Image color analysis is primarily an initial visual test of the image color.We start by segmenting the image into a luminosity-chromaticity (Lab) color space.In the Lab color system, layer (L) represents the luminosity and characteristics of the brightness of light produced by an image.In contrast, layer (a) is a layer of chromaticity showing where colors fall along the red-green axis, and layer (b) is also a layer of chromaticity showing where colors fall along the blue-yellow axis.All color information is contained in the layers (a) and (b).Fig. 3 shows that blue epoxy is standing out on the segmented image's blue component, layer (a), and layer (b).The pixel intensity histogram (scale 0-255) of these three images is shown in Fig. 4, and the required interest feature can be extracted by thresholding (cut-off) the histogram.
As shown in Fig. 4, the lighter part in the blue component image represents the pore space filled with blue epoxy, while the dark (black) part represents the rock matrix.Reverse this case, in layer 'a' and layer 'b' images, the lighter part of the image represents the rock matrix while the black or dark part represents the pore space.Analyzing fifty-three (53) digital image samples show that blue epoxy could be captured adequately by thresholding the blue component, layer 'a' and layer 'b' of the segmented image, in our case the high number of red intensities implies the presence of blue color and therefore epoxy placed in pores.The blue part of the LAB color system only used to capture sample petrophysical properties.

Segmentation of Digital Image
Segmentation is a crucial step in the image analysis process.The purpose of image segmentation is to partition the image into areas based on criteria for pixel values.In a binary image, only two types of regions coexist; the objects of interest (foreground) region represented the pore space and the remaining regions, called "backgrounds," which represented the rock matrix.Thresholding is the easiest way of segmenting the image using image histogram.Thresholding can be used to produce binary images from a grayscale image (Shapiro et al., 2002) (Fig. 5).

Fig. 5. Threshold segmentation of the histogram
Automatic thresholding is an excellent way to obtain pixel-encoded valuable data while minimizing background noise.There are many methods and techniques are used to digital segment image automatically.One of these methods is an image segmentation by K-mean clustering method.K-means clustering algorithm is developed by MacQueen (1967) and then by Hartigan and Wong (1979)).Clustering is a method to divide a set of data into a specific number of groups.
Directly speaking, K-means clustering is an algorithm to classify or to group the objects based on attributes/features into K groups.K is a positive integer number.The grouping is done by minimizing the distances between data, and the corresponding cluster centroid K-means clustering aims to divide data into k clusters in which each data value belongs to the cluster with the closest mean (Sachin, 2010).
In Fig. 6 the function k-means partitions 'n' observations into 'k' number of mutually exclusive clusters and returns clusters indices assigned to each representation.It is an iterative process, and partitioning achieved in a way that data points within a cluster are as close to each other as possible and as distant from data points in different clusters.Each cluster is characterized by its centroid or center point.Fig. 7 shows the process of basic k-means implemented using MATLAB in this study.Using pixel labels, we can separate objects in the digital image by color, which will result in three images, as shown in Fig. 8.A binary image created, which used to quantify petrophysical properties (porosity) from pixels count in the white region of the binarized image.
The red boundary is marked around the captured pores to quality control, the results of image clustering and segmentation if it has obtained all the pores, as shown in Fig. 9.In Lab scale, color information lies in 'a' and 'b' segments of the image, and this color information used to capture blue color epoxy associated with pore space, cluster (1) (Fig. 9).
However, it can be observed from the captured cluster (1) image that the intensity of the blue color is not the same across all pores.Pore sizes are larger than pixel resolution of the image (macropores) appear bluer and lighter as compared to sub-resolution pores (micropores), which includes matrix effect in it.Luminosity (L) is used to further segment blue color into light blue easily visualize-able pores and dark blue sub-resolution pores, as shown in Fig. 10.

RESULTS AND DISCUSSIONS Porosity from Digital Image Analysis
The volume fraction of void spaces, i.e., non-rock space divided by the total volume of the sample is defined as porosity (Fens, 2000).
A digital image comprises pixels, which are the building blocks of an image.Hence, a pixel can be defined as the smallest unit of a digital image (Rudolf, 1999).Core thin section scanned images are used in the current study were typically cropped at 637x478 pixels (MxN pixel array), hence the total number of pixels in a sample is 304486 pixels.Core thin section samples consist of empty pore space filled with the blue liquid epoxy and solid grains comprising of different minerals, as shown in Fig. 11.
Through image segmentation techniques that will be discussed in detail previously, it is possible to extract regions associated with blue epoxy only, i.e., pore space.The number of pixels residing in pore space is cumulated and divided by the total number of pixels to get image porosity.
The definition of porosity from image analysis is somewhat similar to Equation 1 but written in pixels term.
Such differences shall be kept in mind while documenting porosity results.Core thin section samples used in the current study scanned with optical microscopy having a pixel resolution of 10 m.So, substantial porosity may be residing in pore sizes of less than tenm, i.e., sub-resolution pores.Such sub-resolution pores were visually observe-able on thin-section images but with a mixed response of clay-silt matrix and porosity.A subjective adjustment factor used to extract the matrix effect from sub-resolution pores.In the current study, sub-resolution pores are defined as micro pores and pore sizes higher than tenm are defined as macro pores.Hence, the terminology of micro and macro pores porosity in the context of image analysis (scanned with optical microscopy) is used differently than their actual geological definitions.
Where 'A' in Equation (3) stands for adjustment factor (0 and 1) to remove matrix effect from subresolution pores, as a pixel representing pore size of less than 10 m may consist of both a grain and a pore.Ф is micro pores porosity, and Ф is macro pores porosity.The following two equations define the microporosity (Ф) and macroporosity (Ф) from image analysis presented in the current study; The segmentation algorithm clusters pixels automatically are divided into two groups: background (matrix) and foreground (pores).Thus, it is possible to extract regions associated with blue epoxy only, i.e., pore space.The number of pixels residing in each pore space is cumulated and divided by the total number of pixels to get image porosity.The area, perimeter, and diameter for every individual object (pore) calculated.After that, several macropores and micropores computed using two different methods, as explained above.Finally, macroporosity and microporosity are defined as ratio of macropores and micropores to the total number of pixels.
Microporosity was adjusted by the factor  = 0.75 to exclude matrix effect from micropores, and image porosity calculated using Equation (3).In all threshold methods, an adjustment factor was required for microporosity to remove the matrix effect.For the analyzed samples, the coefficient of 0.75 was required in equation 3 to achieve a good correlation between image-derived porosity and core porosity.The automatic method analyzed in the current study to estimate porosity is Kmeans clustering.Three clusters used, and the cluster associated with blue color (epoxy) was further analyzed to determine porosity.Micro and macroporosity were differentiated based on luminosity (L) of the blue color, where light blue represents macropores and dark blue as micropores.Sample 1 was discarded in all results, as the blue color of the sample was not clear, hence porosity and other properties cannot calculate.It points to the limitation of the clustering technique, where blue color shall be present in pore space.Fig. 12 shows a comparison of porosity obtained from image analysis techniques compared to core porosity.Table 1 shows a comparison of porosity obtained by image analysis techniques compared to core porosity for some samples for the Middle Miocene Lower Fars Formation of unit MB21.

Fig. 12. Comparison of image-based total porosity using K-means clustering with core porosity
Table 1.Image porosity analysis using K-Mean thresholding method for some selected samples used in this study

Permeability Prediction from Digital Image Analysis
Permeability is the dynamic property of reservoir rock and measures the ease at which a fluid can flow through the rock.Darcy law states that the flow rate of a single-phase fluid through a porous media is proportional to the permeability of the rock and effective pressure gradient, and is inversely proportional to fluid viscosity.Permeability has units of milli-Darcy.Permeability is a function of the connectivity of pores, pore throats, and grain size.For the clastic reservoir, a general assumption is bigger the pore size, more significant the grains and pore throats (Al-Sudani, 2014).
This assumption may not be valid for carbonate reservoirs as their matrix framework is usually not granular.Over the years, several correlations have been developed to determine permeability from logs, and most of them are function of porosity, e.g., Coates equation and Wyllie-Rose method (Tawfeeq et al., 2020).Some correlations are suited for clastic reservoirs, while others for carbonate reservoirs or fracture permeability.Dry gas (air, N2 or He) permeability from cores is determined from Darcy Law; Where  is the flow rate,  is permeability, Δ (P1-P2) is a pressure drop,  is path length, and  is dynamic viscosity.Permeability from a thin section is derived similarly as for the logs where correlations used as a function of porosity.It believed such correlations are suitable when porosity is granular, and the assumption that pore size distribution is proportional to grain size distribution.Kozeny-Carmen permeability model and Timur-Coates permeability studied in current work.Josef Kozeny and Philip Carman (Carman,1937 andDvorkin, 2009) developed a correlation that expresses permeability as a function of porosity and specific surface area.The general form of Kozeny-Carman equation to determine permeability given as; Where  is Kozeny-Carman constant and is approximately '5' (Allen et al., 2000 andZerabruk et al., 2017) the specific surface area exponent '' as shown in the equation.Still, this value can be adjusted to achieve a better correlation between image-based permeability and the 'ground truth' derived from direct measurements such as core permeability.Specific surface area or surface to volume ratio approximated by the ratio of pore perimeter to the pore area.Perimeter and area of each pore (i) are outputs of binary image analysis as; The specific area of the analyzed sample approximated as the average specific area of all pores.
The unit of a specific area is 1/pixel and converted into units of 1/m by knowing that 1 pixel = 10 m.Hence, the dimension of permeability from equation 7 will be m 2 and converted to mD unit by using the conversion factor of 1 m 2 = 1.01 x 10 15 mD.The empirical constant "Co" depends on pore shapes and can be calculated from porosity using a model with intersecting circular tubes (Mortensen et al., 1998): Permeability (absolute) in this current study was analyzed with the Kozeny-Carman correlation, as established in this section.The correlation is applied to porosity results from the Kmeans clustering method.Fig. 13 shows the permeability from image analysis compared against core permeability (K_core).In Kozeny-Carman equation 7, the constant  is calculated using equation 10, and exponent '' value for the specific surface area tuned to achieve better correlative factor "R 2 values".The value of 2.75 is used for '' in the cross plot below instead of the default value of 2. Table 2 summarizes permeability prediction results from digital image analysis using the Kozeny-Carman correlation for some samples.The core porosity and core permeability are taken from conventional core analysis report for Buzurgan oil field for well BU-22.This correlation relates permeability to total porosity and to the ratio of pores that will contribute to permeability to the pores that will not contribute to permeability (Allen, 2000;Coates and Dumanoir, 1973).
Where ,  and  are constants with default values of 1,4 and 2 respectively.Equation 11 can be used to estimate permeability from image analysis based on the assumption that free fluid porosity is related to macropores and bound fluid porosity to micropores.The Equation outputs permeability in units of M.D.In Fig. 14, permeability from image analysis is compared against core permeability (K-core).The default values of constants and exponents in equation12 were tuned to achieve better R 2 values.In the context of image analysis, Equation 11 is re-written as; For Timur-Coates permeability (equation 12), pre-multiplier 'a' value of 1.2 was used instead of 1, while exponents (b = 3.9) and (c = 1.8) were used instead of their default values.Table 3 summarizes permeability results from digital image analysis using the Timur-Coates correlation

Irreducible Water Saturations from Digital Image
Saturation defined as pore volume occupied by a fluid.In the case of an oil-bearing water-wet reservoir, there will be a portion of pore space occupied by water and the rest by oil.Water saturation () can be defined as (Ali et al., 2019 andNajmuldeen et al., 2020); Irreducible water saturation from the core is determined with special-core-analysis (SCAL) experiments, centrifuge or mercury-injection capillary pressure, and relative permeability profiles.
Only the nuclear magnetic resonance (NMR) log can estimate irreducible water saturation.It assumes that bound fluid porosity will not contribute to flow.For a water-wet reservoir, bound fluid porosity is pore volume occupied by water that will not flow and is equivalent to irreducible water saturation (Aytekin, 1968;Zhi-Qiang Mao et al., 2013 andBaouche et al., 2017); NMR porosity is equivalent to total porosity in oil and water-bearing reservoirs.But for gas and very light oil-bearing reservoirs, NMR porosity needs correction for the hydrogen index effect of giving total porosity.Irreducible water saturation from image analysis derived in the same way as in equation 14.Microporosity from image analysis is equivalent to NMR bound fluid porosity as; zBJJ,BCDEF =      (15) Irreducible water saturation from thin section can be calculated from microporosity and image total porosity numbers populated in Table 4 and by using equation 15.It is observed that using the above equation yields an over-estimating of water saturation values by approximately twice the core saturation value.So that equation 15 has been modified to be; A comparison of irreducible water saturation between thin sections and core saturation is shown in Fig. 15 and Table 4.The studied samples are described and illustrated in this study include a variety of rock types.The studied interval comprises limestones and dolostone of the Middle Miocene Lower Fars Formation.The studied samples are dominantly packstone, followed by grainstone, packstone, wackestone, rare floatstone and dolostone.Packstone is the most common rock type observed followed by grainstone, packstone and wackestone.Floatstone and dolostone are noted rarely in the studied interval.Reservoir quality ranges from poor to good with matrix and cementation as the porosity and permeability controls.it where the threshold on pixel intensity histogram had to be manually adjusted till the analyst is visually satisfied that pore space is adequately captured.This visual analysis was challenging, as optically scanned images used in the current study had a pixel resolution of 10m/pixel, and there were a significant number of pores with size less than the pixel resolution.In another study, regression equations used to achieve a good correlation of petrophysical properties between image analysis and routine core analysis data.These adjustments and regression lost the predictive power of image analysis.K-means clustering introduced as an automatic technique where analysts only need to define the number of clusters.For optically scanned images used in the current study, three clusters were analyzed as optimum to extract pore space from the matrix.Thin sections image porosity using the clustering technique showed a good match with core porosity, with the additional benefit that workflow is now automated.Moreover, clusters can predict threshold values if it desired to make image interpretation with a thresholding technique.In the current study, porosity is the main petrophysical property determined from thin section images.Permeability estimated as a function of porosity, and it also showed an acceptable match with core permeability.Some scatter on permeability correlation was observed, which could be explained that permeability is a dynamic property, and we tried to estimate it from the 2D image.Nevertheless, the interpretation is useful to identify permeable layers.The predictive power of clustering based thin section image analysis is encouraging, as it can be applied on vastly available drill cuttings as a secondary means of porosity and permeability data.However, for the wells where conventional core data is not available or possible, petrophysical properties can be determined from thin section images for its integration with well logs interpretation to reduce uncertainties.Some limitations to thin section image analysis were also observed.For optically scanned images, pore sizes less than tenm have a mixed response of matrix and porosity.A subjective but a single adjustment factor was required to remove the matrix effect from such pores for all analyzed samples.This is equally applicable for both clustering and manual thresholding techniques.Clustering analyzes porosity from pore filling blue epoxy, i.e., a blue cluster, it was observed that clustering over-estimates porosity if blue color is also present as a matrix color.Such a situation will be equally challenging for manual thresholding and hence, can be concluded as a general limitation of thin section image analysis.

Fig. 6 .
Fig. 6.K-means logic to partition data points into clusters based on minimizing data points distance from the cluster centroid

Fig. 11 .
Fig. 11.Grainstone sample shows echinoderms (Each), primary intergranular pore space (Ig), dolomite cement (Dol-C) and dolomite rhomb (Dol) The digital image can be obtained from an optical microscopy technique or with electron microscopy scanning.The accuracy of porosity from image analysis is dependent upon its pixel's resolution.The analyzed samples have pixel resolution of about tenm, which means pore sizes larger than tenm accurately quantified with this technique, and a different interpretation technique used to quantify porosity associated with the pore sizes less than 10 m.Porosity has several

Fig. 14 .
Fig. 14.Absolute permeability estimates from thin section image analysis using Timur-Coates permeability correlations

Fig. 15 .
Fig. 15.Irreducible water saturation estimates from thin section image analysis volume  BCDEF = porosity derived from digital image  CBIJK = microporosity derived from digital image  CDIJK = macroporosity derived from digital image PHI_Core = porosity derived from core sample Q = flow rate