Geological profile map pixelization method, system and program product
By resampling, graying and multiple classification of geological profile images combined with the correction of geometric constraints, the problem of difficult segmentation of strata in geological profiles is solved, clear edge identification and stratigraphic division are achieved, and it is suitable for geological numerical values. Modeling and technology development.
Patent Information
- Application Number
- CN202410750701.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-06-12
AI Technical Summary
Noise and blur near the junction of multiple strata in geological profiles make fine segmentation of strata difficult. Existing methods are difficult to effectively solve, especially threshold-based, region-based and edge-based methods, and deep learning-based methods rely on a large number of data samples.
By resampling and grayscale the original geological section image according to the specified resolution, using a threshold-based method for the first classification, identifying the stratigraphic edges and performing the second classification, and then performing detailed corrections on the edge pixels through geometric constraints. Ensure that the frequency of occurrence of each pixel's gray value in the small matrix meets specific conditions.
It achieves fine segmentation of geological profiles at the pixel scale, eliminates noise and blur, ensures clear stratigraphic edges, and can quickly determine the cross-sectional area and interface depth of different strata. It is suitable for geological numerical modeling and the promotion of digitalization and information and the development of intelligent technology.
Smart Images

Figure CN118537253A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of geological engineering image processing, and in particular to a method, system and program product for pixelating a geological profile. Background Art
[0002] Pixelating geological profiles at a specified resolution has broad application prospects in geological modeling, analysis and visualization. However, it is difficult to avoid noise or blur in the process of image acquisition, transmission, format conversion, and resolution modification. At present, common image segmentation methods include threshold-based, region-based, edge-based, and deep learning-based methods. The first three methods are difficult to solve the problem of fine segmentation of strata caused by noise and blur near the junction of multiple strata in geological profiles, and the last method relies on a large number of data samples for training. Therefore, the present invention proposes a geological engineering image processing method that does not require samples and training, can directly and effectively eliminate noise and blur, and realizes reasonable and fine segmentation of strata at the pixel scale. Summary of the invention
[0003] The present application provides a method, system and program product for pixelating a geological profile to solve the problem of difficulty in finely segmenting strata caused by noise and blur near the junction of multiple strata in a geological profile.
[0004] In order to solve the above technical problems, the present application provides a method for pixelating a geological profile, and the specific steps of the method include: S1, resampling and graying the original geological profile image according to a specified resolution to obtain an initial gray value matrix M0, and then using a threshold-based method to perform a first classification of pixels according to reference gray values of different strata, and the first classification result is recorded as a gray value matrix M1; S2, based on the first pixel classification result obtained in S1, identify the edges of different strata, and perform a second classification on the edge pixels by comparing them with local non-edge pixels. The second classification result is recorded as the gray value matrix M2; S3. Based on the second classification result of pixels obtained in S2, the edges of different strata are re-identified, and the newly obtained edge pixels are fine-tuned through geometric constraints. The third classification result is recorded as the gray value matrix M3.
[0005] In some embodiments of the present application, the resampling and grayscale conversion of the original image in S1 includes reading the three primary color values of the original image, converting the original image to the target resolution using an interpolation method, and converting the three primary color values of the original image into grayscale values, and the converted grayscale value matrix is recorded as M0.
[0006] In some embodiments of the present application, the first classification of pixels in S1 includes referring to the frequency order of different grayscale values in the grayscale value matrix M0 or determining the reference grayscale values corresponding to different strata in an manually specified manner, comparing the reference grayscale values of different strata, traversing each element in the grayscale value matrix M0, calculating the absolute difference between the grayscale value of any element and the reference grayscale values of different strata, and taking the stratum reference grayscale value corresponding to the minimum absolute difference as the grayscale value of the element after the first classification, and recording the grayscale value matrix after the first classification as M1.
[0007] In some embodiments of the present application, identifying the edges of different strata in S2 and S3 includes traversing each element in the grayscale value matrix to determine whether any element satisfies the requirement that the grayscale values of its upper, lower, left and right adjacent elements are all the same. If the grayscale values are all the same, the element is marked as a non-edge element, and the corresponding pixel is marked as a non-edge pixel; if the grayscale values are not all the same, the element is marked as an edge element, and the corresponding pixel is marked as an edge pixel.
[0008] In some embodiments of the present application, the second classification of edge pixels in S2 includes traversing all edge elements in the gray value matrix M1, restoring the gray values of all edge elements to the corresponding values in the gray value matrix M0, and counting the absolute difference and distance of the gray values of all non-edge elements whose distance from the matrix does not exceed m, and then sorting them according to the size of the product of the absolute difference of the gray value and the nth power of the distance, taking the gray value of the non-edge element corresponding to the minimum value as the gray value of the edge element after the second classification, and recording the gray value matrix after the second classification as the gray value matrix M2.
[0009] In some embodiments of the present application, the matrix distance is the arithmetic square root of the sum of the squares of the row number difference and the column number difference. The values of m and n can be determined by trial and error, and the default values are 5 and 2 respectively.
[0010] In some embodiments of the present application, the detailed correction according to the geometric constraints in S3 includes traversing all edge elements in the gray value matrix M2, and determining whether the gray value of each edge element in the gray value matrix M2 appears at a frequency of not less than p times in the 3X3 matrix centered on it. If not, modify its gray value to the reference gray value that is closest to it in the 3X3 matrix, and repeat the above operation until all edge elements in M2 satisfy that the gray value appears at a frequency of not less than p times in the 3X3 matrix centered on it. Then, the gray value and the corresponding stratum corresponding to each pixel can be determined. The value of p is 2 or 3. If the value of p is 2, isolated points composed of single pixels can be eliminated. If the value of p is 3, then on the basis of p=2, strip strata or protrusions composed of single rows or columns of pixels can be further eliminated.
[0011] In some embodiments of the present application, a system for pixelating a geological profile image is characterized by comprising: a sampling module, which resamples and grayscales an original geological profile image according to a specified resolution to obtain a gray value matrix M0; The global classification module uses a threshold-based method to perform the first classification of pixels according to the reference grayscale values of different strata, and the first classification result is recorded as the grayscale value matrix M1; The local classification module identifies the edges of different strata based on the first classification results, and performs a second classification on the edge pixels by comparing them with the local non-edge pixels. The second classification results are recorded as the gray value matrix M2; The detail correction module re-identifies the edges of different strata based on the second classification results, and performs a third classification on the newly identified edge pixels through geometric constraints, so that all edge elements meet the requirement that the frequency of their grayscale values appearing in the 3X3 matrix centered on them is not less than 2 or 3 times.
[0012] To achieve the above objectives, the present invention provides a computer program product, which implements a method for pixelating a geological profile when the computer program / instructions are executed by a processor.
[0013] Compared with the prior art, the present invention has the following characteristics and beneficial effects: The present invention resamples and grayscales the original image, uses a threshold-based method to perform the first classification, then identifies the edges of different strata based on the first classification, performs a second classification on the edge pixels by comparing with local non-edge pixels, then re-identifies the edges of different strata based on the second classification, and performs detailed correction on the newly identified edge pixels through geometric constraints. The geological profile pixelization method proposed in the present invention can solve the noise and blur problems faced by the fine segmentation of strata in geological profiles, ensure that the edges of different strata are clear after pixelation of the geological profile, can be used to quickly determine the cross-sectional area and interface depth of different strata, and can be further used for numerical modeling of geological profiles, promote the development of digitalization, informatization and intelligent technology in the field of geological engineering, and can produce better results when promoted and used. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is a flow chart of a pixelation method according to an embodiment of the present invention; Figure 2 It is a schematic diagram of a geological section of a basin according to an embodiment of the present invention; Figure 3 Embodiment of the present invention Figure 2 Gray value matrix after resampling of middle region 1 (M0); Figure 4 is the gray value matrix (M1) of region 1 after being processed by S1 in the embodiment of the present invention; Figure 5 is the gray value matrix (M2) of region 1 after being processed by S2 in the embodiment of the present invention; Figure 6 is the gray value matrix (M3) of region 1 after being processed by S3 in the embodiment of the present invention; Figure 7 is the gray value matrix (M0) after resampling of region 2 in the embodiment of the present invention; Figure 8 is the gray value matrix (M3) of region 2 after being processed by S3 in the embodiment of the present invention; Fig. 9 is the gray value matrix (M0) after resampling of region 3 in the embodiment of the present invention; Fig.10 is the gray value matrix (M3) of region 3 after being processed by S3 in the embodiment of the present invention; Fig.11 is the gray value matrix (M0) after resampling of region 4 in the embodiment of the present invention; Fig.12 It is the gray value matrix (M3) of region 4 after being processed by S3 in the embodiment of the present invention. DETAILED DESCRIPTION
[0015] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0016] In the description of the present application, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0017] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0018] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0019] like Figure 1 As shown, according to some embodiments of the present application, a method for pixelating a geological profile image includes the following specific steps: S1, resampling and graying the original geological profile image according to a specified resolution to obtain an initial gray value matrix M0, and then performing a first classification of pixels using a threshold-based method according to reference gray values of different strata, and the first classification result is recorded as a gray value matrix M1; S2, based on the first pixel classification result obtained in S1, identify the edges of different strata, and perform a second classification on the edge pixels by comparing them with local non-edge pixels. The second classification result is recorded as the gray value matrix M2; S3. Based on the second pixel classification result obtained in S2, the edges of different strata are re-identified, and the newly identified edge pixels are modified in detail through geometric constraints. The third classification result is recorded as the gray value matrix M3.
[0020] According to some embodiments of the present application, the resampling and grayscale of the original geological profile image in S1 includes reading the three primary color values of the original image, converting the original image to the target resolution using an interpolation method, and converting the three primary color values of the original image into grayscale values, and the converted grayscale matrix is recorded as M0.
[0021] According to some embodiments of the present application, the first classification of pixels in S1 includes referring to the frequency sorting of different grayscale values in the grayscale value matrix M0 or determining the reference grayscale values corresponding to different strata in an manually specified manner, comparing the reference grayscale values of different strata, traversing each element in the grayscale value matrix M0, calculating the absolute difference between the grayscale value of any element and the reference grayscale values of different strata, and taking the stratum reference grayscale value corresponding to the minimum absolute difference as the grayscale value of this element after the first classification, and recording the grayscale value matrix after the first classification as M1.
[0022] In some embodiments of the present application, identifying the edges of different strata in S2 and S3 includes traversing each element in the grayscale value matrix to determine whether any element satisfies the requirement that the grayscale values of its upper, lower, left and right adjacent elements are all the same. If the grayscale values are all the same, the element is marked as a non-edge element, and the corresponding pixel is marked as a non-edge pixel; if the grayscale values are not all the same, the element is marked as an edge element, and the corresponding pixel is marked as an edge pixel.
[0023] In some embodiments of the present application, the second classification of edge pixels in S2 includes traversing all edge elements in the gray value matrix M1, restoring the gray values of all edge elements to the corresponding values in the gray value matrix M0, and counting the absolute difference and distance of the gray values of all non-edge elements whose distance from the matrix does not exceed m, and then sorting them according to the size of the product of the absolute difference of the gray value and the nth power of the distance, taking the gray value of the non-edge element corresponding to the minimum value as the gray value of the edge element after the second classification, and recording the gray value matrix after the second classification as the gray value matrix M2.
[0024] In some embodiments of the present application, the matrix distance is the arithmetic square root of the sum of the squares of the row number difference and the column number difference. The values of m and n can be determined by trial and error, and the default values are 5 and 2 respectively.
[0025] In some embodiments of the present application, the detailed correction according to the geometric constraints in S3 includes traversing all edge elements in the gray value matrix M2, and determining whether the gray value of each edge element in the gray value matrix M2 appears at a frequency of not less than p times in the 3X3 matrix centered on it. If not, modify its gray value to the reference gray value that is closest to it in the 3X3 matrix, and repeat the above operation until all edge elements in M2 satisfy that the gray value appears at a frequency of not less than p times in the 3X3 matrix centered on it. Then, the gray value and the corresponding stratum corresponding to each pixel can be determined. The value of p is 2 or 3. If the value of p is 2, isolated points composed of single pixels can be eliminated. If the value of p is 3, then on the basis of p=2, strip strata or protrusions composed of single rows or columns of pixels can be further eliminated.
[0026] It should be noted here that the value of p is a fixed value, and the value of p can be 2 or 3, and the preferred value is 3.
[0027] like Figure 2-12 As shown, according to some embodiments of the present application, it is necessary to finely segment different strata in the original geological section of a basin, and the contours between adjacent strata in regions 1-4 in the original image become blurred after being magnified, and the original image is processed in sequence according to S1 to S3 in the present method; Figure 3-6 is the gray value matrix diagram of the processing process of area 1, Figure 3The dotted lines in the figure represent the manually identified stratigraphic boundaries. Since the boundaries between multiple stratigraphic regions are too fuzzy, there are areas that are difficult to identify manually. Figure 4 The dotted lines in the figure represent the manually identified stratigraphic boundaries, and the rectangular boxes represent the elements that do not match the manually identified results. Figure 5 The dotted lines in the figure represent the manually identified stratigraphic boundaries, and the rectangular boxes represent the elements that do not match the manually identified results. Figure 6 The solid lines in the figure represent the boundaries of different strata determined by the pixelation method proposed in the present invention, which are completely consistent with the results of manual identification, and also perform reasonable strata division in places that are difficult to identify manually; Figure 7 and Figure 8 is the gray value matrix diagram of the processing process of area 2, Figure 7 The dotted lines in the figure represent the manually identified stratigraphic boundaries. Since the boundaries between multiple stratigraphic regions are too fuzzy, there are areas that are difficult to identify manually. Figure 8 The solid lines in the figure represent the boundaries of different strata determined by the pixelation method proposed in the present invention, which are completely consistent with the results of manual identification and also perform reasonable strata division in places that are difficult to identify manually; Fig. 9 and Fig.10 is the gray value matrix diagram of the processing process of area 3, Fig. 9 The middle dotted line represents the manually identified stratigraphic boundary. Since the boundary between multiple stratigraphic layers is too fuzzy, there are places that are difficult to identify manually. Fig.10 The solid line in the middle represents the boundary lines of different strata determined by the pixelation method proposed in the present invention, which is completely consistent with the results of manual identification and also performs reasonable strata division in places that are difficult to identify manually; Fig.11 and Fig.12 is the gray value matrix diagram of the processing process of area 4, Fig.11 The middle dotted line represents the manually identified stratigraphic boundary. Since the boundary between multiple stratigraphic layers is too fuzzy, there are places that are difficult to identify manually. Fig.12 The solid line in the middle represents the boundary lines of different strata determined by the pixelation method proposed in the present invention, which is completely consistent with the results of manual identification and also performs reasonable strata division in places that are difficult to identify manually.
[0028] It should be noted here that Figure 2 The values in brackets are the reference grayscale values of different strata.
[0029] According to some embodiments of the present application, a system for pixelating a geological profile image is characterized by comprising: a sampling module, which resamples and grayscales an original geological profile image according to a specified resolution to obtain a gray value matrix M0; The global classification module uses a threshold-based method to perform the first classification of pixels according to the reference grayscale values of different strata, and the first classification result is recorded as the grayscale value matrix M1; The local classification module identifies the edges of different strata based on the first classification results, and performs a second classification on the edge pixels by comparing them with the local non-edge pixels. The second classification results are recorded as the gray value matrix M2; The detail correction module re-identifies the edges of different strata based on the second classification results, and performs detail correction on the newly identified edge pixels through geometric constraints, so that all edge elements meet the requirement that the frequency of their grayscale values appearing in the 3X3 matrix centered on them is not less than 2 or 3 times.
[0030] To achieve the above objectives, the present invention provides a computer program product, and when the computer program / instructions are executed by a processor, a method for pixelating a geological profile is implemented.
[0031] Please consider whether there is anything more to add here, Mr. Yao.
[0032] In summary, the present invention relates to the technical field of geological engineering image processing, and discloses a method, system and program product for pixelation of a geological profile, including: S1: resampling and graying the original geological profile image according to a specified resolution, and then performing a first classification of pixels using a threshold-based method according to reference grayscale values of different strata; S2: on the basis of the first classification result of pixels obtained in S1, identifying the edges of different strata, and performing a second classification of edge pixels by comparing with local non-edge pixels; S3: on the basis of the second classification result of pixels obtained in S2, re-identifying the edges of different strata, and performing detailed corrections on the newly identified edge pixels through geometric constraints, so as to achieve fine segmentation of different strata in the geological profile at the pixel scale according to the specified resolution.
[0033] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention. These improvements and substitutions should also be regarded as the scope of protection of the present invention.
Claims
1. A method for pixelating a geological profile, characterized in that: The specific steps of the method include: S1, resampling and graying the original geological profile image according to a specified resolution to obtain an initial gray value matrix M0, and then using a threshold-based method to perform a first classification of pixels according to reference gray values of different strata, and the first classification result is recorded as a gray value matrix M1; S2, based on the first pixel classification result obtained in S1, identify the edges of different strata, and perform a second classification on the edge pixels by comparing them with local non-edge pixels. The second classification result is recorded as the gray value matrix M2; S3. Based on the second pixel classification result obtained in S2, the edges of different strata are re-identified, and the newly obtained edge pixels are corrected in detail through geometric constraints. The corrected results are recorded as the gray value matrix M3.
2. The method for pixelating a geological profile according to claim 1, characterized in that: The resampling and graying of the original image in S1 includes reading the three primary color values of the original image, converting the original image to the target resolution using an interpolation method, and converting the three primary color values of the original image into gray values, and recording the converted gray value matrix as M0.
3. The method for pixelating a geological profile according to claim 1, characterized in that: The first classification of pixels in S1 includes referring to the frequency sorting of different grayscale values in the grayscale value matrix M0 or determining the reference grayscale values corresponding to different strata in an artificially specified manner, comparing the reference grayscale values of different strata, traversing each element in the grayscale value matrix M0, calculating the absolute difference between the grayscale value of any element and the reference grayscale values of different strata, and taking the stratum reference grayscale value corresponding to the minimum absolute difference as the grayscale value of this element after the first classification, and recording the grayscale value matrix after the first classification as M1.
4. The method for pixelating a geological profile according to claim 1, characterized in that: Identifying the edges of different strata in S2 and S3 includes traversing each element in the grayscale value matrix, and judging whether any element satisfies the same grayscale value as the adjacent elements above, below, left and right. If the grayscale values are all the same, the element is marked as a non-edge element, and the corresponding pixel is marked as a non-edge pixel; if the grayscale values are not all the same, the element is marked as an edge element, and the corresponding pixel is marked as an edge pixel.
5. The method for pixelating a geological profile according to claim 1, characterized in that: The second classification of edge pixels in S2 includes traversing all edge elements in the gray value matrix M1, restoring the gray values of all edge elements to the corresponding values in the gray value matrix M0, and counting the absolute difference and distance of the gray values of all non-edge elements whose distance from the matrix does not exceed m, and then sorting them according to the size of the product of the absolute difference of the gray value and the nth power of the distance, taking the gray value of the non-edge element corresponding to the minimum value as the gray value of the edge element after the second classification, and recording the gray value matrix after the second classification as M2, the matrix distance is the arithmetic square root of the sum of the squares of the row number difference and the column number difference, the values of m and n can be determined by trial and error, and the default values are 5 and 2 respectively.
6. The method for pixelating a geological profile according to claim 1, characterized in that: In S3, the newly identified edge pixels are corrected in detail according to the geometric constraints, including traversing all edge elements in the gray value matrix M2, judging whether the gray value of each edge element in the gray value matrix M2 appears at least p times in the 3X3 matrix centered on it. If not, its gray value is corrected to the reference gray value that is closest to it in the 3X3 matrix. The above operation is repeated until all edge elements in M2 satisfy that the gray value appears at least p times in the 3X3 matrix centered on it. The gray value and the corresponding stratum corresponding to each pixel can be determined. The value of p is 2 or 3. If the value of p is 2, the isolated points composed of a single pixel can be eliminated. If the value of p is 3, then on the basis of p=2, the strip stratum or convex part composed of a single row or column of pixels is further eliminated.
7. A system for pixelating a geological profile, characterized in that: include: The sampling module resamples and grayscales the original geological profile image according to the specified resolution to obtain the gray value matrix M0; The global classification module uses a threshold-based method to perform the first classification of pixels according to the reference grayscale values of different strata, and the first classification result is recorded as the grayscale value matrix M1; The local classification module identifies the edges of different strata based on the first classification results, and performs a second classification on the edge pixels by comparing them with local non-edge pixels. The second classification results are recorded as the gray value matrix M2; The detail correction module re-identifies the edges of different strata based on the second classification results, and performs detail correction on the newly identified edge pixels through geometric constraints, so that all edge elements meet the requirement that the frequency of their grayscale values appearing in the 3X3 matrix centered on them is not less than 2 or 3 times.
8. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of a method for pixelating a geological profile as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Texture segmentation method of seismic section image and apparatus thereof
CN107644400A
System and method for image segmentation
CN112419343A
Method for labeling image object and circuit system
US20230334629A1
Cited By
Water tank experiment sedimentary profile analysis method and system
CN121563963A
A flume experiment sediment profile analysis method and system
CN121563963B
Generation layer boundary identification method based on soil profile image
CN121982050A
A method for identifying the occurrence layer boundary based on soil profile images
CN121982050B
