Drilling inner wall image robust splicing method under multi-interference imaging condition

Through the expansion and grid acceleration matching technology in the drilling inner wall image, the problem of image stitching interruption under multiple interference conditions is solved, and stable drilling inner wall image stitching is achieved, ensuring that a smooth transition panoramic image is generated under multiple interference conditions.

CN119295310AActive Publication Date: 2025-01-10WUHAN UNIV OF SCI & TECH

Patent Information

Application Number
CN202411320938.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-01-10
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

Under multi-interference imaging conditions, the traditional drilling inner wall image stitching method is prone to interruption of image stitching due to magnetic rock formation interference and equipment distortion or rotational disturbance, and cannot achieve stable panoramic image generation.

Method used

By expanding the inner wall image of the drilled hole into a narrowband image, the image registration is carried out using the grid acceleration-based template matching method, and linear fusion is performed in the overlapping area to ensure the vertical and horizontal alignment of the image, reduce splicing traces, and achieve stable Image stitching.

Benefits of technology

It effectively avoids the problem of image interruption under adverse lighting conditions, improves image registration speed and accuracy, and ensures that a smooth transition of drilled inner wall panoramic image is generated under multiple interference conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295310A_ABST
    Figure CN119295310A_ABST
Patent Text Reader

Abstract

The invention relates to a robust splicing method for an inner wall image of a drill hole under a multi-interference imaging condition. The method specifically comprises the following steps: S1, expanding an acquired front-view shot inner wall image of the drill hole into a narrow-band image; s2, registering the expanded narrow-band images of the front frame and the rear frame, and determining the vertical offset and the horizontal offset of the reference image and the image to be spliced by adopting a grid acceleration-based template matching method; s3, determining an overlapping region of the reference image and the to-be-spliced image according to the offset, and fusing pixels in the overlapping region to obtain a spliced result image of the inner wall image of the drill hole; and S4, repeating the steps S1 to S3, splicing frame by frame until well logging is completed, and obtaining a panorama of the borehole inner wall image. According to the method, the image splicing problem caused by poor illumination conditions, loss or inaccuracy of reading of an electronic compass and a depth counter and lens rotation disturbance in actual logging operation can be effectively solved, and a smooth borehole inner wall panorama splicing result can be stably obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and more particularly to a method for robustly stitching borehole inner wall images under multi-interference imaging conditions. Background Art

[0002] Borehole inner wall images are widely used to detect underground geological structures and evaluate rock stability. The traditional borehole image stitching method is based on scan line or quasi-scan line stacking stitching, that is, completely relying on or indirectly referring to the azimuth of the electronic compass or compass and the depth information of the encoder to continuously generate a single or multiple scan lines for each frame of the video image; then, the scan lines generated by each frame of the image are stacked up in sequence to form the corresponding borehole image, or a simple and orderly multiple scan lines (rectangular window strip image) are compared and accumulated to achieve the generation of a panoramic image in the hole. Although this type of traditional method has been improved in the algorithm, if there are magnetic rock formations in the borehole, causing the readings of sensors such as depth sensors and electronic compasses to be distorted, or if the cable is lowered too long, causing a slight airflow or water flow to interfere with it, causing the camera to rotate and disturb the picture, then the method based on scan line or quasi-scan line stacking stitching will fail. For this purpose, borehole image stitching algorithms based on feature point matching have gradually emerged, such as image stitching algorithms based on SIFT / SURF and RANSAC. Although these algorithms can stitch the inner wall images of the borehole, the stitched images have a certain degree of geometric distortion due to the homography transformation. As the stitching process continues, the accumulation of this distortion will lead to the interruption of stitching, that is, stable image stitching cannot be performed. Summary of the invention

[0003] In order to overcome the limitations of the prior art, the present invention provides a robust stitching method for borehole inner wall images under multi-interference imaging conditions. This method can automatically perform borehole image expansion, registration and fusion under the interference of various rock formation environmental factors, and stably generate a stitched image of the borehole inner wall.

[0004] Specifically, the present invention provides a method for robustly stitching borehole inner wall images under multi-interference imaging conditions, comprising the following steps:

[0005] S1, expanding the collected forward-view borehole inner wall image into a narrow-band image: including locating the center C (x0, y0) of the circular ring area where the borehole inner wall image is to be expanded, detecting interference areas such as overexposure and underexposure to determine the outer diameter R and inner diameter r of the expanded circular ring, and expanding the circular ring area image into a rectangular narrow-band image through polar coordinate mapping and interpolation operations;

[0006] S2. Register the two unfolded narrow-band images: the previous image is called the reference image and is recorded as I f, the next frame of image is called the image to be stitched and recorded as I. First, the local image block with the largest information entropy is automatically selected from the image to be stitched as a template. Then, the template matching method based on grid acceleration is used to find the most similar local image block in the reference image. The two images are quickly registered, and the coordinates of the matching points of the reference image and the image to be stitched are determined to be (x1, y1) and (x2, y2), respectively. Therefore, the vertical offset and horizontal offset of the image to be stitched relative to the reference image are Δy=y2-y1 and Δx=x2-x1, respectively.

[0007] S3, determine the overlapping area of ​​the reference image and the image to be stitched and fuse the pixels in the overlapping area to obtain the stitching result image of the borehole inner wall: first, all columns of the image to be stitched are circularly translated to the left by Δx pixels, that is, according to the horizontal offset Δx obtained by image registration, they are circularly translated until they are aligned with the reference image in the horizontal direction. The aligned image to be stitched is recorded as J, so that image I f The overlapping area with image J is: I f (0,H f -H+Δy, W, H-Δy), J(0, 0, W, H-Δy), and then the pixels in the overlapping area of ​​the two images are linearly fused row by row to obtain a new stitching result image of the borehole inner wall image.

[0008] S4. Repeat the above steps S1 to S3, stitching frame by frame until the logging is completed, and a panoramic image of the borehole inner wall image can be obtained.

[0009] In the above technical solution, step S1 specifically includes the following steps:

[0010] S11. For the collected forward-looking borehole inner wall image, the halo formed by the forward-looking camera technology is detected using the Hough circle detection method, and the center of the detected halo is used as the center C (x0, y0) of the expanded ring area of ​​the borehole inner wall image, and the radius of the halo is recorded as R f ;

[0011] S12, calculating the distances L1, L2, L3, and L4 from the center of the circle C (x0, y0) to the upper, lower, left, and right sides of the borehole inner wall image captured by the front view, and selecting the shortest of the four distances as the initial outer diameter R of the expanded ring of the borehole inner wall image;

[0012] S13, with ΔR as the step size, for the annular area with C(x0, y0) as the center, R as the outer diameter, and R-ΔR as the inner diameter, record its area as S1, use the threshold method to detect the overexposed pixels and underexposed pixels in the annular area, record its total area as S2, when the overexposed and underexposed pixels occupy a greater than a certain proportion p of the annular area, that is, the condition S2 / S1>p is established, update the outer diameter R=R-ΔR, that is, reduce the outer diameter; repeat the above process to select a new annular area until the condition is not established, and use the latest R value as the optimal outer diameter of the expanded ring of the borehole inner wall image; at the same time, r=R f +q(RR f ) is the inner diameter of the expanded ring of the borehole inner wall image, where q is an adjustable proportional coefficient;

[0013] S14. Expand the determined annular region image into a rectangular narrow-band image through polar coordinate mapping and interpolation operation. The height H=Rr and the width W=π(R+r) of the expanded image are recorded.

[0014] Further, the step S2 specifically includes:

[0015] S21, automatically selecting a local image block with the largest information entropy from the image to be stitched I as a template, specifically, dividing the image to be stitched I into a number of small blocks of size M×N in the form of an m×n grid, and selecting an image block with the largest amount of information as a template image based on the concept of entropy in information theory, denoted as T;

[0016] S22, using a template matching method based on grid acceleration to match the reference image I f The most similar local image block to the template image is found in the coarse matching stage to quickly register the two images. The specific method is as follows: in the coarse matching stage, the template image is searched in the reference image with the grid as the basic unit of matching. During the search process, the grid moves horizontally or vertically with the width or height of a template image. After each movement, the similarity between the grid area in the current reference image and the template image is calculated. The grid position with the highest similarity, that is, the smallest difference, is recorded as the best matching position for coarse matching; then in the fine matching stage, the best matching position obtained by coarse matching is used to perform a more detailed search around it. At this time, the search step size is reduced to half the height or width of the template image. With the current best matching point as the center, the grid moves one step up and down, left and right, and repeats this process continuously. Each time the step size is halved, and a new similarity is calculated and compared with the current best matching point. If a better matching point is found, the best matching position is updated; this process is repeated until the step size is reduced to the preset minimum value, that is, the step size is reduced to 0, and the reference image / f The coordinates of the matching points of the image to be stitched I are recorded as (x1, y1) and (x2, y2) respectively;

[0017] S23, calculating the vertical offset and horizontal offset of the image to be stitched relative to the reference image, which are Δy=y2-y1 and Δx=x2-x1 respectively.

[0018] Further, the step S3 specifically includes:

[0019] S31, circularly shifting all columns of the image to be stitched to the left by Δx pixels, that is, circularly shifting according to the horizontal offset Δx obtained by image registration until the image is aligned with the reference image in the horizontal direction, wherein the circular shift means moving the column pixels of the corresponding horizontal offset on one side to the other side, and the aligned image to be stitched is recorded as J;

[0020] S32: for the image I that has been aligned in the horizontal direction f and image J, denoted as image I f The height is H f , determine the overlapping area of ​​the two: image, f from the H f -H+Δy row to H f The sub-image corresponding to all columns of the row is denoted as If(0, H f -H+Δy, W, H-Δy), the sub-image corresponding to all columns from the 1st row to the H-Δyth row in image J is denoted as J(0, 0, W, H-Δy), and the remaining parts of the two images are non-overlapping areas;

[0021] S33, image I f The non-overlapping areas of the two images retain the original pixel values, and the pixels in the overlapping area are linearly fused row by row to obtain the stitching result image of the new borehole inner wall image. The specific method is: the linear weight calculation of the pixels in the overlapping area is performed row by row, t = i / (H-Δy-1), where the row index i = 0, 1, ..., H-Δy-1, and the linear fusion formula is P(t) = (1-t)·P r +t·P s , where P(t) is the pixel value of a row after fusion, P r is the reference image I f The pixel value of a row in the overlapping area, P s is the pixel value of the corresponding row of the overlapping area of ​​the image to be stitched. When it is close to the non-overlapping area of ​​the reference image, the weight of the overlapping area of ​​the reference image is greater. When it is close to the non-overlapping area of ​​the image to be stitched, the weight of the overlapping area of ​​the image to be stitched is greater. This can better fuse the images and reduce the stitching marks. The height of the stitching result image of the new borehole inner wall image is H. f +Δy.

[0022] Beneficial effects of the present invention:

[0023] 1. When determining the circular radius of the expanded borehole inner wall image, the present invention detects overexposed and underexposed pixels in the image and sets corresponding rules to avoid these low-quality image areas, thereby effectively solving the problem that the borehole inner wall image stitching process may be interrupted due to poor lighting conditions in actual well logging operations.

[0024] 2. The present invention adopts a local image template matching method based on grid acceleration, which improves the registration speed and accuracy of the reference image and the image to be stitched through coarse matching and fine matching. At the same time, through pixel cyclic translation and line-by-line linear fusion, even when the readings of the electronic compass and depth counter are lost or inaccurate and there is lens rotation disturbance in actual logging operations, the registration results of the previous and next frame images can be stably obtained and a panoramic stitching result of the borehole inner wall with a smooth transition in the overlapping area can be formed. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0026] Figure 1 A flowchart of the main steps of the method provided in this application;

[0027] Figure 2 Schematic diagram of the forward-looking camera drilling imaging system used in the embodiments of the present application;

[0028] Figure 3 A relationship diagram of overlapping regions of the images registered for this application; DETAILED DESCRIPTION

[0029] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0030] In the following introduction, the terms "first" and "second" are only used for descriptive purposes and are not to be understood as indicating or implying relative importance. The following description provides examples and does not limit the scope, applicability or examples set forth in the claims. Changes may be made to the functions and arrangements of the elements described without departing from the scope of the present application. Various processes or components may be appropriately omitted, substituted or added to each example. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted or combined. In addition, the features described in some examples may be combined in other examples.

[0031] The embodiment of the present application provides a method for robust stitching of borehole inner wall images under multi-interference imaging conditions, which can be applied to an image processing device, which can be an independent device, or can also be integrated into an electronic terminal or other device with image processing capabilities. Optionally, the operating system carried by the device or electronic terminal integrating the image processing device can be a Windows system, an Android system or other operating systems, which are not limited here. In addition, the image registration algorithm used in the present invention is not limited to the image registration algorithm provided in the embodiment of the present method, and other image registration algorithms with the same functions can also be used.

[0032] See also Figure 1 In an embodiment of the present application, the method includes steps S1 to S4.

[0033] Before the step S1 is executed, the method further includes: photographing the rock formation borehole underground using a forward-looking camera drilling imaging system, wherein the imaging system includes a forward-looking camera, a system control box, a post-processing computer machine cable and other components, such as Figure 2 During exploration, the cable motor rotates to control the forward-looking camera to rise and fall in the borehole and take pictures of the inner wall of the borehole. The image and depth and direction angle information are transmitted to the system control box in real time through the cable; the system control box is used by the staff to control the motor speed and direction in real time and adjust the size according to different drilling environments; the system control box forwards the image and other information to the post-processing computer.

[0034] Combination Figure 1 , the specific steps S1 to S4 of the method can be described as:

[0035] S1, expanding the collected forward-view borehole inner wall image into a narrow-band image: including locating the center C (x0, y0) of the circular ring area where the borehole inner wall image is to be expanded, detecting interference areas such as overexposure and underexposure to determine the outer diameter R and inner diameter r of the expanded circular ring, and expanding the circular ring area image into a rectangular narrow-band image through polar coordinate mapping and interpolation operations;

[0036] S2. Register the two unfolded narrow-band images: the previous image is called the reference image and is recorded as I f , the next frame of image is called the image to be stitched and recorded as I. First, the local image block with the largest information entropy is automatically selected from the image to be stitched as a template. Then, the template matching method based on grid acceleration is used to find the most similar local image block in the reference image. The two images are quickly registered, and the coordinates of the matching points of the reference image and the image to be stitched are determined to be (x1, y1) and (x2, y2), respectively. Therefore, the vertical offset and horizontal offset of the image to be stitched relative to the reference image are Δy=y2-y1 and Δx=x2-x1, respectively.

[0037] S3, determine the overlapping area of ​​the reference image and the image to be stitched and fuse the pixels in the overlapping area to obtain the stitching result image of the borehole inner wall: first, all columns of the image to be stitched are circularly translated to the left by Δx pixels, that is, according to the horizontal offset Δx obtained by image registration, they are circularly translated until they are aligned with the reference image in the horizontal direction. The aligned image to be stitched is recorded as J, so that image I f The overlapping area with image J is: If(0, H f -H+Δy, W, H-Δy), J(0, 0, W, H-Δy), and then the pixels in the overlapping area of ​​the two images are linearly fused row by row to obtain a new stitching result image of the borehole inner wall image, such as Figure 3 shown.

[0038] S4. Repeat the above steps S1 to S3, stitching frame by frame until the logging is completed, and a panoramic image of the borehole inner wall image can be obtained.

[0039] In the above technical solution, step S1 specifically includes the following steps:

[0040] S11. For the collected forward-looking borehole inner wall image, the halo formed by the forward-looking camera technology is detected using the Hough circle detection method, and the center of the detected halo is used as the center C (x0, y0) of the expanded ring area of ​​the borehole inner wall image, and the radius of the halo is recorded as R f ;

[0041] S12, calculating the distances L1, L2, L3, and L4 from the center of the circle C (x0, y0) to the upper, lower, left, and right sides of the borehole inner wall image captured by the front view, and selecting the shortest of the four distances as the initial outer diameter R of the expanded ring of the borehole inner wall image;

[0042] S13, with ΔR as the step size, for the annular area with C(x0, y0) as the center, R as the outer diameter, and R-ΔR as the inner diameter, record its area as S1, use the threshold method to detect the overexposed pixels and underexposed pixels in the annular area, record its total area as S2, when the overexposed and underexposed pixels occupy a greater than a certain proportion p of the annular area, that is, the condition S2 / S1>p is established, update the outer diameter R=R-ΔR, that is, reduce the outer diameter; repeat the above process to select a new annular area until the condition is not established, and use the latest R value as the optimal outer diameter of the expanded ring of the borehole inner wall image; at the same time, r=R f +q(RR f ) as the inner diameter of the expanded ring of the borehole inner wall image, wherein q is an adjustable proportional coefficient; it is generally recommended to set the area ratio p to a value range of 0.7 to 0.8, and the proportional coefficient q to a value range of 0.6 to 0.8;

[0043] S14. Expand the determined annular region image into a rectangular narrow-band image through polar coordinate mapping and interpolation operation. The height H=Rr and the width W=π(R+r) of the expanded image are recorded.

[0044] Further, the step S2 specifically includes:

[0045] S21, automatically selecting a local image block with the largest information entropy from the image to be stitched I as a template, specifically, dividing the image to be stitched I into a number of small blocks of size M×N in the form of an m×n grid, and selecting an image block with the largest amount of information as a template image based on the concept of entropy in information theory, denoted as T;

[0046] S22: Using the template matching method based on grid acceleration to match the reference image I f The most similar local image block to the template image is found in the coarse matching stage to quickly register the two images. The specific method is as follows: in the coarse matching stage, the template image is searched in the reference image with the grid as the basic unit of matching. During the search process, the grid moves horizontally or vertically with the width or height of a template image. After each movement, the similarity between the grid area in the current reference image and the template image is calculated. The grid position with the highest similarity, that is, the smallest difference, is recorded as the best matching position for rough matching; then in the fine matching stage, the best matching position obtained by rough matching is used to perform a more detailed search around it. At this time, the search step size is reduced to half the height or width of the template image. With the current best matching point as the center, the grid moves up and down, left and right by one step size, and this process is repeated continuously. Each time the step size is halved, and a new similarity is calculated and compared with the current best matching point. If a better matching point is found, the best matching position is updated; this process is repeated until the step size is reduced to the preset minimum value, that is, the step size is reduced to 0, and the reference image I is obtained. f The coordinates of the matching points of the image to be stitched I are recorded as (x1, y1) and (x2, y2) respectively;

[0047] S23, calculating the vertical offset and horizontal offset of the image to be stitched relative to the reference image, which are Δy=y2-y1 and Δx=x2-x1 respectively.

[0048] Further, the step S3 specifically includes:

[0049] S31, circularly shifting all columns of the image to be stitched to the left by Δx pixels, that is, circularly shifting according to the horizontal offset Δx obtained by image registration until the image is aligned with the reference image in the horizontal direction, wherein the circular shift means moving the column pixels of the corresponding horizontal offset on one side to the other side, and the aligned image to be stitched is recorded as J;

[0050] S32: for the image I that has been aligned in the horizontal direction fand image J, denoted as image I f The height is H f , determine the overlapping area of ​​the two: image, f from the H f -H+Δy row to H f The sub-image corresponding to all columns of the row is denoted as I f (0,H f -H+Δy, W, H-Δy), the sub-image corresponding to all columns from the 1st row to the H-Δyth row in image J is denoted as J(0, 0, W, H-Δy), and the remaining parts of the two images are non-overlapping areas.

[0051] S33, image I f The non-overlapping areas of the two images retain the original pixel values, and the pixels in the overlapping area are linearly fused row by row to obtain the stitching result image of the new borehole inner wall image. The specific method is: the linear weight calculation of the pixels in the overlapping area is performed row by row, t = i / (H-Δy-1), where the row index i = 0, 1, ..., H-Δy-1, and the linear fusion formula is P(t) = (1-t)·P r +t·P s , where P(t) is the pixel value of a row after fusion, P r is the reference image I f The pixel value of a row in the overlapping area, P s is the pixel value of the corresponding row of the overlapping area of ​​the image to be stitched. When it is close to the non-overlapping area of ​​the reference image, the weight of the overlapping area of ​​the reference image is greater. When it is close to the non-overlapping area of ​​the image to be stitched, the weight of the overlapping area of ​​the image to be stitched is greater. This can better fuse the images and reduce the stitching marks. The height of the stitching result image of the new borehole inner wall image is H. f +Δy.

[0052] In addition, the video frame rate of the algorithm test used in this application is more than 20 frames per second, the duration is more than 10 minutes, the total number of video frames is 12120 frames at the lowest and 17325 frames at the highest. The recorded drilling data comes from a geological engineering survey, and the processor used for the test is Intel(R)Core(TM)i5-10400 CPU 6 cores. The stitching image quality analysis combines visual analysis with image quality numerical evaluation, uses SSIM and PSNR to calculate image similarity to measure the matching effect, and uses MI, NMI, SF, STD, and AG as image fusion quality evaluation indicators. Through experiments, it was found that the stitching effect of the borehole inner wall image is better under various interference conditions such as illumination changes, lens rotation, missing or inaccurate azimuth information, etc.

[0053] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A robust stitching method for borehole inner wall images under multi-interference imaging conditions, characterized in that: The method comprises the following steps: S1, expanding the collected forward-view borehole inner wall image into a narrow-band image: including locating the center C (x0, y0) of the circular ring area where the borehole inner wall image is to be expanded, detecting interference areas such as overexposure and underexposure to determine the outer diameter R and inner diameter r of the expanded circular ring, and expanding the circular ring area image into a rectangular narrow-band image through polar coordinate mapping and interpolation operation; S2, registering the two frames of narrow-band images before and after the expansion: the previous frame image is called the reference image and is recorded as I f , the next frame of image is called the image to be stitched and recorded as I. First, the local image block with the largest information entropy is automatically selected from the image to be stitched as a template. Then, the template matching method based on grid acceleration is used to find the most similar local image block in the reference image. The two images are quickly registered. The coordinates of the matching points of the reference image and the image to be stitched are determined to be (x1, y1) and (x2, y2), respectively. Therefore, the vertical offset and horizontal offset of the image to be stitched relative to the reference image are Δy=y2-y1 and Δx=x2-x1, respectively. S3. Determine the overlapping area of ​​the reference image and the image to be stitched and fuse the pixels in the overlapping area to obtain the stitching result image of the inner wall of the borehole: First, all columns of the image to be stitched are circularly shifted to the left by Δx pixels, that is, according to the horizontal offset Δx obtained by image registration, they are circularly shifted to align with the reference image in the horizontal direction. The aligned image to be stitched is recorded as J, so that image I f The overlapping area with image J is: I f (0,H f –H+Δy,W,H-Δy), J(0,0,W,H-Δy), and then linearly fuse the pixels in the overlapping area of ​​the two images row by row to obtain a new stitching result image of the borehole inner wall image. S4, repeat the above steps S1 to S3, stitching frame by frame until the logging is completed, and a panoramic image of the borehole inner wall image can be obtained.

2. The method according to claim 1, characterized in that The step S1 comprises: S11, for the collected forward-looking borehole inner wall image, using the Hough circle detection method to detect the halo formed by the forward-looking camera technology, taking the center of the detected halo as the center C (x0, y0) of the circular area of ​​the borehole inner wall image, and recording the radius of the halo as R f ; S12, calculate the distances L1, L2, L3, and L4 from the center C(x0, y0) to the upper, lower, left, and right sides of the borehole inner wall image taken by the front view, and select the shortest of the four distances as the initial outer diameter R of the expanded ring of the borehole inner wall image; S13, with ΔR as the step size, for the annular area with C(x0, y0) as the center, R as the outer diameter, and R-ΔR as the inner diameter, its area is recorded as S1, and the threshold method is used to detect the overexposed pixels and underexposed pixels in the annular area, and its total area is recorded as S2. When the overexposed and underexposed pixels occupy more than a certain proportion of the annular area, that is, the condition S2 / S1>p is met, the outer diameter R=R-ΔR is updated, that is, the outer diameter is reduced; repeat the above process to select a new annular area until the condition is not met, and use the latest R value as the optimal outer diameter of the expanded ring of the borehole inner wall image; at the same time, r=R f +q(RR f ) is used as the inner diameter of the expanded ring of the borehole inner wall image, where q is an adjustable proportional coefficient; S14, the determined circular ring area image is expanded into a rectangular narrow-band image through polar coordinate mapping and interpolation operations, and the height of the expanded image is H=Rr, and the width is W=π(R+r).

3. The method according to claim 1, characterized in that The step S2 comprises: S21, automatically selecting a local image block with the largest information entropy from the image to be spliced ​​I as a template, specifically, dividing the image to be spliced ​​I into a number of small blocks of size M×N in the form of an m×n grid, and selecting an image block with the largest amount of information as a template image based on the concept of entropy in information theory, denoted as T; S22, adopting a template matching method based on grid acceleration to match the reference image I f The method is to find the local image block that is most similar to the template image in the coarse matching stage to quickly register the two images. The specific method is as follows: in the coarse matching stage, the grid is used as the basic unit of matching to search for the module image in the reference image. During the search process, the grid moves horizontally or vertically with the width or height of a template image. After each movement, the similarity between the grid area in the current reference image and the template image is calculated. The grid position with the highest similarity, that is, the smallest difference, is recorded as the best matching position for rough matching; then in the fine matching stage, the best matching position obtained by rough matching is used to perform a more detailed search around it. At this time, the search step size is reduced to half the height or width of the template image. With the current best matching point as the center, the grid moves up and down, left and right by one step size, and this process is repeated continuously. Each time the step size is halved, and a new similarity is calculated and compared with the current best matching point. If a better matching point is found, the best matching position is updated; this process is repeated until the step size is reduced to the preset minimum value, that is, the step size is reduced to 0, and the reference image I is obtained. f The coordinates of the matching points of the image to be stitched I are recorded as (x1, y1) and (x2, y2); S23 calculates the vertical offset and horizontal offset of the image to be stitched relative to the reference image, which are Δy=y2-y1 and Δx=x2-x1 respectively.

4. The method according to claim 1, characterized in that: The steps include: S31, circularly shifting all columns of the image to be stitched to the left by Δx pixels, that is, circularly shifting according to the horizontal offset Δx obtained by image registration until the image is aligned with the reference image in the horizontal direction, and the circular shift means that the column pixels of the corresponding horizontal offset size on one side are moved to the other side, and the aligned image to be stitched is recorded as J; S32, for the image I that has been aligned in the horizontal direction f and image J, denoted as image I f The height is H f , determine the overlapping area of ​​the two: Image I f From the H f –H+Δy row to Hth f The sub-image corresponding to all columns of the row is denoted as I f (0,H f –H+Δy,W,H-Δy), the sub-image corresponding to all columns from the 1st row to the H-Δyth row in image J is recorded as J(0,0,W,H-Δy), and the remaining parts of the two images are non-overlapping areas; S33, for image I f The non-overlapping areas of the two images retain the original pixel values, and the pixels in the overlapping area are linearly fused row by row to obtain the stitching result image of the new borehole inner wall image. The specific method is: the linear weight calculation of the pixels in the overlapping area is performed row by row, t = i / (H-Δy-1), where the row index i = 0, 1, ..., H-Δy-1, and the linear fusion formula is P(t) = (1-t)·P r +t·P s , where P(t) is the pixel value of a row after fusion, P r is the reference image I f The pixel value of a row in the overlapping area, P s is the pixel value of the corresponding row of the overlapping area of ​​the image to be stitched. When it is close to the non-overlapping area of ​​the reference image, the weight of the overlapping area of ​​the reference image is greater. When it is close to the non-overlapping area of ​​the image to be stitched, the weight of the overlapping area of ​​the image to be stitched is greater. This can better fuse the images and reduce the stitching marks. The height of the stitching result image of the new borehole inner wall image is H. f +Δy.

5. The implementation process of step S13 of the method for robustly stitching borehole inner wall images under multi-interference imaging conditions according to claim 2 is characterized in that: The area ratio p ranges from 0.7 to 0.8, and the proportional coefficient q ranges from 0.6 to 0.8.

Citation Information

Patent Citations

  • Fast infrared image splicing method

    CN108537833A

  • Image stitching algorithm based on image sharpness perception algorithm

    CN113284049A

  • Video stitching method and system based on grid transformation

    CN117221466A

  • System and method to increase effective dynamic range of image sensors

    US20020176010A1

  • Undistorted outspread method for annular images of the inner wall of borehole with a center offset

    US20240209725A1

Cited By

  • Intelligent panoramic processing method and system for borehole peeping based on image processing

    CN120070170A

  • Image processing-based intelligent panoramic processing method and system for borehole peeping

    CN120070170B

  • Side-scan sonar image line-by-line matching and splicing method based on numerical transformation processing

    CN121582056A