Rock core image acquisition and processing method and device and storage medium
By using contour detection algorithm and image cropping technology in core image acquisition and processing, the problems of low efficiency, poor accuracy and incomplete image stitching in traditional methods are solved, and efficient and accurate core image acquisition and processing are achieved. The generated images are complete and seamless, and are suitable for the generation of drilling three-dimensional models.
Patent Information
- Application Number
- CN202510301918.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-06-24
AI Technical Summary
Traditional core image acquisition and processing methods have problems such as low efficiency, poor accuracy, and incomplete image stitching, and an efficient and accurate core image acquisition and processing method is urgently needed.
By placing the core extracted from each regression in the core tank in the order from top to bottom and from left to right, high-definition orthographing images of the core tank are collected, and the outlines of the core tank and the core tank are identified using the object profile detection algorithm, and image cropping and splicing are performed to generate a complete, seamless drilling image file.
It realizes efficient and accurate acquisition and processing of core images, improves image stitching processing efficiency, and the generated images are complete and seamless, which can help engineers intuitively understand the overall appearance of drilling and use it to generate realistic three-dimensional drilling models.
Smart Images

Figure CN120198679A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent image recognition and processing, and in particular to a core image acquisition and processing method, device and storage medium. Background Art
[0002] Rock cores are important samples for studying underground geological structures. In the drilling business of the exploration industry, it is generally necessary to take photos of the drilled cores to record the original image information of the cores for subsequent research and reference. During drilling construction, each time the drill tool is lowered to the bottom of the hole for drilling, until the drilling is completed and the drill tool is completely lifted out of the hole to the ground, such an operation cycle is called a return. It can be seen that a complete borehole core is composed of cores extracted from multiple drilling returns, and a complete borehole image can be spliced from the core images of all its returns.
[0003] A complete core image can not only provide an intuitive understanding of the true internal picture of the entire borehole, but can also be used for the texture mapping of the borehole 3D model, making the borehole model more realistic. At present, to obtain a complete core image of a borehole, the core of each drilling round is usually photographed separately, and then the core images of each round are cropped, spliced and fused;
[0004] Traditional core image acquisition and processing methods have problems such as low efficiency, poor accuracy, and incomplete image stitching. Therefore, an efficient and accurate core image acquisition and processing method is urgently needed. Summary of the invention
[0005] In view of the technical defects and technical drawbacks in the prior art, the embodiments of the present invention provide a core image acquisition and processing method, device and storage medium that overcome the above problems or at least partially solve the above problems. The specific scheme is as follows:
[0006] As a first aspect of the present invention, a core image acquisition and processing method is provided, characterized in that the method comprises:
[0007] S100, stacking the cores extracted in each round in the core slots of the core box in order from top to bottom and from left to right, ensuring that the cores in each core slot are neatly arranged;
[0008] S200, taking photos of the core box from the orthophoto direction to collect high-definition orthophoto images of the core box;
[0009] S300, based on an object contour detection algorithm, processing the orthophoto image of each core box, identifying the contour of the core box and the edge contour of each core slot in the core box;
[0010] S400. Divide the core grooves of the core box according to the contour recognition. From the core box image, crop the images of each core groove in order from left to right based on the image cropping technology along the inner contour, generate corresponding core groove images separately, number the core groove images, and save them to the core groove image directory;
[0011] S500. For the images cropped from each core groove in sequence, identify the contour edges of the columnar core based on the object contour detection algorithm;
[0012] S600. Based on the image cropping technology, crop the core image again according to the recognized core contour edges, generate corresponding core images separately, number the core image files, and save them separately to the core image directory;
[0013] S700. For the core photos cropped from each core box, perform image stitching in order from top to bottom according to the numbering sequence, and save them as a large image;
[0014] S800. According to the box number sequence of the core box, stitch and fuse the core images stitched and fused in each core box in order from top to bottom to construct a complete and seamlessly docked borehole image file.
[0015] Further, in S100, the cores in the core grooves are neatly arranged, including:
[0016] The axes of the core segments are on a vertical line;
[0017] The gaps between adjacent core segments are aligned and coincident.
[0018] Further, in S300, the object contour detection algorithm includes any one of the following algorithms:
[0019] Contour recognition algorithm based on edge detection;
[0020] Contour recognition algorithm based on connectivity;
[0021] Contour recognition algorithm based on segmentation;
[0022] Object outer contour detection algorithm based on deep learning.
[0023] Further, the contour recognition algorithm based on edge detection includes:
[0024] Perform edge detection on the orthoimage to obtain a set of discrete edge pixel points;
[0025] Track the detected edge pixel points and connect adjacent edge pixels into a closed edge.
[0026] Further, the numbering rule for the core groove images is:
[0027] Accumulatively increase in sequence according to the order of the core boxes and the order of the core slots in each core box.
[0028] Further, in S600, the numbering rule of the core image file is as follows:
[0029] Keep consistent with the number of the corresponding core slot image file.
[0030] Further, in S700 and S800, image stitching and fusion adopt image fusion technology to avoid gaps at the stitching positions.
[0031] As the second aspect of the present invention, there is also provided a core image acquisition and processing device, and the device includes:
[0032] A core placement module, configured to place cores in core slots according to a preset rule;
[0033] An image acquisition module, configured to acquire a high-definition orthographic image of a core box from the orthographic direction;
[0034] A contour recognition module, configured to recognize the contours of the core box and the core slots based on an object contour detection algorithm;
[0035] An image cropping module, configured to crop the images of the core slots and the cores;
[0036] An image stitching module, configured to stitch and fuse the cropped core images;
[0037] An image storage module, configured to save the processed image files.
[0038] Further:
[0039] The core placement module is specifically configured to: place the cores extracted in each round trip in the core slots of the core box in sequence from top to bottom and from left to right, ensuring that the cores in each core slot are neatly placed;
[0040] The image cropping module is specifically configured to: process the orthographic image of each core box based on an object contour detection algorithm to recognize the contour of the core box and the edge contours of each core slot in the core box, and is also configured to sequentially crop the images of each core slot and recognize the contour edges of the columnar cores based on an object contour detection algorithm;
[0041] The image cropping module is specifically used for: according to the division of the core slots of the core box identified by contour recognition, cropping the images of each core slot from the core box image in the order from left to right based on image cropping technology along the inner contour, separately generating corresponding core slot images, numbering the core slot images, and saving them to the core slot image directory. It is also used for, based on image cropping technology, secondarily cropping the image of the core according to the recognized edge of the core contour, separately generating the corresponding core image, numbering the core image file, and saving it separately to the core image directory;
[0042] The image stitching module is specifically used for: in the order of the box numbers of the core boxes, stitching and fusing the core images stitched and fused in each core box in the order from top to bottom in sequence to construct a complete and seamlessly docked borehole image file.
[0043] As a third aspect of the present invention, there is provided a computer-readable storage medium storing a computer program, which when executed by a computer, causes the computer to execute the core image acquisition and processing method as described in any one of the above.
[0044] The present invention has the following beneficial effects:
[0045] Through the contour detection algorithm, the contour of the core image is intelligently recognized from the core box image. Through image cropping technology, the image file of the core is extracted from the core box image. Through image fusion technology, the image files of the core are stitched and fused in sequence, thereby forming a complete borehole portrait. The whole process is completely automatically realized at one time through intelligent algorithms and advanced technologies, changing the previous complex process of manually stitching and fusing two by two with the help of tool software after bringing the images back to the office. The whole process requires no manual intervention and is realized through program automation, thus greatly improving the stitching and processing efficiency of core images. The complete stitched borehole real image can help engineering personnel intuitively understand the overall appearance of the borehole and can also be used to generate a realistic borehole three-dimensional column model. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a schematic flowchart of a core image acquisition and processing method provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0048] Refer toFigure 1 As shown in Figure 1 , the core image acquisition and processing method provided by the embodiment of the present invention includes:
[0049] S100, stack the cores extracted in each round trip in the core slots of the core box in the order from top to bottom and from left to right, ensuring that the cores in each core slot are neatly arranged.
[0050] Among them, the neat arrangement of the cores in the core slot includes:
[0051] The axes of all core segments in the core slot are on a vertical line, and the gaps between adjacent core segments are aligned, and the gaps should overlap as much as possible. This can ensure that the core images in the extracted core slot are regular and can reduce the workload of processing the gaps in the later image processing.
[0052] S200, take a photo of the core box from the orthographic direction to collect the high-definition orthographic image of the core box.
[0053] Among them, the images of all core boxes of a borehole can be collected and processed together after collection, or the images of the core boxes can be collected and processed one by one.
[0054] S300, based on the object contour detection algorithm, process the orthographic image of each core box to identify the contour of the core box and the edge contours of each core slot in the core box.
[0055] The contour detection algorithm is a digital image processing algorithm, mainly used to extract the outer edge of the target object from a binary, edge-detected or thresholded image.
[0056] The contour detection algorithm adopted by the present invention includes one of the contour recognition algorithms based on edge detection, the contour recognition algorithms based on connectivity, and the contour recognition algorithms based on segmentation. In addition to these classic algorithms, with the development of machine learning and artificial intelligence technologies, there are also many object outer contour detection algorithms based on deep learning, such as the edge detection method based on convolutional neural network (CNN). These algorithms automatically extract the contour information of the object by learning a large amount of image data.
[0057] In the embodiment of the present invention, the contour detection algorithm using edge tracking specifically includes:
[0058] Perform edge detection on the orthographic image to obtain a set of discrete edge pixel points;
[0059] Track the detected edge pixel points and connect the adjacent edge pixels into a closed edge.
[0060] Among them, common edge detection algorithms include Sobel operator, Prewitt operator, Canny operator, etc. These operators determine the position of edges by calculating the change gradient of pixel values in the image.
[0061] In the embodiment of the present invention, edge detection based on the Canny operator is adopted, which specifically includes:
[0062] The input image is smoothed by a Gaussian filter, where the standard deviation σ of the Gaussian kernel is dynamically adjusted according to the image noise level to balance the denoising effect and edge localization accuracy;
[0063] The Sobel operator is used to calculate the horizontal direction gradient G x and the vertical direction gradient G y of the smoothed image, and a gradient magnitude map is generated according to the gradient magnitude and direction ;
[0064] The gradient magnitude map is preprocessed by binarization. The OTSU algorithm is used to automatically determine the global threshold to initially extract the candidate edge region, and the pixels higher than the threshold are marked as white edges, and the rest are black backgrounds;
[0065] Non-maximum suppression is performed on the binarized gradient magnitude map. The gradient magnitudes of adjacent pixels are compared along the gradient direction, and only the local maximum points are retained to refine the edges. The gradient direction is accurate to the sub-pixel level through interpolation to improve the suppression accuracy;
[0066] Edge connection is performed on the image after non-maximum suppression based on double thresholds: set the high threshold T high to directly retain strong edges, and the low threshold T low to retain weak edges, and verify whether the weak edges are connected to the strong edges through 8-neighborhood search. If connected, they are retained as the final edges.
[0067] Among them, the kernel size of the Gaussian filter is adaptively selected according to the image resolution, and the standard deviation σ has a positive correlation with the kernel size, satisfying σ = 0.3×((k - 1) / 2 - 1) + 0.8, where k is the kernel size;
[0068] Among them, the discretization process of the gradient direction θ includes approximating the continuous direction to four main directions of 0°, 45°, 90°, and 135°, and only comparing the gradient magnitudes of the neighborhood pixels on both sides of the main direction in non-maximum suppression.
[0069] Among them, the high threshold T high in the double thresholds is calculated by the OTSU algorithm to obtain the global threshold, and the low threshold T low is set to T high ×0.5, and the connectivity verification of weak edges is completed by recursively traversing 8-neighborhood pixels.
[0070] Among them, the interpolation method in the non-maximum suppression is specifically as follows: calculate the gradient amplitudes of the sub-pixel positions on both sides according to the gradient direction, and compare them with the amplitude of the current pixel. If the current amplitude is the maximum, it is retained; otherwise, it is suppressed.
[0071] The above embodiments cover the core steps of the improved Canny algorithm, including dynamic Gaussian filtering, Sobel gradient calculation, OTSU binarization, non-maximum suppression, and double-threshold connection, combined with noise adaptability and edge continuity optimization, and further define the key parameters and implementation details of the algorithm to ensure the advantages of the method in edge positioning accuracy, anti-noise ability, and calculation efficiency.
[0072] S400. According to the division of the core slots of the core box recognized by the contour, from the core box image, the images of each core slot are cropped out along the inner contour in order from left to right based on the image cropping technology, and the corresponding core slot images are generated separately, and the core slot images are numbered and saved in the core slot image directory.
[0073] Among them, in S400, the numbering rule of the core slot image is as follows:
[0074] It increases cumulatively in sequence according to the order of the core boxes and the order of the core slots in each core box;
[0075] For example, if there are m core boxes and there are n core slots in the mth core box, then the core slots in the ith core box are in sequence: i1, i2,..., in.
[0076] S500. For the images cropped from each core slot in sequence, based on the object contour detection algorithm, identify the contour edges of the columnar core.
[0077] S600. Based on the image cropping technology, according to the identified core contour edges, crop the core image again, generate the corresponding core image separately, and number the core image file, and save it separately in the core image directory.
[0078] Among them, in S600, the numbering rule of the core image file is: it is consistent with the number of the corresponding core slot image file.
[0079] S700. The core photos cropped from each core box are sequentially stitched together from top to bottom according to the numbering order and saved as a large image;
[0080] Among them, in the process of stitching two images together, a mature image fusion technology can be used for image fusion to avoid problems such as gaps at the stitching positions.
[0081] For S800, in the order of the core box numbers, the spliced and fused core images in each core box are spliced and fused in sequence from top to bottom to construct a complete and seamlessly docked borehole image file.
[0082] Among them, during the splicing process, a mature image fusion technology is used for image fusion to construct a complete and seamlessly docked borehole image file.
[0083] As another embodiment of the present invention, there is also provided a core image acquisition and processing device, which includes:
[0084] A core placement module for placing cores in the core slots according to a preset rule;
[0085] An image acquisition module for acquiring high-definition orthographic images of the core boxes from the orthographic direction;
[0086] A contour recognition module for recognizing the contours of the core boxes and core slots based on an object contour detection algorithm;
[0087] An image cropping module for cropping the images of the core slots and cores;
[0088] An image splicing module for splicing and fusing the cropped core images;
[0089] An image storage module for saving the processed image files.
[0090] As another embodiment of the present invention, there is also provided a computer-readable storage medium storing a computer program, which when executed by a computer, causes the computer to execute the core image acquisition and processing method as described in any one of the above.
[0091] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A core image acquisition and processing method, characterized in that: The method comprises: S100, stacking the cores extracted in each round in the core slots of the core box in order from top to bottom and from left to right, ensuring that the cores in each core slot are neatly arranged; S200, taking photos of the core box from the orthophoto direction to collect high-definition orthophoto images of the core box; S300, based on an object contour detection algorithm, processing the orthophoto image of each core box, identifying the contour of the core box and the edge contour of each core slot in the core box; S400, dividing the core grooves of the core box identified by the contour, cutting out the image of each core groove from the core box image along the inner contour in order from left to right based on the image cutting technology, generating corresponding core groove images separately, numbering the core groove images, and saving them in the core groove image directory; S500, identifying the contour edge of the columnar core based on the object contour detection algorithm for each image cropped from the core groove in turn; S600, based on the image cropping technology, the core image is cropped again according to the identified core contour edge, a corresponding core image is generated separately, and the core image file is numbered and saved in a core image directory; S700, stitch the cropped core photos in each core box from top to bottom in the order of numbering and save them as a large image; S800, according to the box number sequence of the core box, stitches and fuses the core images in each core box in order from top to bottom to construct a complete and seamless drilling image file.
2. The core image acquisition and processing method according to claim 1, characterized in that: In S100, the cores in the core slot are neatly arranged including: The axis of the core segment is on a vertical line; The gaps between two adjacent core segments are aligned and overlapped.
3. The core image acquisition and processing method according to claim 1, characterized in that: In S300, the object contour detection algorithm includes any one of the following algorithms: Contour recognition algorithm based on edge detection; Connectivity-based contour recognition algorithm; Segmentation-based contour recognition algorithm; Object contour detection algorithm based on deep learning.
4. The core image acquisition and processing method according to claim 3, characterized in that: Contour recognition algorithms based on edge detection include: Perform edge detection on the orthophoto image to obtain a set of discrete edge pixel points; The detected edge pixels are tracked and adjacent edge pixels are connected into a closed edge.
5. The core image acquisition and processing method according to claim 1, characterized in that: In S400, the numbering rule of the core slot image is: The order of the core boxes and the order of the core slots in each core box are cumulative and incremented.
6. The core image acquisition and processing method according to claim 1, characterized in that: In S600, the numbering rule of the core image file is: The file number of the corresponding core slot image should be consistent.
7. The core image acquisition and processing method according to claim 1, characterized in that: In S700 and S800, image stitching and fusion use image fusion technology to avoid gaps at the stitching points.
8. A core image acquisition and processing device, characterized in that: The device comprises: The core placement module is used to place the cores in the core slots according to preset rules; An image acquisition module, used to acquire high-definition orthophoto images of the core box from an orthophoto direction; A contour recognition module, used to identify the contours of the core box and core slot based on an object contour detection algorithm; Image cropping module, used to crop images of core slots and cores; An image stitching module is used to stitch and fuse the cropped core images; The image storage module is used to save the processed image files.
9. The core image acquisition and processing device according to claim 8, characterized in that: The core placement module is specifically used to: stack the cores extracted in each round in the core slots of the core box in order from top to bottom and from left to right, ensuring that the cores in each core slot are neatly placed; The image cropping module is specifically used to: process the orthophoto image of each core box based on the object contour detection algorithm to identify the contour of the core box and the edge contour of each core groove in the core box, and to sequentially crop the image of each core groove based on the object contour detection algorithm to identify the contour edge of the columnar core; The image cropping module is specifically used for: dividing the core grooves of the core box according to the contour recognition, cropping the image of each core groove from the core box image in order from left to right along the inner contour based on the image cropping technology, generating a corresponding core groove image separately, numbering the core groove image, and saving it in the core groove image directory; and further used for secondary cropping the core image according to the recognized core contour edge based on the image cropping technology, generating a corresponding core image separately, numbering the core image file, and saving it in the core image directory; The image stitching module is specifically used to stitch and fuse the stitched and fused core images in each core box in order from top to bottom according to the box number sequence of the core boxes, so as to construct a complete and seamless drilling image file.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the computer executes the core image acquisition and processing method according to any one of claims 1 to 8.