Automatic concealed karst gap identification method based on borehole underground television camera shooting

Through drilling downhole TV camera combined with edge detection of DBSCAN and BDCN models, the skeleton of rock formation images is extracted and converted into vector data, which solves the problem of low recognition accuracy of hidden karst voids, and achieves higher recognition accuracy and geological data accuracy .

CN119021675AActive Publication Date: 2024-11-26GUIZHOU UNIV +3

Patent Information

Application Number
CN202411108345.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-11-26
Estimated Expiration
2044-08-13

AI Technical Summary

Technical Problem

When the existing drilling image analysis method recognizes hidden karst voids, due to the discontinuity and fragmentation of the structural surfaces in the rock formation image, the fitting effect is not obvious, which in turn reduces the recognition accuracy.

Method used

Using a drilling-downhole TV camera method, the pre-processing of rock formation images, image stitching, edge detection and skeleton extraction, combined with the DBSCAN algorithm and the BDCN model, automatic identification and vectorization are performed to generate vector data that can be processed by GIS.

Benefits of technology

It improves the identification accuracy of hidden karst voids, provides more accurate geological data support, and is suitable for risk assessment of groundwater pollution prevention and control and infrastructure construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119021675A_ABST
    Figure CN119021675A_ABST
Patent Text Reader

Abstract

The invention discloses a concealed karst gap automatic identification method based on borehole underground television shooting in the technical field of karst geological detection, which takes a borehole underground television high-definition shooting result as a main body and combines a multi-parameter hydrological logging curve, a rock core and a logging data cross plot. According to the method, key features (three-dimensional space features such as the width, the height and the distribution of a karst cave or a crack) in an image are extracted by adopting an image processing and computer vision technology fusing various algorithms such as edge detection and corner detection, and the method can be used for carrying out statistical analysis on karst development conditions in different directions and different depths of drill holes; and the precision and the working efficiency of karst development feature description and statistics are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of karst geological detection, and in particular relates to a method for automatically identifying hidden karst voids based on underground television photography of a borehole. Background Art

[0002] Covered karst is a special karst geological phenomenon, which refers to karst landforms and structures formed by soluble rocks (such as limestone, dolomite, etc.) buried below the surface and covered by non-soluble rocks or sediments. This type of karst usually does not form typical karst landforms on the surface, such as caves, stone forests, funnels, etc., due to the existence of a covering layer on the top, so it is difficult to directly observe and identify. The accurate identification of the development laws of hidden karst voids (caves, fissures, pipes and cavities, etc.) and regional karst development characteristics is extremely important for regional groundwater pollution prevention and control and the identification and tracking of groundwater pollution pathways; it also poses potential risks to human activities, especially the construction of infrastructure such as buildings, roads, and bridges, because they may cause ground collapse, building stability and other problems.

[0003] At present, there are many methods for identifying hidden karst voids, but they mainly include ground penetrating radar (GPR), high-density resistivity method, shallow seismic method, transient electromagnetic method, borehole image analysis method, inter-hole tomography, ground nuclear magnetic resonance method, etc. Among them, the borehole image analysis method uses downhole television to shoot the core in the borehole to obtain the rock layer image, and then analyzes the core image to identify the rock type, structural surface and cracks and other features to assist geological analysis and interpretation; the specific operation is: first pre-process the rock layer image (grayscale, noise reduction pre-processing), then use the structural surface positioning signal feature value to locate the structural surface, and obtain the image of the area where it is located; then perform edge detection, threshold segmentation and morphological processing, and realize the intelligent identification of structural surface characteristics (geometric parameters such as occurrence and gap width) by fitting edge curves and combining mathematical characterization methods. Since the structural surfaces in the rock formation images are not all sinusoidal curves, or a large part of the digital drilling images are broken, discontinuous, and inconsistently undulating structural surfaces, that is, the randomness of the gaps, the fitting effect is not obvious, which in turn leads to low final recognition accuracy. Summary of the invention

[0004] The present invention aims to provide a method for automatically identifying hidden karst voids based on downhole television photography, so as to improve the recognition accuracy of hidden karst voids.

[0005] A method for automatically identifying hidden karst voids based on downhole television photography in this scheme includes the following steps:

[0006] Step 1: Preprocessing of rock layer images

[0007] (1) Read the rock formation image and display it as a grayscale image;

[0008] (2) Converting the rock layer image into a binary image according to the threshold value. During the binary transformation, non-white pixels in the image are converted to white, and white pixels are converted to black;

[0009] (3) Remove small noise points in the rock layer image through morphological opening operation;

[0010] Step 2: Image stitching

[0011] (4) Use the DBSCAN algorithm to cluster the pixels in the rock layer image after removing small noise points;

[0012] (5) using the mask to extract the image area corresponding to each cluster in the rock formation image;

[0013] (6) stitching multiple image regions into a complete image;

[0014] Step 3: Image edge detection processing

[0015] (7) Convert the spliced ​​image into an array form and perform normalization processing;

[0016] (8) Use the BDCN model to perform edge detection on the normalized image to obtain an edge probability map;

[0017] Step 4: Preprocessing of edge probability map

[0018] (9) Read the edge probability map and add a border, and then perform a binarization process. During the binarization process, the pixel values ​​less than 110 in the image are set to 1, and the pixel values ​​greater than 110 are set to 0, forming a binary image;

[0019] (10) Use the copy.deepcopy function to make a deep copy of the binary image;

[0020] (11) The pixel values ​​of the binary image cmg after the deep copy are set to 255 to form a black and white image;

[0021] (12) Use cv2.imwrite function to save the black and white image;

[0022] Step 5: Skeleton Extraction

[0023] (13) Copy the saved black and white image and use the skeletonize function in the skimage library to extract the skeleton of the binary image;

[0024] (14) Convert the skeleton into a distance matrix and save it as a TIFF format file, i.e., a skeleton raster image.

[0025] Further, the skeleton raster image is converted into a vector polyline graph using the RasterToPolyline_conversion function in the ArcPy module. Use ArcPy to convert the skeleton lines in the raster image into vector polylines. The shange_to_zhexian.shp file is the result of vectorization of the fracture skeleton extracted from the raster image, stored as vector polyline data. This step converts the image data into vector data that can be processed by the Geographic Information System (GIS). This format is suitable for a variety of applications such as spatial analysis, overlay analysis, and visualization in GIS, which facilitates further spatial analysis and processing and provides basic data support for further geological research and engineering applications. The generated shange_to_zhexian.shp is a vector data file that stores the fracture skeleton information extracted from the raster image (i.e., julei_gujia.tif). These skeleton information are represented as polylines in a vector format, which facilitates further spatial analysis and processing in a Geographic Information System (GIS).

[0026] Furthermore, when step 1 reads the rock formation image, OpenCV is used to read and display the image.

[0027] Furthermore, in step 1, the rock layer image is converted into a binary image, and the threshold value is 255 during the binary transformation.

[0028] Furthermore, in step 1, the cv2.morphologyEx function of OpenCV is used to perform morphological opening operation.

[0029] Furthermore, in step 2, the coordinates of non-zero pixels in the image are extracted using the np.where function of NumPy, and the DBSCAN algorithm is used to perform cluster analysis on these pixels.

[0030] Furthermore, in step 4, the image file is read from the file system using the cv2.imread function.

[0031] Furthermore, in step 5, when copying the saved black and white image, the copy.deepcopy function is used to deep copy the cmg black and white image.

[0032] Furthermore, the calculation process of hidden karst voids is as follows:

[0033] (1) Select any identified structural surface and extract the two-dimensional plane coordinates of all points of the selected polyline;

[0034] (2) Calculate the radius: First, output the starting point coordinates (X0, Y0) and the end point coordinates (X e ,Y e ), calculate the difference A between the starting point and the end point of the curve i As the circumference, the radius r is calculated from the circumference formula of a circle i ;

[0035] A i =x e -x o ,

[0036]

[0037] (3) Calculate the central angle: Output the coordinates of each point on the crack curve (X i , Y i ), their horizontal coordinates X i Subtract the starting point's horizontal coordinate X0 to get the arc length s i , calculate the central angle θ corresponding to each point by the arc length formula i ;

[0038]

[0039] (4) Calculate the three-dimensional plane coordinates of all points on the selected polyline in the three-dimensional coordinate system:

[0040] X′ i =r i ·cosθ i ,

[0041] Y′ i =r i sinθ i ,

[0042] Z i =Y i ;

[0043] Therefore, the (X, Y, Z) coordinates of each point on the crack curve in the three-dimensional coordinate system are obtained, that is, (X′ i , Y′ i , Z i ), can be restored to a surface;

[0044] (5) Perform PCA principal component analysis to obtain three eigenvalues ​​and their corresponding eigenvectors, and select the smallest one. The steps are as follows:

[0045] ① Data centering: subtract the mean of each dimension;

[0046] Step 1: Standardize the data

[0047] The (X, Y, Z) coordinates of each point in the above crack curve in the three-dimensional coordinate system are stored as a matrix type to form an n×p data matrix X, where n is the number of samples and p is the number of features. First, the data is centered, that is, each feature is subtracted from its mean so that the mean of each feature is 0;

[0048] X centered =X-1 n m T ;

[0049] Where m is the mean vector of each feature:

[0050]

[0051] ② Covariance matrix: Calculate the covariance matrix H of the data

[0052] Step 2: Calculate the covariance matrix

[0053] The centralized data matrix is ​​X centered , calculate its covariance matrix:

[0054]

[0055] ③Eigendecomposition: solve the eigenvalues ​​and eigenvectors of the covariance matrix through singular value decomposition;

[0056] Step 3: Eigenvalue Decomposition

[0057] Perform eigenvalue decomposition on the covariance matrix c to obtain eigenvalues ​​and eigenvectors:

[0058] Cv i =λ i v i ;

[0059] Among them, λ i is the eigenvalue, v i is the corresponding eigenvector, the eigenvalues ​​are arranged in descending order, and the data direction corresponding to the largest eigenvalue is the direction in which the data changes the most;

[0060] ④ Sorting: Arrange the eigenvalues ​​and corresponding eigenvectors in descending order;

[0061] Step 4: Select principal components

[0062] Select the eigenvectors corresponding to the first k largest eigenvalues ​​as principal components and project the data onto these eigenvectors:

[0063] Z=X centered V k ;

[0064] Among them, V kis a matrix consisting of the first k eigenvectors, and z is the representation of the data in the new coordinate system;

[0065] (6) Calculation tendency:

[0066] If Δy=0 and Δx=0, the inclination is 0 degrees; otherwise, the sine and cosine values ​​are calculated as follows:

[0067]

[0068] Based on the signs of the sine and cosine values, the inclination θ is calculated as follows:

[0069] ①If Δy≥0 and Δx≥0, then

[0070]

[0071] In the first quadrant, sin and cos are both positive, and the result of arcsin directly represents the angle;

[0072] ②If Δy>0 and Δx<0, then

[0073]

[0074] In the second quadrant, sin is positive and cos is negative, so you need to subtract arcsin from π to get the correct angle.

[0075] ③If Δy<0 and Δx<0, then

[0076]

[0077] In the third quadrant, both sin and cos are negative, and you need to subtract arcstn from π.

[0078] ④If Δy<0 and Δx≥0, then

[0079]

[0080] In the fourth quadrant, sin is negative and cos is positive, so you need to add 2π to the result of arcsin to get the correct angle;

[0081] (7) Calculate the inclination angle:

[0082]

[0083] Among them, Δ x , Δ y and Δ z Respectively represent the first three components of the eigenvector, ∈ is a very small value (such as 0.000001) to avoid division by zero;

[0084] (8) Linear and surface karst rates:

[0085] ① Linear karst rate: the percentage of the length of karst space per unit length exposed by the borehole; that is, "Linear karst rate = length of caves and karst crevices encountered by the borehole / length of the borehole passing through soluble rock × 100%"

[0086]

[0087] Among them, depth_range i It is the pixel value of the crack depth range, which refers to the maximum Y coordinate of the pixel occupied by a crack minus the minimum Y coordinate (because they are all non-positive numbers). max_depth i It is the pixel value in the vertical direction of the borehole image, which refers to the total number of pixels in the vertical direction of the entire borehole image;

[0088] ② Surface karst rate: the percentage of karst spatial morphological area per unit area;

[0089]

[0090] Among them, S i is the area of ​​each karst surface, and S0 is the cross-sectional area of ​​the cylinder “enclosed” by the borehole image;

[0091] ③ Karst rate of any hole section interval line:

[0092] The sum of all karst heights of the interval hole section / interval hole section height = interval hole section line karst rate.

[0093] The present application also provides a downhole television, which integrates a method for automatically identifying hidden karst voids based on downhole television photography of boreholes. The method for automatically identifying hidden karst voids based on downhole television photography of boreholes is integrated into the downhole television, so that the downhole television can analyze the borehole while photographing it. BRIEF DESCRIPTION OF THE DRAWINGS

[0094] Figure 1 It is a schematic flow chart of a method for automatically identifying hidden karst voids based on downhole television photography of the present invention;

[0095] Figure 2 It is a three-dimensional spatial map of hidden karst voids;

[0096] Figure 3 This is a thermal map of hidden karst voids. DETAILED DESCRIPTION

[0097] The following is further described in detail through specific implementation methods:

[0098] A method for automatically identifying hidden karst voids based on downhole television photography comprises the following steps:

[0099] Step 1: Preprocessing of rock layer images

[0100] 1. Image reading and display:

[0101] Technology: Use OpenCV to read and display images. The image is taken by a downhole TV camera after drilling into the hidden karst underground. Image XX.jpg.

[0102] Reading image: Use OpenCV's cv2.imread function to read the input image.

[0103] Display image: Use OpenCV's cv2.imshow function to display the image, and control the display time through cv2.waitKey.

[0104] 2. Binary transformation:

[0105] Changes non-white pixels (values ​​less than 255) in the image to white (255) and white pixels to black (0).

[0106] Principle: Convert the grayscale image into a binary image according to the threshold value for subsequent morphological operations and clustering analysis.

[0107] 3. Morphological opening operation:

[0108] Use OpenCV's cv2.morphologyEx function to perform morphological opening to remove noise from the image. The convolution kernel used here is a 30x30 all-1 matrix.

[0109] Step 2: Image stitching

[0110] 1. Cluster analysis:

[0111] Extract non-zero pixels: Use NumPy’s np.where function to extract the coordinates of the non-zero pixels in the image.

[0112] DBSCAN clustering: Use the DBSCAN algorithm to perform cluster analysis on these pixels.

[0113] 2. Mask extraction image:

[0114] Label assignment: Assign the clustering result labels to the corresponding pixel positions to generate the clustering result image.

[0115] Extract region: According to the labels in the clustering result image, extract the image region corresponding to each cluster.

[0116] 3. Image stitching:

[0117] Create a blank image: Create a blank image based on the size of the extracted area.

[0118] Stitch images: Stitch the extracted image region onto a blank image.

[0119] Display and save the image: Display the stitched image and save it to a file to generate XX_tiqu.jpg.

[0120] Step 3: Image edge detection processing

[0121] The edge detection task based on Bi-Directional Cascade Network (BDCN) is implemented. The process is described in detail below:

[0122] 1. Loading and configuration of BDCN model:

[0123] Model loading: Use PyTorch to load the pre-trained BDCN model.

[0124] Model parameters: Load model parameters from the specified path and apply them to the BDCN model.

[0125] 2. Data loading and preprocessing

[0126] Custom dataset: Create a class that inherits from torch.utils.data.Dataset to load and preprocess the dataset.

[0127] Data transformation: including converting the image from RGB to BGR, normalizing it (subtracting the mean), performing scale transformation and cropping, etc.

[0128] Data loader: Use torch.utils.data.DataLoader to create a data loader for easy batch processing and iteration.

[0129] 3. Model inference and result preservation

[0130] Model inference: pass data into the model and get the output result. Use torch.sigmoid to convert the output result into a probability map.

[0131] Result saving: Use OpenCV to save the processed edge detection results as an image file, that is, generate XX_result.tif. Specifically, this XX_result.tif file contains the results of edge detection, in which each pixel value represents the probability that the pixel belongs to the edge.

[0132] Step 4: Preprocessing of edge probability map

[0133] Some basic image processing and computer vision techniques are used, and the process is described in detail below:

[0134] 1. Read the image

[0135] Tools: OpenCV

[0136] The image file is read from the file system using the cv2.imread function. The cv2.IMREAD_UNCHANGED parameter ensures that the image is read in its original format without any color conversion.

[0137] 2. Add a border

[0138] Tools: OpenCV

[0139] By directly operating the image array, borders are added to the four sides of the image. The specific operation is to set the specified value a at the four edge positions of the image array.

[0140] 3. Image Binarization

[0141] Tool: Numpy

[0142] The pixel values ​​in the image less than 110 are set to 1, and the pixel values ​​greater than 110 are set to 0 to form a binary image. Binarization helps simplify image processing tasks such as edge detection and shape analysis.

[0143] 4. Deep copy image

[0144] Tool: Python built-in copy module

[0145] Use the copy.deepcopy function to make a deep copy of the image array to ensure that modifying cmg will not affect the original image ymg.

[0146] 5. Modify the copied image

[0147] Tool: Numpy

[0148] The pixel values ​​of 1 in the binarized image cmg are set to 255 to form a black and white image. This processed image is more suitable for display and further analysis.

[0149] 6. Save the processed image

[0150] Use the cv2.imwrite function to save the processed image to the specified path and generate threshold_extraction.tif.

[0151] Step 5: Skeleton Extraction

[0152] 1. Copy the image

[0153] Use OpenCV's cv2.imread function to read the threshold_extraction.tif image file, add a border to the image through the custom function add_border, then perform binarization, set pixels with values ​​lower than 110 to 1, and pixels higher than 110 to 0, and finally convert to an 8-bit unsigned integer type and save the processed image, that is, take a binary image; then use the copy.deepcopy function to deep copy the cmg image to ensure that subsequent operations will not affect the original image data.

[0154] 2. Get the crack skeleton

[0155] Use the skeletonize function in the skimage library to extract the skeleton of the binary image. Skeleton extraction is to simplify the object into a one-dimensional line and retain its basic shape structure. The purpose is to simplify the lines with a width of multiple pixels in the image into single-pixel lines to represent the main structure of the crack.

[0156] 3. Convert the skeleton into a distance matrix

[0157] Use the np.where function to find the position of the skeleton pixels and convert the result into a two-dimensional array to represent the coordinates of each skeleton point.

[0158] 4. Save the crack skeleton image

[0159] Use cv2.imwrite function to save the skeleton image as TIFF format file to generate julei_gujia.tif. The generated julei_gujia.tif is the crack skeleton image extracted from the cmg image. Specifically, this file contains the refined structure (skeleton) extracted from the original binary image XX_result.tif, where white pixels represent the skeleton structure of the crack and black pixels represent the background.

[0160] The skeleton image can be used for further crack analysis, feature extraction, shape analysis, etc. For example, the length, direction, distribution and other information of the crack can be calculated. In short, the generated julei_gujia.tif file is a skeleton image that simplifies the crack structure in the image, providing concise and meaningful image information for subsequent analysis and processing.

[0161] 6. Grid to Turn Line

[0162] Implement the process of generating vector polylines from crack skeleton images.

[0163] Use the RasterToPolyline_conversion function in the ArcPy module to convert the skeleton raster image into a vector polyline map, that is, generate shange_to_zhexian.shp.

[0164] Parameter explanation:

[0165] "ZERO" means that pixels with a value of 0 are converted to background, and non-zero pixels are converted to polylines. 50 represents the tolerance value set to simplify the generated polylines. "SIMPLIFY" means that simplification is performed during the conversion process to remove unnecessary details.

[0166] Raster to vector conversion uses ArcPy to convert the skeleton lines in the raster image into vector polylines. The shange_to_zhexian.shp file is the result of vectorizing the fracture skeleton extracted from the raster image and stored as vector polyline data. This step converts the image data into vector data that can be processed by the Geographic Information System (GIS). This format is suitable for a variety of applications such as spatial analysis, overlay analysis, and visualization in GIS, facilitating further spatial analysis and processing, and providing basic data support for further geological research and engineering applications.

[0167] The generated shange_to_zhexian.shp is a vector data file that stores the crack skeleton information extracted from the raster image (i.e. julei_gujia.tif). These skeleton information are represented as polylines in vector format, which is convenient for further spatial analysis and processing in geographic information system (GIS).

[0168] Calculation of void space in concealed karst

[0169] (1) Select any identified structural surface (which has been vectorized into a polyline) and extract the two-dimensional plane coordinates of all points of the selected polyline (referring to the two-dimensional plane coordinates of the digital drilling image after a series of processing to splice it into a complete drilling image).

[0170] (2) Calculate the radius: First, output the starting point coordinates (X0, Y0) and the end point coordinates (X e , Y e ), it can be seen from the complete borehole image that if the complete borehole image is "enclosed" in the vertical direction, it is a complete "cylinder" without top and bottom surfaces. Therefore, if a crack in the complete borehole image is projected onto the top and bottom surfaces, it is a "circle". Therefore, the difference A between the horizontal coordinates of the starting point and the end point of the curve is calculated. i As the circumference, the radius r is calculated from the circumference formula of a circle (the projection of the crack on the rock column to the horizontal coordinate system is a circle). i ;

[0171] A i =xe-x0,

[0172]

[0173] (3) Calculate the central angle: Output the coordinates of each point on the crack curve (X i , Y i ), their horizontal coordinates X i Subtract the starting point's horizontal coordinate X0 to get the arc length s i , calculate the central angle θ corresponding to each point by the arc length formula i .

[0174]

[0175] (4) Calculate the three-dimensional plane coordinates of all points on the selected polyline in the three-dimensional coordinate system:

[0176] X′ i =r i ·cosθ i ,

[0177] Y′ i =r i sinθ i ,

[0178] Z i =Y i ;

[0179] Therefore, the (X, Y, Z) coordinates of each point on the crack curve in the three-dimensional coordinate system are obtained, that is, (X′ i , Y′ i , Z i ), can be restored to a surface.

[0180] (5) Perform PCA principal component analysis to obtain three eigenvalues ​​and their corresponding eigenvectors, and select the smallest one.

[0181] PCA (Principal Component Analysis) is used to map high-dimensional data into a low-dimensional space and maintain as much variability of the original data as possible. The steps are as follows:

[0182] ① Data centering: subtract the mean of each dimension.

[0183] Step 1: Standardize the data

[0184] Assume that we have an n×p data matrix X (i.e., the (X, Y, Z) coordinates of each point in the above crack curve in the three-dimensional coordinate system, which is stored as a matrix type), where n is the number of samples and p is the number of features. We first center the data, that is, subtract the mean of each feature from its own so that the mean of each feature is 0.

[0185] X centered =X-1 n m T ;

[0186] Where m is the mean vector of each feature:

[0187]

[0188] ②Covariance matrix: Calculate the covariance matrix H of the data.

[0189] Step 2: Calculate the covariance matrix

[0190] The centralized data matrix is ​​X centered , we calculate its covariance matrix:

[0191]

[0192] ③Eigendecomposition: The eigenvalues ​​and eigenvectors of the covariance matrix are solved through singular value decomposition (SVD).

[0193] Step 3: Eigenvalue Decomposition

[0194] Perform eigenvalue decomposition on the covariance matrix C to obtain eigenvalues ​​and eigenvectors:

[0195] Cv i =λ i v i ;

[0196] Among them, λ i is the eigenvalue, v i is the corresponding eigenvector. The eigenvalues ​​are arranged in descending order, and the data direction corresponding to the largest eigenvalue is the direction in which the data changes the most.

[0197] ④ Sorting: Arrange the eigenvalues ​​and corresponding eigenvectors in descending order.

[0198] Step 4: Select principal components

[0199] Select the eigenvectors corresponding to the first k largest eigenvalues ​​as principal components and project the data onto these eigenvectors:

[0200] Z=X centered V k ;

[0201] Among them, Vk is a matrix consisting of the first k eigenvectors, and Z is the representation of the data in the new coordinate system.

[0202] Usually, the inclination and dip angle of a surface can be determined by the smallest eigenvalue and its corresponding eigenvector. This is because the eigenvector corresponding to the smallest eigenvalue indicates the direction in which the surface changes the slowest, while the inclination and dip angle just describe the slope and direction of the surface.

[0203] (6) Calculation tendency:

[0204] If Δy=0 and Δx=0, the inclination is 0 degrees. Otherwise, the sine and cosine values ​​are calculated as follows:

[0205]

[0206] Based on the signs of the sine and cosine values, the inclination θ is calculated as follows:

[0207] ①If Δy≥0 and Δx≥0, then

[0208]

[0209] In the first quadrant, sin and cos are both positive, and the result of arcsin directly represents the angle.

[0210] ②If Δy≥0 and Δx<0, then

[0211]

[0212] In the second quadrant, sin is positive and cos is negative, so you need to subtract arcsin from π to get the correct angle.

[0213] ③If Δy<0 and Δx<0, then

[0214]

[0215] In the third quadrant, both stn and cos are negative, and you need to subtract arcsin from π.

[0216] ④If Δy<0 and Δx≥0, then

[0217]

[0218] In the fourth quadrant, sin is negative and cos is positive, so you need to add 2π to the result of arcsin to get the correct angle.

[0219] (7) Calculate the inclination angle:

[0220]

[0221] Among them, Δx, Δy and Δz represent the first three components of the eigenvector respectively, and ∈ is a very small value (such as 0.000001) to avoid division by zero.

[0222] (8) Linear and surface karst rates:

[0223] ① Linear karst rate: the percentage of the length of karst space per unit length exposed by the borehole; that is, "Linear karst rate = length of caves and karst crevices encountered by the borehole / length of the borehole passing through soluble rock × 100%"

[0224]

[0225] Among them, depth_range i It is the pixel value of the crack depth range, which refers to the maximum Y coordinate of the pixel occupied by a crack minus the minimum Y coordinate (because they are all non-positive numbers). max_depth i It is the vertical pixel value of the borehole image, which refers to the total number of pixels in the vertical direction of the entire borehole image.

[0226] ② Surface karst rate: the percentage of karst spatial morphological area per unit area.

[0227]

[0228] Among them, S i is the area of ​​each karst surface, and S0 is the cross-sectional area of ​​the cylinder “enclosed” by the borehole image.

[0229] ③ Karst rate of any hole section interval line:

[0230] You can choose an interval hole section (in the vertical direction), for example, the sum of all karst heights within the 10-meter hole section of 0-10 meters or 40-50 meters (or 20.4-31.6 meters, in short, you can choose any interval hole section) / interval hole section height = interval hole section line karst rate.

[0231] Calculation idea: Read the depth range of each karst, i.e., ymin and ymax. Since ymin and ymax are arranged according to pixel size and are negative numbers, first convert ymin and ymax to positive numbers by taking their absolute values, and then multiply them by the actual distance of a pixel, i.e., pixel_distance=a, to get the actual depth range of each karst underground. For example, the range of a karst is 9.3m-10.6m underground, and another karst is 19.7m-20.5m, and so on, so as to get the depth range of all karsts.

[0232] For example, select 10m-20m, and then find out the depth of all karst in this interval hole section. For example, the previous 9.3m-10.6m can only be 10.0m-10.6m, and 19.7m-20.5m can only be 19.7m-20.0m. Then there are only these two karsts in this interval hole section, so write down (20.0-19.7=0.3m, 10.6-10.0=0.6m), and then write down 0.3m+0.6m=0.9m as the sum of all karst heights of the selected 10m-20m interval hole section, the interval hole section height = subtract the positive value from the input range, and then the sum of karst height / interval hole section height = interval hole section line karst rate.

[0233] (9) 3D plane display:

[0234] Import the 3D plane coordinates of all points of the selected polyline in the 3D coordinate system required in (4), create a visualization window, coordinate axes and labels, draw the surface and mark all points, and finally display the visualization window, as shown in the attached figure. Figure 2 shown.

[0235] In addition, the extracted three-dimensional spatial feature data can be used to further draw a thermal map, as shown in the attached figure. Figure 3 shown.

[0236] The above is only an embodiment of the present invention, and the common knowledge such as the known specific structure and characteristics in the scheme is not described in detail here. It should be pointed out that for those skilled in the art, several deformations and improvements can be made without departing from the structure of the present invention, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.

Claims

1. A method for automatically identifying hidden karst voids based on downhole television photography, characterized in that: The following steps are involved: Step 1: Preprocessing of rock layer images (1) Read the rock formation image and display it as a grayscale image; (2) Converting the rock layer image into a binary image according to the threshold value. During the binary transformation, non-white pixels in the image are converted to white, and white pixels are converted to black; (3) Remove small noise points in the rock layer image through morphological opening operation; Step 2: Image stitching (4) Use the DBSCAN algorithm to cluster the pixels in the rock layer image after removing small noise points; (5) using the mask to extract the image area corresponding to each cluster in the rock formation image; (6) stitching multiple image regions into a complete image; Step 3: Image edge detection processing (7) Convert the spliced ​​image into an array form and perform normalization processing; (8) Use the BDCN model to perform edge detection on the normalized image to obtain an edge probability map; Step 4: Preprocessing of edge probability map (9) Read the edge probability map and add a border, and then perform a binarization process. During the binarization process, the pixel values ​​less than 110 in the image are set to 1, and the pixel values ​​greater than 110 are set to 0, forming a binary image; (10) Use the copy.deepcopy function to make a deep copy of the binary image; (11) The pixel values ​​of the binary image cmg after the deep copy are set to 255 to form a black and white image; (12) Use cv2.imwrite function to save the black and white image; Step 5: Skeleton Extraction (13) Copy the saved black and white image and use the skeletonize function in the skimage library to extract the skeleton of the binary image; (14) Convert the skeleton into a distance matrix and save it as a TIFF format file, i.e., a skeleton raster image.

2. The method for automatically identifying hidden karst voids based on downhole television photography according to claim 1 is characterized in that: Convert the skeleton raster image to a vector polyline chart using the RasterToPolyline_conversion function in the ArcPy module.

3. The method for automatically identifying hidden karst voids based on downhole television photography according to claim 2 is characterized in that: Step 1: Reading When reading rock formation images, use OpenCV to read and display the images.

4. The method for automatically identifying hidden karst voids based on downhole television photography according to claim 3 is characterized in that: Step 1: Convert the rock layer image into a binary image. When converting the binary image, the threshold is 255.

5. The method for automatically identifying hidden karst voids based on downhole television photography according to claim 4 is characterized in that: In step 1, use OpenCV's cv2.morphologyEx function to perform morphological opening.

6. The method for automatically identifying hidden karst voids based on downhole television photography according to claim 5 is characterized in that: In step 2, the coordinates of non-zero pixels in the image are extracted using the NumPy np.where function, and the DBSCAN algorithm is used to perform cluster analysis on these pixels.

7. The method for automatically identifying hidden karst voids based on downhole television photography according to claim 6 is characterized in that: In step 4, the image file is read from the file system using the cv2.imread function.

8. The method for automatically identifying hidden karst voids based on downhole television photography according to claim 7, characterized in that: In step 5, when copying the saved black and white image, use the copy.deepcopy function to deep copy the black and white image.

9. The method for automatically identifying hidden karst voids based on downhole television photography according to claim 8, characterized in that: The calculation process of hidden karst voids is as follows: (1) Select any identified structural surface and extract the two-dimensional plane coordinates of all points of the selected polyline; (2) Calculate the radius: First, output the starting point coordinates (X0, Y0) and the end point coordinates (X e ,Y e ), calculate the difference A between the starting point and the end point of the curve i As the circumference, the radius r is calculated from the circumference formula of a circle i ; A i =x e -x0, (3) Calculate the central angle: Output the coordinates of each point on the crack curve (X i , Y i ), their horizontal coordinates X i Subtract the starting point's horizontal coordinate X0 to get the arc length S. i , calculate the central angle θ corresponding to each point by the arc length formula i ; (4) Calculate the three-dimensional plane coordinates of all points on the selected polyline in the three-dimensional coordinate system: X′ i =r i ·cosθ i , Y′ i =r i ·sinθ i , Z i =Y i ; Therefore, the (X, Y, Z) coordinates of each point on the crack curve in the three-dimensional coordinate system are obtained, that is, (X′ i , Y′ i , Z i ), can be restored to a surface; (5) Perform PCA principal component analysis to obtain three eigenvalues ​​and their corresponding eigenvectors, and select the smallest one. The steps are as follows: ① Data centering: subtract the mean of each dimension; Step 1: Standardize the data The (X, Y, Z) coordinates of each point in the above crack curve in the three-dimensional coordinate system are stored as a matrix type to form an n×p data matrix X, where n is the number of samples and p is the number of features. First, the data is centered, that is, each feature is subtracted from its mean so that the mean of each feature is 0; X centered =X-1 n m T ; Where m is the mean vector of each feature: ② Covariance matrix: Calculate the covariance matrix H of the data Step 2: Calculate the covariance matrix The centralized data matrix is ​​X centered , calculate its covariance matrix: ③Eigendecomposition: solve the eigenvalues ​​and eigenvectors of the covariance matrix through singular value decomposition; Step 3: Eigenvalue Decomposition Perform eigenvalue decomposition on the covariance matrix C to obtain eigenvalues ​​and eigenvectors: Cv i =λ i v i ; Among them, λ i is the eigenvalue, v i is the corresponding eigenvector, the eigenvalues ​​are arranged in descending order, and the data direction corresponding to the largest eigenvalue is the direction in which the data changes the most; ④ Sorting: Arrange the eigenvalues ​​and corresponding eigenvectors in descending order; Step 4: Select principal components Select the eigenvectors corresponding to the first k largest eigenvalues ​​as principal components and project the data onto these eigenvectors: Z=X centered V k ; Among them, V k is a matrix consisting of the first k eigenvectors, and Z is the representation of the data in the new coordinate system; (6) Calculation tendency: If Δy=0 and Δx=0, the inclination is 0 degrees; otherwise, the sine and cosine values ​​are calculated as follows: Based on the signs of the sine and cosine values, the inclination θ is calculated as follows: ①If Δy≥0 and Δx≥0, then In the first quadrant, sin and cos are both positive, and the result of arcsin directly represents the angle; ②If Δy≥0 and Δx<0, then In the second quadrant, sin is positive and cos is negative, so you need to subtract arcsin from π to get the correct angle. ③If Δy<0 and Δx<0, then In the third quadrant, sin and cos are both negative, so you need to subtract arcsin from π. ④If Δy<0 and Δx≥0, then In the fourth quadrant, sin is negative and cos is positive, so you need to add 2π to the result of arcsin to get the correct angle; (7) Calculate the inclination angle: Where Δx, Δy and Δz represent the first three components of the eigenvector, 0<∈≤0.000001; (8) Linear and surface karst rates: ① Linear karst rate: the percentage of the length of karst space per unit length exposed by the borehole; that is, "Linear karst rate = length of caves and karst gaps encountered by the borehole / length of the borehole passing through soluble rock × 100%" Among them, depth_range t is the pixel value of the crack depth range, which refers to the maximum Y coordinate of the pixel occupied by a crack minus the minimum Y coordinate (because they are all non-positive numbers). max_depth1 is the pixel value in the vertical direction of the borehole image, which refers to the total number of pixels in the vertical direction of the entire borehole image. ② Surface karst rate: the percentage of karst spatial morphological area per unit area; Among them, S i is the area of ​​each karst surface, and S0 is the cross-sectional area of ​​the cylinder "enclosed" by the borehole image; ③ Karst rate of any hole section interval line: The sum of all karst heights of the interval hole section / interval hole section height = interval hole section line karst rate.

10. A downhole television, characterized in that: Execute the method for automatically identifying hidden karst voids based on downhole television photography as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Slope earth surface deformation crack automatic identification and information extraction method and system

    CN115063698A

  • Apparatus for measuring crack using image processing technology and method thereof

    KR101932214B1

  • Method for landslide crack detection based deep learning and Method for landslide monitoring therewith and Apparatus thereof

    KR102550707B1

  • Image-based crack quantification

    US20130034305A1

  • Method for leakage detection of underground pipeline corridor based on dynamic infrared thermal image processing

    US20190331301A1

Cited By

  • Automatic space element extraction method based on character recognition and image processing

    CN117152185A

  • A pore type classification method and classification model for coal rock scanning electron microscope images

    CN120318604B

  • Non-uniform drilling television video jigsaw method based on small-period speed averaging

    CN120812413A

  • Method, device and equipment for determining porosity of carbonate rock slice and medium

    CN122335950A