Cable well image data processing method and system based on slam equipment
By using SLAM equipment and learning models in cable well mapping, safety hazards and data integration difficulties in cable well mapping are solved, and efficient and safe cable well mapping and digital management are achieved.
Patent Information
- Application Number
- CN202510088716.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2045-01-21
AI Technical Summary
The prior art has problems such as safety hazards and data integration and analysis in cable well mapping, especially when the underground environment is complex and the data format is not uniform.
Using the cable well image data processing method based on SLAM equipment, three-dimensional point cloud data and images are obtained through 360-degree rotation scanning, combined with preliminary cropping, denoising and learning model training, a three-dimensional model of the cable well is constructed and panoramic viewing function is provided.
It improves the safety and efficiency of cable well mapping, provides a high-quality data foundation, simplifies data integration and analysis, and supports the digital management of underground pipe trenches.
Smart Images

Figure CN119540495A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and more specifically to a method and system for processing cable well image data based on SLAM equipment. Background Art
[0002] With the acceleration of urbanization, the management and maintenance of underground cables and trenches have become increasingly important. The workload of the province's distribution network cable census is huge. The existing technical means mainly rely on manual downhole cable mapping. Due to the complex underground environment, there may be dangers such as toxic gases and collapse, which pose a serious threat to the life safety of operators. On the other hand, the cable census is implemented by different surveying and mapping units, and the census results are often stored offline. The data format is not unified, and there is a lack of a unified data management platform, which makes data integration and analysis difficult. Summary of the invention
[0003] In view of the shortcomings of the prior art, the present invention provides a method and system for processing cable well image data based on SLAM equipment, aiming to provide a safe, efficient and automated cable well mapping solution, which can improve the efficiency and safety of cable well mapping, and also provide strong support for the digital management of underground pipe trenches.
[0004] In order to achieve the above-mentioned invention object, a method for processing cable well image data based on SLAM equipment is implemented by executing the following method: Step S1: Use a SLAM device to perform a 360-degree rotation scan on the cable well to obtain three-dimensional point cloud data and a first image of the cable well, establish a corresponding relationship between the three-dimensional point cloud data and the first image according to the shooting time, and transmit the data to the control unit in real time through a wireless transmission module; Step S2: using a first algorithm in the control unit to perform preliminary cropping on the three-dimensional point cloud data to remove redundant point clouds outside the cable well, and using a second algorithm to automatically denoise the three-dimensional point cloud data to identify and remove noise points and outliers in the three-dimensional point cloud data; Step S3: obtaining a geometric body that completely surrounds the three-dimensional point cloud data as a bounding box, calculating the size of the bounding box, and obtaining the cable well measurement result; Step S4: collecting images from historical cable wells and using them as input data to train a corresponding learning model, inputting the first image into the trained learning model, and the learning model outputting the first image with labeled information; Step S5: Based on the measurement results of the cable well and the first image with annotated information that is consistent with the time of the measurement results of the cable well, a three-dimensional model of the cable well is constructed. After the three-dimensional model of the cable well is constructed, the three-dimensional model of the cable well is stored, and a panoramic viewing function of the cable well is provided to the staff.
[0005] As a preferred technical solution of the present invention, step S4 further includes the following steps: Step S41: collecting images in historical cable wells as second images, wherein the second images include images containing pipe holes, well body collapse images, cable breakage images, and well water accumulation images, and the images containing pipe holes also include situations where the pipe holes are occupied and unoccupied; Step S42: creating and training a first learning model, classifying and marking the occupancy status of the tube holes in the second image, and identifying whether the cable in the tube hole is broken when the tube hole is marked as occupied; Step S43: Create and train a second learning model to identify and label whether the second image contains features of well body collapse, and create and train a third learning model to identify and label whether the second image contains features of water accumulation in the well.
[0006] As a preferred technical solution of the present invention, the step S42 further includes: Creating a first learning model based on the deep learning model, wherein the first learning model has a first output branch and a second output branch, wherein the first output branch is used to classify and annotate the occupancy status of the pipe holes in the second image, and the second output branch is used to identify whether the second image contains a broken cable and annotate the identification result; The second image is input into the first learning model, the first layer of the first learning model extracts and identifies the tube holes and the tube hole positions in the second image, and the tube hole positions are used as the output result of the first layer. Based on the tube hole positions, the second layer of the first learning model identifies whether the tube hole positions are occupied, classifies and labels the occupied status of the tube hole positions and uses it as the output result of the first output branch. When the output result of the first output branch is that the tube hole is occupied, the third layer of the first learning model identifies whether the cable in the occupied tube hole is broken, labels the identification result, and uses it as the output result of the second output branch.
[0007] As a preferred technical solution of the present invention, the step S43 further includes: Step S431: Calculate the number of images that do not contain well body collapse features in the second image as a first number, and the number of images that contain well body collapse features in the second image as a second number, compare the first number with the second number, and when the first number is N times or more of the second number, based on the image that does not contain the well body collapse feature and the image that contains the well body collapse feature, use data enhancement technology to generate a virtual image with the well body collapse feature as a virtual image, use the virtual image and the second image together as input data of the second learning model to train the second learning model, and use the annotation result of the well body collapse as the output result of the second learning model, wherein N represents a positive integer greater than or equal to 3; Step S432: Repeat step S431 to train the third learning model.
[0008] As a preferred technical solution of the present invention, step S3 further includes: Searching the points with the maximum and minimum coordinates along the X-axis, the points with the maximum and minimum coordinates along the Y-axis, and the points with the maximum and minimum coordinates along the Z-axis in the three-dimensional point cloud data as eight vertices of the bounding box; constructing an axis-aligned bounding box based on the eight vertices of the bounding box, wherein each side of the axis-aligned bounding box is parallel to a coordinate axis; The difference between the maximum coordinate value and the minimum coordinate value of the X-axis is calculated as the length of the bounding box, the difference between the maximum coordinate value and the minimum coordinate value of the Y-axis is calculated as the width of the bounding box, and the difference between the maximum coordinate value and the minimum coordinate value of the Z-axis is calculated as the height of the bounding box. Based on the length, width and height of the bounding box, a bounding box is constructed, and the size of the bounding box is used as the measurement result of the cable well.
[0009] As a preferred technical solution of the present invention, after constructing the bounding box, the following steps are further included: Convert the axis-aligned bounding box into an oriented bounding box, apply principal component analysis to calculate the principal axis of the three-dimensional point cloud data and use it as the axis vector of the oriented bounding box, calculate the center of gravity of the three-dimensional point cloud data as the center point of the oriented bounding box, and for each of the axis vectors, calculate the maximum value of the vertical distances from all points in the three-dimensional point cloud data to the first axis and use it as the semi-axis length of the first axis; Using a gradient descent algorithm, the center point, the axis vector, and the semi-axis length of the oriented bounding box are fine-tuned to obtain a minimized volume of the oriented bounding box.
[0010] As a preferred technical solution of the present invention, a SLAM device is used to perform a 360-degree rotation scan on the cable well, including: The slam device is safely sent into the cable well by a mechanical arm, and scanning is started during the descent of the slam device to obtain the captured environmental image in real time, and the descent speed and direction of the slam device are adjusted in time based on the environmental image to ensure that the slam device does not collide with the well wall or other structural objects; After the slam device descends to the bottom of the cable well, initial positioning and posture adjustment are performed, the rotation mechanism of the slam device is turned on, and the laser radar and camera are activated at the same time to start all-round scanning.
[0011] As a preferred technical solution of the present invention, obtaining the three-dimensional point cloud data and the first image of the cable well includes: The laser radar emits laser pulses at a preset frequency, measures the time it takes for the laser pulses to reflect back, obtains distance information of the structure in the cable well, and generates three-dimensional point cloud data. The camera captures a first image during the rotation of the slam device and records video information in the cable well.
[0012] As a preferred technical solution of the present invention, the step S2 further includes: The first algorithm is to use CloudCompare software to import the three-dimensional point cloud data, create a cube based on the clipping area, define the corner coordinates of the cube, clip the three-dimensional point cloud data based on the cube, and obtain the clipped three-dimensional point cloud data; The second algorithm is a RANSAC algorithm. The parameters of the RANSAC algorithm are set and the RANSAC algorithm is executed to denoise and filter outliers on the three-dimensional point cloud data. The parameters of the RANSAC algorithm include the number of iterations, model type, distance threshold and confidence.
[0013] The present invention also provides a cable well image data processing system based on the SLAM device as described above, comprising the following modules: A data acquisition unit, used to use a SLAM device to perform a 360-degree rotation scan on the cable well, obtain three-dimensional point cloud data and a first image of the cable well, establish a corresponding relationship between the three-dimensional point cloud data and the first image according to the shooting time, and transmit the data to the control unit in real time through a wireless transmission module; A data preprocessing unit, configured to use a first algorithm in the control unit to perform preliminary cropping on the three-dimensional point cloud data to remove redundant point clouds outside the cable well, and use a second algorithm to automatically denoise the three-dimensional point cloud data to identify and remove noise points and outliers in the three-dimensional point cloud data; A data measurement unit, used to obtain a geometric body that completely surrounds the three-dimensional point cloud data as a bounding box, calculate the size of the bounding box, and obtain the measurement result of the cable well; An image annotation unit, used for collecting images in historical cable wells and using them as input data to train a corresponding learning model, inputting the first image into the trained learning model, and the learning model outputting the first image with annotation information; The three-dimensional modeling unit is used to construct a three-dimensional model of the cable well based on the measurement results of the cable well and the first image with annotated information that is consistent with the measurement results of the cable well in time, and after the three-dimensional model of the cable well is constructed, store the three-dimensional model of the cable well, and provide the staff with a panoramic viewing function of the cable well.
[0014] Compared with the prior art, the beneficial effects of the present invention are at least as follows: The technical solution of the present invention uses a SLAM device to perform a 360-degree rotation scan on the cable well, obtains the three-dimensional point cloud data and the first image of the cable well, establishes the corresponding relationship between the three-dimensional point cloud data and the first image according to the shooting time, and transmits it to the control unit in real time through a wireless transmission module. A fast and comprehensive scan of the internal environment of the cable well is achieved without manual well-diving, which improves the safety of the operation; the first algorithm is used in the control unit to perform preliminary cropping of the three-dimensional point cloud data to remove the redundant point clouds outside the cable well, and the second algorithm is used to automatically denoise the three-dimensional point cloud data, identify and remove noise points and outliers in the three-dimensional point cloud data, and provide a high-quality data foundation for subsequent measurement and modeling. The geometric body that completely surrounds the three-dimensional point cloud data is obtained as a bounding box, the size of the bounding box is calculated, and the measurement result of the cable well is obtained, which improves the speed and accuracy of the measurement. The images in the historical cable well are collected and used as input data to train the corresponding learning model, the first image is input into the trained learning model, and the learning model outputs the first image with annotation information; basic data is provided for constructing a three-dimensional model of the cable well. Based on the measurement results of the cable well and the first image with annotated information that is consistent with the measurement results of the cable well, a three-dimensional model of the cable well is constructed, and after the three-dimensional model of the cable well is constructed, the three-dimensional model of the cable well is stored, and a panoramic viewing function of the cable well is provided to the staff, so that the staff can quickly understand the details of the cable well without going to the site in person, thereby improving work efficiency and safety. Through the coordination between the above steps, the present invention can improve the efficiency and safety of cable well mapping, and can also provide strong support for the digital management of underground pipe trenches. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0016] Figure 1 It is a flowchart of the steps of the method for processing cable well image data based on SLAM equipment in the present invention; Figure 2 It is a structural diagram of the cable well image data processing system based on the SLAM device in the present invention. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0018] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.
[0019] The workload of the province's distribution network cable census is huge. The existing technical means mainly rely on manual downhole surveying and mapping of cables. Due to the complex underground environment, there may be dangers such as toxic gases and collapse, which pose a serious threat to the life safety of operators. On the other hand, the cable census is implemented by different surveying and mapping units, and the census results are often stored offline. The data format is not unified and there is a lack of a unified data management platform, which makes data integration and analysis difficult.
[0020] In view of the above technical problems, the present invention proposes Figure 1 The method for processing cable well image data based on SLAM equipment shown includes the following steps: Step S1: Use the SLAM device to perform a 360-degree rotation scan on the cable well to obtain the three-dimensional point cloud data and the first image of the cable well, and establish a corresponding relationship between the three-dimensional point cloud data and the first image according to the shooting time, and transmit it to the control unit in real time through the wireless transmission module.
[0021] Specifically, SLAM (Simultaneous Localization and Mapping), or simultaneous positioning and mapping, is a technology that allows robots to navigate autonomously in unknown environments and build maps of the environment. Before going down the well, check whether the SLAM equipment is intact, including whether sensors such as laser radar, panoramic camera, and inertial measurement unit are working properly, and set the camera resolution, video frame rate and other parameters according to the specific environment and needs of the cable well to ensure that the acquired data meets the needs of subsequent processing. The SLAM device is sent into the cable well through a rope or a robotic arm. The SLAM device automatically performs a 360-degree rotation scan underground. The laser radar and panoramic camera work at the same time. The laser radar obtains point cloud data in space, and the panoramic camera obtains the first image data. The laser radar scans the inside of the cable well at a high frequency to generate a large amount of point cloud data. These point cloud data contain the spatial position information of the structure in the well; the panoramic camera captures the first image, records the visual information in the well, and provides data support for subsequent image recognition and analysis. The SLAM device is usually equipped with a wireless transmission module, which can transmit the collected point cloud data and the first image to the control center in real time for subsequent processing. Through the above steps, a rapid and comprehensive scan of the internal environment of the cable well is achieved without the need for manual work, which improves the safety of the operation. At the same time, real-time transmission enables image data to be processed quickly, improving work efficiency.
[0022] Step S2: In the control unit, the first algorithm is used to perform preliminary cropping on the three-dimensional point cloud data to remove redundant point clouds outside the cable well, and the second algorithm is used to automatically denoise the three-dimensional point cloud data to identify and remove noise points and outliers in the three-dimensional point cloud data.
[0023] Specifically, in the control unit, the first algorithm, the CloudCompare algorithm, is used to perform preliminary cropping on the received 3D point cloud data to remove redundant point clouds outside the cable well. Then, the second algorithm, the RANSAC algorithm, is used to automatically denoise the point cloud data, identify and remove noise points and outliers. The RANSAC algorithm improves the accuracy and robustness of the data, especially in the presence of noise and outliers. By cropping and denoising the 3D point cloud data, the point cloud data is made more accurate, providing a high-quality data foundation for subsequent measurement and modeling.
[0024] Step S3: Obtain a geometric body that completely surrounds the three-dimensional point cloud data as a bounding box, calculate the size of the bounding box, and obtain the cable well measurement result.
[0025] Specifically, a bounding box calculation method is used to determine a geometric body that can completely surround the point cloud data, such as a cuboid; the size of the bounding box (length, width, height) is determined by calculating the maximum and minimum coordinate values of the geometric body along each coordinate axis in three-dimensional space, thereby obtaining the measurement results of the cable well. The size of the bounding box provides the precise spatial size of the cable well, while automating the measurement process of the cable well, improving the speed and accuracy of the measurement.
[0026] Step S4: collecting images from historical cable wells and using them as input data to train a corresponding learning model, inputting the first image into the trained learning model, and the learning model outputting the first image with labeled information; Specifically, images from historical cable wells are collected and used as input data to train a deep learning model for identifying pipe hole occupancy and downhole defects. Through the intelligent recognition of the deep learning model, the annotation process of pipe hole occupancy status and downhole defects is automated, improving the efficiency and accuracy of recognition. The first image is input into the trained learning model, and the model outputs the first image with annotation information. The first image with annotation information provides basic data for constructing a three-dimensional model of the cable well.
[0027] Step S5: Based on the measurement results of the cable well and the first image with annotated information that is consistent with the measurement results of the cable well, a three-dimensional model of the cable well is constructed. After the three-dimensional model of the cable well is constructed, the three-dimensional model of the cable well is stored, and a panoramic viewing function of the cable well is provided to the staff.
[0028] Specifically, the three-dimensional model of the cable well is constructed using three-dimensional modeling software or an algorithm in combination with the measurement results of the cable well and the first image with annotation information. The three-dimensional model provides an intuitive view of the cable well, which helps the staff to better understand and analyze the structure and status of the cable well; after the three-dimensional model of the cable well is constructed, the model is stored in a database to realize the unified management of the cable well data; a panoramic viewing function is also provided for the staff to use. The panoramic viewing function enhances the remote exploration capability, so that the staff can quickly understand the details of the cable well without going to the site in person, thereby improving work efficiency and safety.
[0029] Through the coordination between the above steps, the present invention can improve the efficiency and safety of cable well mapping, and can also provide strong support for the digital management of underground pipe trenches.
[0030] Furthermore, the above step S4 also includes the following steps: Step S41: collecting images in historical cable wells as second images, wherein the second images include images containing pipe holes, well body collapse images, cable breakage images, and well water accumulation images, and the images containing pipe holes also include the situations where the pipe holes are occupied and unoccupied; Step S42: creating and training a first learning model, classifying and marking the occupancy status of the tube holes in the second image, and identifying whether the cable in the tube hole is broken when the tube hole is marked as occupied; Step S43: Create and train a second learning model to identify and annotate whether the second image contains features of well body collapse, and create and train a third learning model to identify and annotate whether the second image contains features of water accumulation in the well.
[0031] Specifically, the second images are collected from images of historical cable wells, which include images containing pipe holes, well body collapse images, cable breakage images, and water accumulation images in the well. For images containing pipe holes, further subdivision also includes occupied and unoccupied pipe holes. More image types ensure that the model can learn the characteristics of different states of cable wells and improve the model's recognition ability of different image features. Create and train a first learning model, such as using a convolutional neural network (CNN), which is specifically used to identify and classify pipe hole occupancy status. For pipe holes marked as occupied, the model can further identify whether the cable in the pipe hole is broken. Through precise image segmentation and target detection in the above steps, the model can provide more detailed information on pipe hole and cable status, automated pipe hole occupancy status recognition and cable breakage detection, and improve recognition efficiency and accuracy.
[0032] Create and train a second learning model, use deep learning technology (such as CNN) to identify whether the second image contains features of well collapse, and mark it. Create and train a third learning model, also use deep learning technology to identify whether the second image contains features of water accumulation in the well, and mark it. For the second and third learning models, transfer learning technology can be used to improve training efficiency and model performance using pre-trained models. Through specialized models, key issues such as well collapse and water accumulation in the well can be identified more accurately, making it easier to take timely measures. This not only reduces the workload of manual inspections, but also improves detection efficiency and response speed.
[0033] Furthermore, the above step S42 also includes: A first learning model is created based on the deep learning model. The first learning model has a first output branch and a second output branch. The first output branch is used to classify and label the occupancy status of the pipe holes in the second image, and the second output branch is used to identify whether the second image contains a broken cable and label the identification result.
[0034] The second image is input into the first learning model, the tube holes and the tube hole positions in the second image are extracted and identified in the first layer of the first learning model, and the tube hole positions are used as the output result of the first layer. Based on the tube hole positions, the second layer of the first learning model identifies whether the tube hole positions are occupied, and the occupation status of the tube hole positions is classified and labeled as the output result of the first output branch. When the output result of the first output branch is that the tube hole is occupied, the third layer of the first learning model identifies whether the cable in the occupied tube hole is broken, and labels the identification result, which is also used as the output result of the second output branch.
[0035] Specifically, a deep learning model is designed, which contains two output branches: the first output branch is used for classification and labeling of the occupancy status of the pipe hole, and the second output branch is used to identify the broken cable and label the recognition results. Using convolutional neural network (CNN) as the basic architecture, the recognition of the occupancy status of the pipe hole and the broken cable in the image is realized through multiple levels of feature extraction and learning. The second image is input into the first learning model, and the first layer of the model is responsible for extracting the pipe hole and its position information in the image. Using image segmentation technology, such as U-Net or Mask R-CNN, the pipe hole area is accurately located, and the coordinates and features of these areas are passed to the next layer. In the second layer of the model, based on the position of the pipe hole output by the first layer, a classification model (such as a fully connected layer) is used to identify whether the pipe hole is occupied and label it. For each pipe hole, its occupancy status (occupied or unoccupied) is output, and the occupancy status of the pipe hole is labeled on the image using a bounding box or a pixel-level mask. When the output result of the first output branch shows that the pipe hole is occupied, it means that a cable has been installed in the pipe hole. The third layer of the model further identifies whether the cable in the pipe hole is broken. Use target detection algorithms, such as FasterR-CNN or YOLO, to identify and locate cable breaks and mark them on the image. Through multi-level processing of the deep learning model, high-precision recognition and marking of the occupancy status of the pipe holes in the cable well and the cable breaks are achieved. The layer-by-layer processing of the first to third layers of the model makes the recognition process more refined and improves the accuracy of recognition, providing an efficient and accurate solution for the intelligent management of underground cables and trenches.
[0036] Furthermore, the above step S43 also includes: Step S431: Calculate the number of images that do not contain well body collapse features in the second image as a first number, and the number of images that contain well body collapse features in the second image as a second number, compare the first number and the second number, and when the first number is N times or more of the second number, based on the image that does not contain the well body collapse feature and the image that contains the well body collapse feature, use data enhancement technology to generate a virtual image with the well body collapse feature as a virtual image, use the virtual image and the second image together as input data of the second learning model to train the second learning model, and use the annotation result of the well body collapse as the output result of the second learning model, wherein N represents a positive integer greater than or equal to 3; Step S432: Repeat step S431 to train the third learning model.
[0037] Specifically, the second image is extracted from the historical data, and the images are classified using the annotated well collapse features, and the number of images without well collapse features, i.e., the first number and the number of images containing well collapse features, i.e., the second number, is calculated. A threshold N (N≥3) is set, and the first number and the second number are compared. If the first number is N times or more than the second number, it means that the number of images containing well collapse features is small, and data enhancement technology is needed to balance the data set. Images without well collapse features and images containing well collapse features are selected as the basis for generating virtual images, and data enhancement technology such as image rotation and scaling are applied to generate virtual images with well collapse features, i.e., virtual images. For virtual images, it is necessary to ensure that the virtual images are visually similar to the real images and contain well collapse features to improve the generalization ability of the model. The virtual images and the original second images are used together as input data for training the second learning model. The supervised learning method is used, and the annotated results of well collapse are used as the output results of the model to train the model to identify well collapse features. Through data enhancement technology, the problem of unbalanced training data is effectively solved, the output results of the model are prevented from being biased to one side, and the model's ability to recognize the characteristics of well collapse is enhanced. For the identification of the characteristics of water accumulation in the well in the image, the same scheme as the above method can be adopted. Through the implementation of the above steps, data enhancement technology can be effectively used to solve the problem of insufficient number of specific feature images and improve the recognition ability of the learning model. This method not only improves the performance of the model, but also enhances the model's sensitivity to abnormal situations.
[0038] Furthermore, the above step S3 also includes: Find the points with the maximum and minimum coordinates along the X axis, the points with the maximum and minimum coordinates along the Y axis, and the points with the maximum and minimum coordinates along the Z axis in the 3D point cloud data as the 8 vertices of the bounding box; Construct an axis-aligned bounding box based on the eight vertices of the bounding box, where each side of the axis-aligned bounding box is parallel to the coordinate axis; The difference between the maximum coordinate value and the minimum coordinate value of the X-axis is calculated as the length of the bounding box, the difference between the maximum coordinate value and the minimum coordinate value of the Y-axis is calculated as the width of the bounding box, and the difference between the maximum coordinate value and the minimum coordinate value of the Z-axis is calculated as the height of the bounding box. Based on the length, width and height of the bounding box, a bounding box is constructed, and the size of the bounding box is used as the measurement result of the cable well.
[0039] Specifically, by accurately calculating the size of the bounding box, the spatial size of the cable well can be accurately obtained, providing important data for design and construction. The axis-aligned bounding box simplifies the calculation process and improves the calculation efficiency. The method automates the measurement process of the cable well and reduces the error and cost of manual measurement. Through the above embodiment, the accurate measurement results of the cable well can be effectively obtained, providing strong data support for the intelligent management of underground cables and trenches.
[0040] Furthermore, after constructing the bounding box, the following steps are further included: The axis-aligned bounding box is converted into an oriented bounding box. The principal axis of the three-dimensional point cloud data is calculated by principal component analysis and used as the axis vector of the oriented bounding box. The center of gravity of the three-dimensional point cloud data is calculated as the center point of the oriented bounding box. For each axis vector, the maximum value of the vertical distance from all points in the three-dimensional point cloud data to the first axis is calculated and used as the semi-axis length of the first axis. Using the gradient descent algorithm, the center point, axis vector, and semi-axis length of the oriented bounding box are fine-tuned to obtain the minimized volume of the oriented bounding box.
[0041] Specifically, the bounding box is further optimized in order to more accurately match the shape of the 3D point cloud data while minimizing the volume of the bounding box. During the above optimization process, the axis vectors of the OBB are kept orthogonal to ensure that they always form a rectangular box. Through the above method, the bounding box can be effectively optimized to more closely match the shape of the 3D point cloud data of the cable well while reducing the consumption of computing resources.
[0042] In this step, the center point, axis vector, and semi-axis length of the oriented bounding box (OBB) are fine-tuned using the gradient descent algorithm to obtain the minimized oriented bounding box volume. The objective function is defined as follows: The goal is to minimize the volume of the oriented bounding box. The volume of the oriented bounding box can be calculated by its semi-axis length (a, b, c). The volume formula is V = 8abc (because the OBB volume is half the volume of the axis-aligned bounding box AABB). Therefore, our objective function can be defined as f(a, b, c) = 8abc.
[0043] Parameter initialization: Initialize the center point (x, y, z), axis vectors (u, v, w), and semi-axis lengths (a, b, c) of the oriented bounding box.
[0044] Calculate the gradient: Calculate the gradient of the objective function f(a,b,c) with respect to each parameter. For the semi-axis length, the gradient is: ; For the center point and axis vectors, since they affect the orientation and position of the bounding box but do not affect the volume size, their gradients are zero during volume minimization.
[0045] Update parameters: Use the gradient descent algorithm to update the parameters. The update rule is: ; where а is the learning rate.
[0046] Iterative optimization: Repeat the above parameter update steps until the convergence condition is met, such as the gradient is small enough or the number of iterations reaches a preset value.
[0047] Implementation details: In actual implementation, numerical stability and computational efficiency may need to be considered. For example, the PCA method can be used to create the OBB bounding box, which involves calculating the covariance matrix and eigenvectors.
[0048] Code implementation: You can refer to the mathematical derivation and code implementation of the gradient descent algorithm, and how to use the PCA method to create OBB.
[0049] Through the above steps, we can fine-tune the parameters of the oriented bounding box to obtain the minimized oriented bounding box volume. This process requires a combination of mathematical derivation, algorithm implementation, and programming skills to ensure that the optimization goal is achieved efficiently and accurately.
[0050] Furthermore, the training model is made more accurate by improving the learning rate а, and the size of the learning rate directly affects the convergence speed of the algorithm. A larger learning rate can speed up the convergence speed, but it may also increase the risk of overfitting, because the model may oscillate around the minimum value instead of stabilizing. A smaller learning rate can increase the stability of the model, but it will slow down the convergence speed. If the learning rate is set properly, the gradient descent algorithm may jump out of the local minimum and have a chance to find the global minimum. The learning rate can be dynamically adjusted based on past gradient information to adapt to different parameters and training stages.
[0051] In the present invention, the specific steps are: Based on the first and second moments of the historical gradients (i.e. the mean and uncentered variance of the gradients), the learning rate is adaptively adjusted for each parameter: , in, is the first-order moment estimate (exponentially weighted average of the gradient), is the second-order moment estimate (exponentially weighted average of squared gradients), and is the decay rate that controls these two estimates.
[0052] A momentum term is added to smooth the gradient and speed up convergence: , A bias correction step is used to correct the initial bias of the first and second moment estimates towards zero: , Among them, а is the learning rate, is a small constant to avoid division by zero errors.
[0053] The above steps can obtain a better а, which can converge faster and achieve better optimization effect of deep learning model.
[0054] Furthermore, the SLAM device is used to perform a 360-degree rotation scan of the cable well, including: The slam device is safely sent into the cable well by a robotic arm, and scanning is started during the descent of the slam device to obtain the captured environmental images in real time. The descent speed and direction of the slam device are adjusted in time based on the environmental images to ensure that the slam device does not collide with the well wall or other structural objects.
[0055] After the slam device descends to the bottom of the cable well, it performs initial positioning and posture adjustment, turns on the rotation mechanism of the slam device, and activates the lidar and camera at the same time to start all-round scanning.
[0056] Specifically, the real-time image acquisition and control mechanism in the above scheme ensures the safety of the SLAM equipment during the descent process and reduces the risk of equipment damage. Through all-round scanning, the SLAM equipment can efficiently collect complete data of the cable well, including three-dimensional structure and internal environment images. Initial positioning and posture adjustment ensure the accuracy of the scanned data and provide high-quality input for subsequent data processing and analysis. The entire scanning process is automated, reducing the risk of manual operation and improving operational efficiency and consistency of data collection. Through the implementation of the above steps, the SLAM equipment can safely and efficiently perform 360-degree rotation scanning of the cable well, providing strong technical support for the intelligent management and maintenance of the cable well.
[0057] Further, obtaining the three-dimensional point cloud data and the first image of the cable well includes: The lidar emits laser pulses at a preset frequency, measures the time it takes for the laser pulses to reflect back, obtains distance information of the structure inside the cable well, and generates three-dimensional point cloud data. The camera captures the first image during the rotation of the slam device and records the video information inside the cable well.
[0058] Specifically, through high-frequency transmission of the lidar and precise measurement of the laser pulse reflection time, high-precision three-dimensional point cloud data of the internal structure of the cable well can be obtained, providing an accurate data basis for subsequent three-dimensional modeling.
[0059] Furthermore, the above step S2 also includes: The first algorithm is to use CloudCompare software to import 3D point cloud data, create a cube based on the cropping area, define the corner coordinates of the cube, crop the 3D point cloud data based on the cube, and obtain the cropped 3D point cloud data; The second algorithm is the RANSAC algorithm. The parameters of the RANSAC algorithm are set and the RANSAC algorithm is executed to denoise and filter outliers on the three-dimensional point cloud data. The parameters of the RANSAC algorithm include the number of iterations, model type, distance threshold and confidence.
[0060] The present invention also provides a Figure 2 The cable well image data processing system based on the SLAM device shown includes the following modules: A data acquisition unit is used to perform a 360-degree rotation scan on the cable well using a slam device to obtain three-dimensional point cloud data and a first image of the cable well, establish a corresponding relationship between the three-dimensional point cloud data and the first image according to the shooting time, and transmit the data to the control unit in real time through a wireless transmission module; A data preprocessing unit is used to use a first algorithm in the control unit to perform preliminary cropping on the three-dimensional point cloud data to remove redundant point clouds outside the cable well, and use a second algorithm to automatically denoise the three-dimensional point cloud data to identify and remove noise points and outliers in the three-dimensional point cloud data; A data measurement unit, used to obtain a geometric body that completely surrounds the three-dimensional point cloud data as a bounding box, calculate the size of the bounding box, and obtain the measurement result of the cable well; An image annotation unit, used for collecting images in historical cable wells and using them as input data to train a corresponding learning model, inputting a first image into the trained learning model, and the learning model outputting the first image with annotation information; The three-dimensional modeling unit is used to construct a three-dimensional model of the cable well based on the measurement results of the cable well and the first image with annotation information consistent with the measurement results of the cable well at the same time. After the three-dimensional model of the cable well is constructed, the three-dimensional model of the cable well is stored, and a panoramic viewing function of the cable well is provided to the staff.
[0061] In summary, the present invention uses a SLAM device to perform a 360-degree rotation scan on the cable well, obtains the three-dimensional point cloud data and the first image of the cable well, establishes the corresponding relationship between the three-dimensional point cloud data and the first image according to the shooting time, and transmits it to the control unit in real time through the wireless transmission module. A fast and comprehensive scan of the internal environment of the cable well is achieved without manual well-diving, which improves the safety of the operation; the first algorithm is used in the control unit to perform preliminary cropping of the three-dimensional point cloud data to remove the redundant point clouds outside the cable well, and the second algorithm is used to automatically denoise the three-dimensional point cloud data, identify and remove the noise points and outliers in the three-dimensional point cloud data, and provide a high-quality data foundation for subsequent measurement and modeling. The geometric body that completely surrounds the three-dimensional point cloud data is obtained as a bounding box, the size of the bounding box is calculated, and the measurement result of the cable well is obtained, which improves the speed and accuracy of the measurement. The images in the historical cable well are collected and used as input data to train the corresponding learning model, the first image is input into the trained learning model, and the learning model outputs the first image with annotation information; basic data is provided for constructing a three-dimensional model of the cable well. Based on the measurement results of the cable well and the first image with annotated information that is consistent with the measurement results of the cable well, a three-dimensional model of the cable well is constructed, and after the three-dimensional model of the cable well is constructed, the three-dimensional model of the cable well is stored, and a panoramic viewing function of the cable well is provided to the staff, so that the staff can quickly understand the details of the cable well without going to the site in person, thereby improving work efficiency and safety. Through the coordination between the above steps, the present invention can improve the efficiency and safety of cable well mapping, and can also provide strong support for the digital management of underground pipe trenches.
[0062] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0063] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the above-mentioned program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0064] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0065] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0066] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for processing cable well image data based on SLAM equipment, characterized in that: The method comprises: Step S1: Use a SLAM device to perform a 360-degree rotation scan on the cable well to obtain three-dimensional point cloud data and a first image of the cable well, establish a corresponding relationship between the three-dimensional point cloud data and the first image according to the shooting time, and transmit the data to the control unit in real time through a wireless transmission module; Step S2: using a first algorithm in the control unit to perform preliminary cropping on the three-dimensional point cloud data to remove redundant point clouds outside the cable well, and using a second algorithm to automatically denoise the three-dimensional point cloud data to identify and remove noise points and outliers in the three-dimensional point cloud data; Step S3: obtaining a geometric body that completely surrounds the three-dimensional point cloud data as a bounding box, calculating the size of the bounding box, and obtaining the cable well measurement result; Step S4: collecting images from historical cable wells and using them as input data to train a corresponding learning model, inputting the first image into the trained learning model, and the learning model outputting the first image with labeled information; Step S5: Based on the measurement results of the cable well and the first image with annotated information that is consistent with the time of the measurement results of the cable well, a three-dimensional model of the cable well is constructed, and after the three-dimensional model of the cable well is constructed, the three-dimensional model of the cable well is stored to provide the staff with a panoramic viewing function of the cable well.
2. The method according to claim 1, characterized in that The step S4 also includes the following steps: Step S41: collecting images in historical cable wells as second images, wherein the second images include images containing pipe holes, well body collapse images, cable breakage images, and well water accumulation images, and the images containing pipe holes also include situations where the pipe holes are occupied and unoccupied; Step S42: creating and training a first learning model, classifying and marking the occupancy status of the tube holes in the second image, and identifying whether the cable in the tube hole is broken when the tube hole is marked as occupied; Step S43: Create and train a second learning model to identify and label whether the second image contains features of well body collapse, and create and train a third learning model to identify and label whether the second image contains features of water accumulation in the well.
3. The method according to claim 2, characterized in that The step S42 further includes: Creating a first learning model based on the deep learning model, wherein the first learning model has a first output branch and a second output branch, wherein the first output branch is used to classify and annotate the occupancy status of the pipe holes in the second image, and the second output branch is used to identify whether the second image contains a broken cable and annotate the identification result; The second image is input into the first learning model, the first layer of the first learning model extracts and identifies the tube holes and the tube hole positions in the second image, and the tube hole positions are used as the output result of the first layer. Based on the tube hole positions, the second layer of the first learning model identifies whether the tube hole positions are occupied, classifies and labels the occupied status of the tube hole positions and uses it as the output result of the first output branch. When the output result of the first output branch is that the tube hole is occupied, the third layer of the first learning model identifies whether the cable in the occupied tube hole is broken, labels the identification result, and uses it as the output result of the second output branch.
4. The method according to claim 2, characterized in that: The step S43 further includes: Step S431: Calculate the number of images that do not contain well body collapse features in the second image as a first number, and the number of images that contain well body collapse features in the second image as a second number, compare the first number with the second number, and when the first number is N times or more of the second number, based on the image that does not contain the well body collapse feature and the image that contains the well body collapse feature, use data enhancement technology to generate a virtual image with the well body collapse feature as a virtual image, use the virtual image and the second image together as input data of the second learning model to train the second learning model, and use the annotation result of the well body collapse as the output result of the second learning model, wherein N represents a positive integer greater than or equal to 3; Step S432: Repeat step S431 to train the third learning model.
5. The method according to claim 1, characterized in that The step S3 further comprises: Searching the points with the maximum and minimum coordinates along the X-axis, the points with the maximum and minimum coordinates along the Y-axis, and the points with the maximum and minimum coordinates along the Z-axis in the three-dimensional point cloud data as eight vertices of the bounding box; constructing an axis-aligned bounding box based on the eight vertices of the bounding box, wherein each side of the axis-aligned bounding box is parallel to a coordinate axis; The difference between the maximum coordinate value and the minimum coordinate value of the X-axis is calculated as the length of the bounding box, the difference between the maximum coordinate value and the minimum coordinate value of the Y-axis is calculated as the width of the bounding box, and the difference between the maximum coordinate value and the minimum coordinate value of the Z-axis is calculated as the height of the bounding box. Based on the length, width and height of the bounding box, a bounding box is constructed, and the size of the bounding box is used as the measurement result of the cable well.
6. The method according to claim 5, characterized in that After building the bounding box, it also includes: Convert the axis-aligned bounding box into an oriented bounding box, apply principal component analysis to calculate the principal axis of the three-dimensional point cloud data and use it as the axis vector of the oriented bounding box, calculate the center of gravity of the three-dimensional point cloud data as the center point of the oriented bounding box, and for each of the axis vectors, calculate the maximum value of the vertical distances from all points in the three-dimensional point cloud data to the first axis and use it as the semi-axis length of the first axis; Using a gradient descent algorithm, the center point, the axis vector, and the semi-axis length of the oriented bounding box are fine-tuned to obtain a minimized volume of the oriented bounding box.
7. The method according to claim 1, characterized in that Use SLAM equipment to perform 360-degree rotation scanning of the cable well, including: The slam device is safely sent into the cable well by a mechanical arm, and scanning is started during the descent of the slam device to obtain the captured environmental image in real time, and the descent speed and direction of the slam device are adjusted in time based on the environmental image to ensure that the slam device does not collide with the well wall or other structural objects; After the slam device descends to the bottom of the cable well, initial positioning and posture adjustment are performed, the rotation mechanism of the slam device is turned on, and the laser radar and camera are activated at the same time to start all-round scanning.
8. The method according to claim 7, characterized in that Obtain the 3D point cloud data and first image of the cable well, including: The laser radar emits laser pulses at a preset frequency, measures the time it takes for the laser pulses to reflect back, obtains distance information of the structure in the cable well, and generates three-dimensional point cloud data. The camera captures a first image during the rotation of the slam device and records video information in the cable well.
9. The method according to claim 1, characterized in that: The step S2 further comprises: The first algorithm is to use CloudCompare software to import the three-dimensional point cloud data, create a cube based on the clipping area, define the corner coordinates of the cube, clip the three-dimensional point cloud data based on the cube, and obtain the clipped three-dimensional point cloud data; The second algorithm is a RANSAC algorithm. The parameters of the RANSAC algorithm are set and the RANSAC algorithm is executed to denoise and filter outliers on the three-dimensional point cloud data. The parameters of the RANSAC algorithm include the number of iterations, model type, distance threshold and confidence.
10. A cable well image data processing system based on SLAM equipment, used to implement the method according to any one of claims 1 to 9, characterized in that: The system includes the following modules: A data acquisition unit, used to use a SLAM device to perform a 360-degree rotation scan on the cable well, obtain three-dimensional point cloud data and a first image of the cable well, establish a corresponding relationship between the three-dimensional point cloud data and the first image according to the shooting time, and transmit the data to the control unit in real time through a wireless transmission module; A data preprocessing unit, configured to use a first algorithm in the control unit to perform preliminary cropping on the three-dimensional point cloud data to remove redundant point clouds outside the cable well, and use a second algorithm to automatically denoise the three-dimensional point cloud data to identify and remove noise points and outliers in the three-dimensional point cloud data; A data measurement unit, used to obtain a geometric body that completely surrounds the three-dimensional point cloud data as a bounding box, calculate the size of the bounding box, and obtain the measurement result of the cable well; An image annotation unit, used for collecting images in historical cable wells and using them as input data to train a corresponding learning model, inputting the first image into the trained learning model, and the learning model outputting the first image with annotation information; The three-dimensional modeling unit is used to construct a three-dimensional model of the cable well based on the measurement results of the cable well and the first image with annotated information that is consistent with the measurement results of the cable well in time, and after the three-dimensional model of the cable well is constructed, store the three-dimensional model of the cable well, and provide the staff with a panoramic viewing function of the cable well.
Citation Information
Patent Citations
Three-dimensional object detection method based on view cone point cloud
CN109523552A
Parcel volume measurement method, device and equipment and storage medium
CN111709987A
Flexible cable identification and three-dimensional reconstruction method based on point cloud
CN112907735A
Mine point cloud automatic labeling method, device and equipment and storage medium
CN117788804A
Cited By
Underground cable and pipe trench surveying and mapping and collecting and recording method based on artificial intelligence
CN120088410A