Method for calculating rock porosity based on rock casting body slice picture
Through image processing technology, including preliminary processing, gridization and histogram threshold segmentation, the porosity in rock cast sheet photos is accurately calculated, which solves the problem of large artificial errors in traditional methods and achieves high-precision porosity measurement.
Patent Information
- Application Number
- CN202410945917.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-11-08
AI Technical Summary
The traditional method for measuring porosity of rock cast thin sheets depends on human experience and has large errors, which cannot meet the accuracy and accuracy requirements of modern research.
Image processing technology based on rock cast sheet photos, including preliminary processing, grid processing, RGB to XYZ data conversion, histogram threshold segmentation and pore area calculation, is used to accurately determine rock porosity.
High-precision and accurate porosity measurement are achieved, artificial errors are reduced, quantitative porosity data is provided, and the requirements for storage performance evaluation are met.
Smart Images

Figure CN118918172A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of geology and oil and gas field exploration, and in particular to a method for calculating rock porosity based on rock casting thin section photographs. Background Art
[0002] Rock casting thin section data plays an important role in geological research and oil and gas exploration. The determination of rock casting thin section porosity is an important basis for determining rock physical parameters and reservoir performance evaluation.
[0003] Traditionally, the porosity of rock casting thin sections is mainly obtained through visual estimation based on human experience. After the rock is ground into thin sections, the pores in the rock appear blue. Through artificial identification of cast thin sections, the proportion of blue area in the field of view under the microscope is estimated based on personal experience, and the porosity of the rock casting thin sections is roughly determined. This type of method has large human errors, which is closely related to the experience of the identification personnel of the casting thin sections. There are differences in the porosity identified by different personnel for casting thin sections. Although the pores in the rock casting thin sections appear blue, which is quite different from the color of rock minerals under the single polarized light of the microscope, it is very easy to distinguish mineral components from pores, but the estimation of porosity (pore area ratio) still has human errors and empirical errors. In addition, in the study of reservoir space and reservoir properties, the determination of the porosity of rock casting thin sections is very critical, and it is urgent to seek new methods to accurately and quantitatively calculate the porosity.
[0004] Image recognition technology can grid images and determine the relative coordinates of images, determine the color RGB of unit grids, and assign numerical values according to color changes, etc. Therefore, image recognition technology has obvious advantages in identifying and counting the pore area of rock casting thin sections. In summary, in order to obtain high-precision and accurate rock casting thin section porosity size, it is necessary to carry out research on calculating rock porosity based on rock casting thin section photos. Summary of the invention
[0005] The purpose of the present invention is to provide a method for calculating rock porosity based on rock casting thin section photographs, aiming to solve the technical problem that the artificial qualitative determination of porosity in the prior art can no longer meet the precision and accuracy required by current research.
[0006] To achieve the above object, the present invention adopts a method for calculating rock porosity based on rock casting thin section photos, comprising the following steps:
[0007] Obtain rock casting thin section photos and perform preliminary image processing;
[0008] After determining the relative coordinates of the rock casting thin section photos, the rock casting thin section photos are gridded according to the pixel size and quantity of the rock casting thin section photos;
[0009] Determine the RGB distribution data of the rock casting thin section photo and convert the RGB data into XYZ data;
[0010] Based on the principle of histogram threshold segmentation, in the XYZ data, according to the threshold of the Z value within the pore space range, the pore distribution area is picked up and the area of the pore distribution area is calculated;
[0011] The porosity of rock casting thin sections is calculated based on the relative area of rock casting thin section photos;
[0012] Obtain porosity of rock cast thin sections.
[0013] Among them, in the step of obtaining the rock casting thin section photo and performing preliminary processing on the image:
[0014] Photograph the rock casting thin section under single polarized light to obtain the rock casting thin section photograph;
[0015] Input the rock casting thin section photos into the computer for preliminary image processing.
[0016] Among them, in the step of inputting the rock casting thin section photos into the computer and performing preliminary image processing:
[0017] The preliminary processing includes edge clipping, stain treatment, and total variation image denoising.
[0018] Among them, after determining the relative coordinates of the rock casting thin section photograph, according to the pixel size and number of the rock casting thin section photograph, the step of gridding the rock casting thin section photograph is as follows:
[0019] Determine the relative coordinates of rock cast thin section photographs;
[0020] According to the pixel size and number of the rock casting thin section photograph, the number of grids and the grid step length in the vertical and horizontal directions of the rock casting thin section photograph are determined.
[0021] Among them, in the step of determining the relative coordinates of the rock casting thin section photograph:
[0022] The coordinates are relative coordinates determined based on the pixel size and number of the rock cast thin section photograph.
[0023] Among them, in the step of determining the RGB distribution data of the rock casting thin section photograph and converting the RGB data into XYZ data:
[0024] Perform image recognition and processing of rock casting thin section photos to determine the RGB plane data distribution of rock casting thin section photos;
[0025] Convert RGB data to XYZ data.
[0026] Among them, based on the principle of histogram threshold segmentation, in the XYZ data, according to the threshold of the Z value within the pore space range, the pore distribution area is picked up and the area of the pore distribution area is calculated:
[0027] Determine the threshold interval of the Z value of the pore space distribution area in the XYZ data of the rock casting thin section photo;
[0028] According to the threshold interval of the Z value, the pore distribution area is intercepted and the area of the pore space distribution is calculated.
[0029] Wherein, in the step of calculating the porosity of the rock casting thin section according to the relative area of the rock casting thin section photograph:
[0030] The total area of the image is calculated based on the relative coordinates determined from the rock cast thin section photograph;
[0031] According to the size of the pore distribution area, the porosity of the rock casting thin section is calculated by the ratio of the pore distribution area to the total area of the rock casting thin section photograph.
[0032] The invention discloses a method for calculating rock porosity based on rock casting thin section photos. The method comprises the following steps: obtaining rock casting thin section photos and performing preliminary processing on the images; after determining the relative coordinates of the rock casting thin section photos, gridding the rock casting thin section photos according to the pixel size and quantity of the rock casting thin section photos; converting RGB data into XYZ data, and determining the threshold interval of the Z value of the pore space distribution in the XYZ data of the rock casting thin section photos; calculating the area of the pore distribution region based on the histogram threshold segmentation; calculating the porosity of the rock casting thin section according to the relative area of the rock casting thin section photos; and obtaining the porosity of the rock casting thin section. The method can obtain the porosity in the rock casting thin section photos with high precision, accuracy and quantification through the above-mentioned method, thereby solving the problem of roughly estimating the porosity in the rock casting thin section photos through artificial thin section identification in the traditional way and avoiding the problem of errors caused by artificial experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 It is a flow chart of the steps of the method for calculating rock porosity based on rock casting thin section photos of the present invention.
[0035] Figure 2 It is a schematic diagram of a rock photograph of a rock casting thin slice under single polarized light of the present invention.
[0036] Figure 3 It is a schematic diagram of processing a single polarized photograph of a rock cast thin slice according to the present invention.
[0037] Figure 4 It is a schematic diagram of color extraction of a single polarized photograph of a rock casting thin slice based on image recognition and processing technology of the present invention.
[0038] Figure 5 It is a schematic diagram of the threshold range of the Z value for segmenting the pore space distribution in a single polarized light photograph of a rock casting thin section based on the histogram threshold method of the present invention.
[0039] Figure 6 It is a schematic diagram of the grid node distribution of the pore space in the rock casting thin section based on the Z value threshold range of the present invention. DETAILED DESCRIPTION
[0040] See also Figure 1 to Figure 6 ,in Figure 1 is a flow chart of the steps of the method for calculating rock porosity based on rock casting thin section photographs, Figure 2 This is a schematic diagram of a rock photo taken under single polarized light on a rock casting thin section. Figure 3 This is a schematic diagram of processing a single polarized photo of a rock casting thin slice. Figure 4 This is a schematic diagram of color extraction from a single polarized photo of a rock casting thin section based on image recognition and processing technology. Figure 5 This is a schematic diagram of the threshold range of the Z value for segmenting the pore space distribution in the single polarized light photograph of a rock casting thin section based on the histogram threshold method. Figure 6 It is a schematic diagram of the grid node distribution based on the Z value threshold range to intercept the pore space in the rock casting thin section.
[0041] The present invention provides a method for calculating rock porosity based on rock casting thin section photographs, comprising the following steps:
[0042] S100: Take photos of rock casting thin sections under single polarized light to obtain photos of rock casting thin sections;
[0043] In this embodiment, the rock casting thin section is photographed under the single polarized light of a microscope, so that the location of the rock pores can be better identified.
[0044] S200: Input the rock casting thin section photos into the computer and perform preliminary image processing; the preliminary processing includes edge clipping, stain processing, and total variation image denoising;
[0045] In this embodiment, the single polarized photograph of the rock casting thin section is input into the computer, and Photoshop is used to perform image shearing and perspective transformation processing, and preliminary image processing is performed. The rock casting thin sections that cannot be completely photographed are spliced. The blank and shadow areas in the single polarized photograph of the rock casting thin section are hollowed out and transparent, so that the part is skipped during image processing. In addition, the scale part in the single polarized photograph of the rock casting thin section can be stained or cropped to remove the part, so that the acquired image is clearer and more accurate.
[0046] In total variation image denoising, let f be the clear image after denoising, f0 be the original single polarized photo of the rock casting thin section polluted by noise, and n be the noise part in the single polarized photo of the rock casting thin section, that is, the following relationship exists:
[0047] f0(x,y)=f(x,y)+n(x,y);
[0048] Where (x, y) is the pixel point of the image, and its domain is Ω, that is, (x, y)∈Ω; n is a value with zero mean and variance σ 2 The total variation of f0 is obviously larger than that of f. Minimizing the total variation (TV) can eliminate the noise. Therefore, based on the total variation image denoising principle, the denoising problem can be reduced to a minimization problem, namely:
[0049]
[0050] The following constraints are met:
[0051] ∫ Ω fdxdy=∫ Ω f0 dxdy;
[0052]
[0053] It can be deduced that:
[0054]
[0055] In the formula, the first term is the data fidelity term, which mainly plays the role of preserving the original image characteristics and reducing image distortion; the second term is the regularization term, and the parameter is the λ regularization parameter, which plays an important role in balancing denoising and smoothing and depends on the noise level. The derived Euler-Lagrange equation is:
[0056]
[0057] At the edge of the image, The larger the value, the smaller the diffusion coefficient, so the diffusion along the edge direction is weaker, thus preserving the edge; in the smooth area, The smaller the value, the larger the diffusion coefficient, so the diffusion ability is stronger in the smooth area of the image, thus removing the noise.
[0058] S300: Determine relative coordinates of the rock casting thin section photograph, wherein the coordinates are relative coordinates determined according to the pixel size and number of the rock casting thin section photograph;
[0059] In this embodiment, the coordinates of the single polarized light photograph of the rock casting thin section are determined, and the coordinates are relative coordinates. In determining the relative coordinates of the single polarized light photograph of the rock casting thin section, Photoshop, Adobe Illustrator, CorelDRAW and other software are used to determine the relative coordinates of the single polarized light photograph of the rock casting thin section, and the picture is imported into the above corresponding software. Such software can recognize the relative length and width of the single polarized light photograph of the rock casting thin section, and the length is used as the horizontal coordinate range, and the width is used as the vertical coordinate range.
[0060] S400: determining the number of grids and the grid step length in the vertical and horizontal directions of the rock casting thin section photograph according to the pixel size and number of the rock casting thin section photograph;
[0061] In this embodiment, the single polarized light photograph of the rock casting thin section is gridded to determine the number of grids and the network step length; the number of grids and the step length are related to the size of the single polarized light photograph of the rock casting thin section, which will directly affect the accuracy of the calculation and the length of time for computer calculation. When determining the number of grids and the network step length, it is necessary to manually observe the relationship between the minimum pore size and the photo pixel size in the single polarized light photograph of the rock casting thin section. Assuming the photo pixel size is 1, if the minimum pore is equal to the minimum pixel size, the step length needs to be set to 1. If the minimum pore is less than or greater than the minimum pixel size, the step length needs to be set to the ratio of the minimum pore to the minimum pixel.
[0062] S500: performing image recognition and processing of the rock casting thin section photograph to determine the RGB plane data distribution of the rock casting thin section photograph;
[0063] In this embodiment, image recognition and processing of the single polarized light photograph of the rock casting thin section are performed, the weighted average RGB value on the unit grid is identified, and reflected in the grid node, and the RGB plane data distribution of the single polarized light photograph of the rock casting thin section is determined. The color of each unit grid of the single polarized light photograph of the rock casting thin section is identified by image recognition technology, and the color recognition adopts RGB mode. The weighted average method is used to calculate the average RGB value of each unit grid, and the weighted average RGB value of each unit grid is spatially reflected at the node of each grid.
[0064] S600: converting the rock casting thin section photo from RGB data to XYZ data, determining a threshold interval of a Z value of pore space distribution in the XYZ data of the rock casting thin section photo, and intercepting a pore distribution area according to the threshold interval of the Z value;
[0065] In this embodiment, the RGB plane distribution data of the single polarized light photograph of the rock casting thin slice is converted into XYZ plane distribution data, and the color content Z of each unit grid is calculated according to the designed relative coordinates and grid step size. RGB . Convert the RGB data of the single polarized photo of the rock casting thin section into XYZ data:
[0066] Z RGB =0.229R+0.587G+0.114B;
[0067] Where R, G, and B represent the red, green, and blue components of each unit grid of the single polarized photograph of the rock casting thin section, respectively; and Z RGB is the unit grid color component sum, unit %;
[0068] The value range of R, G, and B in RGB is 0 to 255, and the unit is %. To facilitate the subsequent calculation, Z RGB Value range 0~765 weighted into unit grid color content Z i The value range is 0 to 1:
[0069] Z i =(Z RGB max-Z RGB i) / (Z RGB max-Z RGB min)·100;
[0070] Where Z RGB max is used to calculate Z RGB The maximum value, Z RGB min is used to calculate Z RGB The minimum value in .
[0071] S700: Calculate the area of the pore distribution region based on the histogram threshold segmentation;
[0072] In this embodiment, the RGB of the single polarized light photograph of the rock casting thin section is converted into XYZ data, and the Z value threshold range of the pore distribution area in the XYZ data is further determined on the plane map according to the point recognition, and the pore threshold histogram segmentation is performed according to the Z value threshold range, and the segmentation results are combined and mapped to the airspace to form a new color image. The advantage of threshold segmentation is that it is simple to implement, and the segmentation effect is good when the color features of different types of objects are very different. The porosity in the single polarized light photograph of the rock casting thin section is blue and has a large difference in color from the mineral particles, so the porosity of the single polarized light photograph of the rock casting thin section based on the histogram threshold segmentation has a good effect.
[0073] S800: Calculate the porosity of rock casting thin sections based on the relative area of rock casting thin section photos.
[0074] In this embodiment, the total area of the image is calculated based on the relative coordinates determined by the rock casting thin section photograph; the porosity of the rock casting thin section is calculated based on the size of the pore distribution area and the ratio of the pore distribution area to the total area of the rock casting thin section photograph.
[0075] The area of the pore distribution region in the rock casting thin section single polarized light photograph segmented by the histogram threshold method is obtained by counting the number of grid points in the pore distribution region and multiplying the number of grid points in the pore distribution region by the unit grid size:
[0076] S 孔 =N 孔 ×S0;
[0077] Where S 孔 , is the relative area of pore distribution in the rock casting thin section photo, dimensionless; N 孔 , is the number of grids in the pore distribution area in the rock casting thin section photo, dimensionless; S0, is the unit grid size, dimensionless.
[0078] The relative area of the rock casting thin section photograph is calculated by determining the grid size and grid step of the relative coordinates; the porosity of the rock casting thin section photograph is obtained by dividing the area of the pore distribution region by the relative area of the rock casting thin section photograph:
[0079] S 薄 =N 薄 ×S0;
[0080]
[0081] Where S 薄 , is the relative area of the rock casting thin section photograph, dimensionless; N 薄 , is the number of grids in the rock casting thin section photograph, dimensionless; S0, is the unit grid size, dimensionless; is the porosity of rock cast thin section, %.
[0082] The method obtains rock casting thin section photos and performs preliminary image processing; after determining the relative coordinates of the rock casting thin section photos, the rock casting thin section photos are gridded according to the pixel size and number of the rock casting thin section photos; the RGB data is converted into XYZ data; the threshold range of the Z value of the pore distribution area is determined by picking points, and the area of the pore distribution area is calculated based on the histogram threshold segmentation; the porosity of the rock casting thin section is calculated according to the relative area of the rock casting thin section photos; the porosity of the rock casting thin section is obtained; the porosity in the rock casting thin section photos is determined with high precision, relatively accurate and quantitatively through the above method, which solves the problem of roughly estimating the porosity in the rock casting thin section photos through traditional artificial thin section identification and avoiding errors caused by artificial experience.
[0083] What is disclosed above is only a preferred embodiment of the present invention, and it certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.
Claims
1. A method for calculating rock porosity based on rock casting thin section photographs, characterized in that: The steps include: Obtain rock casting thin section photos and perform preliminary image processing; After determining the relative coordinates of the rock casting thin section photos, the rock casting thin section photos are gridded according to the pixel size and quantity of the rock casting thin section photos; Determine the RGB distribution data of the rock casting thin section photo and convert the RGB data into XYZ data; Based on the principle of histogram threshold segmentation, in the XYZ data, according to the threshold of the Z value within the pore space range, the pore distribution area is picked up and the area of the pore distribution area is calculated; The porosity of rock casting thin sections is calculated based on the relative area of rock casting thin section photos; Obtain porosity of rock cast thin sections.
2. The method for calculating rock porosity based on rock casting thin section photographs according to claim 1, characterized in that: In the steps of obtaining rock casting thin section photos and performing preliminary image processing: Photograph the rock casting thin section under single polarized light to obtain the rock casting thin section photograph; Input the rock casting thin section photos into the computer for preliminary image processing.
3. The method for calculating rock porosity based on rock casting thin section photographs according to claim 2, characterized in that: In the step of inputting the rock casting thin section photos into the computer and performing preliminary image processing: The preliminary processing includes edge clipping, stain treatment, and total variation image denoising.
4. The method for calculating rock porosity based on rock casting thin section photographs according to claim 1, characterized in that: After determining the relative coordinates of the rock casting thin section photograph, the steps of gridding the rock casting thin section photograph according to the pixel size and number of the rock casting thin section photograph are as follows: Determine the relative coordinates of rock cast thin section photographs; According to the pixel size and number of the rock casting thin section photograph, the number of grids and the grid step length in the vertical and horizontal directions of the rock casting thin section photograph are determined.
5. The method for calculating rock porosity based on rock casting thin section photographs according to claim 4, characterized in that: In the step of determining the relative coordinates of the rock cast thin section photograph: The coordinates are relative coordinates determined based on the pixel size and number of the rock cast thin section photograph.
6. The method for calculating rock porosity based on rock casting thin section photographs according to claim 1, characterized in that: In the step of determining the RGB distribution data of the rock cast thin section photograph and converting the RGB data into XYZ data: Perform image recognition and processing of rock casting thin section photos to determine the RGB plane data distribution of rock casting thin section photos; Convert RGB data to XYZ data.
7. The method for calculating rock porosity based on rock casting thin section photographs according to claim 6, characterized in that: Based on the principle of histogram threshold segmentation, in the XYZ data, according to the threshold of the Z value within the pore space range, the pore distribution area is picked up and the area of the pore distribution area is calculated: Determine the threshold interval of the Z value of the pore space distribution area in the XYZ data of the rock casting thin section photo; According to the threshold interval of the Z value, the pore distribution area is intercepted and the area of the pore space distribution is calculated.
8. The method for calculating rock porosity based on rock casting thin section photographs according to claim 1, characterized in that: In the step of calculating the porosity of a rock casting thin section based on the relative area of a rock casting thin section photograph: The total area of the image is calculated based on the relative coordinates determined from the rock cast thin section photograph; According to the size of the pore distribution area, the porosity of the rock casting thin section is calculated by the ratio of the pore distribution area to the total area of the rock casting thin section photograph.
Citation Information
Patent Citations
Method for determining pore area of rock casting body slice image, surface porosity calculation method and application thereof
CN112881253A
