Study on Extraction Methods for Different Components in a Carbonate Digital Core

It is difficult to carry out petrophysical experiments because of the serious damage caused to cores in the development of fractures and pores in carbonate reservoirs. .e development of a three-dimensional digital core in carbonate reservoirs has become a hot topic in rock physics research. Compared with the three-dimensional digital core, including basic rock skeletons and pores in sandstone reservoirs, carbonate reservoirs also include secondary structures such as microfractures. .e carbonate contains different components, and extracting these components is a very difficult problem. .e resolution on the electrical image log image is high, which can clearly reflect the macrocomponents in various reservoirs..ere are some blank areas between electrodes on the electrical image log, which affects the extraction of components in a three-dimensional digital core. Aiming at the serious heterogeneities in the carbonate reservoirs and affecting image inpainting on the electrical image log image, a new method of image inpainting based on a combination of multipoint geostatistics and an interpolation method is put forward. .e experimental results show that this method generates faster and better full-bore images than other methods. Due to the multipeak histogram, the maximum interclass variance in the two times method is proposed to extract macrocomponents such as basic rock skeletons, pores, and connected parts. .e microfractures can be extracted from the CT scanned images by using image segmentation from the combination of the watershed and OTSU methods. .e experimental results prove that using extraction methods for different components enables better results to be obtained.


Introduction
Carbonate and other complex reservoirs have become a hot topic in the study of rock physics. It is difficult to carry out petrophysical experiments because of the serious damage caused to cores during development of fractures and pores in carbonate reservoirs. Rock physics numerical simulations play a crucial role. It is necessary to study the three-dimensional digital core method in terms of carbonate reservoirs [1].
Compared with a three-dimensional digital core in sandstone, only two parts of basic rock skeletons and pores are included. In addition to basic rock skeletons and pores of a digital core in sandstone, the carbonate reservoirs also have secondary structures such as microfractures. e carbonate contains different components. Extracting these components is a very difficult problem [2][3][4][5][6][7].
Fractures can improve reservoir permeability. e accurate identification and evaluation of fractures are among the important contents in exploration and development [8].
Well logging techniques that are currently used for fracture identification include resistivity logging, sonic logging, radiological logging, dip logging, density logging, compensated neutron logging and electrical image log, and acoustic image log [9][10][11][12][13]. ese techniques have limitations when using various conventional well logs to directly identify fractures, so some methods for identifying fractures by conventional well logs have been proposed [14][15][16][17][18][19]. For example, the differences between the real resistivity and measured resistivity obtained from the apparent acoustic porosity using rock-electricity by Yang Xue are used to identify fractures in the formation [20]. At present, the majority of hole recognition in carbonate reservoirs is processed based on the OTSU (maximum between-class variance) segmentation algorithm. For example, Jiang has established a chart of facture-hole recognition based on resistivity response [21]. However, this method does not work well when there are multipeaks in the histogram of an electrical image log image. Li and others automatically identify the holes using the threshold segmentation algorithm with the contour tracking algorithm after hollowing out the interior point [22]. However, this algorithm is the human fetching threshold, and the influence of human factors is significant. One of the core problems in the interpretation and evaluation of carbonate reservoirs is hole identification.
e OTSU method is slow and computationally expensive for hole identification. An image segmentation algorithm based on OTSU and watershed is proposed to effectively extract hole targets from complex backgrounds [23].
ere are some blank areas between the electrodes of the electrical image log image. e electrical image log image does not completely cover the stratum around the borehole [24], and the information is relatively small, which affects the extraction of components. Simultaneously, the heterogeneities in the carbonate reservoir are very serious, which affects the image inpainting of the electric imaging image. e incomplete electrical image log image and severe heterogeneity in the carbonate reservoirs are solved by image inpainting, which improves the extraction accuracy of different components in three-dimensional cores. e resolution on the electrical image log image is high, which can clearly reflect the macrocomponents of various reservoirs. Various macrocomponents (basic rock skeletons, pores, and connected parts) in the carbonate reservoirs can be extracted from the electrical image log image. Some microfractures can be extracted from the CT (computed tomography) scanned images, which can provide microscopic component information of rocks.
In this paper, the full-bore image is first generated from the electrical image log image, and then, the macrocomponents (rock skeletons, pores, and connected parts) are extracted. e CT scanned images can provide the microscopic component information of rocks in the carbonate reservoirs, and the microfractures can be extracted from the CT scanned images. ese methods make the extraction of different components more accurate.

Image Inpainting Based on Combining the Multipoint
Geostatistics with an Interpolation Method. Image inpainting refers to the process of reconstructing the lost or damaged parts of images and videos [25]. Image inpainting technologies have many goals and applications [26]. e inpainting steps of the Criminisi image inpainting algorithm are composed of four parts: marking of the area to be repaired, the calculation of priority, searching and filling the best matching blocks, and confidence of updating. Aiming at the defects of the Criminisi algorithm, such as the long period of image inpainting, many researchers have improved the algorithm [27]. Image inpainting is implemented by the Filtersim simulation algorithm based on multipoint geostatistics [28]. e image inpainting method for significant heterogeneities in carbonate reservoirs, which affect inpainting of the electrical image, is proposed based on combining multipoint geostatistics with an interpolation method.
Training: the Filtersim simulation algorithm requires a set of 6 directional filters to filter the training images. Each pattern in the training images is classified according to the filtering scores.
Inpainting: find the nearest pattern in the training filtering scores for the repaired areas, and then, the pattern is chosen for the repaired areas.
e image inpainting method based on multipoint geological statistics has a good effect on homogeneous reservoirs, but when image inpainting is ineffective on large significantly heterogeneous reservoirs, matching of the effects will be uncertain, and the image inpainting results will be abnormal. In view of this situation, the image inpainting method is improved based on multipoint geostatistics [29].
is paper combines multipoint geostatistics with an interpolation method to make full use of the fast interpolation method of quickly inpainting the basic blank areas of the electrical image log image. e preliminary inpainting results are used to filter and match the pattern in the filtering domain to find the optimum matching pattern. After the image inpainting is processed on blanks with serious heterogeneities, using the preliminary image inpainting results and multipoint geostatistics, the amount of information is increased, the uncertainty in matching patterns in this area is reduced, and the image inpainting results are made more reliable.

Denoising of the Inpainting Image and the CT Scanned
Images. First, the SNR (signal-to-noise ratio) of the images is calculated to determine whether there are some noises in the images whose SNR is larger than a certain threshold. Finally, there should be various denoising methods for the noise images, and the image inpainting and CT scanned images should be processed to eliminate some noises.

Different Methods Are Used to Extract Different Components of the Electrical Image Log Image and the CT Scanned
Images.
e electrical image log image produces the fullbore image, and different components can be extracted after denoising from the full-bore image and the CT scanned images. e electrical image log image and the CT scanned images contain different components (basic rock skeletons, pores, connected parts, and microfractures). Different components in the carbonate reservoirs have different distributions of gray levels in the electrical image log images and CT scanned images. Different components are extracted using the improved methods.
After preprocessing of the full-bore images, there are different distributions of gray levels in the basic rock skeletons, pores, and connected parts extracted by the maximum interclass variance in the two times method. Microfractures are extracted using the improved image segmentation between the watershed and OTSU methods.

Different Component Extractions from the Electrical Image Log Image.
e method of maximum interclass variance was proposed by Nobuyuki Otsu, a Japanese scholar, in 1979 [30]. is method is an adaptive threshold determination method, also known as the OTSU method, or OTSU for short. OTSU divides an image into two parts, the background and the target, according to the gray level distribution of the images. e larger the variance is between the background and the target, the greater the difference will be between the two parts of the images. When part of the target is misclassified into the background or part of the background is misclassified into the target, the difference between the two parts will decrease. erefore, maximizing interclass variance minimizes the probability of misclassification. e threshold of the image is obtained by using the maximum interclass variance method [31]. An automatic extraction method of basic rock skeletons, pores, and connected parts based on the maximum interclass variance in the two times method is proposed for the histogram of the electrical image log image.
ere is one threshold in the maximum interclass variance method: where f(i, j) is the gray value of the original image, g(i, j) is the gray value of the image after segmentation, and p represents the gray value of the target; (i, j) represents the coordinates of the current location, such as i ∈ [0, l] and j ∈ [0, w], l is the length of the image, w is the width of the image, and T is the threshold. ere are two thresholds in the interclass maximum variance twice method: where f(i, j) is the gray value of the original image, g(i, j) is the gray value of the image after segmentation, (i, j) represents the coordinates of the current location, such as i ∈ [0, l] and j ∈ [0, w], l is the length of the image, w is the width of the image, P 1 is the gray value of target 1, P 2 is the gray value of target 2, P 3 is the gray value of target 3, T 1 is the first threshold, and T 2 is the second threshold. e histogram of the measured electrical image log image does not have single peaks but three peaks. e segmentation results cannot be obtained by using the maximum interclass variance. e maximum interclass variance in the two times method is proposed. According to different distribution characteristics of the gray levels of different components in the electrical image log, two threshold segmentation points with the largest variance and the second largest variance are calculated sequentially to obtain the automatic segmentation of basic rock skeletons, pores, and connected parts. e maximum interclass variance in the two times method is the maximum interclass variance method for extended classes among three classes segmentation. First, the image is segmented into two classes by using the maximum interclass variance method, which means that the optimal threshold T is determined by the maximum interclass variance method, and the gray level of the full-bore image is segmented into two parts according to the first threshold T.
en, the maximum interclass variance method is also used to calculate the best classifications in each subclass, and the two best thresholds T 1 and T 2 are determined, which means that region P 11 and region P 12 are determined from subregion P 1 according to the second threshold T 1 , and region P 21 and region P 22 are determined from subregion P 2 according to the third threshold T 2 . e second and third thresholds are determined using the maximum interclass variance among subclass methods. e other optimal threshold T 3 is determined from the two best thresholds T 1 and T 2 . Some components are extracted from the full-bore image using the two best thresholds T 3 and T. e two best thresholds T 3 and T are used to clarify the basic rock skeletons, pores, and connected parts.

Microfracture Extraction from the CT Scanned Images.
Generally, strata with microfractures show dark or black features on CT scanned images, which mean that the gray values are much smaller than the background values. However, when the underground situations are complex, the backgrounds of the image become complex, and there will be dark spots similar to the microfractures, which make identification of the microfractures difficult. To effectively separate the targets and backgrounds, the key step is to segment the CT scanned images, and the OTSU method proposed by Japanese scholars is a widely used image segmentation method. However, because of the complexity of the underground strata, there are many dark spots in the backgrounds, and there are many peaks in the gray histogram. e segmentation effects of the OTSU are not ideal in this case. is method divides many backgrounds into the microfractures and enlarges the range of dark spots. ere are many burrs in the contour of the microfractures, the boundary is not clear, and the segmentation effects are not good. erefore, an image segmentation-based method that combines the OTSU and watershed methods is proposed, which can denoise effectively and is suitable for image segmentation with complex backgrounds.
(1) e Principle of the Watershed Segmentation Method. e basic idea of the watershed method is that the image is regarded as a topographic surface [32]. e gray value represents the height of the ground, and each minimum represents a low-lying area where water continuously gushes out and gradually fills the catchment basin related to the low-Mathematical Problems in Engineering lying area. When water from different low-lying areas converges at some points, dams will be built at these points to prevent the water from overflowing. ese dams are called watersheds, which divide the whole topographic surface into many areas. e watershed method usually can be divided into three kinds: the rainfall method, the submergence method, and the Vincent-Soille method. e Vincent-Soille method is adopted in this paper.
(2) e Improved Image Segmentation between the Watershed and OTSU Methods. e principle of the OTSU method has been introduced in detail in many articles. e specific steps of the combined OTSU and watershed method are as follows: converting the image into a 8-bit pseudocolor image, performing morphological open-close filtering to denoise the image, and converting the image RGB (redgreen-blue) into LUV (light-uniform-variation) color space, and then, the watershed is segmented to obtain the 24 true color segmentation image. Additionally, the segmented true color image is converted into an 8-bit gray image, and finally, the final segmentation image is obtained by using the improved image segmentation combining the watershed and OTSU methods. Compared with the traditional OTSU method, this improved image segmentation method that combines the watershed and OTSU methods can effectively extract microfractures, eliminate dark spots in the backgrounds, and reduce the interference of noise. is method is more conducive to microfracture identification and subsequent fusion processing.

Extraction of Basic Rock Skeletons, Pores, and Connected
Parts in the Electrical Image Log Image. Figure 1 is the measured electrical image log image with 5 mm resolution. e electrical logging image was measured by EILOG instrument of CPL company. Figure 2 is the fullbore electrical image log image based on the combination of multipoint geostatistics and an interpolation method. Based on Figure 2, compared with the measured image, the full-bore image can be obtained from the inpainting image.
rough image inpainting, the amount of information in the image is increased, which is conducive to improve the recognition accuracy of subsequent geological targets. Figure 3 shows extraction of some components of the image segmentation by using the maximum interclass variance in the two times method. Figure 3 shows the extracted macrocomponents such as basic rock skeletons, pores, and connected parts. Blue part represents the extracted pores, green part represents the extracted rock skeleton, and red part represents the extracted connected parts in Figure 3. Figure 4 is the CT scanned image with 8 micron resolution. CT images were measured with GE scanner. Figure 5 is the histogram corresponding to Figure 4.     Mathematical Problems in Engineering OTSU and watershed methods are used to classify component from the CT scanned images. After the image noises are removed by filtering, the microcomponents are extracted. Figure 6 shows the microfractures with some noises. Figure 7 shows the final extracted microcomponents after removing noise. e experimental results prove that using extraction methods for different components enables better results to be obtained.

Conclusions
Compared with a three-dimensional digital core in sandstone reservoirs, carbonate reservoirs include secondary structures in addition to the basic rock skeleton and pore components.
ese different components have different properties. Extracting these different components is a very difficult problem.
Based on generation of the full-bore image, different macroscopic components such as basic rock skeletons, pores, and connected parts are extracted from the full-bore image, and microfractures are extracted from the CT scanned images. e maximum interclass variance in the two times method is proposed in this paper. e macroscopic components with different properties can be calculated from the electrical image log images. e histogram of multipeaks of different macroscopic components can be well processed. e method is proposed to make the extraction of different components with different properties more accurate. e improved image segmentation from the combined watershed and OTSU methods can effectively eliminate black spots and reduce noise interference in the CT scanned images.

Data Availability
e core data are the actual oilfield data and are confidential.

Conflicts of Interest
e authors declare that they have no conflicts of interest.

Acknowledgments
is work was supported in part by the National Natural Science Foundation of China (Grant nos. 41674136 and 41374148).