Oil saturation data transmission method between different software
By converting the oil-containing saturation image into a grayscale map and establishing a mapping relationship, the problem of inconvenient use of the grid mapping strategy data transfer method in the existing technology is solved, and the oil-containing saturation data transfer between different software is realized, which improves processing Efficiency and data accuracy.
Patent Information
- Application Number
- CN202411838672.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, the grid mapping strategy data transfer method has problems of inconvenience in use, and it is difficult to avoid errors caused by grid algorithms.
By obtaining the first visual image of oil-containing saturation, performing grayscale processing, and image segmentation and numerical processing are performed using image threshold segmentation method to establish a mapping relationship between grayscale value and oil-containing saturation value, thereby realizing different software oil saturation data transfer between them.
It improves the processing efficiency of data transmission, supports complex analysis and identification tasks, promotes data sharing across software, and improves data accuracy and convenience of use.
Smart Images

Figure CN119477955A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of petroleum and natural gas engineering, and in particular relates to a method for transmitting oil saturation data between different software. Background Art
[0002] Oil saturation is a comprehensive reflection of reservoir characteristics and reservoir dynamic characteristics. It is one of the key parameters for evaluating reservoir reserves and establishing numerical models in the oil and gas engineering industry. However, sometimes it is necessary to rely on more than two solvers to process geomechanical models and seepage models respectively, which inevitably involves parameter transfer between the two models. Data transfer refers to the process of exchanging data or information between different software systems or applications, such as Petrel and Comsol software. This data transfer is usually to share the output results, features, parameters or other necessary data of the model in different systems, modules or services in order to perform subsequent operations or tasks.
[0003] To achieve data transfer between models, the existing technology often uses a grid mapping strategy data transfer method. However, this method not only has very high requirements on the accuracy of grid division, but also is difficult to avoid the errors caused by the grid algorithm, and has the defect of being inconvenient to use. Summary of the invention
[0004] The purpose of the present invention is to solve the technical problem that the grid mapping strategy data transmission method in the prior art is inconvenient to use.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] The present invention provides a method for transmitting oil saturation data between different software, characterized in that it comprises the following steps:
[0007] 1) obtaining a first visualized image, wherein the first visualized image includes oil saturation information, and graying the first visualized image;
[0008] 2) performing image segmentation on the first visualized image after grayscale processing by using an image threshold segmentation method, performing numerical processing on the segmented image, and establishing a mapping relationship between the grayscale value and the oil saturation value;
[0009] 3) Based on the mapping relationship between the grayscale value and the oil saturation value, a second visualization image is obtained through the digitized grayscale value, and the first visualization image contains oil saturation information.
[0010] Furthermore, the grayscale value of the image after grayscale processing in step 1) is:
[0011] Gray(i,j)=A1*R(i,j)+A2*G(i,j)+A3*B(i,j)
[0012] Among them, Gray(i, j) is the gray value, R(i, j) is the red intensity, G(i, j) is the green intensity, B(i, j) is the blue intensity, (i, j) is the coordinate point, and A1, A2, and A3 are coefficients.
[0013] Furthermore, the grayscale value of the image after grayscale processing in step 1) is:
[0014] Gray(i,j)=0.299*R(i,j)+0.578*G(i,j)+0.114*B(i,j).
[0015] Furthermore, in step 2), image segmentation is performed using the Otsu algorithm.
[0016] Furthermore, in step 3), obtaining the second visual image by using the digitized grayscale value also includes:
[0017] The digitized grayscale values are mapped to the three dimensions of the three primary colors according to three piecewise linear functions, and then a colored second visualization image is generated by superposition.
[0018] The present invention provides an oil saturation data transmission system between different software, characterized in that it comprises the following modules:
[0019] A first image processing module, the first image processing module is used to obtain a first visual image, the first visual image contains oil saturation information, and grayscale the first visual image;
[0020] A digitization module, wherein the digitization module performs image segmentation processing on the first visualized image after grayscale processing by an image threshold segmentation method, performs digitization processing on the segmented image, and establishes a mapping relationship between the grayscale value and the oil saturation value;
[0021] The second image processing module obtains a second visualization image through digitized grayscale values according to a mapping relationship between grayscale values and oil saturation values, and the first visualization image contains oil saturation information.
[0022] The present invention provides a hardware for realizing a method for transmitting oil saturation data between different software, characterized in that it comprises:
[0023] Memory for storing computer programs;
[0024] A processor is used to execute the computer program to implement any one of the steps of the above-mentioned method for transmitting oil saturation data between different software.
[0025] The present invention provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to implement the steps of any one of the above-mentioned methods for transmitting oil saturation data between different software.
[0026] The method provided by the present invention can realize the transmission of oil saturation data between different software. By converting the saturation image into a numerical value and then into an image form again, the processing efficiency of data transmission can be improved, complex analysis and identification tasks can be supported, and cross-software data sharing can be further promoted. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0028] Figure 2 It is a first visualization image of oil saturation in a specific embodiment of the present invention;
[0029] Figure 3 The grayscale image of oil saturation converted in the specific embodiment of the present invention;
[0030] Figure 4 A gray-red mapping relationship diagram in a specific embodiment of the present invention;
[0031] Figure 5 A gray-green mapping relationship diagram in a specific embodiment of the present invention;
[0032] Figure 6 A gray-blue mapping relationship diagram in a specific embodiment of the present invention;
[0033] Figure 7 This is the second visualization image of oil saturation in a specific embodiment of the present invention. DETAILED DESCRIPTION
[0034] The present invention will be described in detail below in conjunction with the accompanying drawings.
[0035] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0036] In order to realize the sharing and transmission of oil saturation data between different software, such as Figure 1As shown, the present invention provides a method for transmitting oil saturation data between different software, comprising the following steps:
[0037] 1) obtaining a first visualized image, wherein the first visualized image includes oil saturation information, and graying the first visualized image;
[0038] Specifically, Figure 2 As shown, in the software in this field, the oil saturation image is generally a color image, and the technician obtains the oil saturation numerical information by distinguishing the color distribution on the image. However, there is a problem in the prior art that data cannot be shared between different software, and it is difficult for the technician to obtain the corresponding accurate numerical information directly through the image information. Based on this, the method provided in this application first converts the color oil saturation distribution map into a grayscale map.
[0039] Specifically, according to the three components corresponding to the three primary colors, the RGB value of each pixel of the image is weighted averaged with different weights. Since the human eye is most sensitive to green and least sensitive to blue, the following formula can be used to perform weighted average on the three RGB components to obtain a more reasonable grayscale image: Figure 3 This is a processed grayscale image in an embodiment of the present invention. The grayscale value of each pixel in the grayscale image represents the oil saturation information of the corresponding position.
[0040] Gray(i,j)=0.299*R(i,j)+0.578*G(i,j)+0.114*B(i,j)
[0041] 2) performing image segmentation on the first visualized image after grayscale processing by using an image threshold segmentation method, performing numerical processing on the segmented image, and establishing a mapping relationship between the grayscale value and the oil saturation value;
[0042] The key to the image threshold segmentation method is to find an appropriate grayscale threshold. In a preferred embodiment, the Otsu algorithm is selected as the image threshold segmentation method, and its specific steps are as follows: Let f(x, y) be the grayscale value at position (x, y) of the oil saturation grayscale image, and the grayscale level be L, then (x, y) belongs to [0, L-1]. If the number of all pixels at grayscale level i is f, then the probability of the i-th grayscale appearing is:
[0043]
[0044] Where i = 0, 1, ..., L-1, and The pixels in the image are divided into two categories according to the grayscale using the threshold T, namely background C0 and target C1. The grayscale of the background CO is 0 to T-1, and the grayscale of the target C1 is T to L-1. The pixels corresponding to the background C0 and the target C1 are: {f(x,y)<1} and {f(x,y)>=t}. The probability of the background C0 part appearing is:
[0045]
[0046] The probability of target C1 appearing is:
[0047]
[0048] where ω 0 +ω 1 =1, the average gray value of background C0 is:
[0049]
[0050] The average gray value of target C1 is:
[0051]
[0052] The total average gray value of the image is:
[0053]
[0054] The inter-class variance of the target and background in the image is:
[0055]
[0056] 3) Based on the mapping relationship between the grayscale value and the oil saturation value, a second visualization image is obtained through the digitized grayscale value, and the first visualization image contains oil saturation information.
[0057] The extracted grayscale values are mapped to obtain the final oil saturation value distribution map. In one embodiment, the mapping relationships between grayscale and red, green, and blue are as follows: Figure 4-6 As shown in the figure, the grayscale value of each pixel in the grayscale image is mapped to the three dimensions of R, G, and B according to three piecewise linear functions, and then a color image is generated by superposition to obtain Figure 7 Colored oil saturation image shown.
[0058] It can be seen that through the method provided in this application, the transmission of oil saturation information represented by images between different software can be realized, and by applying the method provided in this application, technical personnel can also accurately obtain the accurate numerical information of oil saturation in the oil saturation image, which has the characteristics of easy use and accurate data.
[0059] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for transmitting oil saturation data between different software, characterized in that: The following steps are involved: 1) obtaining a first visualized image, wherein the first visualized image includes oil saturation information, and graying the first visualized image; 2) performing image segmentation on the first visualized image after grayscale processing by using an image threshold segmentation method, performing numerical processing on the segmented image, and establishing a mapping relationship between the grayscale value and the oil saturation value; 3) Based on the mapping relationship between the grayscale value and the oil saturation value, a second visualization image is obtained through the digitized grayscale value, and the first visualization image contains oil saturation information.
2. In the method for transmitting oil saturation data between different software as described in claim 1, computer vision and image processing technology are used in step 1) to implement grayscale processing.
3. The method for transmitting oil saturation data between different software according to claim 2, wherein the gray value of the image after grayscale processing in step 1) is: Gray(i,j)=A1*R(i,j)+A2*G(i,j)+A3*B(i,j) in, Gray(i, j) is the gray value, R(i, j) is the red intensity, G(i, j) is the green intensity, B(i, j) is the blue intensity, (i, j) is the coordinate point, A1, A2, A3 are coefficients.
4. The method for transmitting oil saturation data between different software according to claim 3, wherein the gray value of the image after grayscale processing in step 1) is: Gray(i,j)=0.299*R(i,j)+0.578*G(i,j)+0.114*B(i,j).
5. The method for transmitting oil saturation data between different software as claimed in claim 1, wherein in step 2), image segmentation processing is performed using the Otsu algorithm.
6. The method for transmitting oil saturation data between different software according to claim 1, wherein the step of obtaining the second visual image by using the digitized gray value in step 3) further comprises: The digitized grayscale values are mapped to the three dimensions of the three primary colors according to three piecewise linear functions, and then a colored second visualization image is generated by superposition.
7. A system for transmitting oil saturation data between different software, characterized in that: Includes the following modules: A first image processing module, the first image processing module is used to obtain a first visual image, the first visual image contains oil saturation information, and grayscale the first visual image; A digitization module, wherein the digitization module performs image segmentation processing on the first visualized image after grayscale processing by an image threshold segmentation method, performs digitization processing on the segmented image, and establishes a mapping relationship between the grayscale value and the oil saturation value; The second image processing module obtains a second visualization image through digitized grayscale values according to a mapping relationship between grayscale values and oil saturation values, and the first visualization image contains oil saturation information.
8. A hardware for realizing a method for transmitting oil saturation data between different software, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program to implement the steps of the method for transmitting oil saturation data between different software as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the method for transmitting oil saturation data between different software as described in any one of claims 1 to 6.