Forward-looking drilling image unfolding method based on machine vision

Through the forward-view drilling image expansion method based on machine vision, the problems of manual interpretation dependence and image distortion in the prior art are solved, and the accurate geometric correction and deployment of drilling video images are realized, providing the ability to quantitatively analyze the drilling geological structure.

CN119762575APending Publication Date: 2025-04-04XIAN RES INST OF CHINA COAL TECH & ENG GRP CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411644893.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The prior art has problems of manual operation dependence, subjective recognition deviation and image distortion in the interpretation of drilling video images, and it is impossible to effectively quantitatively analyze the geological structure in the drilling hole.

Method used

The forward-view drilling image expansion method based on machine vision is adopted, and the central area of ​​the drilling hole is protruded through Gamma transformation, combined with the least squares circle fitting algorithm, the inner and outer diameters of the drilling hole center and the effective annular area are determined, and rotational alignment and trigonometric function expansion are performed to eliminate the influence of jitter, eccentricity and rotation.

Benefits of technology

The geometric correction and unfolding of images is realized, the subjective deviation of manual interpretation is eliminated, and the ability to quantitatively analyze the geological structure of the drilling is improved, which improves the accuracy and efficiency of measurements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762575A_ABST
    Figure CN119762575A_ABST
Patent Text Reader

Abstract

The invention relates to a foresight borehole image expansion method based on machine vision, and the method comprises the steps: highlighting a central region of a foresight image borehole through Gamma transformation, and extracting the center of the image borehole and the inner and outer diameters of an effective annular image through a least square circle detection # imgabs0 # algorithm; the problems that a conventional Hough circle detection method is difficult in parameter adjustment and a least square method is large in circle detection calculation amount are solved; according to the invention, the effective annular image is used as the target image to be unfolded, so that the influence caused by camera shaking and non-centering during borehole measurement is eliminated. Before the effective annular image is unfolded, the drilling center of the front-view image serves as the rotation center, the effective annular image is reversely rotated according to the angular deviation of the tool face, and the influence caused by free rotation of a camera during drilling measurement is eliminated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a forward-looking drilling image expansion method based on machine vision. Background Art

[0002] The forward-looking borehole camera technology uses a CCD camera installed on the top of the probe to capture the video and image of the borehole wall in front of the hole, transmit the video signal to the monitor or controller outside the hole for construction personnel to monitor or view in real time, and store it for subsequent analysis and call. Since the forward-looking borehole camera is located in front of the probe, the video image is intuitive and has a strong three-dimensional sense, which conforms to the observation habits of the human eye. Therefore, the use of forward-looking borehole imaging technology to observe the inside of the borehole is an important means of geological exploration.

[0003] At present, construction workers mostly obtain information about the inner wall of the borehole by directly observing the drilling video or video screenshots obtained by forward-looking borehole imaging. The disadvantage is that the interpretation of the drilling video image remains in manual operation and subjective identification, which is time-consuming and labor-intensive, and human differences will cause deviations in the analysis results. In addition, this type of drilling video or video screenshot has not been expanded, and it is impossible to obtain the expanded image of the borehole wall, and it is impossible to quantitatively analyze the geological structures such as delamination, fracture zone, cracks, joints, etc. in the borehole.

[0004] The forward-looking camera probe has slight jitter and rotation when moving forward in the borehole. In non-vertical boreholes, the camera probe cannot be located in the center of the borehole due to gravity. These problems cause the center of each frame of the forward-looking drilling image to deviate from the center of the borehole to varying degrees, and each frame of the image rotates. According to the traditional video image expansion method, serious image distortion will occur. Summary of the invention

[0005] In order to overcome at least one deficiency in the prior art, the present application provides a forward-looking drilling image expansion method based on machine vision.

[0006] In a first aspect, a forward-looking drilling image expansion method based on machine vision is provided, comprising:

[0007] Gamma transformation is performed on the forward-looking borehole image to highlight the central area of ​​the borehole in the image, and a transformed image is obtained;

[0008] Perform edge detection on the transformed image to obtain the image edge; use the least squares circle fitting method based on the image edge The algorithm determines the center position of the borehole, the inner diameter and the outer diameter of the effective annular area; a small circle is formed with the center position of the borehole as the center, the inner diameter as the radius, and a large circle is formed with the outer diameter as the radius; the area after the small circle is removed from the large circle is the effective annular area;

[0009] The effective annular area is rotated according to the deviation of the tool face angle corresponding to the forward-looking drilling image to obtain the effective annular area after rotation alignment;

[0010] The trigonometric function expansion method is used to expand the effective annular area after rotation and alignment into a rectangular expansion diagram.

[0011] In one embodiment, a Gamma transformation is performed on the forward-looking borehole image to highlight the central area of ​​the borehole in the image, and a transformed image is obtained, including:

[0012] Convert the forward-looking borehole image to a grayscale image;

[0013] Perform Gamma transformation on the grayscale image to obtain the transformed image.

[0014] In one embodiment, edge detection is performed on the transformed image to obtain image edges, including:

[0015] Perform bilateral filtering on the transformed image to filter out noise and obtain a denoised image;

[0016] The Prewitt convolution template is used to calculate the gradient of each pixel in the denoised image, and the amplitude and direction of the pixel are obtained according to the gradient of the pixel to obtain the gradient image;

[0017] The non-maximum suppression algorithm is used to perform non-edge suppression on the gradient image to obtain an image after non-edge suppression;

[0018] The maximum inter-class variance method is used to calculate the segmentation threshold for the image after non-edge suppression, and the high threshold and the low threshold are set according to the segmentation threshold;

[0019] The brightness of each pixel in the non-edge suppressed image is reset according to the high threshold and the low threshold to obtain the image edge.

[0020] In one embodiment, the brightness of each pixel in the non-edge suppressed image is reset according to a high threshold and a low threshold to obtain the image edge, including:

[0021] The brightness of pixels with brightness higher than the high threshold in the non-edge suppressed image is set to 1, and pixels with brightness set to 1 are recorded as strong edge pixels; the brightness of pixels with brightness lower than the low threshold is set to 0, and the brightness of pixels between the high threshold and the low threshold is set to 0.5, and pixels with brightness set to 0 and brightness set to 0.5 are both recorded as weak edge pixels;

[0022] For a pixel whose brightness is set to 0.5, if the pixels in the 8-neighborhood of the pixel contain a strong edge pixel, the brightness of the pixel is reset to 1, otherwise the brightness of the pixel is reset to 0;

[0023] If two adjacent pixels are respectively a strong edge pixel and a weak edge pixel, then the two adjacent pixels are pixels at the edge of the image.

[0024] In one embodiment, a least squares circle fitting is used based on the image edge. The algorithm determines the drilling center position, including:

[0025] Drilling center position (x 0 ,y 0 ) is (-a / 2,-b / 2), where a and b are the parameters of the circular curve equation;

[0026]

[0027] Where N is the number of pixels in the edge of the image, i is the pixel index, (x i y i ) is the coordinate of pixel i.

[0028] In one embodiment, a least squares circle fitting is used based on the image edge. The algorithm determines the inner and outer radius of the effective annular area, including:

[0029] Inner diameter of the effective annular area Among them, a, b, c are the parameters of the circular curve equation;

[0030] The parameter c is expressed by the following formula:

[0031]

[0032] Where N is the number of pixels in the edge of the image, i is the pixel index, (x i y i ) is the coordinate of pixel i;

[0033] The distances between the center of the borehole and each edge of the forward-looking borehole image are calculated, and the minimum value of all distances is selected as the outer diameter of the effective annular area.

[0034] In one embodiment, the effective annular area is rotated according to the deviation of the tool face angle corresponding to the forward-looking drilling image to obtain the effective annular area after rotational alignment, including:

[0035] The effective annular area corresponding to the current forward-looking drilling image is recorded as the current effective annular area;

[0036] The deviation Δθ of the tool orientation angle corresponding to the forward-looking drilling image is: the deviation of the tool orientation angle corresponding to the current forward-looking drilling image and the tool orientation angle corresponding to the first frame of the forward-looking drilling image;

[0037] Calculate the coordinates of any pixel in the effective annular area after rotation alignment (x1 ,y 1 ) corresponds to the coordinates (x, y) of the current valid annular area, using the following formula:

[0038] x=x 1 cosΔθ+y 1 sinΔθ

[0039] y=y 1 cosΔθ-x 1 sinΔθ

[0040] Perform cubic convolution interpolation on the pixel values ​​of 16 pixels in the 4×4 neighborhood of the coordinate (x, y) of the current valid annular area to obtain the interpolated pixel value of the coordinate (x, y);

[0041] Assign the interpolated pixel value of the coordinate (x, y) to the pixel coordinate (x 1 ,y 1 ), the pixel value of each pixel in the effective annular area after rotational alignment can be obtained, and the pixel value of each pixel constitutes the effective annular area after rotational alignment.

[0042] In one embodiment, a trigonometric function expansion method is used to expand the effective annular area after rotation and alignment into a rectangular expansion diagram, including:

[0043] Calculate the coordinates of any pixel (x 2 ,y 2 ) corresponds to the coordinates (x 3 ,y 3 ), using the following formula:

[0044]

[0045] Among them, (x 0 ,y 0 ) is the center position of the borehole, r is the inner diameter of the effective annular area, and R is the outer diameter of the effective annular area;

[0046] The coordinates of the effective annular area after rotation alignment (x 3 ,y 3 ) is bilinearly interpolated to obtain the coordinates (x 3 ,y 3 ) interpolated pixel value;

[0047] The coordinates (x 3 ,y 3 )The interpolated pixel value is assigned to the pixel coordinate (x 2 ,y 2 ) to get the rectangular expansion diagram.

[0048] In a second aspect, a forward-looking drilling image development device based on machine vision is provided, comprising:

[0049] A gamma transformation module is used to perform gamma transformation on the forward-looking borehole image to highlight the center area of ​​the borehole in the image and obtain a transformed image;

[0050] The effective annular region determination module is used to detect the edge of the transformed image and obtain the image edge; the least squares circle fitting is used according to the image edge. The algorithm determines the center position of the borehole, the inner diameter and the outer diameter of the effective annular area; a small circle is formed with the center position of the borehole as the center, the inner diameter as the radius, and a large circle is formed with the outer diameter as the radius; the area after the small circle is removed from the large circle is the effective annular area;

[0051] A rotation module, used for rotating the effective annular area according to the deviation of the tool face angle corresponding to the forward-looking drilling image, to obtain the effective annular area after rotation alignment;

[0052] The unfolding module is used to unfold the effective annular area after rotation and alignment into a rectangular unfolding diagram by using a trigonometric function unfolding method.

[0053] In a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned forward-looking drilling image expansion method based on machine vision is implemented.

[0054] Compared with the prior art, this application has the following beneficial effects:

[0055] 1. This application uses Gamma transformation to highlight the center area of ​​the front view image drilling hole and uses least squares circle detection The algorithm is combined with a screening module to extract the inner and outer diameters of the image drilling center and the effective annular image, avoiding the difficulty in adjusting parameters of the conventional Hough circle detection method and the large amount of calculation required for least squares circle detection. This application uses the effective annular image as the target image to be expanded, eliminating the effects of camera jitter and non-centering during drilling measurement.

[0056] 2. Before expanding the effective annular image, the present application uses the drilling center of the front view image as the rotation center, and reversely rotates the effective annular image according to the tool face angle deviation, thereby eliminating the influence of the free rotation of the camera during drilling measurement. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The present application may be better understood by referring to the following description given in conjunction with the accompanying drawings, which together with the following detailed description are included in this specification and form a part of this specification. In the drawings:

[0058] Figure 1 A flowchart of a forward-looking drilling image expansion method based on machine vision according to an embodiment of the present application is shown;

[0059] Figure 2 A structural block diagram of a forward-looking drilling image expansion device based on machine vision according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0060] The exemplary embodiments of the present application will be described below in conjunction with the accompanying drawings. For the sake of clarity and conciseness, not all features of the actual embodiments are described in the specification. However, it should be understood that many implementation-specific decisions can be made in the process of developing any such actual embodiments in order to achieve the specific goals of the developer, and these decisions may vary from embodiment to embodiment.

[0061] It is also necessary to explain here that, in order to avoid obscuring the present application due to unnecessary details, only the device structure closely related to the scheme according to the present application is shown in the drawings, while other details that are not closely related to the present application are omitted.

[0062] It should be understood that the present application is not limited to the described implementation forms due to the following description with reference to the accompanying drawings. In this article, where feasible, the embodiments can be combined with each other, features between different embodiments can be replaced or borrowed, and one or more features can be omitted in one embodiment.

[0063] In the shooting of the borehole wall, due to the slight shaking of the forward-looking camera during movement, the eccentricity caused by gravity, and the natural rotation, the center of each frame of the forward-looking image deviates from the center of the image drilling to varying degrees, and there is an angle rotation problem between each frame of the image, which produces a large geometric distortion according to the conventional image expansion method. In order to eliminate the influence of shaking, eccentricity and rotation, the present application provides a forward-looking drilling image expansion method based on machine vision, which first finds the drilling center, the drilling edge and the effective annular area of ​​the drilling image in each frame of the image, and unifies the area to be expanded of each frame of the image into an annular area with the drilling center as the center of the circle, the drilling radius as the inner diameter, and the minimum distance from the drilling center to the edge of the image as the outer diameter, so as to eliminate the influence of shaking and eccentricity on the image expansion; then the annular area is rotated with the drilling hole as the center to realize the alignment of each frame of the annular image on the tool face angle, and eliminate the influence of the camera rotation on the image expansion; finally, the trigonometric function expansion method is used to expand the rotated annular image into a rectangular image. Through these operations, the forward-looking image will not produce geometric distortion during the expansion process, providing conditions for subsequent image stitching and the establishment of a drilling panorama.

[0064] Figure 1 A flowchart of a forward-looking drilling image expansion method based on machine vision according to an embodiment of the present application is shown. Figure 1 , the method mainly includes the following steps:

[0065] Step S1, performing a Gamma transformation on the forward-looking borehole image to highlight the center area of ​​the borehole in the image, and obtaining a transformed image.

[0066] Here, the forward-looking drilling camera technology is used to capture the borehole wall video in front of the hole through a CCD camera installed on the top of the probe. Any frame image in the borehole wall video is the forward-looking drilling image. The purpose of performing gamma transformation on the forward-looking drilling image is to adjust the overall grayscale range of the borehole wall image to highlight the center area of ​​the borehole in the image.

[0067] Step S2, edge detection is performed on the transformed image to obtain the image edge; the least squares circle fitting is performed based on the image edge. The algorithm determines the center position of the borehole, the inner diameter and the outer diameter of the effective annular area; a small circle is formed with the center position of the borehole as the center and the inner diameter as the radius, and a large circle is formed with the outer diameter as the radius; the area after the small circle is removed from the large circle is the effective annular area.

[0068] Here, the effective annular area is the area to be expanded. The borehole radius is used as the inner diameter of the effective annular area, and then the outer diameter of the effective annular area is determined, in order to eliminate the effects of camera shaking and non-centering during borehole measurement.

[0069] Step S3, rotating the effective annular area according to the deviation of the tool face angle corresponding to the forward-looking drilling image to obtain the effective annular area after rotational alignment.

[0070] Here, the effective annular area is rotated accordingly according to the change of the tool face angle to achieve image alignment and eliminate the influence of the natural rotation of the camera.

[0071] Step S4, using a trigonometric function expansion method to expand the effective annular area after rotation and alignment into a rectangular expansion diagram.

[0072] In one embodiment, step S1, performing a Gamma transformation on the forward-looking borehole image to highlight the borehole center area in the image, and obtaining a transformed image, includes:

[0073] The forward-looking borehole image is converted into a grayscale image; here, the conversion is performed according to the formula Y=0.299R+0.587G+0.114B, where R, G, and B represent the pixel values ​​of the red, green, and blue channels of the pixel, respectively, and Y is the calculated grayscale value of the pixel.

[0074] Perform Gamma transformation on the grayscale image to obtain the transformed image. Here, according to the formula Gamma transformation, f outThe pixel value of the pixel obtained by Gamma transformation.

[0075] In one embodiment, step S2, performing edge detection on the transformed image to obtain image edges, includes:

[0076] First, bilateral filtering is performed on the transformed image to remove noise and obtain the denoised image.

[0077] Here, the transformed image is subjected to bilateral filtering to filter out noise while keeping the image edge clear. The bilateral filter parameters are set as follows: mask window size 3×3, Gaussian function distance standard deviation σ d =4, Gaussian function grayscale standard deviation σ r =4, and the denoised image is obtained.

[0078] Then, the Prewitt convolution template is used to calculate the gradient of each pixel in the denoised image, and the amplitude and direction of the pixel are obtained according to the gradient of the pixel to obtain the gradient image.

[0079] Here, the Prewitt convolution template is used to find the gradient of the denoised image, and the gradient G in the x direction and the y direction of the image are obtained. x and G y , and according to G x and G y , calculate the amplitude of the pixel and direction α (x,y) =arctan(G y / G x ). After determining the amplitude and direction of each pixel, the gradient image can be obtained.

[0080] Then, the non-maximum suppression algorithm is used to perform non-edge suppression on the gradient image to obtain a non-edge suppressed image.

[0081] Then, the maximum inter-class variance method is used to calculate the segmentation threshold T for the non-edge suppressed image, and the high threshold T is set according to the segmentation threshold. H =T and low threshold T L =0.2T;

[0082] Then, the brightness of each pixel in the non-edge suppressed image is reset according to the high threshold and the low threshold to obtain the image edge.

[0083] Specifically, the brightness of pixels with brightness higher than the high threshold in the non-edge suppressed image is set to 1, and the pixels with brightness set to 1 are recorded as strong edge pixels; the brightness of pixels with brightness lower than the low threshold is set to 0, and the brightness of pixels between the high threshold and the low threshold is set to 0.5, and the pixels with brightness set to 0 and brightness set to 0.5 are both recorded as weak edge pixels;

[0084] For a pixel whose brightness is set to 0.5, if the pixels in the 8-neighborhood of the pixel contain a strong edge pixel, the brightness of the pixel is reset to 1, otherwise the brightness of the pixel is reset to 0;

[0085] If two adjacent pixels are respectively a strong edge pixel and a weak edge pixel, then the two adjacent pixels are pixels at the edge of the image.

[0086] In one embodiment, step S2 uses the least squares circle fitting method based on the image edge. The algorithm determines the drilling center position, including:

[0087] Drilling center position (x 0 ,y 0 ) is (-a / 2,-b / 2), where a and b are the parameters of the circular curve equation;

[0088]

[0089]

[0090] Where N is the number of pixels in the edge of the image, i is the pixel index, (x i y i ) is the coordinate of pixel i.

[0091] In one embodiment, step S2 uses the least squares circle fitting method based on the image edge. The algorithm determines the inner and outer radius of the effective annular area, including:

[0092] Inner diameter of the effective annular area Among them, a, b, c are the parameters of the circular curve equation;

[0093] The parameter c is expressed by the following formula:

[0094]

[0095] Where N is the number of pixels in the edge of the image, i is the pixel index, (x i y i ) is the coordinate of pixel i.

[0096] The distance between the center of the borehole and each edge of the forward-looking borehole image is calculated, and the minimum value of all distances is selected as the outer diameter of the effective annular area. Here, the forward-looking borehole image includes four edges: top, bottom, left, and right.

[0097] In one embodiment, in step S3, the effective annular area is rotated according to the deviation of the tool face angle corresponding to the forward-looking drilling image to obtain the effective annular area after rotational alignment, including:

[0098] First, the effective annular area corresponding to the current forward-looking drilling image is recorded as the current effective annular area;

[0099] The deviation Δθ of the tool orientation angle corresponding to the forward-looking drilling image is: the tool orientation angle θ corresponding to the current forward-looking drilling image is different from the tool orientation angle θ corresponding to the first frame of the forward-looking drilling image. 1 Deviation, Δθ=θ-θ 1 Here, the tool face angle corresponding to the first frame of the forward-looking drilling image is used as a reference to determine the deviation Δθ. The effective annular area is rotated in the opposite direction to eliminate the influence of the rotation of the camera probe during the imaging process.

[0100] Then, calculate the coordinates (x 1 ,y 1 ) corresponds to the coordinates (x, y) of the current valid annular area, using the following formula:

[0101] x=x 1 cosΔθ+y 1 sinΔθ

[0102] y=y 1 cosΔθ-x 1 sinΔθ

[0103] Then, since neither cosΔθ nor sinΔθ is an integer, the coordinate (x, y) is also not an integer. Therefore, the pixel values ​​of the 16 pixels in the 4×4 neighborhood of the coordinate (x, y) of the current valid annular area are interpolated three times by convolution to obtain the pixel value after interpolation of the coordinate (x, y).

[0104] Then, the interpolated pixel value of the coordinate (x, y) is assigned to the pixel coordinate (x 1 ,y 1 ), the pixel value of each pixel in the effective annular area after rotational alignment can be obtained, and the pixel value of each pixel constitutes the effective annular area after rotational alignment.

[0105] In one embodiment, in step S4, a trigonometric function expansion method is used to expand the effective annular area after rotation and alignment into a rectangular expansion diagram, including:

[0106] Calculate the coordinates of any pixel (x 2 ,y 2 ) corresponds to the coordinates (x 3 ,y 3 ), using the following formula:

[0107]

[0108] Among them, (x0 ,y 0 ) is the center position of the borehole, r is the inner diameter of the effective annular area, and R is the outer diameter of the effective annular area;

[0109] Since the coordinates of the rectangular unfolded image mapped to the coordinates of the valid annular area are not necessarily integer values, here, the coordinates of the valid annular area after rotation and alignment (x 3 ,y 3 ) is bilinearly interpolated to obtain the coordinates (x 3 ,y 3 ) interpolated pixel value;

[0110] The coordinates (x 3 ,y 3 )The interpolated pixel value is assigned to the pixel coordinate (x 2 ,y 2 ) to get the rectangular expansion diagram.

[0111] In the above embodiment, the cubic convolution interpolation method and the bilinear interpolation method are used to ensure the quality of the rectangular expanded image while taking into account the rapidity of the image expansion.

[0112] Using the same inventive concept as the forward-looking drilling image development method based on machine vision, this embodiment also provides a corresponding forward-looking drilling image development device based on machine vision. Figure 2 The structure block diagram of the forward-looking drilling image development device based on machine vision according to an embodiment of the present application is shown, including:

[0113] A gamma transformation module 21 is used to perform a gamma transformation on the forward-looking borehole image to highlight the borehole center area in the image, and obtain a transformed image;

[0114] The effective annular region determination module 22 is used to perform edge detection on the transformed image to obtain the image edge; and to use the least squares circle fitting method according to the image edge. The algorithm determines the center position of the borehole, the inner diameter and the outer diameter of the effective annular area; a small circle is formed with the center position of the borehole as the center, the inner diameter as the radius, and a large circle is formed with the outer diameter as the radius; the area after the small circle is removed from the large circle is the effective annular area;

[0115] A rotation module 23 is used to rotate the effective annular area according to the deviation of the tool face angle corresponding to the forward-looking drilling image to obtain the effective annular area after rotation alignment;

[0116] The expansion module 24 is used to expand the effective annular area after rotation and alignment into a rectangular expansion diagram by using a trigonometric function expansion method.

[0117] The forward-looking drilling image expansion device based on machine vision of this embodiment has the same inventive concept as the forward-looking drilling image expansion method based on machine vision mentioned above. Therefore, the specific implementation method of the device can be seen in the implementation example part of the forward-looking drilling image expansion method based on machine vision mentioned above, and its technical effect corresponds to the technical effect of the above-mentioned method, which will not be repeated here.

[0118] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned forward-looking drilling image expansion method based on machine vision is implemented.

[0119] In summary, this application has the following technical effects:

[0120] 1. This application uses Gamma transformation to highlight the center area of ​​the front view image drilling hole and uses least squares circle detection The algorithm is combined with a screening module to extract the inner and outer diameters of the image drilling center and the effective annular image, avoiding the difficulty in adjusting parameters of the conventional Hough circle detection method and the large amount of calculation required for least squares circle detection. This application uses the effective annular image as the target image to be expanded, eliminating the effects of camera jitter and non-centering during drilling measurement.

[0121] 2. Before expanding the effective annular image, the present application uses the drilling center of the front view image as the rotation center, and reversely rotates the effective annular image according to the tool face angle deviation, thereby eliminating the influence of the free rotation of the camera during drilling measurement.

[0122] The above are only various implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A forward-looking drilling image expansion method based on machine vision, characterized in that: include: Gamma transformation is performed on the forward-looking borehole image to highlight the central area of ​​the borehole in the image, and a transformed image is obtained; Perform edge detection on the transformed image to obtain image edges; and use least squares circle fitting based on the image edges. The algorithm determines the center position of the borehole, the inner diameter and the outer diameter of the effective annular area; a small circle is formed with the center position of the borehole as the center, the inner diameter as the radius, and a large circle is formed with the outer diameter as the radius; the area after the small circle is removed from the large circle is the effective annular area; Rotating the effective annular area according to the deviation of the tool face angle corresponding to the forward-looking drilling image to obtain the effective annular area after rotational alignment; The effective annular area after rotation and alignment is expanded into a rectangular expansion diagram by using a trigonometric function expansion method.

2. The method of claim 1, wherein: Gamma transformation is performed on the forward-looking borehole image to highlight the center area of ​​the borehole in the image, and the transformed image is obtained, including: Converting the forward-looking borehole image into a grayscale image; Perform a Gamma transformation on the grayscale image to obtain a transformed image.

3. The method of claim 1, wherein: Performing edge detection on the transformed image to obtain image edges includes: Performing bilateral filtering on the transformed image to filter out noise, thereby obtaining a denoised image; Using a Prewitt convolution template to calculate the gradient of each pixel in the denoised image, obtaining the amplitude and direction of the pixel according to the gradient of the pixel, and acquiring a gradient image; Performing non-edge suppression on the gradient image using a non-maximum suppression algorithm to obtain an image after non-edge suppression; The maximum inter-class variance method is used to calculate the segmentation threshold of the non-edge suppressed image, and a high threshold and a low threshold are set according to the segmentation threshold; The brightness of each pixel in the non-edge suppressed image is reset according to the high threshold and the low threshold to obtain an image edge.

4. The method according to claim 3, characterized in that in, Resetting the brightness of each pixel in the non-edge suppressed image according to the high threshold and the low threshold to obtain an image edge includes: The brightness of pixels whose brightness is higher than the high threshold in the non-edge suppressed image is set to 1, and the pixels whose brightness is set to 1 are recorded as strong edge pixels; the brightness of pixels whose brightness is lower than the low threshold is set to 0, the brightness of pixels whose brightness is between the high threshold and the low threshold is set to 0.5, and the pixels whose brightness is set to 0 and the brightness is set to 0.5 are both recorded as weak edge pixels; For a pixel whose brightness is set to 0.5, if the pixels in the 8-neighborhood of the pixel include a strong edge pixel, the brightness of the pixel is reset to 1, otherwise the brightness of the pixel is reset to 0; If two adjacent pixels are respectively a strong edge pixel and a weak edge pixel, then the two adjacent pixels are pixels at the edge of the image.

5. The method according to claim 1, characterized in that in, Least squares circle fitting is adopted according to the edge of the image The algorithm determines the drilling center position, including: The center position of the drilling hole (x0, y0) is (-a / 2, -b / 2), where a and b are parameters of the circular curve equation; Where N is the number of pixels in the edge of the image, i is the pixel index, (x i y i ) is the coordinate of pixel i.

6. The method according to claim 1, characterized in that in, Least squares circle fitting is adopted according to the edge of the image The algorithm determines the inner and outer radius of the effective annular area, including: The inner diameter of the effective annular area Among them, a, b, c are the parameters of the circular curve equation; The parameter c is expressed by the following formula: Where N is the number of pixels in the edge of the image, i is the pixel index, (x i y i ) is the coordinate of pixel i; The distances between the center position of the borehole and each edge of the forward-looking borehole image are calculated, and the minimum value of all distances is selected as the outer diameter of the effective annular area.

7. The method according to claim 1, characterized in that in, The effective annular area is rotated according to the deviation of the tool face angle corresponding to the forward-looking drilling image to obtain the effective annular area after rotational alignment, including: The effective annular area corresponding to the current forward-looking drilling image is recorded as the current effective annular area; The deviation Δθ of the tool orientation angle corresponding to the forward-looking drilling image is: the deviation of the tool orientation angle corresponding to the current forward-looking drilling image and the tool orientation angle corresponding to the first frame of the forward-looking drilling image; Calculate the coordinates (x1, y1) of any pixel in the effective annular area after rotation and alignment to the coordinates (x, y) of the current effective annular area using the following formula: x=x1 cosΔθ+y1 sinΔθ y=y1cosΔθ-x1sinΔθ Performing cubic convolution interpolation on the pixel values ​​of 16 pixels in a 4×4 neighborhood of the coordinates (x, y) of the current valid annular area to obtain the interpolated pixel value of the coordinates (x, y); By assigning the pixel value after interpolation of the coordinates (x, y) to the pixel coordinates (x1, y1), the pixel values ​​of each pixel in the effective annular area after rotational alignment can be obtained, and the pixel values ​​of each pixel constitute the effective annular area after rotational alignment.

8. The method according to claim 1, characterized in that in, The effective annular area after rotation and alignment is expanded into a rectangular expansion diagram using a trigonometric function expansion method, including: Calculate the coordinates (x3, y3) of any pixel coordinate (x2, y2) of the rectangular expansion image corresponding to the coordinates of the effective annular area after the rotation alignment using the following formula: Where (x0, y0) is the center position of the drill hole, r is the inner diameter of the effective annular area, and R is the outer diameter of the effective annular area; Perform bilinear interpolation on the pixel values ​​of 4 pixels in a 2×2 neighborhood of the coordinates (x3, y3) of the effective annular area after the rotation and alignment to obtain the interpolated pixel value of the coordinates (x3, y3); The interpolated pixel value of the coordinate (x3, y3) is assigned to the pixel coordinate (x2, y2) to obtain a rectangular expansion image.

9. A forward-looking drilling image development device based on machine vision, characterized in that: include: A gamma transformation module is used to perform gamma transformation on the forward-looking borehole image to highlight the center area of ​​the borehole in the image and obtain a transformed image; The effective annular region determination module is used to perform edge detection on the transformed image to obtain the image edge; and to use the least squares circle fitting method according to the image edge. The algorithm determines the center position of the borehole, the inner diameter and the outer diameter of the effective annular area; a small circle is formed with the center position of the borehole as the center, the inner diameter as the radius, and a large circle is formed with the outer diameter as the radius; the area after the small circle is removed from the large circle is the effective annular area; A rotation module, used for rotating the effective annular area according to the deviation of the tool face angle corresponding to the forward-looking drilling image, to obtain the effective annular area after rotation alignment; The expansion module is used to expand the effective annular area after rotation and alignment into a rectangular expansion diagram by using a trigonometric function expansion method.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the forward-looking drilling image expansion method based on machine vision according to any one of claims 1 to 8 is implemented.