A method, system, device and storage medium for core image segmentation

CN119228814BActive Publication Date: 2026-09-01280 INST OF NUCLEAR IND
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411343295.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2026-09-01
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

[0005]为了解决岩心数字化编录过程中图像切分的问题,本发明提供了一种岩心图像切分方法、系统、设备及存储介质

Benefits of technology

[0031]本发明通过获取岩心图像数据,并预设所获取岩心图像的分割参数,将岩心图像的高度划分为整除、向上取整、向下取整三种状态。根据不同状态输出不同的子图像的尺寸结果。分割后的子图像无重叠像元且尺寸接近,实现原始图像数据或提取结果的近似均匀切分。还包括获取岩心图像尺寸数据中单段岩心的深度信息,并进行计算处理得到每段子图像的深度起止信息,将该信息以文件名形式记录于对应子图像中。提高了后续信息提取的可靠性,有利于对模拟人工地质编录结果以及岩心数字化编录研究。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228814B_ABST
    Figure CN119228814B_ABST
Patent Text Reader

Abstract

This invention provides a method, system, device, and storage medium for core image segmentation, belonging to the field of image processing. It includes acquiring core image data, pre-setting segmentation parameters for the acquired core image, and dividing the height of the core image into three states: integer division, rounding up, and rounding down. Different judgment results are output based on different states to determine the size of the sub-images. The depth information of a single core segment in the core image size data is acquired and calculated to obtain the start and end depth information of each sub-image segment. This information is recorded as a filename in the corresponding sub-image filename. The resulting segmented images have the same or approximately the same size, and the combined sub-images are consistent with the original image, achieving uniform segmentation of the original image data or extraction results, facilitating subsequent research on core digitization and cataloging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing, and specifically relates to a method, system, device and storage medium for core image segmentation. Background Technology

[0002] Core logging is an effective means of obtaining deep geological information and is of great significance for engineering construction and mineral exploration. Currently, this work mainly relies on experienced geological experts, which suffers from the drawbacks of manual logging being time-consuming, labor-intensive, and susceptible to the subjective influence of the logger. Digital core logging is a current research hotspot, mainly encompassing two aspects: digital core data acquisition and information extraction. The former can be achieved by measuring borehole core samples using various sensors, with hyperspectral cameras capable of acquiring "image-spectrum integration" data being a research focus. Based on the acquired data, the latter involves extracting geological information through image processing. Overall, digital core logging is still in the exploratory stage. Related research mainly focuses on extracting information such as lithology and altered minerals from acquired images (including hyperspectral images) and spectral curves, but it hasn't further summarized and organized the extracted results to form results similar to those from manual logging, i.e., results containing borehole depth start and end information and corresponding lithology or alteration information.

[0003] In the process of core geological logging, the preservation and study of complete information relies on uniform image segmentation. Uniform image segmentation can ensure the accuracy of raw image data or extracted results, and is of great significance for simulating artificial geological logging results and realizing core digitization and even automated logging.

[0004] Core images (including two-dimensional and three-dimensional images) are composed of pixels. In existing technologies, taking a two-dimensional grayscale image as an example, its dimensions are height × width × band (H × W × 1). When segmenting the image, H is usually used as the segmentation object, and the resulting sub-image has a size of (H / n) × W × 1. This segmentation method may result in sub-images whose total height exceeds or does not completely cover the height range of the original image. This affects information extraction from the core image and impacts the digitization and cataloging of cores. Summary of the Invention

[0005] To address the problem of image segmentation during the digital logging of rock cores, this invention provides a method, system, device, and storage medium for rock core image segmentation.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A core image segmentation method includes the following steps:

[0008] Acquire core image data and extract the size data of the core image, including the height H, width W, and number of bands B of the core image;

[0009] Based on the set segment n and image width factor m of the core image, as well as the obtained core image height H, core image width W and number of bands B, the core image data is segmented to determine the height, width and number of bands of the segmented n sub-images.

[0010] Wherein, if the height H of the core image is divisible by the segment n, the height of each sub-image is determined to be H / n;

[0011] When the height H of the core image is not divisible by the segment n, H / n is rounded to the nearest integer, resulting in a rounded value of round(H / n). The number of sub-image groups and the number of sub-images in each group are determined based on the difference between round(H / n) and H / n. The height of the last sub-image in each group is determined based on round(H / n). The height of the remaining sub-images is round(H / n). The width of each sub-image is round(m / W) and the number of bands is B.

[0012] Preferably, determining the height of the last sub-image in each group based on round(H / n) specifically involves:

[0013] Except for the last group, in all other groups, when round(H / n) is rounded up, the height of the last sub-image is round(H / n)-1; when round(H / n) is rounded down, the height of the last sub-image is round(H / n)+1.

[0014] The height of the last sub-image in the last group is the difference between the height H of the core image and the sum of the heights of the segmented sub-images.

[0015] Preferably, the number of sub-images in each group is specifically:

[0016] Count=int(1 / [(H / n)-round(H / n)]),

[0017] In the formula, Count is the number of the first sub-images in each group of sub-images, and the number of sub-images contained in each group of sub-images is Count+1. int() and round() are the rounding and integer functions in Python, respectively. H is the height of the image being read, and n is the set segment.

[0018] Preferably, the method further includes determining the number of sub-image groups, wherein the formula for calculating the number of sub-image groups is:

[0019] Group_num=int(n / (count+1))+1,

[0020] In the formula, Group_num is the number of sub-image groups; int() is the integer function in Python; n is the set segment; and Count is the number of sub-images at the beginning of each sub-image group.

[0021] Preferably, the core image specifically includes an original color photograph, a hyperspectral image, or a grayscale image.

[0022] Preferably, the method further includes obtaining the depth information of a single core segment in the core image size data, obtaining the depth information of the entire core segment based on the depth information of the single core segment, calculating the depth start and end information of each sub-image segment based on the depth information of the entire core segment and the segmented segment n using the mean algorithm, outputting the depth start and end information of each sub-image segment, and storing and recording it in the form of a file name.

[0023] The present invention also provides a core image segmentation system, specifically comprising:

[0024] The data acquisition module is used to acquire core image data and extract the size data of the core image, including the height H, width W, and number of bands B of the core image.

[0025] The segmentation module is used to segment the core image data according to the set segmentation segment n and image width factor m, as well as the acquired core image height H, core image width W and number of bands B, and to determine the height, width and number of bands of the segmented n sub-images.

[0026] The judgment module is used to determine the height of each sub-image as H / n if the height H of the core image is divisible by the segment n.

[0027] When the height H of the core image is not divisible by the segment n, H / n is rounded to the nearest integer, resulting in a rounded value of round(H / n). The number of sub-image groups and the number of sub-images in each group are determined based on the difference between round(H / n) and H / n. The height of the last sub-image in each group is determined based on round(H / n). The height of the remaining sub-images is round(H / n). The width of each sub-image is round(m / W) and the number of bands is B.

[0028] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps described in the core image segmentation method.

[0029] The present invention also provides a computer-readable storage medium storing a computer program, characterized in that, when the computer program is loaded by a processor, it is capable of executing the steps described in the core image segmentation method.

[0030] The core image segmentation method provided by this invention has the following beneficial effects:

[0031] This invention acquires core image data and presets segmentation parameters for the acquired core images, dividing the height of the core images into three states: integer division, rounding up, and rounding down. Different sub-image sizes are output based on these states. The segmented sub-images have no overlapping pixels and are of similar size, achieving approximately uniform segmentation of the original image data or extracted results. It also includes acquiring the depth information of a single core segment from the core image size data, calculating and processing it to obtain the start and end depth information of each sub-image segment, and recording this information as a filename in the corresponding sub-image. This improves the reliability of subsequent information extraction and is beneficial for research on simulated artificial geological logging results and digital core logging. Attached Figure Description

[0032] To more clearly illustrate the embodiments and design schemes of the present invention, the accompanying drawings required for this embodiment will be briefly described below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a flowchart of a core image segmentation method according to an embodiment of the present invention.

[0034] Figure 2 This is a schematic diagram of a rock core image. Detailed Implementation

[0035] To enable those skilled in the art to better understand and implement the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.

[0036] Example

[0037] This invention provides a method for segmenting core images, specifically as follows: Figure 1 As shown, the specific steps include:

[0038] Step 1: Read the core image.

[0039] Image data can be read using programming languages ​​such as Python. The image data can be two-dimensional or three-dimensional, and can include the original image (color photo, hyperspectral image) or the extracted image (grayscale image), etc.

[0040] Step 2: Preset the required core image segment (n) and image width factor (m).

[0041] Core image (H×W×B) with height H, such as Figure 2 As shown, the depth corresponds to the core extension direction; the width is W, corresponding to the core width; the number of bands is B, with a value ≥ 1. When it is 1, the image is a grayscale image; when it is 3, the image is a color image. The segmentation (n) is the number of segments to be uniformly divided into in the original image, i.e., the number of segments to be divided along the core extension direction; the image width factor (m) is the ratio of the sub-image width to the original image width, with a value less than or equal to 1. By setting the width factor, pixels of a certain width can be extracted from the center of the original image, thus eliminating interfering pixels at the edge of the core image. Interfering pixels refer to rock debris or core box information present at the edge of the core, which affects the final extraction result.

[0042] Step 3: H / n and round(m / W) calculation; Using the image dimensions (H×W×B) read in Step 1 and the n and m parameters given in Step 2, calculate H / n to determine the initial height of the sub-image, and calculate round(m / W) to determine the width of the sub-image, where round() is the rounding function in Python.

[0043] Step 4: Determine the size of the sub-image.

[0044] Step 4.1, H / n State Determination. Using the H / n value calculated in Step 3, determine whether it is in an integer division, rounding up, or rounding down state. Rounding up and rounding down refer to whether the value is rounded down or rounded up.

[0045] Step 4.2: The combination form of each group of sub-images and the size of the images within the group are initially determined. Based on one of the three states determined in Step 4.1—division, rounding up, and rounding down—the size of the sub-images is determined. When in the division state, it indicates that the original image can be uniformly divided, and the height, width, and number of bands of the sub-image are H / n, round (m / W), and B, respectively. In the width direction, the sub-image is located in the middle of the original image, that is, the center line of the sub-image in the width direction coincides with the center line of the original image. When in the rounding down or rounding up state, the number of images in each group and the size of the sub-images within the group are determined according to the difference between the initial H / n value and its own rounded value. The number of images in each group refers to the number of sub-images in each group, and its calculation formula is as follows:

[0046] Count=int(1 / [(H / n)-round(H / n)]) (1)

[0047] In equation (1), Count is the number of the first sub-images in each group of sub-images, and the number of sub-images contained in each group of sub-images is Count+1. int() and round() are the rounding and integer functions in Python, respectively. H is the height of the image read in step 1, and n is the parameter given in step 2.

[0048] The first Count sub-images in each group have a height of round(H / n), a width of round(m / W), and a band count of B, respectively. The last sub-image in each group has a height of round(H / n) + 1 (rounded down) or round(H / n) - 1 (rounded up), a width of round(m / W), and a band count of B.

[0049] Step 4.3: Determine the size of the last sub-image in all segmented sub-images. The last sub-image is located at the very end of the last group of sub-images, and its size is determined based on a combination of the original image size and the sizes of the segmented sub-images. The entire image is divided into many groups of sub-images, and the formula for calculating the number of sub-image groups is as follows:

[0050] Group_num=int(n / (count+1))+1 (2)

[0051] In equation (2), Group_num is the number of sub-image groups, int() is the integer function in Python, n is the parameter given in step 2, and Count is the number of sub-images that appear first in each sub-image group.

[0052] The height of the last sub-image is the difference between the height H of the original image and the sum of the heights of all the segmented sub-images, the width is round (m / W), and the number of bands is B.

[0053] Step 5: Depth Information Annotation. The depth start and end information of each sub-image segment is calculated using the mean algorithm, and this information is recorded as a filename in the corresponding sub-image filename for subsequent core digitization and logging studies.

[0054] The present invention also provides a core image segmentation system, comprising:

[0055] The data acquisition module is used to acquire core image data and extract the size data of the core images, including the height H, width W, and number of bands B of the core image.

[0056] The segmentation module is used to segment the core image data according to the set segmentation segment n and image width factor m, as well as the acquired core image height H, core image width W and number of bands B, and to determine the height, width and number of bands of the segmented n sub-images.

[0057] The judgment module is used to determine the height of each sub-image as H / n if the height H of the core image is divisible by the segment n; if the height H of the core image is not divisible by the segment n, H / n is rounded to the nearest integer, resulting in the integer value of H / n as round(H / n); the difference between round(H / n) and H / n is used to determine the number of sub-image groups and the number of sub-images in each group; the height of the last sub-image in each group is determined based on round(H / n); the height of the remaining sub-images is round(H / n); the width of each sub-image is round(m / W) and the number of bands is B.

[0058] The modules in the aforementioned core image segmentation system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0059] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps in an embodiment of a core image segmentation method. Specific implementation methods can be found in the method embodiments, and will not be repeated here.

[0060] Furthermore, the present invention also provides a non-transitory computer-readable storage medium containing instructions, on which a computer program is stored. For example, a memory containing instructions that can be executed by a processor of a computer device to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc. When the computer program is executed by the processor, it can implement the steps in an embodiment of a core image segmentation method. Specific implementation methods can be found in the method embodiments, which will not be repeated here.

[0061] Those skilled in the art will understand that embodiments of the present invention can provide methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0062] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0063] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0064] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0065] It should be noted that the specific embodiments described above enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although the present invention has been described in detail in this specification and embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention; and all technical solutions and improvements that do not depart from the spirit and scope of the present invention are covered within the protection scope of the present invention patent. No reference numerals in the claims should be construed as limiting the scope of the claims. Any simple variations or equivalent substitutions of technical solutions that can be readily obtained by those skilled in the art within the scope of the technology disclosed in the present invention are within the protection scope of the present invention.

Claims

1. A method for segmenting core images, characterized in that, Includes the following steps: Acquire core image data and extract the size data of the core image, including the height H, width W, and number of bands B of the core image; Based on the set segment n and image width factor m of the core image, as well as the obtained core image height H, core image width W and number of bands B, the core image data is segmented to determine the height, width and number of bands of the segmented n sub-images. Wherein, if the height H of the core image is divisible by the segment n, the height of each sub-image is determined to be H / n; If the height H of the core image is not divisible by the segment n, then H / n is rounded to the nearest integer to obtain the integer value of H / n. According to the above The difference between H / n and H / n determines the number of sub-image groups and the number of sub-images in each group; according to the... Determine the height of the last sub-image in each group, specifically: except for the last group, in all other groups, when When rounded up, the height of the last sub-image is ;when When rounded down, the height of the last sub-image is The height of the last sub-image in the last group is the difference between the height H of the core image and the sum of the heights of the segmented sub-images; the heights of the remaining sub-images are... The width of each sub-image is The number of bands is B; The number of sub-images in each group is specifically as follows: , In the formula, This represents the number of the first sub-images in each group of sub-images, and the number of sub-images contained in each group of sub-images is... , and These are the integer and rounding functions in the Python language. To read the height of the image, For the defined segmentation; The formula for calculating the number of sub-image groups is: , In the formula, Number of sub-image groups; This is the integer function in the Python language; For the defined segmentation; This represents the number of the first sub-images in each group of sub-images.

2. The core image segmentation method according to claim 1, characterized in that, The core images specifically include original color photographs, hyperspectral images, or grayscale images.

3. The core image segmentation method according to claim 1, characterized in that, It also includes obtaining the depth information of a single core segment from the core image size data, obtaining the depth information of the entire core segment based on the depth information of the single core segment, calculating the depth start and end information of each sub-image segment using the mean algorithm based on the depth information of the entire core segment and the segmented segment n, outputting the depth start and end information of each sub-image segment, and storing and recording it in the form of a file name.

4. A core image segmentation system, characterized in that, include: The data acquisition module is used to acquire core image data and extract the size data of the core image, including the height H, width W and number of bands B of the core image. The segmentation module is used to segment the core image data according to the set segmentation segment n and image width factor m, as well as the acquired core image height H, core image width W and number of bands B, and to determine the height, width and number of bands of the segmented n sub-images. The judgment module is used to determine the height of each sub-image as H / n if the height H of the core image is divisible by the segment n. If the height H of the core image is not divisible by the segment n, then H / n is rounded to the nearest integer to obtain the integer value of H / n. According to the above The difference between H / n and H / n determines the number of sub-image groups and the number of sub-images in each group; according to the... Determine the height of the last sub-image in each group, specifically: except for the last group, in all other groups, when When rounded up, the height of the last sub-image is ;when When rounded down, the height of the last sub-image is The height of the last sub-image in the last group is the difference between the height H of the core image and the sum of the heights of the segmented sub-images; the heights of the remaining sub-images are... The width of each sub-image is The number of bands is B; The number of sub-images in each group is specifically as follows: , In the formula, This represents the number of the first sub-images in each group of sub-images, and the number of sub-images contained in each group of sub-images is... , and These are the integer and rounding functions in the Python language. To read the height of the image, For the defined segmentation; The formula for calculating the number of sub-image groups is: , In the formula, Number of sub-image groups; This is the integer function in the Python language; For the defined segmentation; This represents the number of the first sub-images in each group of sub-images.

5. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is loaded by the processor, it is able to perform the steps of the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Rock core RQD digital statistical method, equipment and terminal based on image recognition technology

    CN115393605A

  • Three-dimensional finite element simulation method based on high-precision digital core reconstruction model

    CN115630543A