Drilling video image unfolding method and device
By combining deep learning models and the interior majority principle, the problems of edge blurring and difficulty in adjusting fitting parameters in borehole video image unfolding are solved, achieving efficient and accurate borehole video image unfolding, which is suitable for long-term analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-03-10
AI Technical Summary
Existing methods for unfolding borehole video images suffer from problems such as blurred edges, high computational cost, and difficulty in adjusting fitting parameters during image preprocessing and edge extraction, resulting in inaccurate image unfolding results.
Deep learning models are used for image denoising and edge enhancement. Circle fitting is performed by combining the majority principle of interior points. Noise is suppressed and image texture details are preserved by using the U-Net model to achieve end-to-end real-time processing. The pixel values of the rectangular unfolded image are determined by the interior points within the annular region.
It improves the image signal-to-noise ratio and edge structure integrity, achieves a real-time processing speed of 30 frames per second, overcomes the shortcomings of traditional methods, and is particularly suitable for long-term borehole video analysis.
Smart Images

Figure CN121639447A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image processing, in particular to a borehole video image unwrapping method and device. BACKGROUND
[0002] Observing the inside of a borehole by using borehole imaging technology is an important means of geological exploration, Obtaining the information of the borehole wall by directly observing the borehole video or video screenshot obtained by borehole imaging has the disadvantage that the interpretation of the borehole video image is left to manual operation and subjective identification, and is time-consuming and laborious. Unwrapping the borehole video image frame or video screenshot to form a borehole wall panoramic unwrapping image can quantitatively analyze the geological structure such as separation, fracture zone, fissure and joint in the borehole, and is the basis for intelligent analysis of borehole video.
[0003] Due to the problems of slight shaking, rotation of the imaging probe during borehole video shooting, and uneven motion speed of the imaging probe, the video image has inter-frame radial offset, angle difference and depth difference. The existing image unwrapping method has the problems of image edge blurring and large amount of calculation in the image preprocessing and edge extraction process, and the image edge extraction is slow and inaccurate. Moreover, the existing technology fails when there are a large number of burrs and interference in the hole edge data in the borehole hole fitting process, and has the problems of difficult fitting parameter adjustment and large amount of calculation, resulting in inaccurate image unwrapping result. SUMMARY
[0004] In order to overcome at least one of the deficiencies in the prior art, the present application provides a borehole video image unwrapping method and device.
[0005] In a first aspect, a borehole video image unwrapping method is provided, comprising: performing denoising and edge enhancement processing on the borehole image by using a deep learning model to obtain a processed image; performing circle fitting based on the borehole hole edge data points in the processed image to obtain a fitted circle, and determining the center and radius of the fitted circle; calculating the distance between the center of the fitted circle and each boundary of the processed image, and determining the minimum value of all distances; the image unwrapping region is an annular region, i.e. an annular region with the radius as the inner diameter and the minimum value as the outer diameter; converting each coordinate point in the annular region to a coordinate point corresponding to a rectangular unwrapping image, and determining the pixel value of the coordinate point corresponding to the rectangular unwrapping image according to the pixel value of each coordinate point in the annular region.
[0006] In one embodiment, performing circle fitting based on the borehole hole edge data points in the processed image to obtain a fitted circle, and determining the center and radius of the fitted circle, comprises: Step 21, in the current iteration, randomly select three data points p1, p2, p3 which are not collinear in the borehole hole edge data points; Step 22, respectively calculate the perpendicular bisector equations of line segment p1p2 and line segment p2p3 And ; Step 23, find the intersection point of And , that is, the center of the fitting circle; Step 24, select any data point in p1, p2, p3, calculate the distance between the selected data point and the center of the circle as the radius of the fitting circle ; Step 25, calculate the distance between each data point in the borehole hole edge data points and the center of the circle except the data points p1, p2, p3 If , wherein is the deviation threshold, then the data point is an inner point, and the number of inner points is counted; Step 26, if the number of inner points in the current iteration is greater than the maximum value of the number of inner points in the previous iteration, update the center and radius of the optimal fitting circle determined in the current iteration; Otherwise, do not update the optimal fitting circle parameters; Step 27, determine whether the current iteration reaches the maximum iteration number N, if yes, terminate the iteration and output the current optimal fitting circle parameters; if not, return to step 21.
[0007] In an embodiment, the maximum iteration number N satisfies: , is the confidence level, is the outer point probability, is the minimum sample size.
[0008] In an embodiment, each coordinate point in the annular region is converted into a coordinate point corresponding to a rectangular unfolded image, using the following formula:
[0009] Wherein, is the coordinate point in the annular region, is the center of the fitting circle, is the radius of the fitting circle, is the outer diameter of the annular region, is the coordinate point corresponding to the rectangular unfolded image.
[0010] In an embodiment, the pixel value of the coordinate point corresponding to the rectangular unfolded image is determined according to the pixel value of each coordinate point in the annular region, comprising: If the coordinate point in the annular region If the coordinate point is an integer coordinate, the pixel value of the coordinate point of the rectangular unfolded image is taken as the pixel value of the coordinate point corresponding to the rectangular unfolded image; If the coordinate point is a non-integer coordinate, the pixel values of the four integer coordinate points in the neighborhood of the coordinate point are obtained by using a bilinear interpolation method to obtain the pixel value of the coordinate point corresponding to the rectangular unfolded image.
[0011] In a second aspect, a borehole video image unfolding device is provided, comprising: a denoising and edge enhancement module configured to perform denoising and edge enhancement processing on the borehole image by using a deep learning model to obtain a processed image; a ring region determination module configured to perform circle fitting based on the borehole hole edge data points in the processed image to obtain a fitted circle, and determine the center and radius of the fitted circle; calculate the distances between the center of the fitted circle and each boundary of the processed image, and determine the minimum value of all distances; the image unfolding region is a ring region, i.e., a ring region with the radius as the inner diameter and the minimum value as the outer diameter; a coordinate conversion and pixel value determination module configured to convert each coordinate point in the ring region into a coordinate point corresponding to the rectangular unfolded image, and determine the pixel value of the coordinate point corresponding to the rectangular unfolded image according to the pixel value of each coordinate point in the ring region.
[0012] Compared with the prior art, the present application has the following beneficial effects: 1. The improved U-Net end-to-end deep learning model is used for borehole video image denoising and edge extraction in the present application, which can suppress image noise while preserving image texture details, improve image signal-to-noise ratio, and strengthen the structural integrity of the edge. The end-to-end architecture combined with GPU acceleration can achieve real-time processing speed of 30 frames per second, and is particularly suitable for long-term borehole video analysis.
[0013] 2. When performing borehole hole circle fitting, the present application naturally has the ability to resist external point interference based on the majority principle of internal points, and there is no problem of adjusting fitting parameters, which can effectively overcome the shortcomings of traditional borehole hole fitting algorithms. BRIEF DESCRIPTION OF DRAWINGS
[0014] The present application can be better understood by referring to the description given below in conjunction with the accompanying drawings, which are included in the specification and form a part of the specification. In the drawings: Figure 1 A flowchart of a borehole video image unfolding method is shown. DETAILED DESCRIPTION
[0015] Exemplary embodiments of the present application will be described herein below with reference to the accompanying drawings. In the description, specific embodiments have not been described in all features for the sake of clarity and conciseness. It should be appreciated, however, that many embodiment-specific decisions can be made in the process of developing any such actual embodiments in order to achieve the specific objectives of the developers, and these decisions can vary from embodiment to embodiment.
[0016] It should also be noted herein that, in order to avoid obscuring the present application with unnecessary details, only the structures of the devices closely related to the scheme according to the present application are shown in the accompanying drawings, and other details not closely related to the present application are omitted.
[0017] It should be understood that the present application is not limited to the described embodiments only by the description below with reference to the accompanying drawings. In this context, the embodiments can be combined with each other, features can be replaced or borrowed between different embodiments, and one or more features can be omitted in one embodiment, if possible.
[0018] The embodiment of the present application provides a borehole video image unwrapping method, Figure 1 A flowchart of the borehole video image unwrapping method is shown, see Figure 1 The method mainly includes the following steps: Step 1: using a deep learning model to denoise and edge enhance the borehole image to obtain a processed image.
[0019] Collect 1000-2000 frames of borehole video frames, and remove random noise from clear frames with little noise by "mean filtering + median filtering" to obtain noise-free labels I。 Add Gaussian noise and salt and pepper noise (Gaussian noise standard deviation , salt and pepper noise density 0.01~0.03) to the noise-free labels to generate noisy images I noise The noisy images I noise Each pixel is normalized and uniformly mapped to [0, 1], and the contrast-limited adaptive histogram equalization is used to enhance the shadow area in the image to avoid the influence of uneven illumination on the learning effect of the deep learning model.
[0020] Here, the deep learning model can adopt U-Net, or can adopt an improved U-Net model, which is the prior art. In order to eliminate the problem that the U-Net encoder is sensitive to noise, a residual module and a spatial attention module are added to the U-Net model, wherein the residual block uses ResNet34 as the backbone through residual connection to alleviate gradient disappearance, ensure edge detail transmission, and the spatial attention module focuses on the edge area and can suppress noise interference. A joint loss function is used to balance denoising and edge enhancement, and to suppress the conflict between denoising and edge enhancement (excessive denoising will cause edge blur).
[0021] Model training: 1000-2000 frames of drilling video images collected are used as a training set, a joint loss function is given, and model training is performed. Training environment and parameter setting: deep learning framework PyTorch2.0 and Adam optimizer+weight decay, wherein the weight decay is set to 0.0001, the initial learning rate is set to 0.0001, cosine annealing scheduling T_max=50 is used. The encoder weight is initialized by ResNet50 pre-trained on ImageNet (to accelerate convergence), and the decoder and attention module are randomly initialized.
[0022] Load the trained deep learning model, first unify the size and normalize the test image, then use the deep learning model for denoising+edge enhancement preprocessing, map the output normalized image back to the original pixel range (0~255), and get the denoised+edge enhanced image.
[0023] Step 2, based on the drilling hole edge data points in the processed image, a circle fitting is performed to obtain a fitted circle and determine the center and radius of the fitted circle; the distances between the center of the fitted circle and each boundary of the processed image are calculated, and the minimum value of all distances is determined; the image unfolding region is an annular region, i.e. an annular region with the radius as the inner diameter and the minimum value as the outer diameter; here, the processed image can be a rectangle with four sides, i.e. four boundaries.
[0024] Step 3, convert each coordinate point in the annular region to a coordinate point corresponding to the rectangular unfolded image, and determine the pixel value of the coordinate point corresponding to the rectangular unfolded image according to the pixel value of each coordinate point in the annular region.
[0025] Due to special working conditions, the quality of the drilling video image is poor, and the traditional image preprocessing and edge extraction algorithm (such as Laplace operator, sobel operator, Canny algorithm, etc.) has the problems of image edge blur, large amount of calculation, slow image edge extraction speed and poor accuracy. In this embodiment, the U-Net deep learning model is used for drilling video image denoising + edge extraction, which can suppress image noise while retaining image texture details, improve image signal-to-noise ratio, and strengthen the structural integrity of the edge. The end-to-end architecture combined with GPU acceleration can realize real-time processing speed of 30 frames / second, and is especially suitable for long-term drilling video analysis. In the drilling hole circle fitting, in addition, through the principle of majority of inliers, it naturally has the ability to resist the interference of outliers, and there is no problem of adjusting the fitting parameters, which can effectively overcome the shortcomings of the traditional drilling hole fitting algorithm.
[0026] In one embodiment, in step 2, based on the drilling hole edge data points in the processed image, the circle fitting is performed to obtain the fitted circle, and the center and radius of the fitted circle are determined, which can include: Step 21, in the current iteration, randomly select three non-collinear data points p1, p2, p3 from the drilling hole edge data points; Step 22, calculate the perpendicular bisector equations of line segment p1p2 and line segment p2p3 respectively And ; Step 23, find the intersection of and , which is the center of the fitted circle; Step 24, select any data point from p1, p2, p3, and calculate the distance between the selected data point and the center as the radius of the fitted circle ; Step 25, calculate the distance between each data point in the drilling hole edge data points and the center , if , where is a deviation threshold, which can be 0.05, then the data point is an inlier, and the number of inliers is counted; Step 26, if the number of inliers in the current iteration is greater than the maximum value of the number of inliers in the previous iteration, update the optimal fitted circle parameters determined in the current iteration; otherwise, do not update the optimal fitted circle parameters; Step 27, determine whether the current iteration reaches the maximum iteration number N, if yes, terminate the iteration and output the current optimal fitted circle parameters; if not, return to step 21. Here, the maximum iteration number N can be set to 120-150.
[0027] The center of the circle determined in the embodiment is the real center of the drilling hole, and the radius is the inner diameter of the hole-wall boundary line (the inner diameter of the annular area). The traditional hole fitting algorithm (such as the Hough circle detection algorithm and the least square circle fitting algorithm) will fail when there are a large number of burrs and interference in the hole edge data, and there are problems of difficult adjustment of fitting parameters and large amount of calculation. In the present embodiment, the inner point majority principle is used when fitting the hole circle, which naturally has the ability to resist external point interference, and there is no problem of adjusting the fitting parameters, which can effectively overcome the shortcomings of the traditional hole fitting algorithm.
[0028] Further, the maximum iteration number N satisfies: , is a confidence level, which can be 0.99, is an outlier probability, which can be 0.4, is a minimum sample size, which is 3.
[0029] In one embodiment, in step 3, each coordinate point in the annular area is converted into a coordinate point corresponding to the rectangular unfolded image, using the following formula:
[0030] wherein, is the coordinate point in the annular area, is the center of the fitted circle, is the radius of the fitted circle, is the outer diameter of the annular area, is the coordinate point corresponding to the rectangular unfolded image.
[0031] In one embodiment, in step 3, the pixel value of the coordinate point corresponding to the rectangular unfolded image is determined according to the pixel value of each coordinate point in the annular area, including: If the coordinate point in the annular area is an integer coordinate, the pixel value of the coordinate point is taken as the pixel value of the coordinate point corresponding to the rectangular unfolded image; If the coordinate point in the annular area is a non-integer coordinate, the pixel values of the four integer coordinate points in the neighborhood of the coordinate point are obtained by using the bilinear interpolation method to obtain the pixel value of the coordinate point corresponding to the rectangular unfolded image.
[0032] Here, when the coordinate point is a non-integer coordinate, and are both non-integers, and are rounded down and up respectively to obtain , , and are rounded down and up respectively to obtain , The coordinate point The four integer coordinate points in the neighborhood are The pixel value of the coordinate point corresponding to the unfolded image can be determined by the following formula:
[0033] Based on the same inventive concept as the borehole video image unfolding method, the embodiment also provides a corresponding borehole video image unfolding device, comprising: The denoising and edge enhancement module is configured to perform denoising and edge enhancement processing on the borehole image by using a deep learning model to obtain a processed image. The annular region determination module is configured to perform circle fitting based on the borehole hole edge data points in the processed image to obtain a fitted circle and determine the center and radius of the fitted circle; calculate the distances between the center of the fitted circle and each boundary of the processed image, and determine the minimum value of all distances; the image unfolding region is an annular region, i.e., an annular region with the radius as the inner diameter and the minimum value as the outer diameter. The coordinate conversion and pixel value determination module is configured to convert each coordinate point in the annular region into a coordinate point corresponding to the rectangular unfolded image, and determine the pixel value of the coordinate point corresponding to the rectangular unfolded image according to the pixel value of each coordinate point in the annular region.
[0034] The borehole video image unfolding device of the embodiment has the same inventive concept as the borehole video image unfolding method described above, so the specific embodiments of the device can be seen in the embodiment part of the borehole video image unfolding method described above, and the technical effects thereof correspond to those of the above method, which will not be repeated here.
[0035] The above is only various embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A borehole video image unwinding method characterized by, The method comprises the following steps: The deep learning model is used to denoise and enhance the edges of the drilling image, and a processed image is obtained; Based on the drilling hole edge data points in the processed image, a circle fitting is performed to obtain a fitting circle, and the center and radius of the fitting circle are determined; the distance between the center of the fitting circle and each boundary of the processed image is calculated, and the minimum value of all distances is determined; the image unfolding region is an annular region, i.e., an annular region with the radius as the inner diameter and the minimum value as the outer diameter; Each coordinate point in the annular region is converted into a corresponding coordinate point of a rectangular unfolded image, and the pixel value of the corresponding coordinate point of the rectangular unfolded image is determined according to the pixel value of each coordinate point in the annular region.
2. The method of claim 1, wherein, Wherein, Based on the drilling hole edge data points in the processed image, a circle fitting is performed to obtain a fitting circle, and the center and radius of the fitting circle are determined, which comprises the following steps: Step 21: In the current iteration, three non-collinear data points p1, p2 and p3 are randomly selected from the drilling hole edge data points; Step 22, calculate the perpendicular bisector equations of line segments p1p2 and p2p3, respectively and ; Step 23, find the intersection of and the center of the fitted circle; Step 24, select any data point in p1, p2, p3, calculate the distance between the selected data point and the center of the circle as the radius of the fitted circle ; Step 25, calculate the distance between each data point of the drilling hole edge data points excluding data points p1, p2, p3 and the center of the circle , if wherein, is a deviation threshold value, the data point is an inner point, and the number of inner points is counted; Step 26: If the number of inner points in the current iteration is greater than the maximum value of the number of inner points in the previous iteration, the optimal fitting circle parameters are updated with the center and radius determined in the current iteration; otherwise, the optimal fitting circle parameters are not updated; Step 27: Determine whether the current iteration reaches the maximum iteration number N, if yes, terminate the iteration and output the current optimal fitting circle parameters; if not, return to step 21.
3. The method of claim 1, wherein, The maximum number of iterations N satisfies: , is a confidence level, is an outlier probability, is a minimum sample size.
4. The method of claim 1, wherein, Wherein, Each coordinate point in the annular region is converted into a corresponding coordinate point of a rectangular unfolded image, and the following formula is used: wherein, is a coordinate point within the annular region, is a center of the fitted circle, is a radius of the fitted circle, is an outer diameter of the annular region, is a coordinate point corresponding to the rectangular unfolded image.
5. The method of claim 1, wherein, Wherein, The pixel value of the corresponding coordinate point of the rectangular unfolded image is determined according to the pixel value of each coordinate point in the annular region, which comprises the following steps: If the coordinate point in the annular region is an integer coordinate, the pixel value of the coordinate point is taken as the pixel value of the coordinate point corresponding to the rectangular unfolded image. If the coordinate point in the annular region is a non-integer coordinate, the pixel value of the coordinate point in the neighborhood of the 4 integer coordinate points is obtained by using a bilinear interpolation method to obtain the pixel value of the coordinate point corresponding to the rectangular expansion image.
6. A borehole video image unwinding apparatus characterized by, The method comprises the following steps: A denoising and edge enhancement module is configured to use a deep learning model to denoise and enhance the edges of the drilling image, and obtain a processed image; An annular region determination module is configured to perform a circle fitting based on the drilling hole edge data points in the processed image to obtain a fitting circle, and determine the center and radius of the fitting circle; calculate the distance between the center of the fitting circle and each boundary of the processed image, and determine the minimum value of all distances; the image unfolding region is an annular region, i.e., an annular region with the radius as the inner diameter and the minimum value as the outer diameter; A coordinate conversion and pixel value determination module is configured to convert each coordinate point in the annular region into a corresponding coordinate point of a rectangular unfolded image, and determine the pixel value of the corresponding coordinate point of the rectangular unfolded image according to the pixel value of each coordinate point in the annular region.