Intelligent splicing and defect detection method and system for core scanning image
By correcting core scan images using multiple sets of laser displacement sensors and cylindrical projection transformation models, and combining graph cut algorithm and deep convolutional neural network, the problems of geometric distortion and uneven illumination in core scan images were solved, achieving high-precision panoramic core stitching and defect detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENGLI OILFIELD SHENGYOU OIL RECORDING ENG TECH CO LTD
- Filing Date
- 2026-05-07
- Publication Date
- 2026-07-31
AI Technical Summary
Existing core scanning image stitching techniques cannot effectively solve the near-to-far effect and edge stretching distortion caused by the cylindrical structure of the core, and it is difficult to balance detail preservation and illumination consistency, thus affecting the accuracy of geological analysis.
Multiple sets of laser displacement sensors are used to measure the radial runout of the core surface in real time. Combined with the cylindrical projection transformation model of the arctangent function and the graph cut algorithm, image correction and stitching are performed, and defect detection is performed through a deep convolutional neural network.
It generates a high-resolution panoramic core map with rigorous geometry and consistent illumination, which can automatically identify and quantify microcracks, pores and mineral alteration areas, meeting the needs of high-precision geological analysis.
Smart Images

Figure CN122492441A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of image processing and computer vision, specifically relating to an intelligent stitching and defect detection method and system for core scan images. Background Technology
[0002] With the continuous advancement of petroleum geological survey and mineral exploration technologies, core digitization has become a core means of acquiring subsurface geological information, assessing oil and gas reserves, and analyzing rock mechanical properties. Core scanning, as a fundamental step in building a digital core library, uses high-resolution imaging equipment to capture the texture, fractures, and mineral distribution on the core surface, providing crucial raw data for subsequent refined geological description. In complex exploration tasks, the completeness and accuracy of core surface information directly affect the accurate judgment of subsurface structures by geological experts, placing higher demands on the imaging quality and data integration capabilities of the scanning system.
[0003] Among these technologies, the stitching and reconstruction of core scan images is a key technical direction for synthesizing discrete local views into a highly continuous panoramic view. Limited by the field of view of optical lenses and the physical travel of scanning equipment, the original image sequence is typically captured in segments, and then combined using image registration algorithms to achieve a full digital representation of the elongated core. This stitching technology not only pursues seamless visual integration but also emphasizes geometric consistency in physical space, which is a prerequisite for ensuring that the panoramic unfolded core image can accurately reflect the geological structural characteristics.
[0004] However, due to the cylindrical physical structure of the rock core, the near-size effect and edge stretching distortion produced by conventional imaging processes disrupt the geometric and topological relationships of the image. Traditional planar stitching algorithms, lacking effective modeling of the cylindrical surface curvature, frequently result in image ghosting, crack texture breaks, and accumulated geometric distortions during feature matching, especially over long distances. Furthermore, the non-uniformity of the rock core surface reflectivity often produces panoramic images with alternating light and dark areas resembling ribbed patterns, severely interfering with the accuracy of subsequent automated defect identification algorithms. In addition, existing linear fusion logic struggles to balance detail preservation and illumination consistency, leading to discrepancies between visual features and actual geological properties, failing to meet the demands of high-precision scientific analysis. Summary of the Invention
[0005] The purpose of this invention is to provide an intelligent stitching and defect detection method and system for core scan images, which can effectively solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: Firstly, a method for intelligent stitching and defect detection of core scan images includes: During the core rotation scanning process, multiple sets of circumferentially distributed laser displacement sensors are used to collect radial runout data of the core surface in real time, and real-time least squares fitting operation is performed on multiple distance measurements acquired at the same time to determine the real-time equivalent radius of the core at the current scanning section and the real-time imaging distance. The imaging unit is controlled to perform segmented imaging along the core axis to obtain the original image sequence, and each original image frame is associated with the synchronously acquired real-time equivalent radius and real-time imaging object distance; For each frame of the original image, a cylindrical projection transformation model based on the arctangent function is constructed. Using the real-time equivalent radius and real-time imaging object distance associated with the current frame, the planar pixel coordinates of the original image are dynamically mapped to a cylindrical coordinate system that is proportional to the actual arc length of the cylindrical surface, so as to generate a corrected image sequence. Feature point matching is performed on the overlapping region of two adjacent frames in the corrected image sequence, and the coordinate transformation matrix used to align the adjacent images is calculated. After aligning adjacent images using the coordinate transformation matrix, an optimal cutting line is determined in the overlapping area using a graph cut algorithm, and image stitching is performed along the optimal cutting line. When constructing the energy cost function of the graph cut algorithm, a texture saliency term that characterizes the strength of the linear geological structure on the core surface is introduced so that the optimal cutting line automatically avoids the linear geological structure on the core surface. Global optimization is performed on the panoramic image generated after image stitching to eliminate accumulated pose errors and generate a panoramic unfolded image of the core.
[0007] Preferably, the step of determining the real-time equivalent radius and the real-time imaging object distance further includes: Based on the distance differences between multiple sets of laser displacement sensors at the same cross section, the tilt angle of the core relative to the ideal axis is calculated, and the real-time imaging distance is corrected according to the tilt angle.
[0008] Preferably, the cylindrical projection transformation model maps the horizontal coordinate x of a pixel in the original image to the horizontal coordinate x' of the corresponding pixel in the corrected image, and the mapping relationship follows: ; Where f is the equivalent focal length of the imaging unit, x c Let d be the horizontal coordinate of the imaging center, d be the real-time imaging object distance, and R be the real-time equivalent radius. Bicubic interpolation resampling is performed on the image after coordinate mapping to generate the corrected image sequence.
[0009] Preferably, during the scanning process, the feature richness of the current image frame is evaluated at a preset axial distance interval. When a region with a feature point density exceeding a preset threshold is identified, the image frame is marked as an anchor frame and assigned a reference pose locked in the global coordinate system. When performing feature matching and coordinate transformation matrix calculation on subsequent image frames, the reference pose of the nearest anchor frame is used as a priori constraint to perform weighted correction on the coordinate transformation matrix in order to suppress the cumulative drift of frame-by-frame stitching.
[0010] Preferably, constructing the graph cut algorithm energy cost function that incorporates the texture saliency term includes: The overlapping region is modeled as an energy network composed of pixel nodes, and the energy cost of the edge between adjacent pixel nodes is defined as a weighted sum of the color difference gradient term and the texture saliency term. The texture saliency term is defined as the absolute value of the response after convolution of the corresponding pixel position with the Laplacian operator, and is used to measure whether the position is located on a crack or a bedding plane.
[0011] Preferably, during the scanning process, the sharpness and focus status of each original image frame are continuously quantitatively evaluated; when the evaluation index is lower than the preset quality threshold, the rescanning mechanism is automatically triggered, and the running step size and speed parameters of the axial drive motor are finely adjusted in reverse according to the degree of blur, so as to ensure that the acquired image is restored to the predetermined imaging standard.
[0012] Preferably, after the step of generating the panoramic unfolded image of the core, the method further includes: A pre-trained deep convolutional neural network model is invoked to perform pixel-level semantic segmentation on the panoramic unfolded image of the core, so as to automatically identify geological defects on the surface of the core. The feature tracking algorithm is activated to search along the panoramic image axis and associate the segments of the same crack that are truncated due to the field of view limitation of a single frame. The multiple segments belonging to the same crack are connected and merged in terms of topology, and the continuous total length and average curvature of the entire crack are calculated accordingly.
[0013] Preferably, the step of globally optimizing the panoramic image generated after image stitching to eliminate accumulated pose errors includes: During the scanning process, local bundle adjustment optimization is performed on the preset number of most recently acquired frames before the current acquisition time to correct the relative pose relationship of the local frame sequence in real time. Once the entire core scan is completed and closed-loop constraints are triggered, the result of the local bundle adjustment optimization is used as the initial value to perform nonlinear least squares optimization of the entire sequence, generating a geometrically tight closed panoramic core unfolded map.
[0014] Preferably, before the step of generating the panoramic unfolded core image, the method further includes: The original color space of the corrected image sequence is converted to the CIE Lab color space, which separates luminance and chrominance. Histogram specification processing is performed on the chrominance channel. Using a selected standard illumination image from a batch as a reference template, the chrominance channel histograms of the remaining frames are matched to the statistical distribution of the reference template so that the color performance of the images acquired under different illumination conditions is consistent.
[0015] Secondly, an intelligent stitching and defect detection system for core scan images, used to perform the above method, includes: The geometric parameter acquisition module is used to acquire radial runout data in real time using multiple circumferentially distributed laser displacement sensors during core rotation scanning, and to determine the real-time equivalent radius of the core at the current scanning section and the real-time imaging distance through real-time least squares fitting calculation. The image acquisition and association module is used to control the imaging unit to perform segmented shooting along the core axis to obtain the original image sequence, and associate each frame of the original image with the synchronously acquired real-time equivalent radius and the real-time imaging object distance; The cylindrical correction module is used to construct a cylindrical projection transformation model based on the arctangent function for each frame of the original image. By using the associated real-time equivalent radius and the real-time imaging object distance, the planar pixel coordinates of the original image are dynamically mapped to a cylindrical coordinate system that is proportional to the actual arc length of the cylindrical surface, so as to generate a corrected image sequence. The registration module is used to perform feature point matching on the overlapping region of two adjacent frames in the corrected image sequence and to solve the coordinate transformation matrix used to align the adjacent images. The image stitching module is used to determine an optimal cutting line in the overlapping area using a graph cut algorithm after aligning adjacent images through the coordinate transformation matrix, and to perform image stitching along the optimal cutting line; wherein, when constructing the energy cost function of the graph cut algorithm, a texture saliency term characterizing the intensity of the linear geological structure on the core surface is introduced, so that the optimal cutting line automatically bypasses the linear geological structure on the core surface; The global optimization module is used to perform global optimization on the fused panoramic image to eliminate accumulated errors and generate a panoramic unfolded image of the core.
[0016] In summary, this application includes at least one of the following beneficial technical effects: 1. By constructing an adaptive cylindrical projection transformation model based on the arctangent function, the projection parameters of each frame of the image are dynamically corrected using the imaging object distance and equivalent radius measured in real time by the laser displacement sensor. This effectively eliminates the perspective effect of near-large and far-small caused by the curvature of the core cylinder surface and the edge stretching distortion, so that the geometric relationship of the corrected image sequence corresponds to the real unfolded shape of the core surface.
[0017] 2. During the image stitching process, the graph cut algorithm with the introduction of a texture saliency term is used to determine the optimal cutting line in the overlapping area. The texture saliency term measures the strength of the linear geological structure on the core surface by the absolute value of the Laplacian operator response, so that the optimal cutting line automatically bypasses structural areas such as cracks and bedding planes and passes through areas with messy textures, thereby eliminating the stitching seams while maintaining the continuity and integrity of geological features.
[0018] 3. By performing nonlinear least-squares global optimization with closed-loop constraints on the first and last frames of the stitched panoramic image, the accumulated pose residual is evenly distributed to the transformation matrix of each frame in the entire image sequence. The texture displacement at the stitching seam is controlled within 0.5 pixels, generating a geometrically tight closed high-resolution panoramic core unfolded image. A deep convolutional neural network is used to achieve automated segmentation and quantitative statistics of microcracks, pores and mineral alteration areas, and output a geological analysis report including crack orientation, width, porosity and mineral proportion. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the overall scheme of the intelligent stitching and defect detection method for core scanning images of the present invention; Figure 2 This is a core principle framework diagram of the present invention for cylindrical projection model correction based on real-time geometric parameters; Figure 3 This is a flowchart illustrating the main stages of the process for extracting feature points in the overlapping area and calculating the coordinate transformation matrix in this invention. Figure 4 This is a schematic diagram of the image stitching principle framework of the present invention based on multi-band fusion algorithm and Laplacian pyramid; Figure 5 This is a logical framework diagram of defect detection based on closed-loop adjustment global optimization and deep learning neural network of the present invention. Detailed Implementation
[0020] The following will be combined with the appendix Figures 1 to 5 The technical solution of the present invention is clearly and completely described below. Obviously, the following embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0021] Example 1 In the intelligent stitching and defect detection method and system for core scanning images, the entire technical solution is divided into data acquisition, geometric correction, image registration, multi-scale image stitching, and global adjustment optimization and depth recognition.
[0022] Step S1: Obtain the geometric parameters and original image sequence of the core to be scanned.
[0023] This step is responsible for simultaneously acquiring the surface geometric contour information and raw image data of the rock core during the scanning process, providing a precise physical reference for subsequent cylindrical projection correction and image stitching. The specific operation procedure is as follows: Step S101: Arrange multiple sets of laser displacement sensors in the core scanning hardware module. The laser displacement sensors use high-frequency semiconductor lasers as light sources and work based on the triangulation principle. The laser displacement sensors are evenly distributed along the circumference of the core. The number of distributions can be configured as any of 4, 8 or 12 sets according to the measurement accuracy requirements.
[0024] During the core rotation scanning process, each laser displacement sensor synchronously emits a laser beam and receives the reflected signal from the core surface, thereby calculating in real time the change in physical distance from the core surface sampling point to the imaging lens, i.e., radial runout data.
[0025] The measurement accuracy of the laser displacement sensor is set to 0.01 mm, and the single-channel sampling frequency is set to above 2000 Hz to ensure that it can effectively capture the detailed changes in the surface geometric contour even under conditions of high-speed rotation or axial movement of the core.
[0026] Step S102: Receive distance data streams from all laser displacement sensors and temporarily store them in a preset high-speed data buffer. Perform real-time least squares fitting operation on multiple distance measurements acquired by each group of laser displacement sensors at the same time to determine the geometric center coordinates of the core outer contour at the current scanning section and the average radius calculated based on the fitted circle model. The average radius is further converted into the real-time equivalent radius of the core at the current section. The real-time equivalent radius, together with the real-time imaging distance data measured by each laser displacement sensor, is used as a geometric parameter and recorded in memory.
[0027] Step S103: While acquiring geometric parameters, control the imaging unit to perform segmented imaging along the core axis. The imaging unit can be a surface array camera or a line array camera (hereinafter referred to as a camera).
[0028] A closed-loop synchronization logic is established between the exposure trigger signal of the imaging unit and the feedback signal of the encoder of the motor that drives the core to move axially. Whenever the axial drive motor drives the core to move relative to the camera to a preset distance step, the encoder outputs a trigger pulse to drive the camera to acquire a frame of raw image.
[0029] By adjusting the camera's exposure time and gain parameters, the field-of-view overlap rate between two adjacent original images is kept within a preset range of 35% to 50%, thus providing sufficient redundant information for subsequent image registration steps.
[0030] In step S104, when each original image is generated, its corresponding metadata field is written with the real-time imaging object distance value recorded at the same time and the calculated real-time equivalent radius of the rock core. The real-time imaging object distance represents the average distance from the lens main plane of the imaging unit to the current imaging area on the surface of the rock core, while the real-time equivalent radius reflects the scale correspondence between the actual contour of the rock core cross section and the standard circle.
[0031] The synchronous writing of the two geometric parameters mentioned above establishes a strict mapping relationship between each frame of image and the actual three-dimensional spatial position when the frame of image is generated, which is an indispensable input variable in the subsequent cylindrical correction calculation.
[0032] Step S105: Before each scanning task is officially started, the built-in automatic calibration device is called to calibrate the camera's internal parameters. The calibration process uses a standard flat plate with a high-precision grid pattern as a reference.
[0033] The camera is controlled to image a standard grid plate, and the grid corner coordinates are extracted from the acquired image. The intrinsic parameter matrix of the camera is calculated by Zhang Zhengyou calibration method. The intrinsic parameter matrix includes the radial and tangential distortion coefficients of the lens, the coordinates of the principal imaging point in the pixel coordinate system, and the equivalent focal length along the horizontal and vertical directions of the image.
[0034] The intrinsic parameter calibration results, along with the scale parameters obtained by converting the physical size of the grid panel to the pixel size, are stored in the XML configuration file and referenced as global constants in all subsequent geometric transformation calculations.
[0035] In this embodiment, step S1 integrates three technologies: high-frequency laser ranging, closed-loop triggered imaging, and precise camera calibration, to construct the spatiotemporal correspondence between the three-dimensional physical morphology of the core surface and the two-dimensional digital image. Each frame of the obtained image carries a real-time equivalent radius and a real-time imaging distance that can be quantitatively calculated, laying a reliable data foundation for the implementation of nonlinear coordinate mapping based on the cylindrical projection model in the subsequent step S2, and also eliminating the image geometric distortion problem caused by ignoring the curvature change of the core surface in traditional scanning methods.
[0036] Step S2: Construct a cylindrical projection model and generate a corrected image sequence.
[0037] This step utilizes the original image sequence obtained in step S1 and the synchronously recorded real-time equivalent radius and real-time imaging object distance to establish a nonlinear mapping relationship from the planar imaging coordinate system to the cylindrical unfolding coordinate system, thereby eliminating image geometric distortion caused by the curvature of the core cylinder surface. The specific operation process is as follows: Step S201: Read the camera intrinsic parameter matrix generated in step S105 from memory or XML configuration file, and extract the equivalent focal length value f of the imaging system. f is a constant determined based on the camera calibration results, and the unit is pixels.
[0038] Simultaneously, the real-time imaging distance d and the real-time equivalent radius R are extracted from the metadata field corresponding to each frame of the original image. d represents the average physical distance from the main plane of the camera lens to the current imaging area on the core surface, in mm, and R represents the equivalent radius of the core section calculated by the least squares fitting in step S102, in mm.
[0039] The x-coordinate of the imaging center c The coordinates of the principal point in the camera intrinsic parameter matrix are given directly, representing the projection position of the lens optical axis on the image plane, in pixels.
[0040] Step S202: Construct a cylindrical projection transformation function for the coordinates x and y of each pixel in the original image. The cylindrical projection transformation function converts the horizontal coordinate x of the planar pixel into the unfolded cylindrical arc length coordinate x'.
[0041] The transformation model follows the mathematical relationship below: ; In the formula, x' is the horizontal coordinate of the corresponding pixel in the corrected image, in pixels, and x is the horizontal coordinate of the pixel in the original image, in pixels. c d is the x-coordinate of the imaging center in pixels, d is the real-time imaging object distance in mm, R is the real-time equivalent radius in mm, and f is the equivalent focal length in pixels.
[0042] The physical significance of the transformation model lies in mapping the planar image coordinates, which are originally distributed as near objects appear larger and far objects smaller due to perspective projection, to a cylindrical coordinate system proportional to the actual arc length of the cylindrical surface through the arctangent function, thereby achieving geometric flattening of the core surface in digital space.
[0043] Step S203: Traverse each frame of the original image sequence and calculate the target coordinate position in the cylindrically corrected image pixel by pixel according to the transformation model in step S202. Since the transformation is a non-linear mapping, the calculated target coordinates are usually non-integer values. Therefore, sub-pixel level resampling is performed to determine the gray value or color component value of each output pixel.
[0044] Step S204: In the resampling process, a multi-point interpolation algorithm is introduced to ensure the texture clarity and edge continuity of the corrected image. The multi-point interpolation algorithm uses a bicubic interpolation scheme, which uses the original pixel values in the 4×4 neighborhood around the target pixel position to perform weighted convolution operation.
[0045] For configurations with more abundant hardware computing resources, the multi-point interpolation algorithm can also be switched to a 16-point sampling interpolation scheme with preset weights to further suppress spectral aliasing caused by resampling.
[0046] In step S205, the corrected image after interpolation and filling in step S204 is written to a temporary memory buffer frame by frame. Each frame of the corrected image effectively preserves the detail contrast of the core surface texture, crack boundary and mineral grain outline, and the edge area no longer exhibits stretching distortion or jagged artifacts caused by the curvature of the cylinder.
[0047] The correction process is equivalent to flattening the curved core surface in digital space into a continuous planar image, thereby eliminating perspective effects and edge stretching deformation at the physical level.
[0048] In this embodiment, step S2 establishes an adaptive cylindrical projection model that includes the real-time object distance d and the equivalent radius R, and combines arctangent nonlinear mapping with bicubic interpolation resampling to accurately correct the distortion caused by the curvature of the core cylinder surface in each frame of the original image. The corrected image sequence eliminates the near-large and far-small effect and edge stretching distortion, and its geometric relationship strictly corresponds to the actual unfolded shape of the core surface.
[0049] Step S3: Extract feature points in the overlapping region and calculate the coordinate transformation matrix.
[0050] This step, based on the corrected image sequence generated in step S2, performs feature point detection, descriptor generation and matching on the overlapping regions of adjacent two frames. It also uses an anti-noise algorithm to calculate the coordinate transformation matrix describing the pose relationship between adjacent images, providing a precise geometric alignment reference for subsequent image stitching. The specific operation flow is as follows: Step S301: Read the corrected image sequence written to the temporary memory buffer in step S205. For each pair of adjacent frames, determine the overlapping region. The range of the overlapping region is pre-calculated based on the 35% to 50% overlap rate set in step S103. Then, within the overlapping region, construct a Gaussian difference pyramid using the SIFT algorithm and detect local extrema as candidate feature points. Each candidate feature point carries the scale layer information of the candidate feature point and has scale invariance.
[0051] Step S302: Based on the statistical characteristics of the local contrast of the image in the overlapping area, dynamically adjust the threshold parameter of the feature detection operator: calculate the average pixel contrast of each sub-block in the overlapping area, and compare the average pixel contrast with the preset benchmark value. The preset benchmark value is set to 0.5 times the standard deviation of the overall pixel gray level in the overlapping area. This value can effectively distinguish between normal texture areas and low texture areas caused by single mineral composition or uniform color distribution.
[0052] If the average contrast of a sub-block is lower than the preset benchmark value, it indicates that the current sub-block is a low-texture region. In this case, the contrast threshold of the feature detection operator is automatically reduced by multiplying the default contrast threshold by a coefficient of 0.6, and the side length of the feature search window is expanded to 1.5 to 2 times the original size. If the average contrast of a sub-block is not lower than the preset benchmark value, the default contrast threshold and the original search window size are kept unchanged.
[0053] By lowering the threshold and expanding the search range as described above, more effective feature points can be captured at weak textures such as the edges of pores or tiny spots, thereby enhancing the registration stability under low texture conditions.
[0054] Step S303: Generate a 128-dimensional SIFT descriptor vector for each candidate feature point obtained in steps S301 and S302. The descriptor vector is invariant to image rotation and can adapt to small angular deviations between adjacent frames.
[0055] Step S304: Perform bidirectional nearest neighbor matching on all feature point descriptor vectors in two adjacent frames: First, for each descriptor in the previous frame, find the two descriptors with the smallest Euclidean distance in the next frame. If the ratio of the nearest distance to the second nearest distance is less than a preset ratio threshold of 0.8, then retain the matching pair; then swap the matching directions and perform the same matching rule on each descriptor in the previous frame; only when both directions are determined to be valid matches are the matching pairs included in the initial matching set. The bidirectional matching strategy can effectively filter out unidirectional mismatches.
[0056] Step S305: The initial matching set is iteratively filtered using the Random Sample Consensus (RANSAC) algorithm to eliminate mismatched pairs and calculate the coordinate transformation matrix. The number of iterations of the RANSAC algorithm is set to more than 500. In each iteration, 4 pairs of matching points are randomly selected from the initial matching set to calculate the candidate affine coordinate transformation matrix or homography matrix. Then, the number of point pairs whose projection errors of the remaining matching pairs in the initial matching set fall within the allowable tolerance range under the current transformation model is counted. The allowable tolerance is set to 2.0 pixels. This value is determined by comprehensively considering the image resolution and the size of the overlapping area, which can effectively eliminate mismatch interference while retaining a sufficient number of inliers.
[0057] Record the transformation model with the most interior points, and re-perform least squares fitting using all interior points corresponding to the transformation model with the most interior points to obtain the final coordinate transformation matrix.
[0058] In this embodiment, step S3 constructs a Gaussian difference pyramid and introduces an adaptive threshold mechanism to stably extract scale-invariant feature points in low-texture areas on the core surface. It generates highly reliable initial matching pairs through gradient direction histogram descriptors and a bidirectional matching strategy. Then, it uses a random sampling consensus algorithm to eliminate false matches with a clear interior point determination tolerance and calculates the accurate coordinate transformation matrix.
[0059] Step S4: Perform image fusion based on multi-band fusion algorithm, that is, perform image stitching through multi-band fusion.
[0060] This step, guided by the coordinate transformation matrix calculated in step S3, completes the geometric alignment of adjacent frames. To address brightness differences and uneven illumination within overlapping areas, multi-scale decomposition and adaptive weighted fusion are used to eliminate seams. Furthermore, a seam path optimization mechanism is introduced before fusion to avoid obvious geological structures, ultimately generating a visually seamless and detail-preserving continuous image of the core surface. The specific operation process is as follows: Step S401: Read the image sequence registered by the coordinate transformation matrix in step S305, and use the Laplacian pyramid algorithm to decompose each frame image into sub-band image sequences with different spatial frequencies: First, Gaussian blur and downsampling are performed on the original image in a loop to construct a Gaussian pyramid. The resolution of each layer of the Gaussian pyramid is half that of the previous layer. Then, starting from the top layer of the Gaussian pyramid, upsampling is performed layer by layer and the difference is made with the lower layer Gaussian image to obtain the Laplacian residual image of each layer.
[0061] The first layer is the low-frequency base layer, which is the topmost low-frequency component remaining after the top layer of the Gaussian pyramid is upsampled and subtracted from the next layer. It carries the large-scale illumination distribution and background tone information of the image. The second to Lth layers are high-frequency detail layers, which are the Laplacian residual images of each layer, respectively preserving local features such as core cracks, mineral textures and grain contours with different levels of detail.
[0062] Step S402: Dynamically set the number of decomposition layers L of the Laplacian pyramid according to the resolution of the current image to be stitched. The value of the number of decomposition layers L is within a preset range of 4 to 7.
[0063] The specific rules for dynamic setting are as follows: when the number of pixels on the shorter side of the image is greater than or equal to 4096, L is 7; when the number of pixels on the shorter side of the image is between 2048 and 4095, L is 6; when the number of pixels on the shorter side of the image is between 1024 and 2047, L is 5; and when the number of pixels on the shorter side of the image is less than 1024, L is 4.
[0064] The above layering strategy ensures that the size of the lowest frequency base layer is always within a reasonable range under different scanning resolutions, and that both low-frequency illumination components and high-frequency texture components can be effectively separated, avoiding the base layer becoming too rough due to too many layers or the illumination components remaining in the high-frequency layer due to too few layers.
[0065] Step S403: For the overlapping area of two adjacent frames, the pixel weight distribution map is calculated independently in each frequency layer. In the low-frequency base layer, a wideband weight function is used. The weight value gradually changes linearly from the side of the overlapping area closer to the previous frame image to the side closer to the next frame image. The width of the weight transition area is set to 80% to 100% of the total width of the overlapping area. That is, when the width of the overlapping area is W pixels, the weight transition width is a value between 0.8W and W pixels.
[0066] The linear weighting method with a slow transition enables a smooth gradation of background lighting and tone over a large spatial range, thereby effectively suppressing the alternating banding phenomenon caused by uneven ambient light distribution or camera exposure differences.
[0067] Step S404: In the high-frequency detail layer, a local contrast preservation strategy is adopted for fusion: For each pixel position in the overlapping area, a local window of the same size is taken in the two frames of the image with the position as the center, and the standard deviation of pixel gray level in the two windows is calculated as the local contrast index. The pixel value of the side with larger standard deviation, i.e. higher contrast, is selected as the fusion result.
[0068] The size of the local window is adaptively determined based on the scale of the current high-frequency layer. The side length of the window corresponding to the l-th layer is set to... Pixels; when the local contrast difference between two frames at a certain position is less than a preset threshold, i.e., the ratio of their standard deviations is between 0.8 and 1.25, the pixel values of the two frames at that position are taken as an arithmetic mean to avoid frequent switching caused by noise.
[0069] The aforementioned local contrast preservation strategy ensures that key geological details such as the edges of microcracks and the boundaries of mineral grains are not smoothed out at the joints, while also taking into account the naturalness of the integration in flat areas.
[0070] Step S405: Before performing multi-band fusion in steps S403 and S404, a seam path optimization mechanism based on graph cut algorithm is run first to determine the fusion starting line: the overlapping area is modeled as an energy network composed of pixel nodes, and a directed edge is defined between each pixel node and its four neighboring pixels. The energy cost of the directed edge is obtained by weighted summation of the color difference gradient term and texture saliency term of the adjacent images at the location of the directed edge.
[0071] Color difference gradient G colorDefined as the square root of the sum of the squares of the grayscale differences of the RGB three channels at corresponding pixel positions in two frames, i.e. This reflects the degree of color transition at the seam between two images.
[0072] Texture saliency G texture Defined as the absolute value of the response at the corresponding pixel position after convolution with the Laplacian operator in the original image, i.e. This measures whether the corresponding location lies on a clearly linear structure on the core surface.
[0073] The formula for calculating the energy cost of the edge [E] is as follows: The weighting coefficients α and β are set to 0.6 and 0.4 respectively, in order to achieve a balance between color consistency and structural integrity.
[0074] Step S406: Apply the maximum flow minimum cut algorithm to the constructed energy network to find a minimum energy path from the top boundary to the bottom boundary of the overlapping region image. The minimum energy path is the optimal cutting line.
[0075] Because the texture saliency value is high at linear geological structures such as straight cracks and bedding planes, the energy cost increases accordingly. The optimal cutting line will automatically bypass the above-mentioned linear geological structure areas and instead pass through positions with messy textures and indistinct features.
[0076] Using the optimal cutting line as the starting reference line for multi-band fusion ensures that the fusion transition occurs in areas that are less likely to attract visual attention, further enhancing the naturalness of the stitched image.
[0077] In this embodiment, step S4 separates the lighting background and texture details of the image through Laplacian pyramid multi-scale decomposition. Broadband linear fusion is used in the low-frequency layer to eliminate rib patterns, and a local contrast preservation strategy is used in the high-frequency layer to preserve subtle geological features such as cracks. Before fusion, a graph cut algorithm is used to optimize the seam path to avoid obvious linear structures, so that adjacent frames are visually seamless and continuous while maintaining the authenticity and integrity of the geological information on the core surface.
[0078] Step S5: Perform global optimization and detect defects through closed-loop adjustment, that is, perform global optimization through closed-loop adjustment.
[0079] After frame-by-frame stitching and fusion of the image sequence, this step performs global consistency optimization to address the accumulated geometric pose errors during long-distance scanning, outputting a high-precision panoramic core image. Based on this, a deep convolutional neural network is used to automatically identify and quantify geological defects in the panoramic image. The specific operation process is as follows: Step S501: Establish a global objective function based on reprojection error to quantify the overall alignment deviation of all image frames in a unified global coordinate system, and at the same time identify the topological closure relationship between the first and last frames of the scan sequence.
[0080] When the core scan performs a complete 360° circumferential rotation or completes one axial reciprocating scan, the feature matching algorithm in step S3 is invoked to automatically detect the corresponding feature points in the overlapping area of the first and last frames and construct closed-loop constraint conditions.
[0081] The closed-loop constraint forces the first and last frames to maintain consistent spatial positions in the global coordinate system, and participates in the optimization solution as an additional constraint term of the global objective function.
[0082] Step S502: The Levenberg-Marquardt algorithm is used to perform nonlinear least squares optimization on the global objective function to correct the camera pose parameters and coordinate transformation matrix of all image frames.
[0083] During the optimization process, the residuals generated by the closed-loop constraints of the first and last frames are evenly distributed to the coordinate transformation matrix of each frame in the entire image sequence, thereby effectively eliminating the cumulative drift error caused by frame-by-frame stitching. After optimization, the texture displacement at the stitching seam is strictly controlled to within 0.5 pixels.
[0084] In step S503, based on the coordinate transformation matrix optimized in step S502, all corrected image frames are mapped to a unified global output coordinate system to generate a high-resolution panoramic unfolded core image.
[0085] The panoramic unfolded image of the core is geometrically closed, eliminating the overall distortion and misalignment caused by long-distance splicing, and preserving the continuous geological texture information of the core surface from the beginning to the end.
[0086] Step S504: After generating the panoramic unfolded image, a pre-trained deep convolutional neural network model is called to perform pixel-level semantic segmentation on the panoramic image in order to automatically identify various geological defects on the surface of the core.
[0087] The deep convolutional neural network model adopts an encoder-decoder architecture. The encoder part uses a deep convolutional network with residual connections as the backbone feature extraction module, while the decoder part restores the spatial resolution step by step through transposed convolutional layers and uses skip connections to fuse shallow detailed features.
[0088] Deep convolutional neural network models introduce large-scale data augmentation strategies during the training phase, including simulating random shifts in image brightness under different lighting conditions, performing mirror flips at random angles, and injecting Gaussian white noise that simulates sensor thermal noise into pixel values.
[0089] Step S505: Apply the Softmax function to the segmentation probability map output by the deep convolutional neural network model to obtain the posterior probability of each pixel belonging to each preset defect category, and assign a category label to each pixel according to the maximum a posteriori criterion to form a segmentation mask of the same size as the panoramic image.
[0090] The target categories for the detection task include at least microcracks larger than 0.05 mm, pores larger than 0.1 mm, and mineral alteration areas exhibiting specific color or texture characteristics.
[0091] Subsequently, connected component analysis was performed on the segmented mask to extract the geometric morphological parameters of each defect instance, generating a geological analysis report that includes the distribution of crack orientation angles, the statistical mean and standard deviation of crack widths, the percentage of porosity, and the area ratio of mineral components. All quantitative data in the report were obtained by integrating the pixels of the segmented mask.
[0092] Step S506: To address application scenarios with massive amounts of scanned data, this method is deployed on a distributed parallel computing architecture. Computationally intensive tasks such as cylindrical projection correction of image sequences, feature registration, multi-band fusion, and forward inference of deep convolutional neural networks are dynamically scheduled to be executed asynchronously on multiple graphics processor cores.
[0093] Employing a multi-threaded pipeline design, while geometric correction is being performed on a certain frame of image in the graphics processor, the raw data for the next frame of image has already been loaded and preprocessed.
[0094] For a total of 10 pixels 9 For ultra-large-scale panoramic images of this scale, a block processing strategy is adopted. The panoramic image is divided into several overlapping sub-blocks, and deep convolutional neural network inference is performed on each sub-block. The predicted probabilities are weighted and averaged at the boundaries of the sub-blocks to eliminate stitching traces. The block processing strategy controls the memory usage of a single processing process to below the hardware physical limit and compresses the total time for panoramic image generation and defect detection to less than 300 seconds.
[0095] In this embodiment, step S5 establishes a global objective function for reprojection error and introduces closed-loop constraints for the first and last frames. It then uses the Levenberg-Marquardt nonlinear optimization algorithm to eliminate cumulative pose drift, generating a geometrically tight, high-resolution panoramic core unfolded image. Subsequently, it uses a deep convolutional neural network with an encoder-decoder architecture to achieve automated segmentation and quantitative statistics of microcracks, pores, and mineral alteration areas. Finally, it outputs a geological analysis report containing key parameters such as crack orientation, width, porosity, and mineral percentage.
[0096] In addition, this method also has the function of real-time imaging quality monitoring during the scanning process and an automatic anomaly handling mechanism.
[0097] During core scanning, the sharpness and focus of each original image frame were continuously quantitatively evaluated using two types of indicators.
[0098] The first type is the mean absolute value G of the image gradient. avg It is defined as the arithmetic mean of the absolute values of the grayscale differences between each pixel and its adjacent pixels in the entire image, i.e. It is used to reflect the sharpness of image edges and thus to judge the accuracy of focusing operations.
[0099] The second category is the focusing evaluation value F based on the Laplace operator. lap , defined as the variance of the absolute values of the convolution results of the Laplacian operator for all pixels in the entire image, i.e. It is sensitive to motion blur and loss of high-frequency details.
[0100] When any evaluation index falls below the preset quality threshold, the automatic rescan mechanism is immediately triggered, and the running step size and speed parameters of the axial drive motor are finely adjusted in reverse according to the degree of blur. The preset quality threshold is set to 80% of the average value of the corresponding index of the first 10 frames of images acquired after the start of the current scanning task, so as to ensure that subsequent acquired frames are restored to the predetermined imaging standard.
[0101] During the output phase, the generated panoramic core unfolded map supports multi-scale tile loading modes.
[0102] The ultra-high resolution panoramic image is pre-cut into a series of square image tiles of fixed size according to the preset scaling level. Each tile corresponds to the local field of view at a specific scaling level. The number of scaling levels is set to downsample by a factor of 2 from the highest resolution, i.e. the original panoramic image resolution, generating a total of 5 levels.
[0103] Users can smoothly switch between different resolution levels in the front-end viewer through interactive panning and zooming operations, thereby observing the microscopic texture and macroscopic structure of the core surface in a progressive manner.
[0104] To further ensure the consistency of image color performance between different scanning batches, a color space standardization conversion is performed before outputting the panoramic image.
[0105] The pixel values in the original RGB color space are projected to the CIE Lab color space through a transformation matrix, separating the luminance channel from the chroma channel and saturation channel. The transformation matrix is defined as a standard step-by-step transformation from sRGB linearization to XYZ space, and then to Lab space according to the CIE standard.
[0106] Subsequently, histogram specification processing is performed on the chroma channels, namely the a channel and the b channel. Using the selected standard illumination image in a batch as a reference template, the histograms of the a channel and the b channel of the remaining frames are matched to the statistical distribution of the corresponding channels of the reference template.
[0107] After the above processing, the panoramic core images generated under different lighting conditions and different collection periods achieved a high degree of consistency in visual color representation.
[0108] Finally, the defect annotation results and surface texture information identified in the panoramic image are reprojected onto the surface of the three-dimensional digital core model using a spatial mapping algorithm.
[0109] The mapping algorithm uses the real-time equivalent radius R obtained in step S1 and the axial position encoder reading z enc Based on geometry, establish the correspondence between the coordinates of the two-dimensional panoramic image and the vertices of the three-dimensional cylindrical or surface mesh.
[0110] The mapping relationship from 2D panoramic image coordinates (u,v) to 3D cylindrical coordinates is: cylindrical angle axial position S ax It is the ratio factor of the physical size of the axial pixels, with the unit being mm / pixel, and is determined by the ratio of the encoder's axial travel to the total number of axial pixels in the panoramic image.
[0111] The generated three-dimensional surface model is further spatially registered and fused with externally acquired core CT scan data or nuclear magnetic resonance imaging data. The fused digital model simultaneously includes high-resolution color textures of the core's outer surface, the precise spatial location of defects such as cracks and pores, and heterogeneous structural information from internal imaging data.
[0112] The above additional functional modules, together with the aforementioned steps S1 to S5, constitute a complete closed-loop processing flow. Real-time monitoring ensures the controllability of the quality of the original image acquisition, multi-scale tiles and color standardization ensure the usability and comparability of the final results, and the fusion of three-dimensional surface and internal data expands the application depth of core digitization.
[0113] Example 2 The method described in this embodiment is a specific application of the automated processing of continuous long-distance core samples. In this scenario, the total length of the core sample can reach hundreds of meters. In order to maintain high splicing accuracy and equipment stability during long-term continuous operation, this embodiment introduces several enhancement measures based on the steps of embodiment 1.
[0114] In the geometric parameter acquisition step S1, a precision optical encoder is added to the core conveyor belt or moving track as an axial absolute position reference mark to output the current axial absolute coordinate value of the core in real time, in mm. The working frequency of the laser displacement sensor is further improved compared to Example 1, and is set to above 4000Hz. In addition to calculating the real-time equivalent radius, the tilt angle of the core relative to the ideal axis is monitored based on the distance difference of multiple laser displacement sensors at the same cross section. The real-time imaging distance parameter is corrected based on the tilt angle to compensate for the change in real-time imaging distance caused by core bending or installation eccentricity.
[0115] In the cylindrical projection correction step S2, the cylindrical projection transformation process is processed in real time. Whenever a new frame of the original image is acquired, the real-time equivalent radius and the corrected real-time imaging object distance are immediately extracted, and the cylindrical correction and interpolation resampling operations are performed online. The corrected image frames are stored sequentially in a circular buffer for subsequent asynchronous reading during registration, effectively reducing the overall delay from the input of the original data to the output of the corrected image.
[0116] In the feature point extraction and registration step S3, a dynamic anchor point mechanism is introduced to suppress the accumulation of coordinate drift caused by long-distance frame-by-frame stitching. During the scanning process, the feature richness of the current image frame is automatically evaluated at a preset axial distance interval, such as every 5m. When an area with feature point density exceeding a preset threshold is identified, the image frame is marked as an anchor point frame. The preset threshold is set to 0.05 feature points per square pixel, and the aforementioned axial absolute coordinates are used to assign a reference pose locked in the global coordinate system to the anchor point frame.
[0117] When performing feature matching and coordinate transformation matrix calculation on adjacent frames, the registration algorithm uses the pose of the nearest anchor frame as a priori constraint to perform weighted correction on the coordinate transformation matrix of the intermediate frame. The weighting coefficients decrease linearly from the anchor frame to the adjacent frames, thereby preventing the error from accumulating indefinitely during long-distance transmission.
[0118] In the multi-band fusion step S4, to address the slow drift that may occur during long-distance scanning of ambient light, a global brightness consistency algorithm is used to preprocess the image sequence, and the average gray value of the low-frequency components of each frame within the entire sequence or a long sliding window is statistically analyzed. The length of the sliding window is set to 500 frames, and an adaptive brightness compensation coefficient is calculated for each frame image accordingly. The low-frequency base layer is uniformly corrected before the Laplacian pyramid reconstruction.
[0119] Meanwhile, the number of decomposed layers L of the Laplace pyramid is finely adjusted in real time in conjunction with the local smoothness index of the core surface: in areas with flat surfaces and sparse textures, the L value is appropriately increased to obtain a smoother light transition; in areas with dense cracks and severe undulations, the L value is correspondingly decreased to preserve the original texture details to the maximum extent.
[0120] In the global optimization stage of step S5, a combination of sliding window adjustment strategy and final full-sequence closed-loop adjustment is adopted. During the scanning process, local bundle adjustment optimization is continuously performed on the 100 most recently acquired images before the current acquisition time, and the relative pose relationship of the 100 images within the sliding window is corrected in real time. After the entire core scan is completed and the global closed-loop constraint is triggered, a complete full-sequence Levenberg-Marquardt nonlinear optimization is performed with the sliding window adjustment result as the initial value.
[0121] The strategy of combining sliding window adjustment with full-sequence closed-loop adjustment allows users to observe a local panoramic image with high stitching quality in the preview interface even before the scan is fully completed.
[0122] In this embodiment, the deep convolutional neural network also has the ability to perform cross-frame defect correlation analysis. For long cracks that are truncated into multiple segments due to the limitation of a single frame field of view, after generating a segmentation mask, the feature tracking algorithm is started to search for the endpoint positions and directions of the crack segments along the panoramic image axis. Multiple segments belonging to the same crack are connected and merged in the topology, and parameters such as the continuous total length, average curvature and maximum width of the entire crack are calculated accordingly.
[0123] All inspection results, along with the original panoramic tile data, are stored in a distributed database. The database supports fast indexing and retrieval by depth range, defect type, and size range.
[0124] In the output stage, in addition to supporting multi-scale tile loading mode, the panoramic core image embeds GIS coordinate information in the metadata of each level of the tile. The panoramic core image of each centimeter is mapped to the downhole measurement depth through the axial absolute coordinates recorded by the aforementioned optical encoder, so that any position in the image can be traced back to the real underground depth coordinates.
[0125] At the hardware level, all control logic runs on the real-time operating system kernel. The synchronization accuracy between the stepping pulse signal of the axial drive motor and the shutter trigger signal of the camera reaches the microsecond level. When the graphics processor performs image fusion, i.e. image stitching task, it adopts a customized texture memory management strategy. By reducing redundant data copying operations between the central processing unit and the graphics processor, the overall data throughput is increased by more than 40% compared with conventional memory management methods.
[0126] For a total of 10 pixels 9For panoramic global adjustment tasks of scale and above, the graphics processor decomposes the large-scale sparse matrix equation into multiple independent sub-blocks and distributes them to different graphics processor cores to perform concurrent adjustment calculations, thereby keeping memory usage within a preset stable range and avoiding memory overflow due to processing extremely long core data.
[0127] In summary, this embodiment addresses the engineering requirements of continuous core scanning over hundreds of meters. Building upon Embodiment 1, it enhances the process from multiple dimensions, including axial absolute positioning, real-time pipeline correction, dynamic anchor point constraints, global photometric consistency, sliding window adjustment, cross-frame crack tracking, GIS coordinate integration, and hardware-level temporal optimization. The entire method effectively improves the processing efficiency and equipment reliability of long-distance continuous operations while ensuring high-precision geometric reconstruction and defect identification.
[0128] Example 3 This embodiment provides an intelligent stitching and defect detection system for core scan images, used to execute the method described in Embodiment 1, including a geometric parameter acquisition module, an image acquisition and association module, a cylindrical surface correction module, a registration module, an image stitching module, and a global optimization module.
[0129] The geometric parameter acquisition module is used to acquire radial runout data in real time using multiple circumferentially distributed laser displacement sensors during core rotation scanning, and to determine the real-time equivalent radius of the core at the current scanning section and the real-time imaging distance through real-time least squares fitting calculation.
[0130] The image acquisition and association module is used to control the imaging unit to perform segmented shooting along the core axis to obtain the original image sequence, and associate each original image frame with the synchronously acquired real-time equivalent radius and real-time imaging distance. The specific association method is as described in step S104 of Embodiment 1, that is, the imaging distance and equivalent radius are written into the metadata field of each image frame.
[0131] The cylindrical correction module is used to construct a cylindrical projection transformation model based on the arctangent function for each frame of the original image. By using the associated real-time equivalent radius and real-time imaging object distance, the planar pixel coordinates of the original image are dynamically mapped to a cylindrical coordinate system that is proportional to the arc length of the actual cylindrical surface, so as to generate a corrected image sequence. The specific mapping relationship is as described in step S202 of Example 1.
[0132] The registration module is used to perform feature point matching on the overlapping area of two adjacent frames in the corrected image sequence and to solve the coordinate transformation matrix used to align the adjacent images. The specific matching and solving process is as described in steps S301 to S305 of Example 1.
[0133] The image stitching module is used to determine an optimal cutting line in the overlapping area using a graph cut algorithm after aligning adjacent images through a coordinate transformation matrix, and to perform image stitching along the optimal cutting line. When constructing the energy cost function of the graph cut algorithm, a texture saliency term that characterizes the strength of the linear geological structure on the core surface is introduced so that the optimal cutting line automatically bypasses the linear geological structure on the core surface. The specific stitching method is as described in step S4 of Example 1.
[0134] The global optimization module is used to perform global optimization on the panoramic image generated after stitching, eliminate accumulated errors, and generate a panoramic unfolded image of the core. The specific optimization method is as described in step S5 of Example 1, that is, by establishing a global objective function for reprojection error and introducing closed-loop constraints for the first and last frames, the Levenberg-Marquardt algorithm is used for nonlinear least squares optimization.
[0135] The above modules work together to form a complete closed-loop processing flow from geometric parameter acquisition, image correction, registration, stitching to global optimization, realizing high-precision generation of panoramic core images and automated detection of geological defects.
[0136] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention. Therefore, the embodiments should be regarded as exemplary and non-limiting in all respects.
[0137] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment includes only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. An intelligent splicing and defect detection method of a core scan image, characterized in that, include: During the core rotation scanning process, multiple sets of circumferentially distributed laser displacement sensors are used to collect radial runout data of the core surface in real time, and real-time least squares fitting operation is performed on multiple distance measurements acquired at the same time to determine the real-time equivalent radius of the core at the current scanning section and the real-time imaging distance. The imaging unit is controlled to perform segmented imaging along the core axis to obtain the original image sequence, and each original image frame is associated with the synchronously acquired real-time equivalent radius and real-time imaging object distance; For each frame of the original image, a cylindrical projection transformation model based on the arctangent function is constructed. Using the real-time equivalent radius and real-time imaging object distance associated with the current frame, the planar pixel coordinates of the original image are dynamically mapped to a cylindrical coordinate system that is proportional to the actual arc length of the cylindrical surface, so as to generate a corrected image sequence. Feature point matching is performed on the overlapping region of two adjacent frames in the corrected image sequence, and the coordinate transformation matrix used to align the adjacent images is calculated. After aligning adjacent images using the coordinate transformation matrix, an optimal cutting line is determined in the overlapping area using a graph cut algorithm, and image stitching is performed along the optimal cutting line. When constructing the energy cost function of the graph cut algorithm, a texture saliency term that characterizes the strength of the linear geological structure on the core surface is introduced so that the optimal cutting line automatically avoids the linear geological structure on the core surface. Global optimization is performed on the panoramic image generated after image stitching to eliminate accumulated pose errors and generate a panoramic unfolded image of the core.
2. The intelligent splicing and defect detection method of core scan images according to claim 1, characterized in that, The steps of determining the real-time equivalent radius and the real-time imaging object distance further include: Based on the distance differences between multiple sets of laser displacement sensors at the same cross section, the tilt angle of the core relative to the ideal axis is calculated, and the real-time imaging distance is corrected according to the tilt angle.
3. The intelligent splicing and defect detection method of core scan images according to claim 1, characterized in that, The cylindrical projection transformation model maps the horizontal coordinate x of a pixel in the original image to the horizontal coordinate x' of the corresponding pixel in the corrected image, and the mapping relationship follows: ; wherein f is the equivalent focal length of the imaging unit, x c is the imaging center horizontal coordinate, d is the real-time imaging object distance, and R is the real-time equivalent radius. Bicubic interpolation resampling is performed on the image after coordinate mapping to generate the corrected image sequence.
4. The intelligent splicing and defect detection method of core scan images according to claim 1, characterized in that, During the scanning process, the feature richness of the current image frame is evaluated at preset axial distance intervals. When a region with feature point density exceeding a preset threshold is identified, the image frame is marked as an anchor frame and assigned a reference pose locked in the global coordinate system. When performing feature matching and coordinate transformation matrix calculation on subsequent image frames, the reference pose of the nearest anchor frame is used as a priori constraint to perform weighted correction on the coordinate transformation matrix in order to suppress the cumulative drift of frame-by-frame stitching.
5. The intelligent stitching and defect detection method of core scan images according to claim 1, wherein, Constructing the graph cut algorithm energy cost function that incorporates a texture saliency term includes: The overlapping region is modeled as an energy network composed of pixel nodes, and the energy cost of the edge between adjacent pixel nodes is defined as a weighted sum of the color difference gradient term and the texture saliency term. The texture saliency term is defined as the absolute value of the response after convolution of the corresponding pixel position with the Laplacian operator, and is used to measure whether the position is located on a crack or a bedding plane.
6. The intelligent stitching and defect detection method of core scan images according to claim 1, wherein, During the scanning process, the sharpness and focus status of each original image frame are continuously quantitatively evaluated. When the evaluation index is lower than the preset quality threshold, the rescanning mechanism is automatically triggered, and the running step size and speed parameters of the axial drive motor are finely adjusted in reverse according to the degree of blurring to ensure that the acquired image is restored to the predetermined imaging standard.
7. The intelligent stitching and defect detection method of core scan images according to claim 1, wherein, After the step of generating the panoramic unfolded image of the core, the method further includes: A pre-trained deep convolutional neural network model is invoked to perform pixel-level semantic segmentation on the panoramic unfolded image of the core, so as to automatically identify geological defects on the surface of the core. The feature tracking algorithm is activated to search along the panoramic image axis and associate the segments of the same crack that are truncated due to the field of view limitation of a single frame. The multiple segments belonging to the same crack are connected and merged in terms of topology, and the continuous total length and average curvature of the entire crack are calculated accordingly.
8. The intelligent stitching and defect detection method of core scan images according to claim 1, wherein, The global optimization of the panoramic image generated after image stitching to eliminate accumulated pose errors includes: During the scanning process, local bundle adjustment optimization is performed on the preset number of most recently acquired frames before the current acquisition time to correct the relative pose relationship of the local frame sequence in real time. Once the entire core scan is completed and closed-loop constraints are triggered, the result of the local bundle adjustment optimization is used as the initial value to perform nonlinear least squares optimization of the entire sequence, generating a geometrically tight closed panoramic core unfolded map.
9. The intelligent stitching and defect detection method of core scan images according to claim 1, wherein, Before the step of generating the panoramic unfolded core image, the method further includes: The original color space of the corrected image sequence is converted to the CIE Lab color space, which separates luminance and chrominance. Histogram specification processing is performed on the chrominance channel. Using a selected standard illumination image from a batch as a reference template, the chrominance channel histograms of the remaining frames are matched to the statistical distribution of the reference template so that the color performance of the images acquired under different illumination conditions is consistent.
10. An intelligent splicing and defect detection system of core scanning images, configured to perform the intelligent splicing and defect detection method of core scanning images according to any one of claims 1 to 9, characterized in that, include: The geometric parameter acquisition module is used to acquire radial runout data in real time using multiple circumferentially distributed laser displacement sensors during core rotation scanning, and to determine the real-time equivalent radius of the core at the current scanning section and the real-time imaging distance through real-time least squares fitting calculation. The image acquisition and association module is used to control the imaging unit to perform segmented shooting along the core axis to obtain the original image sequence, and associate each frame of the original image with the synchronously acquired real-time equivalent radius and the real-time imaging object distance; The cylindrical correction module is used to construct a cylindrical projection transformation model based on the arctangent function for each frame of the original image. By using the associated real-time equivalent radius and the real-time imaging object distance, the planar pixel coordinates of the original image are dynamically mapped to a cylindrical coordinate system that is proportional to the actual arc length of the cylindrical surface, so as to generate a corrected image sequence. The registration module is used to perform feature point matching on the overlapping region of two adjacent frames in the corrected image sequence and to solve the coordinate transformation matrix used to align the adjacent images. The image stitching module is used to determine an optimal cutting line in the overlapping area using a graph cut algorithm after aligning adjacent images through the coordinate transformation matrix, and to perform image stitching along the optimal cutting line; wherein, when constructing the energy cost function of the graph cut algorithm, a texture saliency term characterizing the intensity of the linear geological structure on the core surface is introduced, so that the optimal cutting line automatically bypasses the linear geological structure on the core surface; The global optimization module is used to perform global optimization on the fused panoramic image to eliminate accumulated errors and generate a panoramic unfolded image of the core.