Underground surveying device based on 3D printing and intelligent image recognition

By using downhole surveying devices based on 3D printing and intelligent image recognition in power wells, the safety, efficiency and accuracy of downhole surveying of power wells in the prior art have been solved, and a fast and safe survey effect has been achieved.

CN119554012APending Publication Date: 2025-03-04STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

It is difficult for the existing technology to conduct downhole surveys of power wells quickly, safely and effectively, especially in limited space, where there are problems such as system cable ledgers that do not match the actual situation, underground surveys are difficult, frequent operations and high safety requirements.

Method used

The underground survey device based on 3D printing and intelligent image recognition is adopted, and the Raspberry Pi, high-definition camera, digital servo and telescopic long rod are used, combined with Open CV and Python programs to realize real-time monitoring of the underground environment, image acquisition and remote operation, reducing the risk of manual downhole.

Benefits of technology

It realizes rapid and safe surveying of power wells without manual downs, improving survey efficiency and safety, and reducing the time and error of manual operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119554012A_ABST
    Figure CN119554012A_ABST
Patent Text Reader

Abstract

The invention discloses an underground surveying device based on 3D printing and intelligent image recognition, and belongs to the field of cable well surveying. A tripod structure is arranged; a telescopic long rod is arranged at the vertex of the tripod, and a mainboard box is arranged at the lower end of the telescopic long rod; a digital steering engine is arranged on the mainboard box to drive the mainboard box to rotate or swing by 360 degrees; a main board of the Raspberry Pi is arranged in the main board box, and a camera is arranged on one side surface of the main board box; the Raspberry Pi is provided with a ubuntu system and is provided with a real-time hotspot, so that interaction between equipment data and a mobile phone APP is realized; the Raspberry Pi, the camera, the telescopic long rod and the stepping motor form an image data acquisition module; the image data acquisition module takes the Raspberry Pi as a core and is assisted by a high-definition camera, a digital steering engine and a telescopic long rod, so that real-time monitoring, scene recording and remote operation of an electric underground environment are realized, and the practicability and operability of field image acquisition and recognition functions are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of exploration and measurement of cable wells, and in particular relates to a downhole surveying device for power wells. Background Art

[0002] With the continuous development of economic construction, the pace of urban construction is increasing. In order to adapt to the needs of urban planning development and the construction of municipal transportation facilities, the burial of cables in power wells has become increasingly complex. How to strengthen and improve the scientific management level of power wells and fully and accurately grasp the distribution of power wells and cables in the wells is a problem that has always been faced. This is not only to meet the needs of urban development and urban modernization management, but also to strengthen and improve the level of power cable operation management, quickly identify power wells and cables in the wells, and promptly troubleshoot faults, improve power grid safety, and ensure normal power supply for all types of users.

[0003] When laying underground cables, they are mainly laid in power well pipelines. There are many cases where they are intertwined and adjacent to various pipelines such as communications, gas, water supply, and drainage. Although corresponding technical files and drawings have been established for each power line and each power well, due to the replacement of management personnel, various construction operations and other factors, the original technical files, drawings and on-site conditions often do not match, affecting the coordinated exploration and design, and making it impossible to truly play a supporting, guiding and monitoring role.

[0004] The underground field survey of the power well is carried out in the early, middle and late stages of the pipe laying project. However, the following problems have always existed:

[0005] 1. The system cable inventory is inconsistent with the actual situation. The information in the PMS may be inconsistent with the actual situation on site, which brings a large amount of field survey work to the design stage.

[0006] 2. Underground survey is difficult. Underground pipelines need to open the manhole cover, and the underground working environment is complex and changeable.

[0007] 3. Underground survey operations are frequent. If there is no convenient way, it will consume a lot of time resources and manpower costs.

[0008] 4. The safety requirements for downhole survey in limited space are high. Downhole operations require multiple processes such as toxicity detection, explosion detection, and ventilation. If there are personnel going down the well, they need to wear gas masks and rescue ropes.

[0009] During the project site survey phase, how to safely, quickly and effectively survey underground conditions is an issue that needs to be addressed urgently.

[0010] The invention patent application with the application publication date of October 27, 2023 and the application publication number of CN 116953673 A discloses "a cable well underwater survey sonar", including a top plate, with arms distributed circumferentially on the top plate, a rod body located below the top plate, a toggle plate at the bottom of the rod body, a rotating servo on the outer side of the toggle plate, a sonar located inside the toggle plate, a probe at the end of the sonar, and an output end of the rotating servo connected to the sonar through the toggle plate. The rotating servo can drive the sonar to rotate on the toggle plate. By setting up a sonar and a sonar probe, this technical solution realizes the survey of the working conditions of the cable in the cable well without manual well descent and without discharging water from the cable well, and achieves the purpose of improving work efficiency.

[0011] This technical solution focuses on underwater survey of cable wells that are in a state of water accumulation. The sonar conducts a multi-directional survey and scan of the interior of the cable well, and transmits the scanned information to the main control platform. The main control platform completes the imaging of the cable well through the transmitted information, which can reduce the pumping time for underwater cable wells before surveying, and can also reduce the ventilation time for underwater cable wells. However, it is not suitable for cable wells without obvious water accumulation or shallow water accumulation or large channel-type cable wells. Moreover, the images collected are based on the image images formed by sonar echoes, which can only show the outline of underwater objects and cannot provide more relevant information about the cables laid in the cable well (such as cable markings, cable signs or related text information printed on the outer surface of the cable). Summary of the invention

[0012] The technical problem to be solved by the present invention is to provide a downhole survey device based on 3D printing and intelligent image recognition. It applies intelligent image recognition technology to downhole survey work of cable wells, takes Raspberry Pi as the core, and is supplemented by high-definition cameras, digital servos, and retractable long poles to achieve real-time monitoring, scene recording, and remote operation of the power downhole environment; it can track the downhole environment through Open CV automatic tracking or through raspberryAPP on the mobile phone; it uses Python program to collect image data through API, realizes the instant presentation of images on the mobile phone, and improves the operation and maintenance efficiency.

[0013] The technical solution of the present invention is to provide a downhole survey device based on 3D printing and intelligent image recognition, which is characterized by:

[0014] On the ground at the cable wellhead, a tripod structure is set up;

[0015] At the top of the tripod, a retractable long pole is installed;

[0016] The upper end of the telescopic long rod is connected to the top of the tripod; a mainboard box is arranged at the lower end of the telescopic long rod;

[0017] At least one stepping motor is arranged on the mainboard box to form a digital servo, which drives the mainboard box to rotate or swing 360 degrees horizontally and / or vertically.

[0018] A Raspberry Pi mainboard is arranged in the mainboard box, and a camera is arranged on a side of the mainboard box;

[0019] The tripod is used to construct a stable base for bearing the weight of the entire downhole survey device and constructing a reference point for the downhole survey device.

[0020] The retractable long rod is used to extend the mainboard box and its related accessories into the cable well, and to adjust the specific height of the mainboard box, and also serves as the base point for the mainboard box to rotate left and right or pitch up and down;

[0021] The camera is used to capture optical images of the cable well and transmit the images to the Raspberry Pi for corresponding data processing;

[0022] The Raspberry Pi is installed with Ubuntu system and a real-time hotspot is set to realize the interaction between device data and mobile phone APP;

[0023] The Raspberry Pi, camera, telescopic rod and stepper motor constitute an image data acquisition module;

[0024] The image data acquisition module is based on the Raspberry Pi, supplemented by a high-definition camera, a digital servo, and a retractable long pole, to achieve real-time monitoring, scene recording, and remote operation of the underground power mine environment.

[0025] Specifically, the tripod structure adopts a structure with an inverted central axis.

[0026] Specifically, the extendable retractable rod is controlled by a worm gear brush reduction motor, and is also equipped with a winding wheel and a 0.8mm steel wire. The descent is achieved by releasing the steel wire by its own weight, and the ascent is achieved by winding the steel wire by the torque of the motor.

[0027] Furthermore, two stepper motors are arranged on the mainboard box to form a digital servo, which drives the mainboard box to rotate or swing 360 degrees horizontally and vertically in a two-dimensional shooting gimbal mode.

[0028] Furthermore, the camera is a high-definition camera.

[0029] Furthermore, a lighting device for auxiliary shooting may be arranged around the camera to provide auxiliary light source for underground shooting.

[0030] The lighting device is a light emitting diode group.

[0031] Specifically, the image data acquisition module realizes the tracking of the underground environment through automatic tracking by OpenCV or operation on the mobile phone through raspberryAPP; the image data is collected through API by Python program to realize the real-time presentation of the image on the mobile phone, thereby improving the operation and maintenance efficiency.

[0032] Furthermore, the downhole survey device adopts 3D printing technology to realize rapid manufacturing and customized design of the device, timely verify design ideas, and provide space for continuous optimization. At the same time, it also reduces manufacturing costs, improves the scalability and flexibility of the device, reduces the time and errors of manual operation, improves the efficiency of the survey, and brings new technical applications to downhole survey work.

[0033] The downhole survey device described in the present invention replaces manual downhole survey with a machine with intelligent image recognition function, takes downhole survey as the core, uses Raspberry Pi and the Internet of Things as technical support, realizes real-time transmission of images in power downholes, and utilizes the integration of existing technologies to increase the practicality and operability of on-site image acquisition and recognition functions; by establishing a comprehensive evaluation index and system for the environmental conditions of power wells, it helps to more comprehensively evaluate and fully understand the downhole environment, timely discover and solve environmental and information problems, and improve production efficiency and safety.

[0034] Compared with the prior art, the advantages of the present invention are:

[0035] 1. The technical solution of the present invention replaces manual underground survey with machines, reducing the safety risks faced by manual underground survey;

[0036] 2. The technical solution of the present invention utilizes the perception and survey of limited space through human-machine interaction. It does not require professional personnel to go down the well and does not require them to carry safety tools. It can reduce the safety risks to a minimum, avoid various accidents to the greatest extent, and improve the safety of underground survey operations.

[0037] 3. The technical solution of the present invention applies image recognition technology to the cable nameplate QR code recognition, text recognition and hole position recognition processes. Through the image detection of OpenCV, the positioning of the nameplate and the existing hole position in the well is realized, and the QR code recognition function is added. The QR code information that can be read is the QR code information generated in the library; it is helpful to establish environmental evaluation indicators with gas content, water immersion, cable nameplate and hole position information as key information, and to build a complete underground environmental evaluation system. By scoring various indicators, the environmental conditions of the power well can be comprehensively evaluated, and a comprehensive evaluation score can be obtained to determine whether the environment of the power well is safe, effective and compliant;

[0038] 4. The technical solution of the present invention has the characteristics of improved safety, enhanced practicality and greater promotion. Its structure is made through 3D printing and has strong product iteration. The product can be redesigned or adjusted at any time according to different on-site requirements to meet different on-site needs and quickly make updates and iterations. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a structural schematic diagram of a downhole survey device based on 3D printing and intelligent image recognition of the present invention;

[0040] Figure 2 It is a schematic diagram of the structure of the Raspberry Pi of the present invention;

[0041] Figure 3 It is a schematic diagram of the spatial transformation principle of the present invention;

[0042] Figure 4 It is a schematic diagram of the overall structure of the system of the present invention.

[0043] In the figure, 1 is a tripod, 2 is a retractable long pole, 3 is a stepper motor, 4 is a mainboard box, and 5 is a camera. DETAILED DESCRIPTION

[0044] The present invention will be further described below in conjunction with the accompanying drawings.

[0045] Intelligent surveying equipment can be used in working environments where unsafe factors exist underground to complete corresponding survey work. It not only solves the safety issues of construction workers, but also can greatly save labor costs and greatly improve the efficiency of underground work after the technology matures and becomes modular.

[0046] The goal of this technical solution is to replace manual underground surveying with machines to reduce the safety risks faced by humans in underground surveying.

[0047] The main core component used in this technical solution is Raspberry Pi (abbreviated as RPi, also known as RasPi / RPI, is a microcomputer designed for learning computer programming education, only the size of a credit card, and its system is based on Linux). Raspberry Pi is a simple processor based on the Linux programming language, with an SD card as a memory hard disk, a USB interface around the card as a connection, and a TV output interface for video analog signals and an HDMI high-definition video output interface.

[0048] The equipment foundation of this technical solution comes from the combined use of the above components. Through the integrated operating platform and visual interface, the direction and photography of the downhole probe are operated, including certain lens recognition functions (mainly implemented through Python programming) to confirm the hole position in the pipeline, identify the cable nameplate, and evaluate the cable environment, etc., which originally required manual downhole survey. The survey arm of the probe uses an operable telescopic rod to realize the survey of the downhole from the well.

[0049] Specifically, Figure 1 As shown in, in the technical solution, a tripod structure (adopting a structure with an inverted central axis) is set on the ground, and a retractable retractable rod with adjustable length is hoisted at the top of the tripod. The upper end of the retractable rod is connected to the top of the tripod, and a mainboard box is set at the lower end of the retractable rod.

[0050] The extendable retractable rod is controlled by a worm gear brush reduction motor, and is also equipped with a winding wheel and a 0.8mm steel wire. The descent is achieved by releasing the steel wire by its own weight, and the ascent is achieved by winding the steel wire by the torque of the motor.

[0051] At least one stepping motor is arranged on the mainboard box to form a digital servo (or two-dimensional shooting gimbal) to drive the mainboard box to rotate or swing 360 degrees horizontally and / or vertically.

[0052] A Raspberry Pi mainboard is arranged in the mainboard box, and a camera is arranged on a side of the mainboard box.

[0053] The camera is a high-definition camera.

[0054] The tripod is used to construct a stable base for bearing the weight of the entire downhole survey device and constructing a reference point for the downhole survey device.

[0055] The retractable long rod is used to extend the mainboard box and its related accessories into the cable well, and to adjust the specific height of the mainboard box, and also serves as the base point for the mainboard box to rotate left and right or pitch up and down;

[0056] The camera is used to capture optical images of the cable well and transmit the images to the Raspberry Pi for corresponding data processing.

[0057] A lighting device for auxiliary shooting can also be set around the camera to provide auxiliary light source for underground shooting.

[0058] The lighting device is a light emitting diode group.

[0059] The Raspberry Pi, camera, telescopic rod and stepper motor constitute an image data acquisition module;

[0060] The image data acquisition module is based on the Raspberry Pi, supplemented by a high-definition camera, a digital servo, and a retractable long pole, to achieve real-time monitoring, scene recording, and remote operation of the underground power mine environment.

[0061] The Raspberry Pi is installed with the Ubuntu system and a real-time hotspot is set to realize the interaction between device data and mobile phone APP.

[0062] The image data acquisition module device tracks the underground environment automatically through OpenCV (Open Source Computer Vision Library, a cross-platform computer vision and machine learning software library released based on the Apache2.0 license (open source), which can run on Linux, Windows, Android and Mac OS operating systems. It consists of a series of C functions and a small number of C++ classes, and provides interfaces for languages ​​such as Python, Ruby, MATLAB, etc., and implements many general algorithms in image processing and computer vision), or operates on the mobile phone through the raspberry APP; the Python program collects image data through the API, realizes the instant presentation of the image on the mobile phone, and improves the operation and maintenance efficiency.

[0063] The image data acquisition module is used to realize the following functions:

[0064] 1) Data acquisition: Collect power well image data, including information such as cable nameplates and cable hole locations, and construct an image dataset.

[0065] 2) Data preprocessing: The collected images are preprocessed, including image enhancement, noise removal, image alignment, etc., to improve the accuracy and robustness of subsequent recognition.

[0066] 3) Feature extraction: Extract useful features such as texture, color, shape, etc. from the preprocessed image so that the subsequent classifier can better identify the target.

[0067] 4) Classifier design: Based on the feature extraction results, design a suitable classifier model, such as support vector machine, neural network, etc., to identify cable nameplates and cable holes.

[0068] 5) Model training: Use the dataset to train the classifier model so that it can accurately classify cable nameplates and cable hole locations.

[0069] 6) Application practice: Apply the trained model to actual scenarios to automatically identify cable nameplates and cable holes, and improve the efficiency and accuracy of power well image analysis.

[0070] The structure of the Raspberry Pi is as follows Figure 2 as shown in .

[0071] Specifically, the Raspberry Pi's mainboard is equipped with a dual-band wireless Bluetooth chip, a power management chip, a BCM2711 quad-core CPU chip, a memory chip, a network card chip and a USB management chip. Around the mainboard, there are a display interface, a power supply interface, an HDMI high-definition multimedia interface (High Definition Multimedia Interface, a fully digital video and sound transmission interface), a camera interface, a 3.5mm audio interface, a USB2.0 interface and a USB3.0 interface.

[0072] Raspberry Pi is fundamentally different from other robot controllers because it has a complete operating system (others only have control systems) and supports Python very well. Therefore, using Python, you can quickly develop software on the Raspberry Pi to control the robot's sensors. Another advantage of the Raspberry Pi is that it can run artificial intelligence-related algorithms, such as running SVM (Support Vector Machine, which can easily classify data).

[0073] A. In this technical solution, the following relevant calculation modes are adopted:

[0074] 1) Space transformation principle:

[0075] like Figure 3 As shown in , this technical solution can obtain the x and y coordinate transformation of the root angle (two-dimensional shooting gimbal) and the camera position through triangulation:

[0076]

[0077] 2) Automatic object recognition:

[0078] The object recognition function is implemented through the OpenCV library. The HSV method of segmenting binary images is used. Although the objects to be recognized become simple and strict, the recognition accuracy is greatly improved, and the speed can withstand the test of the Raspberry Pi.

[0079] 3) 3D printing technology:

[0080] 3D printing technology is an additive manufacturing method that creates something from scratch. It mainly slices the 3D digital model and then prints each section layer by layer, thereby simplifying the complex 3D model into a flat graphic. This allows 3D printing technology to use relatively mature plane processing technology to print layer by layer and eventually complete the manufacturing of the entire model.

[0081] In this technical solution, most of the parts suitable for downhole survey equipment, including connectors, main body, rotating pan / tilt, etc., are printed by an FDM printer.

[0082] Image recognition technology based on Raspberry Pi:

[0083] Raspberry Pi is a small single-board computer with powerful performance and functions that can be used for image recognition and processing tasks. Here are some image recognition technologies based on Raspberry Pi:

[0084] OpenCV: OpenCV is an open source computer vision library that supports multiple platforms, including Raspberry Pi. It can be used for applications such as image processing, object detection, feature extraction, and face recognition.

[0085] TensorFlow Lite: TensorFlow Lite is a lightweight machine learning framework that can run on Raspberry Pi. It supports tasks such as image classification, object detection, segmentation, and provides pre-trained models and model conversion tools to make model deployment easier.

[0086] Caffe: Caffe is a popular deep learning framework that can run on the Raspberry Pi. It supports a variety of neural network models and provides pre-trained models for tasks such as image classification, object detection, and semantic segmentation.

[0087] PyTorch: PyTorch is another popular deep learning framework that can run on the Raspberry Pi. It provides an easy-to-use interface and flexible network definition, supporting a variety of neural network models and image processing tasks.

[0088] These techniques can all be implemented on the Raspberry Pi using the Python programming language.

[0089] B. The overall structure of the system of the present invention is as follows Figure 4 as shown in .

[0090] The underground survey device based on 3D printing and intelligent image recognition is mainly composed of a mechanical system and an image transmission system. The data exchange and command transmission between the systems are completed through the communication module.

[0091] The mechanical control system is the main management part in the operation process of the entire downhole survey device, which consists of vertical lifting motor, horizontal rotation motor, vertical rotation motor, controller, display screen and other parts.

[0092] The operator mainly interacts with the entire device and views the results through the controller; the power management part is responsible for the charge and discharge management of the overall power supply battery and the regulated output of the power supply; the image sensor is responsible for coordinating the corresponding algorithms for identification and image information collection; the communication module is responsible for parsing, encoding, compressing, and transmitting the transmitted data and instructions.

[0093] C. Image recognition system design:

[0094] 1) Hardware selection

[0095] Choose a Raspberry Pi model and camera that are suitable for the application scenario. The performance and memory capacity of the Raspberry Pi will affect the speed and efficiency of recognition, and the resolution and frame rate of the camera will affect the accuracy and real-time performance of recognition.

[0096] This technical solution uses a Raspberry Pi 4B and a USB camera that supports a maximum resolution of 1080p and a frame rate of 30fps.

[0097] 2) Software selection:

[0098] Choose an image processing and machine learning framework that is suitable for the application scenario. You need to choose the appropriate algorithm and model according to the specific task and implement it in the Python programming language.

[0099] This technical solution selects OpenCV and TensorFlow Lite as image processing and machine learning frameworks, and is implemented using the Python programming language.

[0100] 3) Dataset preparation:

[0101] Prepare appropriate datasets for training and testing models. The diversity and quantity of datasets need to be ensured to improve recognition accuracy.

[0102] This technical solution prepares a dataset of images of various underground scenes, cable nameplates, etc., including front, side, different angles, and different lighting conditions. Data enhancement technology is used to increase the diversity of the dataset.

[0103] 4) Model training and optimization:

[0104] Train a suitable model based on the data set, and improve the accuracy and efficiency of recognition by optimizing algorithms and parameters.

[0105] This technical solution uses TensorFlow Lite to train a deep learning model, such as MobileNetV2 or SSD model, for object detection and classification. The size and speed of the model are optimized through model compression, quantization and other technologies.

[0106] 5) System integration and deployment:

[0107] Integrate the model and algorithm into the Raspberry Pi image recognition system, deploy and test it. Consider the ease of use, reliability and security of the system.

[0108] This technical solution integrates the model and algorithm into the Raspberry Pi system, uses OpenCV and the camera to read real-time image data, and performs target detection and classification through the model. The results are displayed on the screen or transmitted to other devices through the network.

[0109] 6) Specific methods and steps in the image recognition process:

[0110] OpenCV is an image and video processing library that includes bindings for C++, C, Python, and Java. This technical solution mainly uses Python.

[0111] OpenCV is used for a variety of image and video analysis such as facial recognition and detection, license plate reading, photo editing, advanced robot vision, optical character recognition, and many more.

[0112] This technical solution requires two main libraries: python-OpenCV, Numpy

[0113] apt-get install python3-numpy

[0114] apt-get install python3-numpy

[0115] import cv2importmatplotlibimportnumpy

[0116] 1. Remotely log in to the Raspberry Pi and install a fully functional OenpCV vision library first:

[0117] sudo apt-getupdate ensures that all software is up to date;

[0118] sudo apt-get install build-essential installs the necessary dependency libraries for compiling OpenCV;

[0119] sudo apt-get install build-libavformat-dev This library provides a method for encoding and decoding audio and video streams;

[0120] sudo apt-get install ffmpeg This library provides transcoding functions for audio and video streams;

[0121] sudo apt-get install python-opencv Python development package that OpenCV depends on;

[0122] sudo apt-get install opencv-doc to install OpenCV development documentation;

[0123] sudo apt-get install libcv-dev installs the header files and static libraries required to compile OpenCV;

[0124] sudo apt-get install libcvaux-dev installs more development tools to compile OpenCV;

[0125] sudo apt-get install libhighgui-dev installs another header file and static library required to compile OpenCV;

[0126] cp -r / usr / share / doc / opencv-doc / examples / dt / Copy all examples to the root directory;

[0127] 2. Prepare the camera: Plug the Raspberry Pi dedicated CSI camera into the CSI port of the Raspberry Pi and open it in raspi-config, then use the Raspistill command to use it directly.

[0128] Test the camera: Copy the camera.py file in the example just copied to the root directory

[0129] test / dt / examples / python / camera.py / home / pi /

[0130] Run python camera.py to see if there is a device with image video0.

[0131] 3. In terms of image and video analysis, the camera actually records one frame at a time, 30-60 times per second. Therefore, image recognition and video analysis mostly use the same method.

[0132] Next a lot of image and video analysis comes down to simplifying the source as much as possible. This starts with conversion to grayscale, but can also be a color filter, gradient, or a combination of these. From here a variety of analyses and transformations can be performed on the source.

[0133] Generally speaking, the process is that conversion is done, followed by analysis, and then any overlays that one wishes to apply over the original source, which is what can often be seen, with the “finished product” of an identified object displayed over a full color image or video.

[0134] However, data is rarely actually processed in this raw form.

[0135] For example, in the case of edge detection, black corresponds to a pixel value of (0, 0, 0), while a white line is (255, 255, 255). Each picture and frame in a video is broken down into pixels like this, and like edge detection, it can be inferred that the edges are based on where the white pixels contrast with the black pixels. Then, if you want to see the original image with the edges marked, record all the coordinate locations of the white pixels, and then mark these locations on the original image or video, you have a shape recognition bounding box, as shown below:

[0136] importnumpy as npi import cv2 / / Import runtime library

[0137] cap = cv2.VideoCapture(0) / / Get the camera

[0138] while(True):

[0139] ret, frame = cap.read()

[0140] gray=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)

[0141] cv2.imshow('frame', gray)

[0142] ifcv2.waitKey(1)&0xFF==ord('q'):

[0143] break

[0144] cap.release()

[0145] cv2.destroyAllWindows()

[0146] First, import numpy and cv2. Next, cap = cv2.VideoCapture(0). The first webcam on the computer returns the video.

[0147] while(True):

[0148] ret, frame = cap.read()

[0149] This code starts an infinite loop (which will be broken later by the break statement) where ret and frame are defined as cap.read(). Basically, ret is a boolean representing whether there is a return, and frame is each returned frame.

[0150] gray=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)

[0151] Define a new variable gray as the frame converted to grayscale. OpenCV reads the colors as BGR (Blue Green Red).

[0152] cv2.imshow('frame', gray)

[0153] Source to convert to gray.

[0154] ifcv2.waitKey(1)&0xFF==ord('q'):

[0155] break

[0156] This statement runs only once per frame, exiting the while loop and then running:

[0157] cap.release()

[0158] cv2.destroyAllWindows()

[0159] This will release the webcam and then close all imshow() windows.

[0160] 4. Set thresholds

[0161] The role of thresholding is to further simplify the analysis of visual data.

[0162] First, you can convert to grayscale, but grayscale still has at least 255 values.

[0163] What thresholding can do, at the most basic level, is convert everything to white or black based on the threshold. For example, if you set the threshold to 125 (the maximum is 255), then everything below 125 will be converted to 0 or black, and everything above 125 will be converted to 255 or white. If you convert to grayscale like normal, you will get white and black. If we don't convert to grayscale, we will get a binary image, but with color.

[0164] This is illustrated here using examples and different types of thresholds.

[0165] First, try a simple threshold:

[0166] retval, threshold=cv2.threshold(img, 10, 255, cv2.THRESH_BINARY)

[0167] A binary threshold is a simple "yes or no" threshold where the pixel is either 255 or 0. In many cases this is white or black, but color is already preserved for the image so it is still in color.

[0168] The first parameter here is the image. The next parameter is the threshold, choose 10. The next is the maximum value, choose 255. The last is the threshold type, choose THRESH_BINARY.

[0169] Normally a threshold of 10 will be a bit worse. I chose 10 because this is a low light picture so I chose a low number. Usually something around 125-150 probably works best.

[0170] import cv2 import numpy as np

[0171] img=cv2.imread('bookpage.jpg')

[0172] retval, threshold=cv2.threshold(img, 12, 255, cv2.THRESH_BINARY)

[0173] cv2.imshow('original', img)

[0174] cv2.imshow('threshold', threshold)

[0175] cv2.waitKey(0)

[0176] cv2.destroyAllWindows()

[0177] The image is now slightly easier to read, but it is still difficult to analyze using a program and needs to be simplified further.

[0178] First, grayscale the image, then apply a threshold:

[0179] import cv2 import numpy as np

[0180] grayscaled=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)

[0181] retval, threshold=cv2.threshold(grayscaled, 10, 255, cv2.THRESH_BINARY)

[0182] cv2.imshow('original', img)

[0183] cv2.imshow('threshold', threshold)

[0184] cv2.waitKey(0)

[0185] cv2.destroyAllWindows()

[0186] Next, try adaptive thresholding to clarify the unclear image.

[0187] import cv2 import numpy as np

[0188] th=cv2.adaptiveThreshold(grayscaled, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 115, 1)

[0189] cv2.imshow('original', img)

[0190] cv2.imshow('Adaptive threshold', th)

[0191] cv2.waitKey(0)

[0192] cv2.destroyAllWindows()

[0193] 5. Color Filtering

[0194] Filter the color at the bottom of the nameplate to try to display it. Convert the color to HSV, which stands for "Hue Saturation Value". This can help us determine a more specific color with varying values ​​based on the hue and saturation range, for example:

[0195] import cv2 import numpy as np

[0196] cap = cv2.VideoCapture(0)

[0197] while(1):

[0198] _, frame = cap.read()

[0199] hsv=cv2.cvtColor(frame,cv2.COLOR_BGR2HSV)

[0200] lower_red=np.array([30, 150, 50])

[0201] upper_red=np.array([255, 255, 180])

[0202] mask=cv2.inRange(hsv, lower_red, upper_red)

[0203] res=cv2.bitwise_and(frame, frame, mask=mask)

[0204] cv2.imshow('frame', frame)

[0205] cv2.imshow('mask', mask)

[0206] cv2.imshow('res',res)

[0207] k=cv2.waitKey(5)&0xFF

[0208] ifk==27:

[0209] break

[0210] cv2.destroyAllWindows()

[0211] cap.release()

[0212] Target the nameplate font color. The way it works is that the human eye sees anything that is within the visual range, which is basically 30-255, 150-255, and 50-180.

[0213] 6. Edge Detection

[0214] Edge detection is mainly used to select the range of the detection target, such as the edge of a nameplate.

[0215] import cv2 import numpy as np

[0216] cap = cv2.VideoCapture(0)

[0217] while(1):

[0218] _, frame = cap.read()

[0219] hsv=cv2.cvtColor(frame,cv2.COLOR_BGR2HSV)

[0220] lower_red=np.array([30, 150, 50])

[0221] upper_red=np.array([255, 255, 180])

[0222] mask=cv2.inRange(hsv, lower_blue, upper_blue)

[0223] res=cv2.bitwise_and(frame, frame, mask=mask)

[0224] cv2.imshow('Original', frame)

[0225] edges=cv2.Canny(frame, 100, 200)

[0226] cv2.imshow('Edges', edges)

[0227] k=cv2.waitKey(5)&0xFF

[0228] ifk==27:

[0229] break

[0230] cv2.destroyAllWindows()

[0231] cap.release()

[0232] In this way, a camera with image recognition that can automatically detect underground objects and the edges of blue nameplates can be obtained.

[0233] 7) Application of underground survey site:

[0234] In this technical solution, the field application of underground survey of cable wells mainly includes:

[0235] 7.1) On-site image acquisition;

[0236] 7.2) Cable nameplate QR code recognition;

[0237] 7.3) Identification of cable nameplate text information;

[0238] 7.4) Identification of cable holes.

[0239] 8) Specific implementation process of the software related to this technical solution:

[0240] ① Environment construction: Download the Ubuntu system environment decompression package, use the system tool to decompress and install it to the Raspberry Pi and set the user password, then use the remote port login tool putty to implement remote command operations on the Raspberry Pi. Use the config command to open the WIFI connection, install the Python and OPENCV environment packages and execute program files. Perform OPENCV script programming on the Raspberry Pi in the Python environment.

[0241] ② Image training: Extract hole position imaging and nameplates in underground photos for algorithm training, use circle in OPENCV to detect hole positions, define continuous hole positions as targets, encapsulate to improve algorithm accuracy, use rectangle detection rec to perform rectangular edge detection, and increase accuracy based on the aspect ratio of the nameplate 800*600 and color. Use CV2.cvtcolor and BGR2GRAY to grayscale images, use bilateralFilter to blur background details to increase recognition accuracy, use edged for edge detection, implement simple strokes, traverse the filtered image, and draw a rectangular blue frame around the detection results.

[0242] ③ Functional logic: Identify the images of underground hole positions and nameplates in real-time images, and compare the hole position and nameplate identification information in the real-time photos with the existing information in the library. Import the py.zbar package to recognize the QR code, use decode to realize simple QR code recognition for the recognized image, and also mark it with a rectangular frame. At the same time, upload the information to the database SQL for comparison with the existing information.

[0243] ④Transmission unit: Download the image transmission tool (Qopen, HLS, etc.) on the mobile phone, connect to the RTMP server of the Raspberry Pi for image streaming, and realize real-time image display and nameplate reading from the Raspberry Pi to the mobile phone on the same WIFI.

[0244] ⑤Save results: The background generates a directory saomiao folder containing a screenshot of the photo hole and the scanned QR code information.

[0245] 9) Establish an underground environmental assessment system:

[0246] The underground environment of power mines is complex, with a large number of cables, pipelines and other equipment. The location and layout of these equipment are often very complex. The underground environment in different regions also varies greatly, which brings certain difficulties to the survey. At the same time, the amount and quality of data collected by underground surveys vary. It is necessary to effectively process and analyze the collected data to extract useful information. Due to the limitations of the survey environment, the collected data is usually incomplete and needs to be supplemented and corrected in various ways.

[0247] In order to solve these difficulties, it is necessary to establish a standardized power underground assessment system to conduct rapid, efficient and accurate surveys of power underground to improve the accuracy and efficiency of the survey, reduce the cost and risk of the survey, and provide a basis for cable laying and maintenance.

[0248] The main purposes of establishing an environmental assessment system for power wells are as follows:

[0249] 9.1) Improve safety. The establishment of an assessment system can comprehensively assess the environmental conditions of the power well, including indicators such as toxic and harmful gas content, water immersion, cable nameplate information, and cable hole position accuracy, and evaluate the environmental safety of the power well, thereby improving the safety of the power well.

[0250] 9.2) Promote standardized management. Establishing an evaluation system can standardize the management of power wells, evaluate the early survey, mid-term operation and maintenance, and late record filing, and enforce the requirement that each link be operated in accordance with the specifications, thereby promoting the standardized management of power wells.

[0251] 9.3) Ensure production efficiency. Establishing an assessment system can timely discover environmental problems in power wells, ensure the normal operation of power wells, and avoid environmental problems affecting production efficiency.

[0252] Furthermore, the power well environmental assessment system needs to include the following indicators:

[0253] Toxic and harmful gas content: For power wells, the monitoring of gas content is crucial, including the concentration, temperature, humidity, etc. of toxic and harmful gases. Gas detection instruments need to be deployed underground to monitor the concentration of harmful gases in the air in real time, including carbon monoxide, carbon dioxide, oxygen, methane, etc.

[0254] Flooding: If flooding occurs in the power well, it will seriously affect the operation of the equipment and even cause damage to the electrical equipment. Therefore, it is necessary to monitor the water level in the well in real time and take waterproof measures to ensure the safe operation of the equipment.

[0255] Cable nameplate information: The cable nameplate information in the power well needs to include cable model, rated voltage, current, conductor material, insulation material, etc. This information is crucial for the maintenance and management of cable equipment. The nameplate information can be identified and recorded to facilitate future maintenance and management.

[0256] Cable hole position accuracy: In power wells, the accuracy of cable hole position is very important. If the hole position is offset or inaccurate, it will seriously affect the operation and service life of the cable. Therefore, it is necessary to locate and survey the cable hole position to ensure that the hole position is accurate.

[0257] According to the above indicators, an evaluation scoring table of the evaluation system is designed as follows:

[0258]

[0259]

[0260] For the content of toxic and harmful gases, an assessment of 1-5 points can be given based on the concentration, temperature, humidity, etc. of toxic and harmful gases in the air. The higher the score, the lower the content of toxic and harmful gases in the air and the better the air quality.

[0261] For the flooding situation, an assessment of 1-5 points can be given based on the underground water level. The higher the score, the lower the underground water level and the better the flooding situation.

[0262] For the cable nameplate information, an assessment of 1-5 points can be given based on the accuracy and completeness of the cable nameplate information and compared with the information in the PMS system. The higher the score, the more accurate and complete the cable nameplate information is.

[0263] For the accuracy of cable hole locations, an assessment of 1-5 points can be given based on the accuracy and completeness of the cable hole locations and the comparison with the information in the PMS system. The higher the score, the more accurate and complete the cable hole locations are.

[0264] By scoring various indicators, we can comprehensively evaluate the environmental conditions of the power well and come up with a comprehensive evaluation score to determine whether the environment of the power well is safe, effective and compliant.

[0265] At the same time, the establishment of this system will help to more comprehensively evaluate and understand the underground environment, promptly discover and solve environmental and information problems, improve production efficiency and safety, and is of great significance for achieving lean management.

[0266] The technical solution of the present invention is to construct a solution for underground power survey equipment with Raspberry Pi single-board computer as the core and Internet of Things and OpenCV as technical support. Its image data acquisition module is based on Raspberry Pi, supplemented by high-definition camera, digital servo, telescopic long rod and relay, to achieve real-time monitoring, scene recording and remote operation of underground power environment. Raspberry Pi is installed with Ubuntu system and real-time hotspot is set to achieve interaction between device data and mobile phone APP; the equipment tracks the underground environment automatically through OpenCV or through Raspberry APP on the mobile phone, and the Python program collects image data through API to achieve real-time presentation of images on the mobile phone, thereby improving operation and maintenance efficiency.

[0267] At the same time, the technical solution of the present invention adopts 3D printing technology to realize the rapid manufacturing and customized design of the device, which can not only verify the design ideas in time and provide space for continuous optimization, but also reduce the manufacturing cost, improve the scalability and flexibility of the device, reduce the time and errors of manual operation, improve the efficiency of surveying, and bring new technical applications to underground surveying work.

[0268] In summary, the technical solution of the present invention focuses on replacing manual underground surveys with machines to reduce the safety risks faced by humans in underground surveys; it takes underground surveys as the core, uses Raspberry Pi and the Internet of Things as technical support, and realizes real-time transmission of images in power wells; it uses the integration of existing technologies to increase the practicality and operability of on-site image acquisition and recognition functions; by establishing a comprehensive evaluation index and system for the environmental conditions of power wells, it helps to more comprehensively evaluate and fully understand the underground environment, promptly discover and solve environmental and information problems, improve production efficiency and safety, and is of great significance for achieving lean management.

[0269] The invention can be widely used in the field of exploration and measurement of cable wells.

Claims

1. A downhole survey device based on 3D printing and intelligent image recognition, characterized by: On the ground at the cable wellhead, a tripod structure is set up; A telescopic rod is hoisted at the top of the tripod; the upper end of the telescopic rod is connected to the top of the tripod, and a mainboard box is arranged at the lower end of the telescopic rod; At least one stepping motor is arranged on the mainboard box to form a digital servo, which drives the mainboard box to rotate or swing 360 degrees horizontally and / or vertically. A Raspberry Pi mainboard is arranged in the mainboard box, and a camera is arranged on a side of the mainboard box; The tripod is used to construct a stable base, which is used to bear the weight of the entire downhole survey device and to construct a reference point for the downhole survey device; The telescopic rod is used to extend the mainboard box and its related accessories into the cable well, and to adjust the specific height of the mainboard box, and also serves as the base point for the mainboard box to rotate left and right or pitch up and down; The camera is used to capture optical images of the cable well and transmit the images to the Raspberry Pi for corresponding data processing; The Raspberry Pi is installed with Ubuntu system and a real-time hotspot is set to realize the interaction between device data and mobile phone APP; The Raspberry Pi, camera, telescopic rod and stepper motor constitute an image data acquisition module; The image data acquisition module is based on the Raspberry Pi, supplemented by a high-definition camera, a digital servo, and a telescopic rod, to achieve real-time monitoring, scene recording, and remote operation of the underground power mine environment.

2. The downhole survey device based on 3D printing and intelligent image recognition according to claim 1, characterized in that The tripod structure adopts a structure with an inverted central axis.

3. The downhole survey device based on 3D printing and intelligent image recognition according to claim 1 is characterized in that The extendable retractable rod is controlled by a worm gear brush reduction motor, and is also equipped with a winding wheel and a 0.8mm steel wire. The descent is achieved by releasing the steel wire by its own weight, and the ascent is achieved by winding the steel wire by the torque of the motor.

4. The downhole survey device based on 3D printing and intelligent image recognition according to claim 1, characterized in that The mainboard box is provided with two stepper motors to form a digital servo, which drives the mainboard box to rotate or swing 360 degrees horizontally and vertically in a two-dimensional shooting pan-tilt mode.

5. The downhole survey device based on 3D printing and intelligent image recognition according to claim 1, characterized in that The camera is a high-definition camera.

6. According to the downhole survey device based on 3D printing and intelligent image recognition as described in claim 1, it is characterized in that a lighting device for auxiliary shooting can also be arranged around the camera to provide auxiliary light source for downhole shooting.

7. The downhole survey device based on 3D printing and intelligent image recognition according to claim 6 is characterized in that The lighting device is a light emitting diode group.

8. The downhole survey device based on 3D printing and intelligent image recognition according to claim 1, characterized in that The image data acquisition module can realize the tracking of the underground environment through Open CV automatic tracking or through raspberry APP operation on the mobile phone; the Python program is used to collect image data through API to realize the real-time presentation of the image on the mobile phone, thereby improving the operation and maintenance efficiency.

9. The downhole survey device based on 3D printing and intelligent image recognition according to claim 1, characterized in that The downhole survey device adopts 3D printing technology to realize rapid manufacturing and customized design of the device, timely verify design ideas, and provide space for continuous optimization. At the same time, it also reduces manufacturing costs, improves the scalability and flexibility of the device, reduces the time and errors of manual operation, improves the efficiency of surveying, and brings new technical applications to downhole surveying work.

10. The downhole survey device based on 3D printing and intelligent image recognition according to claim 1, characterized in that The downhole survey device replaces manual downhole survey with a machine with intelligent image recognition function, takes downhole survey as the core, uses Raspberry Pi and the Internet of Things as technical support, realizes real-time transmission of images in power wells, and utilizes the integration of existing technologies to increase the practicality and operability of on-site image acquisition and recognition functions; By establishing comprehensive environmental assessment indicators and systems for power wells, it will help to more comprehensively assess and understand the underground environment, promptly identify and resolve environmental and information problems, and improve production efficiency and safety.

Citation Information

Patent Citations

  • Underwater surveying sonar for cable well

    CN116953673A