Pipeline detection method and device, electronic equipment and storage medium
The pipeline detection method addresses operational complexities and range limitations by imaging pipeline orifices to determine fluid cross-sectional area and flow rate, enabling accurate connectivity assessment without entering the pipeline.
Patent Information
- Application Number
- CN202410987701.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-12-06
AI Technical Summary
Existing pipeline detection technologies face challenges such as cumbersome operations, limitations due to cable length or signal transmission range, and inability to effectively detect connectivity status in pipelines with fluid inside.
A pipeline detection method that acquires images of pipeline orifices, determines fluid cross-sectional area and flow rate using image recognition models, and judges connectivity status based on these parameters without entering the pipeline.
Enables simple and accurate connectivity detection of pipelines with fluid inside, overcoming distance and signal transmission limitations, and providing precise results.
Smart Images

Figure CN119090800A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pipeline detection, and in particular to a pipeline detection method, device, electronic equipment and storage medium. Background Art
[0002] Underground pipelines are a complex environment, prone to blockages, breaks, misconnections, and collapses. If not promptly repaired, sewage overflows can cause regional pollution, while rainwater overflows can lead to waterlogging and land subsidence. To repair these pipeline problems, the first step is to confirm that the actual pipeline connections match the intended construction plan. Then, determine the type and location of the problem, and finally, proceed with repairs.
[0003] The existing technology for detecting the connectivity status of pipelines mainly involves placing a pipeline inspection robot or a visual probe into the pipeline to be inspected to capture an image of the interior of the pipeline, and then analyzing the image to determine the connectivity status of the pipeline. This inspection method requires unblocking and draining the pipeline to provide a good shooting environment for the pipeline robot or visual probe, and requires staff to operate the pipeline robot or visual probe. The operation is cumbersome and is limited by cable length or signal transmission range. In addition, pipelines where fluid has existed inside for a long time cannot be inspected.
[0004] It can be seen that the existing technology for pipeline detection has technical problems such as cumbersome operation, limitation by cable length or signal transmission range, and inability to effectively detect the connectivity status of pipelines with fluid existing inside for a long time. Summary of the Invention
[0005] In view of this, it is necessary to provide a pipeline detection method, device, electronic equipment and storage medium to solve the technical problems in the existing technology of pipeline detection, such as cumbersome operation, limitation by cable length or signal transmission range, and inability to effectively detect the connectivity status of pipelines with fluid existing inside for a long time.
[0006] In order to solve the above technical problems, the present invention provides a pipeline detection method, comprising: Acquire an image of a pipe orifice of a pipeline to be inspected, wherein the image includes the pipe orifice of the pipeline to be inspected and the fluid in the pipe orifice; Determining a fluid cross-sectional area and a fluid flow rate of the fluid in the nozzle using a preset image recognition model based on the nozzle image; The communication state of the pipeline to be inspected is determined based on the fluid cross-sectional area and the fluid flow rate.
[0007] As a possible implementation manner of the present invention, in this implementation manner, determining the fluid cross-sectional area of the fluid in the nozzle based on the nozzle image using a preset image recognition model includes: Extracting a nozzle mask image and a fluid mask image from the nozzle image based on a preset mask image extraction model; Calculating the orifice area of the pipeline to be inspected based on the distance between the image acquisition device and the inner wall of the pipeline to be inspected and the orifice mask image; The fluid cross-sectional area is calculated by combining the ratio of the pixels of the fluid mask image to the pixels of the pipe orifice and the area of the pipe orifice.
[0008] As a possible implementation manner of the present invention, in this implementation manner, calculating the orifice area of the pipeline to be inspected based on the distance value between the image acquisition device and the inner wall of the pipeline to be inspected and the orifice mask image includes: Determine a distance matrix of each pixel point of the nozzle based on the minimum distance from each non-zero pixel point to a zero pixel point in the nozzle mask image; fitting an elliptic curve of the nozzle using a least squares method based on the distance matrix, and determining a pixel radius of the nozzle based on the elliptic curve; The orifice area of the orifice is calculated based on the pixel radius of the orifice and the distance between the image acquisition device and the inner wall of the pipeline to be inspected.
[0009] As a possible implementation manner of the present invention, in this implementation manner, fitting the elliptical curve of the nozzle using the least squares method based on the distance matrix includes: In a preset image coordinate system, determining the number of occurrences of the nozzle pixel point in the image coordinates based on the minimum distance between each pixel point of the nozzle and the zero pixel point, wherein the number of occurrences is proportional to the minimum distance; Based on the coordinate values of each nozzle pixel point in the image coordinate system, the elliptical curve of the nozzle is fitted using the least squares method.
[0010] As a possible implementation manner of the present invention, in this implementation manner, determining the fluid flow rate of the fluid in the nozzle based on the nozzle image using a preset image recognition model includes: Using a preset floating object recognition model to identify a first position and a second position of the same floating object in adjacent frame nozzle images; Calculating the fluid flow rate of the pipe orifice in the pipeline to be inspected based on the shooting interval of the adjacent frames of the pipe orifice images and in combination with the first position and the second position; The fluid flow rate of the orifice is calculated based on the fluid flow rate and the fluid cross-sectional area of the orifice.
[0011] As a possible embodiment of the present invention, in this embodiment, the method of using a preset floating object recognition model to identify the first position and the second position of the same floating object in adjacent frame nozzle images includes: Using a preset floating object recognition model to identify a first image position and a second image position of the same floating object in adjacent frame nozzle images; The first position and the second position of the same floating object are determined based on the first image position and the second image position in combination with the distance value between the image acquisition device and the interior of the pipeline to be inspected and the internal parameters of the image acquisition device.
[0012] As a possible implementation manner of the present invention, in this implementation manner, the pipe orifice image includes a first pipe orifice image of a first pipe orifice and a second pipe orifice image of a second pipe orifice of the pipe to be inspected, and determining the connectivity state of the pipe to be inspected based on the fluid cross-sectional area and the fluid flow rate includes: Determining a size relationship between the fluid cross-sectional areas of the first pipe opening and the second pipe opening based on a first fluid cross-sectional area of the first pipe opening and a second cross-sectional area of the second pipe opening; Based on the magnitude relationship, the communication state of the pipeline between the first pipe opening and the second pipe opening is determined in combination with the first fluid flow velocity of the first pipe opening and the second fluid flow velocity of the second pipe opening.
[0013] In another aspect, the present invention further provides a pipeline detection device, comprising: An image acquisition module is used to acquire an image of the pipe orifice of the pipe to be inspected, wherein the image of the pipe orifice includes the pipe orifice of the pipe to be inspected and the fluid in the pipe orifice; an image recognition module, configured to determine a fluid cross-sectional area and a fluid flow rate of the fluid in the nozzle based on the nozzle image and using a preset image recognition model; A judgment module is used to judge the connectivity status of the pipeline to be detected based on the fluid cross-sectional area and the fluid flow rate.
[0014] On the other hand, the present invention also provides an electronic device, including a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is configured to execute the program stored in the memory to implement the steps of the pipeline detection method described in any of the above implementations.
[0015] On the other hand, the present invention further provides a computer-readable storage medium for storing a computer-readable program or instruction, which, when executed by a processor, can implement the steps of the pipeline detection method described in any of the above implementations.
[0016] The beneficial effects of the present invention are as follows: the pipeline detection method provided by the present invention collects an image of the pipeline opening, analyzes the pipeline opening image using an image analysis model, determines the fluid cross-sectional area and fluid flow rate of the fluid in the pipeline opening, and judges the connectivity status of the pipeline based on the fluid cross-sectional area and fluid flow rate. There is no need to enter the interior of the pipeline, the operation is simple, and the limitations of distance and signal transmission range are ignored. Moreover, the pipeline connectivity detection can be performed on the pipeline with fluid inside, and the results of the pipeline connectivity detection are accurate. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 A schematic flow chart of a pipeline detection method provided by an embodiment of the present invention; Figure 2 A schematic diagram of an implementation scenario provided for an embodiment of the present invention; Figure 3 A schematic flow chart of a method for calculating a fluid cross-sectional area provided in an embodiment of the present invention; Figure 4 A schematic flow chart of a method for calculating nozzle area provided in an embodiment of the present invention; Figure 5 A schematic diagram of a flow chart of an elliptic curve fitting method provided in an embodiment of the present invention; Figure 6 A flow chart of a method for calculating fluid flow provided by an embodiment of the present invention; Figure 7 A schematic flow chart of a method for calculating the position of floating objects provided by an embodiment of the present invention; Figure 8 A schematic flow chart of a method for determining pipeline connectivity status provided by an embodiment of the present invention; Figure 9 A schematic structural diagram of a pipeline detection device provided by an embodiment of the present invention; Figure 10 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0019] The terms "first," "second," and so on, used in the embodiments of the present invention are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, technical features designated as "first" or "second" may explicitly or implicitly include at least one such feature.
[0020] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0021] The present invention provides a pipeline detection method, device, electronic equipment and storage medium, which are described below respectively.
[0022] Figure 1 A flow chart of an embodiment of the pipeline detection method provided by the present invention is shown as follows: Figure 1 As shown, the pipeline detection method includes: S101, obtaining an image of a pipe orifice of a pipe to be inspected, where the image includes the pipe orifice of the pipe to be inspected and the fluid in the pipe orifice; S102, based on the nozzle image, using a preset image recognition model to determine the fluid cross-sectional area and fluid flow rate of the fluid in the nozzle; S103: Determine the connectivity status of the pipeline to be inspected based on the fluid cross-sectional area and the fluid flow rate.
[0023] The pipeline detection method provided in the embodiment of the present invention is suitable for performing connectivity detection on pipelines in which fluid exists for a long time, such as Figure 2 The figure shows a possible implementation scenario of an embodiment of the present invention. By placing image acquisition devices at both ends of the pipe to be inspected, the pipe orifice images are collected by the image acquisition devices, and the pipe orifice images are uploaded to the cloud server. The pipe orifice images are analyzed by the cloud server to determine the connectivity status of the pipe orifice to be inspected.
[0024] In an embodiment of the present invention, the image of the pipe orifice to be inspected should at least include the pipe orifice of the pipe to be inspected and the fluid in the pipe orifice. The fluid cross-sectional area of the fluid in the pipe orifice refers to the cross-sectional area of the fluid in the pipe at the pipe orifice, and the fluid flow rate refers to the flow volume of the fluid at the pipe orifice per unit time. Optionally, the fluid cross-sectional area and fluid flow rate of the fluid in the pipe orifice can be determined using a preset image recognition model. The image recognition model can be a U-Net model or a YOLO model. The image recognition model can identify the pipe orifice and fluid in the pipe orifice image and calculate the cross-sectional area and fluid flow rate of the fluid in the pipe orifice. Furthermore, by comparing the size of the fluid cross-sectional area and the size of the fluid flow rate at the pipe orifices at both ends of the pipe to be inspected, the internal connectivity status of the pipe to be inspected, such as whether there is leakage or blockage, can be determined.
[0025] The pipeline detection method provided by the present invention collects an image of the pipeline opening, analyzes the pipeline opening image using an image analysis model, determines the fluid cross-sectional area and fluid flow rate of the fluid in the pipeline opening, and judges the connectivity status of the pipeline based on the fluid cross-sectional area and fluid flow rate. It does not require entering the interior of the pipeline, is simple to operate, ignores the limitations of distance and signal transmission range, and can perform connectivity detection on pipelines with fluid inside, and the results of the pipeline connectivity detection are accurate. As a possible embodiment of the present invention, in this embodiment, Figure 3 As shown, based on the nozzle image, a preset image recognition model is used to determine the fluid cross-sectional area of the fluid in the nozzle, including: S301, extracting a nozzle mask image and a fluid mask image from a nozzle image based on a preset mask image extraction model; S302, calculating the orifice area of the pipeline to be inspected based on the distance between the image acquisition device and the inner wall of the pipeline to be inspected and the orifice mask image; S303 , calculating the fluid cross-sectional area by combining the ratio of the pixels of the fluid mask image to the pixels of the nozzle and the nozzle area.
[0026] In an embodiment of the present invention, the orifice mask image is a binary image. In this orifice mask image, the pixel value of the orifice portion of the pipe to be inspected is 1, and the pixel values of the remaining portion are 0. Similarly, in the fluid mask image, the pixel value of the fluid portion is 1, and the pixel values of the remaining portion are 0. Optionally, the orifice mask image and the fluid mask image can be extracted from the orifice image using a mask image extraction model. This mask image extraction model can be a U-Net model or other image recognition model, which is not limited by the present invention.
[0027] In an embodiment of the present invention, the distance between the image acquisition device and the inner wall of the pipeline to be inspected can be measured by an infrared ranging device. Specifically, the infrared ranging device can be integrated into the image acquisition device. Optionally, the area of the pipeline orifice can be calculated based on the pixel area of the pipeline orifice in the orifice mask image and the distance values from the image acquisition device to the interior of the pipeline to be inspected. Based on this, and in combination with the ratio of the number of fluid pixels to the number of pixels at the pipeline orifice in the fluid mask image, the cross-sectional area of the fluid at the pipeline orifice can be calculated.
[0028] The embodiment of the present invention can calculate the fluid cross-sectional area and fluid flow rate of the fluid in the pipe orifice through the pipe orifice mask image and the fluid mask image, which facilitates the subsequent judgment of the pipeline connectivity.
[0029] As a possible embodiment of the present invention, in this embodiment, Figure 4 As shown, the orifice area of the pipeline to be inspected is calculated based on the distance value between the image acquisition device and the inner wall of the pipeline to be inspected and the orifice mask image, including: S401, determining a distance matrix of each pixel point of the nozzle based on the minimum distance from each non-zero pixel point to a zero pixel point in the nozzle mask image; S402, fitting an elliptic curve of the nozzle using a least squares method based on the distance matrix, and determining a pixel radius of the nozzle based on the elliptic curve; S403: Calculate the orifice area of the pipe orifice based on the pixel radius of the pipe orifice and the distance between the image acquisition device and the inner wall of the pipe to be inspected.
[0030] In an embodiment of the present invention, when calculating the orifice area of a pipeline to be inspected, a distance transformation is first performed on the orifice mask image. Specifically, the pixel value of each non-zero pixel in the orifice mask image is adjusted to the minimum distance between the non-zero pixel and the zero pixel, thereby obtaining a distance matrix. Generally, in the orifice mask image, the orifice range is a pixel region covering the orifice ridge line. The pixel value of this pixel region is 1, and the pixel values of the remaining pixels are 0. The distance between each pixel in this pixel region and the nearest pixel with a pixel value of 0 is calculated, and this distance value is used as the pixel value of the pixel in this pixel region. For example, if the minimum distance between the pixel at the edge of the orifice and the pixel with a pixel value of 0 is 1, then the pixel value of the pixel at the edge of the orifice remains 1. However, the pixel in the middle of the orifice is generally farther from the zero pixel, for example, 10. In this way, the pixel value of the pixel in the middle of the orifice is set to 10. Based on this, the orifice portion in the orifice image can be determined, and the pixel value is higher when the pixel is closer to the center.
[0031] In an embodiment of the present invention, a least squares method is used to fit an elliptical curve of the pipe orifice based on the distance matrix. The pixel radius of the pipe orifice can be determined based on the fitted elliptical curve. Specifically, the pixel lengths of the major and minor axes of the ellipse can be calculated based on the fitted elliptical curve. The average of these pixel lengths is used as the pixel radius of the ellipse. The pixel area of the ellipse can then be calculated using the formula for calculating the area of a circle. The actual area of the pipe orifice can then be calculated by combining the distance between the image acquisition device and the interior of the pipe to be inspected and the focal length formula of the image acquisition device.
[0032] The embodiment of the present invention can calculate the actual area of the nozzle through the nozzle mask image, which facilitates the subsequent calculation of the fluid cross-sectional area of the fluid in the nozzle.
[0033] As a possible embodiment of the present invention, in this embodiment, Figure 5 As shown, the elliptic curve of the nozzle is fitted using the least squares method based on the distance matrix, including: S501, in a preset image coordinate system, determining the number of occurrences of the nozzle pixel point in the image coordinates based on the minimum distance between each nozzle pixel point and the zero pixel point, wherein the number of occurrences is proportional to the minimum distance; S502 , fitting the elliptical curve of the nozzle using the least square method based on the coordinate value of each nozzle pixel point in the image coordinate system.
[0034] In an embodiment of the present invention, when performing an ellipse fitting on a pipe nozzle, it is necessary to weight the pixel points of the pipe ridge to ensure the accuracy of the ellipse curve fitting of the pipe. Specifically, an image coordinate system is constructed in the pipe nozzle image, and the number of occurrences of the pipe nozzle pixel point in the image coordinates is determined based on the minimum distance between each pipe nozzle pixel point and the zero pixel point. For example, for a pipe nozzle edge pixel point, it may not be the pipe nozzle ridge line, and its distance value from the zero pixel point is 1, so the number of occurrences of the coordinate value of this pixel point in the image coordinate system is 1. For a pixel point in the middle of the pipe nozzle, it is most likely the pipe nozzle ridge line, and its minimum distance from the zero pixel point is 10, so the number of occurrences of the coordinate value of this pixel point in the image coordinate system is 10. This can enhance the influence of the pipe ridge line on the ellipse fitting, thereby ensuring the accuracy of the ellipse fitting. Optionally, the least squares method can be used to fit the coordinates of all pipe nozzle pixel points to obtain the pipe nozzle ellipse curve, and the fitting criterion is to minimize the sum of the squares of the distances from each pipe nozzle pixel point to the ellipse curve.
[0035] The embodiment of the present invention ensures the accuracy of pipeline curve fitting by weighting the coordinate values of the pixel points of the pipe orifice ridge line.
[0036] As a possible embodiment of the present invention, in this embodiment, Figure 6 As shown, based on the nozzle image, a preset image recognition model is used to determine the fluid flow rate of the fluid in the nozzle, including: S601, using a preset floating object recognition model to identify a first position and a second position of the same floating object in adjacent frame nozzle images; S602, calculating the fluid flow rate of the pipe orifice in the pipeline to be inspected based on the interval between the shots of the pipe orifice images in adjacent frames and in combination with the first position and the second position; S603: Calculate the fluid flow rate of the pipe orifice based on the fluid flow rate and the fluid cross-sectional area of the pipe orifice.
[0037] In the embodiment of the present invention, when calculating the fluid flow rate of the fluid in the nozzle, the calculation needs to be performed based on two adjacent nozzle image frames. Specifically, the fluid flow rate of the fluid in the nozzle can be indirectly calculated based on floating objects in the nozzle image.
[0038] Furthermore, the position of floating objects in the pipe orifice image is identified using a floating object recognition model. For the same floating object in two adjacent frames of images, the first and second positions of the floating object in the two adjacent frames are respectively identified. Then, based on the shooting interval between the two adjacent frames of images, the flow velocity of the floating object in the pipe is calculated, and the flow velocity of the fluid in the pipe is indirectly obtained. Then, the fluid cross-sectional area of the fluid in the pipe orifice is collected to calculate the fluid flow rate.
[0039] As a possible embodiment of the present invention, in this embodiment, Figure 7 As shown, a preset floating object recognition model is used to recognize the first position and the second position of the same floating object in adjacent frame nozzle images, including: S701, using a preset floating object recognition model to identify a first image position and a second image position of the same floating object in adjacent frame nozzle images; S702 : Determine the first position and the second position of the same floating object based on the first image position and the second image position, in combination with the distance between the image acquisition device and the interior of the pipeline to be inspected and the internal parameters of the image acquisition device.
[0040] In the embodiment of the present invention, when identifying the first position and the second position of the floating object, it is necessary to first identify the first image position and the second image position of the floating object in the nozzle image. Specifically, formulas (1) and (2) can be used for calculation: (1) (2) Among them, X is the camera horizontal coordinate of the floating object, and Y is the camera vertical coordinate of the floating object. is the horizontal coordinate of the image of the floating object, is the image ordinate of the float, and is the intrinsic focal length of the image acquisition device, and are the horizontal and vertical coordinates of the center point of the nozzle image, is the pitch angle of the image acquisition device, and H is the height of the image acquisition device from the bottom of the pipeline to be detected.
[0041] After calculating the image position of the floating object, the actual position of the floating object in the world coordinate system can be calculated using formula (3) and formula (4): (3) (4) in, is the horizontal coordinate of the floating object in the world coordinate system, is the ordinate of the floating object in the world coordinate system, is the heading angle of the image acquisition device.
[0042] In the embodiment of the present invention, the actual position of the floating object in the pipeline can be determined by the position of the floating object in the image, so as to facilitate calculation of the fluid flow rate based on the floating object.
[0043] As a possible embodiment of the present invention, in this embodiment, Figure 8 As shown, the pipe orifice image includes a first pipe orifice image of a first pipe orifice and a second pipe orifice image of a second pipe orifice of the pipe to be inspected, and judging the connectivity state of the pipe to be inspected based on the fluid cross-sectional area and the fluid flow rate includes: S801, determining a size relationship between the fluid cross-sectional areas of the first pipe opening and the second pipe opening based on a first fluid cross-sectional area of the first pipe opening and a second cross-sectional area of the second pipe opening; S802: Determine the connection state of the pipeline between the first pipe opening and the second pipe opening based on the size relationship and in combination with the first fluid flow rate of the first pipe opening and the second fluid flow rate of the second pipe opening.
[0044] In the embodiment of the present invention, the determination of the pipeline connectivity state needs to be made in combination with the fluid cross-sectional area and fluid flow rate of the fluid in the pipe openings at both ends of the pipeline. Specifically, as shown in Table 1, a possible determination rule is: Table 1: Pipeline connectivity status judgment rules AB pipe port status AB pipe port status AB pipe port status AB pipe port status Fluid cross-sectional area A=B A>B A<B A<B Fluid flow rate A is positive and B is negative, the same size A is positive and B is negative, the sizes are the same or A>B A is positive and B is negative, the same size A is positive and B is unknown, A is much greater than B in conclusion No pipeline defects, A flows out, B flows in, A is low-lying, B is high-lying External water intrusion; A flows out, B flows in; A is low-lying, B is high-lying Pipeline leakage, A flows out, B flows in. A is low-lying, B is high-lying. Pipeline blockage Based on the above table, the first pipe opening of the pipeline to be inspected is defined as pipe opening A, and the second pipe opening is defined as pipe opening B. The fluid cross-sectional area and fluid flow rate of the fluid in pipe openings AB can be used to determine the terrain height at the location of pipe openings AB, the inflow and outflow relationship of pipe openings AB, and whether the pipeline to be inspected between pipe openings AB has leaks, blockages, external water intrusion, etc., which makes it easier for maintenance personnel to determine the connectivity status of the pipeline.
[0045] In order to better implement the pipeline detection method in the embodiment of the present invention, based on the pipeline detection method, correspondingly, Figure 9 As shown, an embodiment of the present invention further provides a pipeline detection device, and the pipeline detection device 900 includes: An image acquisition module 901 is configured to acquire an image of the orifice of the pipeline to be inspected, wherein the orifice image includes the orifice of the pipeline to be inspected and the fluid in the orifice; An image recognition module 902 is configured to determine the fluid cross-sectional area and fluid flow rate of the fluid in the nozzle based on the nozzle image using a preset image recognition model; The judgment module 903 is used to judge the connectivity status of the pipeline to be detected based on the fluid cross-sectional area and the fluid flow rate.
[0046] The pipeline detection device 900 provided in the above embodiment can implement the technical solution described in the above pipeline detection method embodiment. The specific implementation principles of the above modules or units can be found in the corresponding content of the above pipeline detection method embodiment, which will not be repeated here.
[0047] The pipeline detection method provided by the present invention collects an image of the pipeline opening, analyzes the pipeline opening image using an image analysis model, determines the fluid cross-sectional area and fluid flow rate of the fluid in the pipeline opening, and judges the connectivity status of the pipeline based on the fluid cross-sectional area and fluid flow rate. It does not require entering the interior of the pipeline, is simple to operate, ignores the limitations of distance and signal transmission range, and can perform connectivity detection on pipelines with fluid inside, and the results of the pipeline connectivity detection are accurate. like Figure 10 As shown, the present invention also provides an electronic device 1000. The electronic device 1000 includes a processor 1001, a memory 1002 and a display 1003. Figure 10 Only some of the components of the electronic device 1000 are shown, but it should be understood that it is not required to implement all of the shown components, and more or fewer components may be implemented instead.
[0048] In some embodiments, the processor 1001 may be a central processing unit (CPU), a microprocessor, or other data processing chip, configured to execute program codes or process data stored in the memory 1002 , such as the pipeline detection method of the present invention.
[0049] In some embodiments, processor 1001 may be a single server or a server group. The server group may be centralized or distributed. In some embodiments, processor 1001 may be local or remote. In some embodiments, processor 1001 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, multiple clouds, or any combination thereof.
[0050] In some embodiments, the memory 1002 may be an internal storage unit of the electronic device 1000, such as a hard disk or memory of the electronic device 1000. In other embodiments, the memory 1002 may also be an external storage device of the electronic device 1000, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 1000.
[0051] Furthermore, the memory 1002 may include both an internal storage unit of the electronic device 1000 and an external storage device. The memory 1002 is used to store application software installed in the electronic device 1000 and various data.
[0052] In some embodiments, display 1003 can be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 1003 is used to display information about electronic device 1000 and to display a visual user interface. Components 1001-1003 of electronic device 1000 communicate with each other via a system bus.
[0053] In one embodiment, when the processor 1001 executes the pipeline detection program in the memory 1002, the following steps may be implemented: Acquire an orifice image of the pipeline to be inspected, where the orifice image includes the orifice of the pipeline to be inspected and the fluid in the orifice; Based on the nozzle image, a preset image recognition model is used to determine the fluid cross-sectional area and fluid flow rate of the fluid in the nozzle; The connectivity status of the pipeline to be inspected is determined based on the fluid cross-sectional area and the fluid flow rate.
[0054] It should be understood that, when the processor 1001 executes the pipeline detection program in the memory 1002 , in addition to the above functions, it can also implement other functions. For details, please refer to the description of the corresponding method embodiment above.
[0055] Furthermore, the embodiment of the present invention does not specifically limit the type of the electronic device 1000 mentioned. The electronic device 1000 may be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop computer, or the like. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with IOS, Android, Microsoft, or other operating systems. The above-mentioned portable electronic devices may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 1000 may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0056] Accordingly, an embodiment of the present invention further provides a computer-readable storage medium, which is used to store computer-readable programs or instructions. When the program or instructions are executed by a processor, the steps or functions of the pipeline detection method provided in the above-mentioned method embodiments can be implemented.
[0057] Those skilled in the art will appreciate that all or part of the process flow of the above-described method embodiment can be implemented by instructing related hardware (such as a processor, controller, etc.) through a computer program, and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a magnetic disk, an optical disk, a read-only memory, or a random access memory.
[0058] The pipeline detection method, device, electronic device, and storage medium provided by the present invention are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only intended to help understand the method and core concept of the present invention. At the same time, those skilled in the art will find that the specific implementation methods and application scopes may vary based on the concepts of the present invention. In summary, the contents of this specification should not be construed as limiting the present invention.
Claims
1. A pipeline detection method, characterized in that: include: Acquire an orifice image of the pipeline to be inspected, wherein the orifice image includes the orifice of the pipeline to be inspected and the fluid in the orifice; Based on the nozzle image, a preset image recognition model is used to determine a fluid cross-sectional area and a fluid flow rate of the fluid in the nozzle; The connection state of the pipeline to be inspected is determined based on the fluid cross-sectional area and the fluid flow rate.
2. The pipeline detection method according to claim 1, characterized in that: The method of determining the fluid cross-sectional area of the fluid in the nozzle based on the nozzle image by using a preset image recognition model includes: Extracting a nozzle mask image and a fluid mask image from the nozzle image based on a preset mask image extraction model; Calculating the orifice area of the pipeline to be inspected based on the distance value between the orifice image acquisition point and the inner wall of the pipeline to be inspected and the orifice mask image; The fluid cross-sectional area is calculated by combining the ratio of the pixels of the fluid mask image to the pixels of the pipe orifice and the area of the pipe orifice.
3. The pipeline detection method according to claim 2, characterized in that: The calculating the pipe orifice area of the pipe to be detected based on the distance value between the pipe orifice image acquisition point and the inner wall of the pipe to be detected and the pipe orifice mask image comprises: Determine a distance matrix of each pixel point of the nozzle based on the minimum distance from each non-zero pixel point to a zero pixel point in the nozzle mask image; Fitting an elliptic curve of the pipe orifice by a least square method based on the distance matrix, and determining a pixel radius of the pipe orifice based on the elliptic curve; The orifice area of the orifice is calculated based on the pixel radius of the orifice and the distance value between the image acquisition device and the inner wall of the pipeline to be detected.
4. The pipeline detection method according to claim 3, characterized in that: The method of fitting the elliptic curve of the nozzle by the least square method based on the distance matrix comprises: In a preset image coordinate system, the number of occurrences of the nozzle pixel point in the image coordinates is determined based on the minimum distance between each pixel point of the nozzle and the zero pixel point, wherein the number of occurrences is proportional to the minimum distance; Based on the coordinate values of each pipe opening pixel point in the image coordinate system, the elliptical curve of the pipe opening is fitted by the least square method.
5. The pipeline detection method according to claim 1, characterized in that: The method of determining the fluid flow rate of the fluid in the nozzle based on the nozzle image by using a preset image recognition model includes: Using a preset floating object recognition model to recognize a first position and a second position of the same floating object in adjacent frame nozzle images; Based on the shooting interval time of the pipe orifice images of adjacent frames, combined with the first position and the second position, the fluid flow rate of the pipe orifice in the pipe to be inspected is calculated; The fluid flow rate of the orifice is calculated based on the fluid flow rate and the fluid cross-sectional area of the orifice.
6. The pipeline detection method according to claim 5, characterized in that: The method of using a preset floating object recognition model to recognize a first position and a second position of the same floating object in adjacent frame nozzle images includes: Using a preset floating object recognition model to recognize a first image position and a second image position of the same floating object in adjacent frame nozzle images; Based on the first image position and the second image position, the first position and the second position of the same floating object are determined in combination with the distance value between the image acquisition device and the inside of the pipeline to be detected and the internal parameters of the image acquisition device.
7. The pipeline detection method according to claim 1, characterized in that: The pipe orifice image includes a first pipe orifice image of a first pipe orifice and a second pipe orifice image of a second pipe orifice of the pipe to be detected, and judging the connectivity state of the pipe to be detected based on the fluid cross-sectional area and the fluid flow rate includes: Determine the size relationship between the cross-sectional areas of the fluid in the first pipe opening and the second pipe opening based on the first cross-sectional area of the fluid in the first pipe opening and the second cross-sectional area of the second pipe opening; Based on the magnitude relationship, the connection state of the pipeline between the first pipe opening and the second pipe opening is determined in combination with the first fluid flow rate of the first pipe opening and the second fluid flow rate of the second pipe opening.
8. A pipeline detection device, characterized in that: include: An image acquisition module, used to acquire an image of a pipe opening of a pipe to be inspected, wherein the image of the pipe opening includes the pipe opening of the pipe to be inspected and the fluid in the pipe opening; An image recognition module, used to determine the fluid cross-sectional area and fluid flow rate of the fluid in the nozzle based on the nozzle image using a preset image recognition model; A judgment module is used to judge the connection state of the pipeline to be detected based on the fluid cross-sectional area and the fluid flow rate.
9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps of the pipeline detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps of the pipeline detection method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Unattended water level and flow velocity monitoring camera and monitoring method
CN112362900A
Sewage treatment chemical pool flow detection method and device and related equipment
CN113819960A
Intelligent evaluation method and system for flow velocity and flow of municipal drainage pipeline
CN114895060A
Intelligent measuring method for flow of drainage pipeline
CN116824467A
River surface flow velocity measurement method based on water surface floating object target tracking
CN116934808A
