Core CT data pore extraction method and device based on gray cumulative distribution function
By constructing a gray-scale cumulative distribution function and a first-order derivative spectrum, combined with nuclear magnetic resonance calibration, an automated pore structure extraction of unconventional reservoir cores was achieved. This solved the problem of difficulty in determining the segmentation threshold in existing technologies, and improved the accuracy and repeatability of the segmentation results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YANGTZE UNIVERSITY
- Filing Date
- 2026-03-03
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies cannot automatically determine accurate segmentation thresholds when processing unconventional reservoir core CT data, resulting in poor objectivity and repeatability of segmentation results, making it difficult to achieve accurate quantitative characterization of complex rock pore structures.
A method based on the gray-level cumulative distribution function is adopted. By constructing a global gray-level cumulative distribution function curve, smoothing it and calculating the first derivative, a gray-level change rate spectrum is constructed. An adaptive segmentation model is used to determine the critical slope threshold. Combined with nuclear magnetic resonance measurement for physical calibration, the automatic segmentation of pores and matrix is realized.
It effectively solves the problem of segmenting single-peak distribution data, realizes robust, objective and repeatable automated extraction of pore structure of unconventional reservoir cores, and improves the accuracy of segmentation threshold and the reliability of segmentation results.
Smart Images

Figure CN122156233A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of microscopic characterization and evaluation technology of unconventional oil and gas reservoirs, and in particular to a method and apparatus for extracting pores from core CT data based on the gray-level cumulative distribution function. Background Technology
[0002] As global energy exploration and development expands into deeper and tighter strata, oil and gas resources located in unconventional reservoirs have become a core area for energy strategy succession. Among the microscopic evaluation technologies for such complex reservoirs, digital core technology based on X-ray computed tomography (X-CT) has become a key means of constructing three-dimensional micropore network models and conducting multiphase fluid numerical simulations due to its non-destructive, high-resolution, and three-dimensional visualization advantages.
[0003] Compared to conventional reservoirs, unconventional reservoirs exhibit extremely strong heterogeneity. Their complex pore systems experience widespread partial volumetric effects during imaging, causing the grayscale values within a single voxel to appear as a weighted average of high-density mineral matrix and low-density pore fluid, rather than a pure signal from a single component. This sub-voxel-scale signal aliasing causes the grayscale histograms of unconventional reservoir core CT images to completely lose the typical bimodal characteristics of conventional reservoirs, instead exhibiting a significant quasi-Gaussian unimodal distribution or a severe left-side tailing feature.
[0004] Constrained by these statistical distribution characteristics, existing mainstream automatic thresholding algorithms in the industry face severe challenges. In existing technologies, Otsu's method and its derivatives, based on the principle of maximizing inter-class variance, strictly rely on the geometric separation of histogram peaks and troughs. However, when faced with single-peak histograms of unconventional reservoir core CT data, they completely fail because they cannot locate effective extreme valleys in grayscale space, often leading to threshold selection that deviates significantly from the actual physical interface. Furthermore, the currently widely used manual interactive thresholding method is not only inefficient but also susceptible to the influence of the operator's subjective visual differences, resulting in significant non-reproducibility of data analysis results for the same rock sample, severely weakening the objectivity and quantitative level of geological evaluation.
[0005] Therefore, it is necessary to propose a dynamic feature-adaptive segmentation method based on the gray-level cumulative distribution function to overcome the limitations of traditional statistical segmentation theory based on absolute gray-level frequency in processing unimodal distribution data, realize the dynamic calibration of the segmentation threshold with image features, and provide objective, accurate and repeatable automated technical support for the quantitative characterization of complex rock pore structures. Summary of the Invention
[0006] In view of this, the present invention provides a method and apparatus for extracting pores from core CT data based on the gray-level cumulative distribution function, in order to solve the technical problem that existing porosity segmentation methods cannot automatically determine the accurate segmentation threshold when faced with the single-peak gray-level distribution of unconventional reservoir core samples.
[0007] In a first aspect, the present invention provides a method for extracting pores from core CT data based on a gray-level cumulative distribution function, comprising: CT scan data of unconventional reservoir core samples were obtained, and the CT scan data were analyzed and reconstructed to obtain a three-dimensional grayscale matrix. The global gray-level cumulative distribution function curve of the core sample is constructed based on the three-dimensional gray-level matrix, and the cumulative distribution function curve is smoothed. Numerical differentiation is performed on the smoothed cumulative distribution function curve to calculate the first derivative of the global gray level and construct the global gray level change rate spectrum. Search for the maximum gray level change rate in the global gray level change rate spectrum, construct an adaptive segmentation model based on the maximum gray level change rate and the preset relative sensitivity benchmark coefficient, and calculate the critical slope threshold. A one-way search algorithm is used to scan the gray-level change rate spectrum point by point from the low gray-level area to the high gray-level area. The gray-level point corresponding to the first gray-level change rate exceeding the critical slope threshold is taken as the optimal segmentation threshold between pores and matrix. Based on the optimal segmentation threshold, the three-dimensional gray-level matrix is binarized to extract the pore structure.
[0008] Furthermore, CT scan data of unconventional reservoir core samples were acquired. After parsing the CT scan data, a three-dimensional grayscale matrix was reconstructed, including: CT scans were performed on unconventional reservoir core samples to obtain three-dimensional CT images of the core samples, and the three-dimensional CT images were saved in a preset format. The binary data stream of a 3D CT image in a preset format is parsed layer by layer, and CT reconstruction is performed based on the preset data type and 3D size to obtain the corresponding 3D grayscale matrix.
[0009] Furthermore, a global gray-level cumulative distribution function curve of the core sample is constructed based on the three-dimensional gray-level matrix, and the cumulative distribution function curve is smoothed, including: Statistical analysis of the global gray-level histogram of the 3D gray-level matrix; Transform the global grayscale histogram into a cumulative distribution function curve; The curve was fitted with a polynomial smoothing using a Savitzky-Golay digital filter.
[0010] Furthermore, an adaptive segmentation model is constructed based on the maximum grayscale change rate and a preset relative sensitivity benchmark coefficient, and the critical slope threshold is calculated, including: The maximum grayscale change rate was used as the normalization benchmark. The critical slope threshold is obtained by multiplying the normalized benchmark by the preset relative sensitivity benchmark coefficient.
[0011] Furthermore, the adaptive segmentation model is constructed based on the mapping relationship between gray-level dynamic features and pore edges, using a relative slope thresholding method, and is expressed by the following formula: in The critical slope threshold. This is the smoothed cumulative gray-level distribution function. The first derivative of grayscale. This is a relative sensitivity benchmark coefficient used to define the critical velocity ratio at which the porous phase begins to emerge significantly.
[0012] Furthermore, the adaptive segmentation model also includes a neighborhood robustness determination mechanism: The target gray level is determined to be the critical point for pore segmentation only when the average rate of change of multiple consecutive gray level points after the target gray level position corresponding to the critical slope threshold is higher than the critical slope threshold.
[0013] Furthermore, the method further includes: physically calibrating the optimal segmentation threshold based on the porosity measured by nuclear magnetic resonance of the core sample; the physical calibration method includes: CT scans and nuclear magnetic resonance scans were performed on the same core sample to obtain porosity measured by nuclear magnetic resonance and porosity segmented by CT. Using the error between porosity measured by nuclear magnetic resonance and porosity calculated by CT as the optimization target, the porosity segmentation critical point is iteratively adjusted to make the porosity error less than the preset error tolerance. The critical point of pore segmentation that satisfies the error constraint is used as the calibration threshold.
[0014] Furthermore, the calculation method for the porosity of the core sample measured by nuclear magnetic resonance is expressed by the following formula: in, This indicates the porosity of the rock core sample as measured by nuclear magnetic resonance. Let be the signal intensity of the i-th relaxation component, M be the total signal amplitude of the standard sample, S and G be the cumulative number of measurements and the receiving gain of the standard sample, respectively, s be the cumulative number of measurements during NMR data acquisition of the rock sample, and g be the receiving gain of the sample during NMR data acquisition. ρ represents the water content of the standard sample, and v represents the volume of the rock sample to be tested.
[0015] Furthermore, the method also includes: performing binarization segmentation of the three-dimensional grayscale matrix according to the optimal threshold, and generating a grayscale-porosity panoramic curve and a grayscale-slope change curve to achieve quantitative characterization and visual verification of the segmentation results.
[0016] Secondly, the present invention provides a core CT data pore extraction device based on a gray-level cumulative distribution function, comprising: The data input module is used to acquire CT scan data of unconventional reservoir core samples, and after parsing the CT scan data, reconstruct a three-dimensional grayscale matrix. The smoothing and denoising module is used to construct the global gray-level cumulative distribution function curve of the core sample based on the three-dimensional gray-level matrix, and to smooth the cumulative distribution function curve. The analysis module is used to perform numerical differentiation on the smoothed cumulative distribution function curve, calculate the first derivative of the global gray level, and construct the global gray level change rate spectrum. The calculation module is used to search for the maximum gray level change rate in the global gray level change rate spectrum, construct an adaptive segmentation model based on the maximum gray level change rate and the preset relative sensitivity benchmark coefficient, and calculate the critical slope threshold. The segmentation module uses a one-way search algorithm to scan the gray-level change rate spectrum point by point from the low gray-level area to the high gray-level area. The gray-level point corresponding to the first gray-level change rate exceeding the critical slope threshold is taken as the optimal segmentation threshold between the pores and the matrix. Based on the optimal segmentation threshold, the three-dimensional gray-level matrix is binarized to extract the pore structure.
[0017] Compared with existing technologies, the pore extraction method and apparatus for core CT data based on the gray-level cumulative distribution function proposed in this invention have the following advantages: First, by performing global statistical analysis on the core CT scan data, a gray-level cumulative distribution function is constructed, and a digital filtering algorithm is introduced to perform polynomial smoothing fitting on the CDF curve, effectively eliminating high-frequency unstructured noise while preserving the signal topological features; Second, numerical differentiation is performed on the smoothed curve to construct a global gray-level first derivative spectrum, transforming the static gray-level distribution into a dynamic rate evolution process, and locating the global maximum gray-level growth rate point; Based on the adaptive discrimination model with relative slope constraints, a specific proportion of the maximum gray-level growth rate is used as the sensitivity criterion.
[0018] Compared to traditional segmentation methods based on grayscale amplitude or manual experience, this invention directly utilizes the structural variation patterns of grayscale distribution as the judgment criterion, ensuring that the threshold determination aligns with the actual physical process of pore formation. This effectively solves the problem of difficult-to-define pore edges in low-contrast core images and avoids random errors from manual threshold selection. By introducing the dynamic extreme values of the data itself as a benchmark, dynamic calibration of the segmentation threshold based on image features is achieved, providing robust, objective, and repeatable automated technical support for the quantitative characterization of complex rock pore structures. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating the pore extraction method for core CT data based on the gray-level cumulative distribution function provided by the present invention. Figure 2 This is a schematic diagram of the process for performing CT scanning on rock samples provided by the present invention; Figure 3 A schematic diagram of the cumulative grayscale distribution curve and the grayscale change rate curve of the core sample provided by the present invention; Figure 4 This is a schematic diagram of the nuclear magnetic resonance core scanning principle provided by the present invention; Figure 5 The flowchart illustrates the implementation of the core CT data pore extraction method based on the gray-level cumulative distribution function provided by this invention. Figure 6 This is a schematic diagram of the core CT data pore extraction device based on the gray-level cumulative distribution function provided by the present invention. Detailed Implementation
[0020] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0021] Please see Figure 1 This embodiment provides a method for extracting pores from core CT data based on the gray-level cumulative distribution function, including: Step S101: Obtain CT scan data of unconventional reservoir core samples, analyze the CT scan data, and reconstruct a three-dimensional grayscale matrix. Step S102: Construct the global gray-level cumulative distribution function curve of the core sample based on the three-dimensional gray-level matrix, and smooth the cumulative distribution function curve; Step S103: Perform numerical differentiation on the smoothed cumulative distribution function curve, calculate the first derivative of the global gray level, and construct the global gray level change rate spectrum; Step S104: Search for the maximum gray level change rate in the global gray level change rate spectrum, construct an adaptive segmentation model based on the maximum gray level change rate and the preset relative sensitivity benchmark coefficient, and calculate the critical slope threshold. Step S105: Using a one-way search algorithm, the gray-level change rate spectrum is scanned point by point from the low gray-level area to the high gray-level area. The gray-level point corresponding to the first gray-level change rate exceeding the critical slope threshold is taken as the optimal segmentation threshold between the pores and the matrix. Based on the optimal segmentation threshold, the three-dimensional gray-level matrix is binarized to extract the pore structure.
[0022] This embodiment breaks away from the traditional framework of finding histogram valleys and overcomes the limitations of statistical segmentation theory based on absolute gray-level frequency in processing unimodal distribution data. By introducing digital filtering and gradient analysis algorithms, this method transforms the static gray-level statistical problem into a dynamic rate evolution analysis, constructing a global gray-level change rate spectrum. It then utilizes the rate of change breakpoint (RCP) characteristic of the signal in the transition region from pores to matrix as an adaptive criterion to determine the pore segmentation threshold of 3D core CT data. This effectively overcomes the mathematical challenge of finding a threshold for unimodal histograms, achieving robust extraction and high-precision characterization of the micropore topology of unconventional reservoir cores without human intervention.
[0023] In a preferred embodiment, in step S101, CT scan data of the core sample is acquired, and after parsing the CT scan data, a three-dimensional grayscale matrix is reconstructed, including: CT scans were performed on unconventional reservoir core samples to obtain three-dimensional CT images of the core samples, and the three-dimensional CT images were saved in a preset format. The binary data stream of a 3D CT image in a preset format is parsed layer by layer, and CT reconstruction is performed based on the preset data type and 3D size to obtain the corresponding 3D grayscale matrix.
[0024] As a specific implementation, the preset format of the three-dimensional CT image is .raw format. The CT scan data of the core sample can be obtained by performing a CT scan on the rock sample or by directly reading the existing three-dimensional .raw format data. The binary data stream is parsed and reconstructed into a three-dimensional grayscale matrix, which serves as the basic data source for subsequent image processing and feature analysis.
[0025] In some embodiments, CT scanning of rock samples specifically includes: reproducing the actual stratigraphic environment using a high-temperature, high-pressure clamp. When performing CT scanning of core samples, appropriate acquisition parameters must be selected based on the properties of the core sample to obtain high-quality scan images. The quality of the sample scan determines the accuracy of subsequent image processing. Simultaneously, during preprocessing, the sample must be rigorously cut and ground flat and thoroughly dried to avoid moisture interference with grayscale imaging.
[0026] like Figure 2 As shown, Figure 2 A schematic diagram of the process for performing CT scans on rock samples is shown.
[0027] First, shale plunger core samples are drilled from the full-diameter core of the unconventional reservoir. The core samples are then cut and polished using a diamond cutter and sandpaper to conform to the requirements of 3D core CT scanners and MRI scanners. They are typically 1 inch in diameter and about 4 centimeters in length.
[0028] Secondly, the cut and polished plunger core sample is placed on a sample stage equipped with a high-temperature and high-pressure holder. This holder should have good X-ray permeability and be able to withstand the target formation temperature and confining pressure / pore pressure.
[0029] Subsequently, the position of the clamp is adjusted so that the center of the rock sample is aligned with the rotation axis, ensuring that the sample is completely covered by X-rays throughout the scanning process, and avoiding image cropping or reconstruction distortion due to offset.
[0030] Before the formal scanning, a pre-equilibration of temperature and pressure must be performed to ensure that the rock sample is under the set formation conditions. Next, background imaging is carried out, and detector response data is collected when the holder is unloaded or without a sample. This data is used for noise and inhomogeneity correction in the subsequent image reconstruction process.
[0031] After background acquisition, the scanning program is initiated, and a high-resolution CT scanner is used to capture the micro- and nano-scale pore structures of the shale in a constant temperature and humidity environment. Scanning parameters (such as voltage, current, exposure time, and projection angle) are set according to the rock sample density and resolution requirements. Temperature and pressure changes are monitored in real time during the scan, and temperature and pressure curves are recorded. If temperature and pressure fluctuations exceed the allowable range, the scan is paused and resumed only after stabilization.
[0032] After the scan is completed, the original projection data is reconstructed using the accompanying software. The reconstruction process includes basic image correction and denoising to improve image quality. The final output is a 3D CT image, saved as a .raw file.
[0033] Furthermore, the .raw file obtained from the CT scan is imported into the developed Python application. This program parses the binary data stream layer by layer based on the CT reconstruction parameters (data type uint16, preset 3D size) to construct a global cumulative distribution function (CDF).
[0034] In a preferred embodiment, in step S102, the global gray-level cumulative distribution function curve of the core sample is constructed based on the three-dimensional gray-level matrix, and the cumulative distribution function curve is smoothed, including: Statistical analysis of the global gray-level histogram of the 3D gray-level matrix; Transform the global grayscale histogram into a cumulative distribution function curve; The curve is fitted with a polynomial smoothing using a Savitzky-Golay digital filter, expressed by the following formula: in, Is the cumulative distribution function in The value of the point, Indicates a value less than The sum of probabilities. For 3D core CT data, It is the grayscale value of the core CT data. Indicates grayscale less than The sum of all voxels.
[0035] To address the quantum noise and high-frequency artifacts present in the original data, this method introduces the Savitzky-Golay filtering algorithm to perform polynomial smoothing fitting on the CDF curve. While preserving the key topological features of the curve (such as inflection points and peaks), it eliminates unstructured random fluctuation interference and effectively suppresses unstructured noise caused by CT imaging artifacts.
[0036] Although there is a severe overlap between the pores and the matrix in terms of absolute grayscale value, their growth rates during the grayscale accumulation process show significant kinetic differences. In step S103, numerical differentiation is performed on the smoothed CDF curve to calculate the first derivative of the global grayscale (…). This involves constructing a gray-scale dynamic feature reflecting the change in pore accumulation rate, namely the "gray-scale-rate of change" feature spectrum. This transforms the static gray-scale distribution into a dynamic growth rate signal, characterizing the evolution trend of pore components in gray-scale space. It also provides fundamental data support for subsequently establishing an adaptive segmentation model that correlates gradient features with segmentation thresholds. Figure 3 As shown, Figure 3 The cumulative grayscale distribution curve and grayscale change rate curve of the core sample are shown.
[0037] In step S104, an adaptive segmentation model is constructed based on the maximum grayscale change rate and a preset relative sensitivity benchmark coefficient, and the critical slope threshold is calculated, including: The maximum grayscale change rate was used as the normalization benchmark. The critical slope threshold is obtained by multiplying the normalized benchmark by the preset relative sensitivity benchmark coefficient.
[0038] As a specific implementation, the global maximum (MaxSlope), i.e., the location where the grayscale increase is steepest, is searched in the grayscale change rate spectrum and defined as the "characteristic main peak rate" of the rock sample image. Using this rate as a normalization benchmark, a relative sensitivity coefficient (Ratio) is introduced. Calculate the critical slope threshold used to determine the critical point of pore segmentation. The calculation formula is as follows: .
[0039] Because the absolute grayscale values of core CT images from different scanning batches vary (dimension differences) due to the influence of voltage energy, directly using the absolute slope may affect the stability of the judgment. Therefore, the gradient features need to be relativized. This method searches for the maximum grayscale growth rate (MaxSlope) across the entire region and uses this as a normalization benchmark to eliminate numerical bias caused by differences in imaging energy between different rock samples.
[0040] The adaptive segmentation model is based on the mapping relationship between gray-level dynamic features and pore edges, and is constructed using a relative slope thresholding method, expressed by the following formula: in The critical slope threshold. This is the smoothed cumulative gray-level distribution function. The first derivative of grayscale. This is a relative sensitivity benchmark coefficient used to define the critical velocity ratio at which the porous phase begins to emerge significantly.
[0041] In some embodiments, to accurately measure the porosity of shale cores under formation temperature and pressure conditions and provide accurate data for correcting the porosity extraction results of core CT data, determining the segmentation threshold further includes: physically calibrating the optimal segmentation threshold based on the nuclear magnetic resonance measurement of the porosity of the core sample; the physical calibration method includes: CT scans and nuclear magnetic resonance scans were performed on the same core sample to obtain porosity measured by nuclear magnetic resonance and porosity segmented by CT. Using the error between porosity measured by nuclear magnetic resonance and porosity calculated by CT as the optimization target, the porosity segmentation critical point is iteratively adjusted to make the porosity error less than the preset error tolerance. The critical point of pore segmentation that satisfies the error constraint is used as the calibration threshold.
[0042] In practice, the porosity measured by nuclear magnetic resonance is used as a benchmark to correct and adjust the porosity segmentation threshold of CT images until the error between the porosity obtained by CT image processing and the porosity measured by nuclear magnetic resonance is ≤2%. This threshold is recorded as the optimal threshold. By establishing a porosity consistency calibration mechanism, nuclear magnetic resonance technology and CT scanning technology are combined to realize a porosity segmentation threshold prediction method for CT images under shale in-situ strata conditions based on nuclear magnetic resonance technology.
[0043] Specifically, methods for measuring the porosity of samples based on nuclear magnetic resonance include: First, the core samples were dried. After drying, the samples were placed in a desiccator and allowed to cool naturally to room temperature. Then, they were placed in a high-temperature, high-pressure (HTHP) holder to replicate the actual formation environment. The CPMG signal of the dried core samples was then measured using a nuclear magnetic resonance (NMR) scanner. Next, a fluid saturation experiment was performed on the core samples using a vacuum pressure saturator. The saturated core samples were then placed back into the HTHP holder, and the CPMG signal was repeatedly measured in the actual formation environment. Figure 4 As shown, the CPMG signal of pure fluid in the core is calculated using the echo subtraction and re-inversion method, and then the porosity of the core under in-situ formation conditions is calculated to correct the porosity obtained based on the CDF curve of the core CT data.
[0044] The calculation method for the porosity of the core sample by nuclear magnetic resonance measurement is expressed by the following formula: In the formula, This indicates the porosity (%) of the core sample as measured by nuclear magnetic resonance. denoted as Σi ... v represents the water content of the standard sample; v represents the volume of the rock sample to be tested (cm³). 3 ).
[0045] In some embodiments, the method further includes: collecting the grayscale features of each sample and its corresponding pore segmentation threshold to form a training sample set of grayscale features-pore segmentation threshold, which is used to establish a statistical mapping relationship between grayscale dynamic features and the physical optimal segmentation threshold, realize cross-sample prediction of segmentation threshold, thereby improving the generalization ability and stability of the algorithm under different lithology and scanning conditions.
[0046] Furthermore, after eliminating dimensional differences in sample features, ridge regression and L2 regularization methods are used to automatically select the optimal relative sensitivity benchmark coefficient λ through LOOCV hyperparameter search. Using nuclear magnetic resonance porosity as the benchmark and grayscale features as input, a physical calibration-data-driven model is established, overcoming the challenge of selecting thresholds for single-peak histograms. This model can accurately pinpoint the critical abrupt change points between porosity and matrix based on grayscale gradient features, achieving automated threshold segmentation adapted to the specific lithological characteristics.
[0047] In step S105, to improve the robustness of the model and avoid local extrema interference, this method employs a one-way search algorithm to scan the gray-level change rate spectrum point by point from the low gray-level region to the high gray-level region, identifying the first gray-level change rate that exceeds the critical slope threshold. The locked grayscale nodes are determined as the optimal porosity segmentation threshold for this rock sample. ).based on The value is read from the grayscale distribution corresponding to the CDF curve, and then the core porosity is calculated. ).
[0048] To eliminate false positives for isolated noise points, in some embodiments, the one-way search algorithm further includes a neighborhood robustness determination mechanism: The target gray level is determined to be the critical point for pore segmentation only when the average rate of change of multiple consecutive gray level points after the target gray level position corresponding to the critical slope threshold is higher than the critical slope threshold.
[0049] By ignoring the computationally unstable region in the initial stage through the neighborhood robustness determination mechanism, the mean of the continuous neighborhood after the target point continues to meet the threshold condition.
[0050] In some embodiments, the method further includes: performing binarization segmentation on the three-dimensional CT image according to a determined optimal threshold, and generating a panoramic curve of "grayscale-porosity" and a curve of "grayscale-slope" change, so as to realize quantitative characterization and visual verification of the segmentation results.
[0051] To more clearly illustrate the method of this application, such as Figure 5 As shown, Figure 5 The implementation flowchart of this method is shown.
[0052] This method mainly consists of three core steps: 1) Global Gray-Level Distribution Modeling and Preprocessing: Construct a gray-level histogram of the 3D CT data and transform it into a cumulative gray-level distribution function to eliminate the interference of local noise on the overall trend. This addresses high-frequency signal fluctuations in the original data. 2) Constructing the first derivative spectrum of grayscale change rate: Numerical differentiation is performed on the smoothed and denoised CDF curve to calculate its first derivative (i.e., grayscale growth rate), thereby constructing the global grayscale change rate spectrum. This step transforms the static grayscale threshold problem into a dynamic rate change analysis, which can accurately locate the "abrupt point" where porous components begin to emerge significantly in the grayscale space.
[0053] 3) Adaptive Threshold Determination Based on Relative Dynamic Characteristics: To address the lack of generalization ability in the fixed threshold method, a relative threshold criterion based on the "maximum rate of change" is established. The algorithm first searches for the global maximum value in the first derivative spectrum, using this as a reference benchmark. Then, an adjustable sensitivity coefficient is introduced, and by scanning from the background region to the signal region, the first grayscale node that breaks through the maximum rate of change is identified. This node represents the critical segmentation threshold between the pores and the matrix, avoiding misjudgments due to tail noise while ensuring effective capture of weak signals at the pore edges.
[0054] This method can accurately pinpoint the critical abrupt change point between pores and matrix based on gray-level gradient features, thereby achieving automated threshold segmentation adapted to the lithological characteristics.
[0055] like Figure 6 As shown, this embodiment of the invention also provides a core CT data pore extraction device 600 based on a gray-level cumulative distribution function. The data input module 601 is used to acquire CT scan data of unconventional reservoir core samples, and after parsing the CT scan data, reconstruct a three-dimensional grayscale matrix. The smoothing and denoising module 602 is used to construct the global gray-level cumulative distribution function curve of the core sample based on the three-dimensional gray-level matrix, and to smooth the cumulative distribution function curve. Analysis module 603 is used to perform numerical differentiation on the smoothed cumulative distribution function curve, calculate the first derivative of the global gray level, and construct the global gray level change rate spectrum. The calculation module 604 is used to search for the maximum gray level change rate in the global gray level change rate spectrum, construct an adaptive segmentation model based on the maximum gray level change rate and the preset relative sensitivity benchmark coefficient, and calculate the critical slope threshold. The segmentation module 605 is used to scan the gray-level change rate spectrum point by point from the low gray-level area to the high gray-level area using a one-way search algorithm. The gray-level point corresponding to the first gray-level change rate exceeding the critical slope threshold is taken as the optimal segmentation threshold between the pores and the matrix. Based on the optimal segmentation threshold, the three-dimensional gray-level matrix is binarized to extract the pore structure.
[0056] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for extracting pores from core CT data based on the gray-level cumulative distribution function, characterized in that, include: CT scan data of unconventional reservoir core samples were obtained, and the CT scan data were analyzed and reconstructed to obtain a three-dimensional grayscale matrix. The global gray-level cumulative distribution function curve of the core sample is constructed based on the three-dimensional gray-level matrix, and the cumulative distribution function curve is smoothed. Numerical differentiation is performed on the smoothed cumulative distribution function curve to calculate the first derivative of the global gray level and construct the global gray level change rate spectrum. Search for the maximum gray level change rate in the global gray level change rate spectrum, construct an adaptive segmentation model based on the maximum gray level change rate and the preset relative sensitivity benchmark coefficient, and calculate the critical slope threshold. A one-way search algorithm is used to scan the gray-level change rate spectrum point by point from the low gray-level area to the high gray-level area. The gray-level point corresponding to the first gray-level change rate exceeding the critical slope threshold is taken as the optimal segmentation threshold between pores and matrix. Based on the optimal segmentation threshold, the three-dimensional gray-level matrix is binarized to extract the pore structure.
2. The method according to claim 1, characterized in that, CT scan data of unconventional reservoir core samples were acquired. After parsing the CT scan data, a three-dimensional grayscale matrix was reconstructed, including: CT scans were performed on unconventional reservoir core samples to obtain three-dimensional CT images of the core samples, and the three-dimensional CT images were saved in a preset format. The binary data stream of a 3D CT image in a preset format is parsed layer by layer, and CT reconstruction is performed based on the preset data type and 3D size to obtain the corresponding 3D grayscale matrix.
3. The method according to claim 1, characterized in that, The global gray-level cumulative distribution function curve of the core sample is constructed based on the three-dimensional gray-level matrix, and the cumulative distribution function curve is smoothed, including: Statistical analysis of the global gray-level histogram of the 3D gray-level matrix; Transform the global grayscale histogram into a cumulative distribution function curve; The curve was fitted with a polynomial smoothing using a Savitzky-Golay digital filter.
4. The method according to claim 1, characterized in that, An adaptive segmentation model is constructed based on the maximum grayscale change rate and a preset relative sensitivity benchmark coefficient. The critical slope threshold is calculated, including: The maximum grayscale change rate was used as the normalization benchmark. The critical slope threshold is obtained by multiplying the normalized benchmark by the preset relative sensitivity benchmark coefficient.
5. The method according to claim 4, characterized in that, The adaptive segmentation model is based on the mapping relationship between gray-level dynamic features and pore edges, and is constructed using a relative slope thresholding method, expressed by the following formula: in The critical slope threshold. This is the smoothed cumulative gray-level distribution function. The first derivative of grayscale. This is a relative sensitivity benchmark coefficient used to define the critical velocity ratio at which the porous phase begins to emerge significantly.
6. The method according to claim 1, characterized in that, Also includes: The optimal segmentation threshold is physically calibrated based on the porosity measured by nuclear magnetic resonance of the core sample. The physical calibration method includes: CT scans and nuclear magnetic resonance scans were performed on the same core sample to obtain porosity measured by nuclear magnetic resonance and porosity segmented by CT. Using the error between porosity measured by nuclear magnetic resonance and porosity calculated by CT as the optimization target, the porosity segmentation critical point is iteratively adjusted to make the porosity error less than the preset error tolerance. The critical point of pore segmentation that satisfies the error constraint is used as the calibration threshold.
7. The method according to claim 6, characterized in that, The calculation method for the porosity of the core sample by nuclear magnetic resonance measurement is expressed by the following formula: in, This indicates the porosity of the rock core sample as measured by nuclear magnetic resonance. Let be the signal intensity of the i-th relaxation component, M be the total signal amplitude of the standard sample, S and G be the cumulative number of measurements and the receiving gain of the standard sample, respectively, s be the cumulative number of measurements during NMR data acquisition of the rock sample, and g be the receiving gain of the sample during NMR data acquisition. ρ represents the water content of the standard sample, and v represents the volume of the rock sample to be tested.
8. The method according to claim 1, characterized in that, The one-way search algorithm also includes a neighborhood robustness determination mechanism: The target gray level is determined to be the critical point for pore segmentation only when the average rate of change of multiple consecutive gray level points after the target gray level position corresponding to the critical slope threshold is higher than the critical slope threshold.
9. The method according to claim 1, characterized in that, Also includes: The three-dimensional grayscale matrix is binarized and segmented according to the optimal threshold, and a grayscale-porosity panoramic curve and a grayscale-slope change curve are generated to achieve quantitative characterization and visual verification of the segmentation results.
10. A pore extraction device for core CT data based on gray-level cumulative distribution function, characterized in that, include: The data input module is used to acquire CT scan data of unconventional reservoir core samples, and after parsing the CT scan data, reconstruct a three-dimensional grayscale matrix. The smoothing and denoising module is used to construct the global gray-level cumulative distribution function curve of the core sample based on the three-dimensional gray-level matrix, and to smooth the cumulative distribution function curve. The analysis module is used to perform numerical differentiation on the smoothed cumulative distribution function curve, calculate the first derivative of the global gray level, and construct the global gray level change rate spectrum. The calculation module is used to search for the maximum gray level change rate in the global gray level change rate spectrum, construct an adaptive segmentation model based on the maximum gray level change rate and the preset relative sensitivity benchmark coefficient, and calculate the critical slope threshold. The segmentation module uses a one-way search algorithm to scan the gray-level change rate spectrum point by point from the low gray-level area to the high gray-level area. The gray-level point corresponding to the first gray-level change rate exceeding the critical slope threshold is taken as the optimal segmentation threshold between the pores and the matrix. Based on the optimal segmentation threshold, the three-dimensional gray-level matrix is binarized to extract the pore structure.