A method of constructing a visualized power manhole environment system

By applying intelligent image recognition technology and a Raspberry Pi system to power wells, problems such as discrepancies in cable records and the difficulty of downhole surveys were solved. This enabled rapid and accurate surveying and safety assessment of the downhole environment, improving survey accuracy and efficiency while reducing costs and risks.

CN119445252BActive Publication Date: 2025-12-05STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411601582.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-12-05
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

Existing technologies for power well surveying suffer from problems such as discrepancies between the system cable ledger and the actual cable situation, high difficulty in downhole surveying, frequent operations, and high safety requirements. In particular, surveying efficiency is low in cable wells with no obvious water accumulation or shallow water accumulation, or in large tunnel-type cable wells, and cable marking and text information cannot be provided.

Method used

Employing intelligent image recognition technology and utilizing a Raspberry Pi as the core, combined with a high-definition camera, digital servo motor, and retractable long pole, this system enables real-time monitoring and remote operation of the underground environment in power wells. Through OpenCV automatic tracking and Raspberry App operation, it identifies cable nameplates and cable hole locations, constructs an image dataset, trains a classifier model, and builds an environmental assessment system by combining indicators such as gas content and water immersion conditions.

Benefits of technology

It enables rapid, efficient, and accurate surveying of the underground environment of power wells, improving survey accuracy and efficiency, reducing survey costs and risks, enhancing safety and practicality, identifying cable nameplates and borehole locations, providing comprehensive assessments of power wells, and meeting iterative design needs for different site requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119445252B_ABST
    Figure CN119445252B_ABST
Patent Text Reader

Abstract

The application relates to a method for constructing a visual power shaft environment system, belonging to the field of measurement. Image recognition technology is applied to cable nameplate two-dimensional code recognition, character recognition and cable hole position recognition processes; a model and an algorithm are integrated into a Raspberry Pi system, real-time image data are read by using OpenCV and a camera, and target detection and classification are carried out through the model; the positioning of underground nameplates and existing hole positions is realized through image detection of OpenCV; the two-dimensional code recognition function is added, and the two-dimensional code information that can be read is two-dimensional code information generated in the library; an environment evaluation index taking gas content, water immersion, cable nameplate and hole position information as key information is established, and a complete underground environment evaluation system is constructed; through scoring of various indexes, the environment of the power shaft is comprehensively evaluated, a comprehensive evaluation score is obtained, and whether the environment of the power shaft is safe, effective and compliant is judged.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of exploration and measurement of cable wells, and particularly relates to a method for constructing a visual power well environment system. BACKGROUND

[0002] With the continuous development of economic construction, the pace of urban construction is increasing. In order to adapt to the development of urban planning and the construction needs of municipal transportation facilities, the laying of power cables in power wells is increasingly complex and intertwined. How to strengthen and improve the scientific management level of power wells, and comprehensively and accurately grasp the distribution of power wells and cables in the wells, is a problem that has been faced. This is not only the need to adapt to urban development and modern urban management, but also an important prerequisite for strengthening and improving the management level of power cables, quickly identifying power wells and cables, promptly troubleshooting, improving power grid safety, and ensuring normal power use of various users.

[0003] Underground cables are mainly laid in the form of laying in power well pipes. There are a large number of interlaced and adjacent situations with various pipelines such as communication, gas, water supply, and drainage. Although each power line and each power well has established corresponding technical archives and drawing materials. However, due to the replacement of management personnel, various construction operations and other factors, the original technical archives, drawings and on-site conditions often do not match, affecting the exploration and design, and leading to the inability to truly play a supporting, guiding and monitoring role.

[0004] The underground on-site survey of power wells is carried out before, during and after the implementation of the pipe project. However, the following problems have always existed:

[0005] 1. The system cable account does not match the actual situation. The information in PMS may not be consistent with the actual situation on site, which brings a large amount of on-site survey workload to the design stage.

[0006] 2. Underground survey is difficult. Underground pipes need to open manhole covers, and the underground operation environment is complex and variable.

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

[0008] 4. Safety requirements for underground survey in limited space are high. Underground operations require multiple processes such as poison detection, explosion detection, and air exhaust. If personnel go down the well, they also need to wear gas masks and safety ropes.

[0009] During the project site reconnaissance stage, how to safely, quickly and effectively survey the underground situation is a problem that needs to be solved.

[0010] The invention patent application with the application publication date of October 27, 2023 and the application publication number of CN 116953673 A discloses "an underwater surveying sonar for cable well", which comprises a top plate, the top plate is circumferentially distributed with supporting arms, a rod body is arranged below the top plate, an elbow plate is arranged at the bottom end of the rod body, a rotating rudder is arranged on the outer side of the elbow plate, a sonar is rotatably arranged inside the elbow plate, a probe is arranged at the end of the sonar, the output end of the rotating rudder penetrates through the elbow plate and is connected with the sonar, and the rotating rudder can drive the sonar to rotate on the elbow plate. The technical scheme realizes the surveying of the working condition of the cable in the cable well without using manual well drilling and without discharging the accumulated water in the cable well, and achieves the purpose of improving the working efficiency.

[0011] The technical scheme focuses on underwater surveying of the cable well in the accumulated water state, the sonar performs multi-directional surveying and scanning inside the cable well, and the scanned information is transmitted to the master control platform, the master control platform completes imaging of the cable well through the transmitted information, which can reduce the pumping time for surveying after pumping the underwater cable well and can reduce the ventilation time of the underwater cable well, but it is not suitable for the cable well or large channel type cable well without obvious accumulated water or with shallow accumulated water, and the collected image is an image based on the echo of the sonar, which can only represent the contour of the underwater object and cannot provide more relevant information about the laid cable in the cable well (such as cable markings, cable labels or relevant text information printed on the outer surface of the cable). SUMMARY

[0012] The technical problem to be solved by the present application is to provide a method for constructing a visual power worker well environment system. The intelligent image recognition technology is applied to the downhole surveying work of the power well (also known as cable well), and the raspberry pi is used as the core, supplemented by high-definition camera, digital rudder, telescopic long rod, to realize real-time monitoring, scene recording and remote operation of the power well environment; the Open CV automatic tracking or the raspberry APP operation on the mobile phone end is realized, the tracking of the downhole environment is realized; the Python program collects image data through API, realizes the instant presentation of the image on the mobile phone end, and improves the operation and maintenance efficiency.

[0013] The technical scheme of the present application is to provide a method for constructing a visual power worker well environment system, characterized by:

[0014] An downhole image data acquisition module is arranged to realize the following functions:

[0015] 1) Collecting power well image data, including cable nameplate and cable hole position information, to construct an image data set;

[0016] 2) Preprocessing the collected images to improve the accuracy and robustness of subsequent identification;

[0017] The preprocessing includes image enhancement, noise removal and image alignment;

[0018] 3) Extract useful features from the preprocessed images to enable better target recognition by subsequent classifiers;

[0019] 4) Design appropriate classifier models based on feature extraction results for cable plate and cable hole recognition;

[0020] 5) Train the classifier models using data sets to accurately classify cable plates and cable holes;

[0021] 6) Apply the trained model to real-world scenarios for automated recognition of cable plates and cable holes, improving the efficiency and accuracy of power well image analysis;

[0022] The method for building a visual power well environment system applies image recognition technology to cable plate QR code recognition, text recognition and cable hole recognition processes; integrates models and algorithms into a Raspberry Pi system, uses OpenCV and a camera to read real-time image data, and performs target detection and classification through the model; uses OpenCV image detection to locate underground plates and existing holes; adds QR code recognition function, which can read generated QR code information in the library; establishes an environment evaluation index based on gas content, water immersion, cable plate and hole information, and builds a complete underground environment evaluation system; scores each index to comprehensively evaluate the environment of the power well and obtain a comprehensive evaluation score to determine whether the environment of the power well is safe, effective and compliant.

[0023] Specifically, the method for building a visual power well environment system conducts rapid, efficient and accurate surveying of power wells to establish a standardized power well evaluation system, thereby improving surveying accuracy and efficiency, reducing surveying costs and risks, and providing a basis for cable laying and maintenance.

[0024] Further, the preprocessing includes image enhancement, noise removal and image alignment; the features include texture, color and shape; and the classifier model includes a support vector machine and a neural network.

[0025] Specifically, the downhole image data acquisition module is composed of a mechanical control system and an image recognition system; the mechanical control system and the image recognition system exchange data and transmit instructions through a communication module; the mechanical control system includes a vertical lifting motor, a horizontal rotating motor, a vertical rotating motor, a controller, and a display screen; the image transmission system includes a controller, a power management part, an image sensor, and a communication module.

[0026] The operator mainly interacts with the entire device through the controller and views the results; the power management part is responsible for the charge and discharge management of the overall power supply battery and the stable voltage output of the power supply; the image sensor is responsible for identification and image information collection in cooperation with the corresponding algorithm; the communication module part is responsible for analyzing, encoding, compressing, and transmitting the transmitted data and instructions.

[0027] Further, the image recognition system includes at least a Raspberry Pi 4B and a USB camera supporting a maximum resolution of 1080p and a frame rate of 30fps; OpenCV and TensorFlow Lite are selected as the image processing and machine learning framework, which is implemented through Python programming language; an image dataset containing various downhole scenes and cable nameplates is prepared, including front, side, different angles, and different lighting conditions; data augmentation techniques are used to increase the diversity of the dataset; a suitable model is trained according to the dataset, and optimization algorithms and parameters are used to improve the accuracy and efficiency of identification.

[0028] Specifically, the method for constructing a visual power well environment system uses TensorFlow Lite to train a deep learning model for target detection and classification; model compression and quantization techniques are used to optimize the size and speed of the model.

[0029] More specifically, the deep learning model includes at least MobileNetV2 or SSD model.

[0030] Specifically, the downhole environment evaluation system includes the following indicators:

[0031] Toxic and harmful gas content: including the concentration, temperature, and humidity of toxic and harmful gases;

[0032] Gas detection instruments are placed in the downhole to monitor the concentration of harmful gases in the air in real time, including carbon monoxide, carbon dioxide, oxygen, and methane;

[0033] Water immersion: real-time monitoring of downhole water level and taking waterproof measures to ensure safe operation of the equipment;

[0034] Cable nameplate information: the cable nameplate information in the power well includes cable model, rated voltage, current, conductor material, insulation material; by identifying and recording the nameplate information, it is convenient for future maintenance and management;

[0035] Cable hole position accuracy: the cable hole position in the power well is positioned and surveyed to ensure that the hole position is accurate.

[0036] Further, the method for constructing a visual power well environment system evaluates the environment of the power well based on and according to the evaluation score table, comprehensively evaluates the environment of the power well by scoring each index, and obtains a comprehensive evaluation score to determine whether the environment of the power well is safe, effective, and compliant.

[0037] The method for constructing a visual power well environment system according to the technical scheme of the present application collects and processes underground visual images to construct an image data set, realizes unmanned surveying based on cable nameplate two-dimensional code recognition, text recognition, and cable hole position recognition, uses a Raspberry Pi and the Internet of Things as technical support to realize real-time transmission of images in the power well, increases the practicability and operability of the on-site image collection and recognition function, establishes comprehensive evaluation indexes and systems of the environment of the power well, comprehensively evaluates and understands the underground environment, timely discovers and solves environmental and information problems, and improves production efficiency and safety.

[0038] Compared with the prior art, the present application has the following advantages:

[0039] 1. The technical scheme of the present application establishes a standardized underground power well evaluation system to quickly, efficiently, and accurately survey the underground power well, thereby improving the accuracy and efficiency of the survey and reducing the cost and risk of the survey, and providing a basis for cable laying and maintenance.

[0040] 2. The technical scheme of the present application uses the perception and survey of the limited space of human-computer interaction without the need for professional downhole personnel and the carrying of safety tools, thereby improving the safety of underground surveying operations.

[0041] 3. The technical scheme of the present application applies image recognition technology to the processes of cable nameplate two-dimensional code recognition, text recognition, and hole position recognition, uses Open CV image detection to position the nameplate and existing hole position in the well, and adds two-dimensional code recognition function to read two-dimensional code information generated in the library; this helps to establish an environmental evaluation index based on gas content, water immersion, cable nameplate, and hole position information, to construct a complete underground environment evaluation system, to comprehensively evaluate the environment of the power well by scoring each index, and to obtain a comprehensive evaluation score to determine whether the environment of the power well is safe, effective, and compliant.

[0042] 4. The technical solution of the present application has the characteristics of improving safety, enhancing practicality and being more popular, the framework is formed by 3D printing, has strong product iteration, can be redesigned or adjusted according to different on-site needs at any time, to meet different on-site needs, and make rapid updates and iterations. BRIEF DESCRIPTION OF DRAWINGS

[0043] Figure 1 is a hardware structure schematic diagram of the visual power manhole environment system constructed by the present application;

[0044] Figure 2 is a structure schematic diagram of the Raspberry Pi of the present application;

[0045] Figure 3 is a space transformation principle schematic diagram of the present application;

[0046] Figure 4 is a system overall structure schematic diagram of the present application;

[0047] Figure 5 is a method step schematic block diagram of the visual power manhole environment system constructed by the present application.

[0048] In the figure, 1 is a tripod, 2 is a telescopic long rod, 3 is a stepping motor, 4 is a mainboard box, and 5 is a camera. DETAILED DESCRIPTION

[0049] The present application will be further described below in combination with the drawings.

[0050] The intelligent surveying equipment can be used in a working environment with unsafe factors underground to complete the corresponding surveying work, which not only solves the safety problem of construction personnel, but also greatly saves labor cost and greatly improves the efficiency of underground work after the technology matures and forms modularization.

[0051] The target of the technical solution is to establish a standardized power underground evaluation system, to quickly, efficiently and accurately survey the power underground, to improve the accuracy and efficiency of the survey, to reduce the cost and risk of the survey, and to provide a basis for cable laying and maintenance.

[0052] The main core component used in the technical solution is Raspberry Pi (abbreviation RPi, alias RasPi / RPI, a microcomputer only the size of a credit card designed for computer programming education, its system is based on Linux). Raspberry Pi is a simple processor based on Linux programming language, uses SD card as internal hard disk, uses USB interface around the card as connection, and has video analog signal TV output interface and HDMI high-definition video output interface.

[0053] The equipment basis of the technical solution is derived from the combination of the above components. The operation is performed through the integrated operation platform and visual interface, and the direction and photography of the probe in the well are operated, including certain lens recognition function (mainly realized through Python programming) to confirm the hole position in the pipeline, identify the cable nameplate, evaluate the cable environment, etc. The original manual downhole surveying is realized. The surveying arm of the probe uses an operable telescopic rod to realize the surveying in the well.

[0054] Specifically, as shown in Figure 1 In the technical solution, a tripod structure (adopting an inverted central axis structure) is arranged on the ground, a length-adjustable telescopic rod is arranged at the top of the tripod, the upper end of the telescopic rod is connected with the top of the tripod, and a mainboard box is arranged at the lower end of the telescopic rod.

[0055] The telescopic rod is controlled by a worm gear and brush reduction motor, and is additionally provided with a wire winding wheel and a 0.8 mm steel wire. The steel wire is released by gravity in the descending process and is wound by the motor torsion in the ascending process.

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

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

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

[0059] The tripod is used to build a stable base to bear the weight of the entire downhole surveying device and build the reference point of the downhole surveying device.

[0060] The telescopic rod is used to extend the mainboard box and its related accessories into the cable well and adjust the specific height of the mainboard box, and simultaneously serves as the reference point for the left-right rotation or up-down pitching of the mainboard box.

[0061] The camera is used to shoot the optical image of the cable well and transmit the image to the Raspberry Pi for corresponding data processing.

[0062] An illuminating device for assisting shooting can also be arranged around the camera to provide auxiliary light source for downhole shooting.

[0063] The illuminating device is a light-emitting diode group.

[0064] The Raspberry Pi, camera, telescopic rod and stepper motor form an image data acquisition module.

[0065] The image data acquisition module takes Raspberry Pi as the core, supplemented by a high-definition camera, a digital servo, and a telescopic long rod, to realize real-time monitoring, scene recording, and remote operation of the power well environment.

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

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

[0068] As shown in Figure 5 The image data acquisition module is used to realize the following functions:

[0069] 1) Data acquisition: Collect power well image data, including cable nameplate and cable hole information, etc., to build an image data set.

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

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

[0072] 4) Classifier design: According to the feature extraction results, design appropriate classifier models, such as support vector machines, neural networks, etc., to identify cable nameplates and cable hole positions.

[0073] 5) Model training: Train the classifier model using the data set to make it accurately classify cable nameplates and cable hole positions.

[0074] 6) Application practice: Apply the trained model to the actual scene to automatically identify cable nameplates and cable hole positions, improving the efficiency and accuracy of power well image analysis.

[0075] Specifically, the structure of the Raspberry Pi is as shown in Figure 2

[0076] On the mainboard of the Raspberry Pi, a dual-frequency 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 are arranged, and around the mainboard, a display screen interface, a power supply interface, an HDMI (High Definition Multimedia Interface) interface, a camera interface, a 3.5mm audio interface, a USB 2.0 interface, and a USB 3.0 interface are arranged.

[0077] The controller of the Raspberry Pi and other robots are essentially different, because the Raspberry Pi has a perfect operating system (others only have a control system) and supports Python very well. Therefore, using Python language can quickly develop software on the Raspberry Pi to control the sensors of the robot, and the Raspberry Pi has another advantage that it can run artificial intelligence related algorithms, such as running SVM (Support Vector Machine) on it.

[0078] A、In the technical solution, the following related calculation mode is adopted:

[0079] 1) Space transformation principle:

[0080] As shown in Figure 3 , the technical solution can obtain the conversion of the root angle (two-dimensional shooting holder) and the x, y coordinates of the camera part through triangular variation:

[0081]

[0082] 2) Object automatic recognition:

[0083] The object recognition function is realized through the opencv function library. The method of hsv segmentation binary image is adopted, although the recognized object becomes simple and strict, but the recognition accuracy is greatly improved, and the speed can withstand the test of the Raspberry Pi.

[0084] 3) 3D printing technology:

[0085] 3D printing technology is an additive manufacturing method from nothing to something, which mainly slices the three-dimensional digital model, then prints each section layer by layer, and then simplifies the complex three-dimensional model into a planar manufacturing. This makes the 3D printing technology can use the relatively mature planar processing technology, layer by layer printing, and finally complete the manufacturing of the whole model.

[0086] ​In the technical solution, most parts of the downhole surveying device, including connectors, main bodies, rotating gimbals, etc., are printed by an FDM printer.

[0087] Raspberry Pi-based image recognition technology:

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

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

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

[0091] Caffe: Caffe is a popular deep learning framework that can run on Raspberry Pi. It supports multiple neural network models and provides pre-trained models for image classification, object detection, and semantic segmentation.

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

[0093] These technologies can be implemented on Raspberry Pi through Python programming language.

[0094] B、The overall structure of the system of the present invention is shown in Figure 4 .

[0095] The method of constructing the visual power well environment system mainly consists of a mechanical system and a video transmission system. The communication module is used to exchange data and transmit instructions between the systems.

[0096] The mechanical control system is the main management part of the entire downhole surveying device operation process, which includes vertical lifting motor, horizontal rotating motor, vertical rotating motor, controller, display screen and other parts.

[0097] The operator mainly interacts with the entire device through the controller and views the results; the power management part is responsible for the charge and discharge management of the overall power supply battery and the stable voltage output of the power supply; the image sensor is responsible for identification and image information collection in cooperation with the corresponding algorithm; the communication module part is responsible for analyzing, encoding, compressing, and transmitting data and instructions.

[0098] C. Image recognition system design scheme:

[0099] 1) Hardware selection

[0100] Select the appropriate Raspberry Pi model and camera for the application scenario. The performance and memory capacity of 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.

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

[0102] 2) Software selection:

[0103] Select the appropriate image processing and machine learning framework for the application scenario. Select the appropriate algorithm and model according to the specific task, and implement it through Python programming language.

[0104] This technical solution selects OpenCV and TensorFlow Lite as the image processing and machine learning framework, and implements it through Python programming language.

[0105] 3) Dataset preparation:

[0106] Prepare appropriate data sets for training and testing models. Ensure the diversity and quantity of the data set to improve the accuracy of recognition.

[0107] This technical solution prepares an image data set containing various downhole scenes, cable nameplates, etc., including front, side, different angles, and different lighting conditions. Use data enhancement techniques to increase the diversity of the data set.

[0108] 4) Model training and optimization:

[0109] Train the appropriate model according to the data set, and optimize the algorithm and parameters to improve the accuracy and efficiency of recognition.

[0110] This technical solution uses TensorFlow Lite to train a deep learning model, such as MobileNetV2 or SSD model, for target detection and classification. Use model compression, quantization, and other techniques to optimize the size and speed of the model.

[0111] 5) System integration and deployment:

[0112] Integrate the model and algorithm into the Raspberry Pi image recognition system, and then deploy and test it. The system's ease of use, reliability, and security need to be considered.

[0113] This technical solution integrates models and algorithms into a Raspberry Pi system, uses OpenCV and a camera to read real-time image data, and performs object detection and classification using the model. The results are displayed on a screen or transmitted to other devices via a network.

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

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

[0116] OpenCV is used for various image and video analysis tasks, such as face recognition and detection, license plate reading, photo editing, advanced robot vision, optical character recognition, and more.

[0117] This technical solution requires two main libraries: python-OpenCV and NumPy.

[0118] apt-get install python3-numpy

[0119] apt-get install python3-numpy

[0120] import cv2importmatplotlibimportnumpy

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

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

[0123] Install the necessary dependency libraries for compiling OpenCV using the command `sudo apt-get install build-essential`.

[0124] The command `sudo apt-get install build-libavformat-dev` installs the library, which provides a method for encoding and decoding audio and video streams.

[0125] The command `sudo apt-get install ffmpeg` installs ffmpeg, which provides transcoding capabilities for audio and video streams.

[0126] sudo apt-get install python-opencv This installs the Python development packages that OpenCV depends on.

[0127] Install OpenCV development documentation using `sudo apt-get install opencv-doc`;

[0128] The command `sudo apt-get install libcv-dev` installs the header files and static libraries required for compiling OpenCV.

[0129] The command `sudo apt-get install libcvaux-dev` installs more development tools for compiling OpenCV.

[0130] The command `sudo apt-get install libhighgui-dev` installs another header file and static library required for compiling OpenCV.

[0131] Copy all examples to the root directory using the command: `cp -r / usr / share / doc / opencv-doc / examples / dt / `.

[0132] 2. Prepare the camera: Plug the Raspberry Pi-specific CSI camera into the Raspberry Pi's CSI port and enable it in raspi-config. Then, use the Raspistill command to use it directly.

[0133] Test the camera: Copy the camera.py file from the example program that you just copied to the root directory.

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

[0135] Run `python camera.py` to check if there is a device with image video0.

[0136] 3. In image and video analysis, cameras record data frame by frame, 30-60 times per second. Therefore, image recognition and video analysis largely use the same methods.

[0137] The subsequent extensive image and video analysis boils down to simplifying the source as much as possible. This begins with converting to grayscale, or it could be color filtering, gradients, or a combination of these. From here, various analyses and transformations can be performed on the source.

[0138] Generally, the process involves conversion, analysis, and then any overlay applied to the original source. This is what we often see: the "finished product" of the identified object displayed on a full-color image or video.

[0139] However, data is rarely processed in this raw form in practice.

[0140] For example, in the case of edge detection, black corresponds to a pixel value of (0, 0, 0), while white lines are (255, 255, 255). Each image and frame in the video is broken down into pixels in this way, and like edge detection, it can be inferred that edges are locations based on the contrast between white and black pixels. Then, to see the original image with marked edges, all the coordinates of the white pixels are recorded, and these locations are then marked on the original image or video, resulting in a bounding box for image recognition, as shown in the example below:

[0141]

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

[0143] while(True):

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

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

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

[0147] Define a new variable gray as the frame to be converted to grayscale. OpenCV will read the color as BGR (blue-green-red).

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

[0149] The source is converted to gray.

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

[0151] break

[0152] This statement executes only once per frame, exits the while loop, and then runs:

[0153] cap.release()

[0154] cv2.destroyAllWindows()

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

[0156] 4. Set threshold

[0157] The purpose of thresholding is to further simplify the analysis of visual data.

[0158] First, it can be converted to grayscale, but grayscale still has at least 255 values.

[0159] At its most basic level, thresholding converts everything to either white or black. For example, setting the threshold to 125 (maximum 255) means everything below 125 will be converted to 0 or black, while everything above 125 will be converted to 255 or white. If you convert it to grayscale as usual, it will become white and black. If you don't convert it to grayscale, you'll get a binarized image, but with color.

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

[0161] First, try a simple threshold:

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

[0163] Binary thresholding is a simple "yes or no" threshold where the pixel is 255 or 0. In many cases, this is white or black, but color has already been preserved for the image, so it is still color.

[0164] The first parameter here is the image. The next parameter is the threshold, which is set to 10. The next is the maximum value, which is set to 255. Finally, the threshold type is selected as THRESH_BINARY.

[0165] Generally, a threshold of 10 is a bit too low. Choose 10 because this is a low-light image, so a low number is preferable. Usually, a threshold around 125-150 might produce the best results.

[0166] import cv2importnumpy as np

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

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

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

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

[0171] cv2.waitKey(0)

[0172] cv2.destroyAllWindows()

[0173] The picture is now slightly more readable, but still difficult to analyze programmatically, so let's simplify it further.

[0174] First, grayscale the image, then use a threshold:

[0175] import cv2import numpy as np

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

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

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

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

[0180] cv2.waitKey(0)

[0181] cv2.destroyAllWindows()

[0182] Next, try adaptive thresholding to figure out the unclear image.

[0183] import cv2import numpy as np

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

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

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

[0187] cv2.waitKey(0)

[0188] cv2.destroyAllWindows()

[0189] 5. Color filter

[0190] Filter the color at the bottom of the plaque, trying to show it. Convert the color to HSV, which is "hue saturation value". This can help us determine a more specific color using varying values based on the hue and saturation range, for example:

[0191]

[0192]

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

[0194] 6. Edge detection

[0195] Edge detection is mainly used to frame the range of the detected target, such as the edge of the plaque.

[0196]

[0197]

[0198] In this way, an image recognition camera can be obtained that can automatically detect the edges of downhole objects and blue plaques.

[0199] 7) Downhole survey field application:

[0200] In this technical solution, the downhole survey field application of the cable well mainly includes:

[0201] 7.1) Field image acquisition;

[0202] 7.2) Cable plaque two-dimensional code recognition;

[0203] 7.3) Cable nameplate text information recognition;

[0204] 7.4) Cable hole position recognition.

[0205] 8) The specific implementation process of the software related to the technical solution:

[0206] ① Environment building: download the ubuntu system environment package, use the system tool to decompress and install to the raspberry pi and set the user password, then use the remote port login tool putty to realize the remote instruction operation of the raspberry pi. Use the config instruction to open the WIFI connection, install the Python and OPENCV environment package and execute the program file. In the Python environment, the OPENCV script programming is carried out on the raspberry pi.

[0207] ② Image training: the hole imaging and nameplate in the downhole photo are extracted for algorithm training, the circle in OPENCV is used to detect the hole, and the continuous hole is defined as the target, the algorithm accuracy is improved, the rectangular edge detection is executed using the rectangle detection rec, and the accuracy is increased according to the length-width ratio 800*600 and the color of the nameplate. The gray image is obtained using CV2.cvtcolor, BGR2GRAY, the background details are blurred using bilateralFilter to increase the recognition accuracy, the edge detection is carried out using edged to realize simple outlining, the filtered image is traversed, and a rectangular blue frame is drawn around the detection result.

[0208] ③ Function logic: the images of the downhole hole and the nameplate in the real-time image are recognized, and the hole and the nameplate recognition information in the real-time photographed photo are compared with the existing information in the library. The py.zbar package is imported to recognize the two-dimensional code, the image is decoded to realize simple two-dimensional code recognition, and the rectangular frame is also used for marking. At the same time, the information is uploaded to the database SQL for comparison with the existing information.

[0209] ④ Transmission unit: the image transmission tool (Qopen, HLS, etc.) is downloaded on the mobile phone, the RTMP server image of the raspberry pi is connected, the real-time image display of the raspberry pi to the mobile phone is realized in the same WIFI, and the nameplate reading is realized.

[0210] ⑤ Result saving: the background generates the saomiao folder containing the screenshot of the photographed hole and the scanned two-dimensional code information.

[0211] 9) Establish a downhole environment evaluation system:

[0212] The power downhole environment is complex, and there are a large number of cables, pipelines and other equipment, and the position and layout of these equipment are often very complex, and the downhole environment in different areas also has great differences, which brings certain difficulties to the survey. At the same time, the amount and quality of the data collected by the downhole survey are different, and the collected data need to be effectively processed and analyzed to extract useful information, and due to the limitation of the survey environment, the collected data are usually not complete and need to be supplemented and corrected in multiple ways.

[0213] In order to solve these difficulties, it is necessary to establish a standardized power downhole evaluation system to quickly, efficiently and accurately survey the power downhole, so as 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.

[0214] The main purposes of establishing the power downhole environment evaluation system are as follows:

[0215] 9.1) Improve safety. The establishment of the evaluation system can comprehensively evaluate the environment of the power downhole, including the content of toxic and harmful gases, water immersion, cable nameplate information, cable hole position accuracy and other indicators, and evaluate the safety of the power downhole environment, so as to improve the safety of the power downhole.

[0216] 9.2) Promote standardized management. The establishment of the evaluation system can standardize the management of the power downhole, evaluate the pre-survey, mid-term operation and maintenance, and post-accounting archiving, and forcibly require each link to operate according to the standard, so as to promote the standardized management of the power downhole.

[0217] 9.3) Ensure production efficiency. The establishment of the evaluation system can timely find the problems of the power downhole environment, ensure the normal operation of the power downhole, and avoid the influence of the environment problems on the production efficiency.

[0218] Further, the power downhole environment evaluation system needs to include the following indicators:

[0219] Toxic and harmful gas content: For the power downhole, the monitoring of gas content is very important, including the concentration, temperature and humidity of toxic and harmful gases. It is necessary to lay gas detection instruments in the downhole to monitor the concentration of harmful gases in the air in real time, including carbon monoxide, carbon dioxide, oxygen and methane.

[0220] Water immersion: If water immersion occurs in the power downhole, it will seriously affect the operation of the equipment, and even cause damage to the electrical equipment. Therefore, the water level in the downhole needs to be monitored in real time, and waterproof measures need to be taken to ensure the safe operation of the equipment.

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

[0222] Cable hole position accuracy: In the power well, the accuracy of the 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, the cable hole position needs to be located and surveyed to ensure accurate hole position.

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

[0224]

[0225] For the content of toxic and harmful gases, 1-5 points can be given according to the concentration of toxic and harmful gases in the air, temperature, humidity, etc. The higher the score, the lower the content of toxic and harmful gases in the air, and the better the air quality.

[0226] For water immersion, 1-5 points can be given according to the water level in the well. The higher the score, the lower the water level in the well, and the better the water immersion.

[0227] For cable nameplate information, 1-5 points can be given according to the accuracy and completeness of identifying cable nameplate information compared with the information in the PMS system. The higher the score, the more accurate and complete the cable nameplate information.

[0228] For cable hole position accuracy, 1-5 points can be given according to the accuracy and completeness of the cable hole position compared with the information in the PMS system. The higher the score, the more accurate and complete the cable hole position.

[0229] Through the scoring of each indicator, the environmental situation 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.

[0230] At the same time, the establishment of this system helps to more comprehensively evaluate the underground environment, timely discover and solve environmental and information problems, improve production efficiency and safety, and has important significance for achieving lean management.

[0231] The technical scheme of the present application takes Raspberry Pi single-board computer as the core, takes Internet of Things and OpenCV as technical support, and constructs an image data acquisition module of a power underground surveying device.The image data acquisition module takes Raspberry Pi as the core, is supplemented with a high-definition camera, a digital steering engine, an extendable long rod and a relay, realizes real-time monitoring, scene recording and remote operation of the power underground environment, installs an ubuntu system on Raspberry Pi and sets a real-time hotspot, realizes interaction between device data and a mobile phone APP, tracks the underground environment through OpenCV automatic tracking or through operation of a raspberry APP on the mobile phone end, collects image data through an API by a Python program, realizes instant presentation of the image on the mobile phone end, and improves operation and maintenance efficiency.

[0232] Meanwhile, the technical scheme of the present application adopts 3D printing technology, realizes rapid manufacturing and customized design of the device, can not only verify design ideas in time, give space for continuous optimization, but also reduces manufacturing cost, improves expandability and flexibility of the device, reduces time and error of manual operation, improves surveying efficiency, and brings new technical application to underground surveying work.

[0233] To sum up, the technical scheme of the present application takes underground surveying as the core, uses Raspberry Pi and Internet of Things as technical support, realizes real-time transmission of images in the power well, integrates existing technologies, increases practicality and operability of the on-site image acquisition and identification function, establishes an environmental condition comprehensive evaluation index and system of the power well, helps to more comprehensively evaluate and understand the underground environment, timely discovers and solves environmental and information problems, improves production efficiency and safety, and has important significance for realizing lean management.

[0234] The present application can be widely used in the planning and operation management field of power wells (cable wells).

Claims

1. A method for constructing a visual power manhole environment system, characterized by: setting up an underground image data acquisition module to realize the following functions: 1) collecting power well image data, including cable nameplate and cable hole information, to construct an image data set; 2) preprocessing the collected images to improve the accuracy and robustness of subsequent recognition; the preprocessing includes image enhancement, noise removal, and image alignment; 3) extracting useful features from the preprocessed images to enable the subsequent classifier to better recognize the target; 4) designing a suitable classifier model based on the feature extraction results to identify the cable nameplate and cable hole; 5) training the classifier model using the data set to enable accurate classification of the cable nameplate and cable hole; 6) applying the trained model to real-world scenarios for automated recognition of cable nameplates and cable holes, improving the efficiency and accuracy of power well image analysis; the method for constructing a visual power manhole environment system applies image recognition technology to the process of cable nameplate QR code recognition, text recognition, and cable hole recognition; 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; uses OpenCV image detection to locate the underground nameplate and existing hole; adds QR code recognition function, which can read the generated QR code information in the library; establishes an environment evaluation index based on gas content, water immersion, cable nameplate, and hole information, and constructs a complete underground environment evaluation system; evaluates the environment of the power well by scoring each index and obtaining a comprehensive evaluation score to determine whether the environment of the power well is safe, effective, and compliant.

2. The method of constructing a visualized power manhole environment system according to claim 1, characterized in that The method for constructing a visual power manhole environment system quickly, efficiently, and accurately surveys the power well, establishes a standardized power well evaluation system, improves the accuracy and efficiency of the survey, reduces the cost and risk of the survey, and provides a basis for cable laying and maintenance.

3. The method of constructing a visualized power manhole environment system according to claim 1, characterized in that the preprocessing includes image enhancement, noise removal, and image alignment; the features include texture, color, and shape; the classifier model includes support vector machines and neural networks.

4. The method of constructing a visualized electrical manhole environment system according to claim 1, characterized in that The underground image data acquisition module is composed of a mechanical control system and an image recognition system; the mechanical control system and the image recognition system exchange data and transmit instructions through a communication module; the mechanical control system includes a vertical lifting motor, a horizontal rotating motor, a vertical rotating motor, a controller, and a display screen; the image transmission system includes a controller, a power management part, an image sensor, and a communication module; The operator mainly interacts with the entire device through the controller and views the results; the power management part is responsible for charging and discharging management of the overall power supply battery and stable voltage output of the power supply; the image sensor is responsible for identification and image information collection in cooperation with the corresponding algorithm; the communication module is responsible for analyzing, encoding, compressing, and transmitting the transmitted data and instructions.

5. The method of constructing a visualized electrical manhole environment system according to claim 4, characterized in that The image recognition system comprises at least a Raspberry Pi 4B and a USB camera supporting a maximum resolution of 1080p and a frame rate of 30fps; OpenCV and TensorFlow Lite are selected as the image processing and machine learning framework, and are realized through a Python programming language; an image dataset containing various downhole scenes and cable nameplates is prepared, including front, side, different angles and different light conditions; a data augmentation technique is used to increase the diversity of the dataset; a suitable model is trained according to the dataset, and an optimization algorithm and parameters are used to improve the accuracy and efficiency of the recognition.

6. The method of constructing a visualized electrical manhole environment system according to claim 5, characterized in that The method for constructing the visual power well environment system uses TensorFlow Lite to train a deep learning model for target detection and classification; the model size and speed are optimized through model compression and quantization techniques.

7. The method of constructing a visualized electrical manhole environment system according to claim 6, characterized in that The deep learning model comprises at least a MobileNetV2 or SSD model.

8. The method of constructing a visualized electrical manhole environment system according to claim 1, characterized in that The downhole environment evaluation system comprises the following indexes: Toxic and harmful gas content: including the concentration, temperature and humidity of toxic and harmful gases; Gas detection instruments are arranged in the downhole to monitor the concentration of harmful gases in the air in real time, including carbon monoxide, carbon dioxide, oxygen and methane; Water immersion condition: the water level in the downhole is monitored in real time, and waterproof measures are taken to ensure the safe operation of the equipment; Cable nameplate information: the cable nameplate information in the power well includes the cable model, rated voltage, current, conductor material and insulating material; by identifying and recording the nameplate information, future maintenance and management are facilitated; Cable hole position accuracy: the cable hole position in the power well is positioned and surveyed to ensure accurate hole position.

9. The method of constructing a visualized electrical manhole environment system according to claim 8, characterized in that The method for constructing the visual power well environment system takes the evaluation scoring table of the evaluation system as the evaluation basis and evaluation basis, and comprehensively evaluates the environment of the power well by scoring each index to obtain a comprehensive evaluation score, so as to determine whether the environment of the power well is safe, effective and compliant.

10. The method of constructing a visualized electrical manhole environment system according to claim 1, characterized in that The method for constructing the visual power well environment system realizes the unmanned survey of the power well cable nameplate two-dimensional code recognition, character recognition and cable hole position recognition by collecting and processing the downhole visual images, constructing the image dataset, using Raspberry Pi and Internet of Things as technical support, and realizing the real-time transmission of images in the power well; the practicability and operability of the on-site image collection and recognition function are improved; By establishing the comprehensive evaluation indexes and system of the environment of the power well, the downhole environment is comprehensively evaluated and understood, and environmental and information problems are found and solved in a timely manner, thereby improving the production efficiency and safety.

Citation Information

Patent Citations

  • Underwater surveying sonar for cable well

    CN116953673A

  • Big data-based electric cable well state evaluation and early warning system and method

    CN109540212A

  • Cable well monitoring system and cable well monitoring method

    CN116989844A