Disclosure of Invention
The application aims to provide a leakage detection method and a leakage detection system for an underwater pipeline, a computer readable storage medium and a leakage detection underwater robot for the underwater pipeline, and can improve detection accuracy and detection efficiency.
In order to solve the technical problem, the application provides a leakage detection method for an underwater pipeline, which has the following specific technical scheme:
acquiring a detection image of the underwater pipeline by using a CCD image sensor;
filtering the detection image and generating a digital signal corresponding to the detection image;
performing data detection on the digital signals frame by adopting an interframe difference method to judge whether an image frame containing suspicious leakage points exists in the digital signals;
and if so, determining that the underwater pipeline leaks.
Wherein, utilizing CCD image sensor to obtain the detection image of pipeline under water includes:
and controlling the underwater robot to shoot the underwater pipeline at an angle of 45 degrees to obtain a detection image.
Wherein, if present image frame does not contain suspicious leak point, still include:
and updating the current image frame to the background, and continuously detecting the data of the undetected image frame by using an interframe difference method.
Wherein, if the digital signal does not have the image frame containing the suspicious leakage point, the method further comprises:
and determining the moving direction of the underwater robot according to the detection image so as to enable the underwater robot to move along the moving method, and executing the steps of the leakage detection method on the underwater pipeline.
Wherein determining a moving direction of the underwater robot from the detection image to move the underwater robot along the moving method comprises:
carrying out binarization processing and edge detection on the detected image; the length of the detection image is X pixels, and the width of the detection image is Y pixels;
setting a plurality of sinusoidal curves with different phases and amplitudes according to a plurality of different polar diameters and polar angle values for any coordinate in the detection image; the intersection point of the sine curve represents that the coordinates corresponding to the sine curve pass through the same straight line;
determining two edge lines of the detection image according to the number of the intersection points on the straight line, and calculating the actual distance between the two edge lines at a first preset position;
when the actual distance is larger than a first preset value, the underwater robot ascends;
when the actual distance is smaller than a second preset value, the underwater robot descends;
when the actual distance is smaller than the first preset value and larger than the second preset value, the underwater robot keeps the current movement height unchanged;
determining a center line of the underwater pipeline according to the two edge lines and the pixel value of the same preset pixel point, and calculating a coordinate value at a second preset position on the center line;
when the coordinate value is larger than a left deviation threshold value, the underwater robot drives to the left side;
when the coordinate value is larger than a right deviation threshold value, the underwater robot drives to the right side;
and when the coordinate value is within the preset threshold value range, the underwater robot keeps the current movement direction unchanged.
The present application further provides a leak detection system for an underwater pipeline, comprising:
the acquisition module is used for acquiring a detection image of the underwater pipeline by using a CCD image sensor;
the image processing module is used for filtering the detection image and generating a digital signal corresponding to the detection image;
the detection module is used for carrying out data detection on the digital signals frame by adopting an interframe difference method so as to judge whether an image frame containing a suspicious leakage point exists in the digital signals;
and the determining module is used for determining that the underwater pipeline leaks if the detecting module determines that the digital signal contains the image frame containing the suspicious leakage point.
Wherein the acquisition module comprises:
and the acquisition unit is used for controlling the underwater robot to shoot the underwater pipeline at an angle of 45 degrees to acquire a detection image.
Wherein, still include:
and the updating module is used for updating the current image frame to the background if the current image frame does not contain the suspicious leakage point, and continuously carrying out data detection on the undetected image frame by using an interframe difference method.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the leak detection method as described above.
The application also provides a leak detection underwater robot of the underwater pipeline, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of the leak detection method when calling the computer program in the memory.
The application provides a leak detection method of an underwater pipeline, which comprises the following steps: acquiring a detection image of the underwater pipeline by using a CCD image sensor; filtering the detection image and generating a digital signal corresponding to the detection image; performing data detection on the digital signals frame by adopting an interframe difference method to judge whether an image frame containing suspicious leakage points exists in the digital signals; and if so, determining that the underwater pipeline leaks.
According to the method, the leakage point of the underwater pipeline is detected by using the detection method of optical imaging image processing, the digital signal is subjected to data detection frame by adopting an interframe difference method, the detection resolution is high, the location detection is accurate, the leakage detection accuracy is improved, and the misjudgment rate is greatly reduced compared with that of a distributed optical fiber sensing method. The application also provides a leak detection system of the underwater pipeline, a computer readable storage medium and a leak detection underwater robot of the underwater pipeline, which have the beneficial effects and are not repeated here.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a flowchart of a leak detection method for an underwater pipeline according to an embodiment of the present application, where the leak detection method includes:
s101: acquiring a detection image of the underwater pipeline by using a CCD image sensor;
in this step, a CCD (charge-coupled device) sensor is used to acquire an image. When the light source irradiates an object, the reflected light carries the information on the surface of the object, the information is amplified by the lens group and then enters the photosensitive surface of a CCD (charge coupled device) sensor, and the tiny pixels on the photosensitive surface generate electric signals with different intensities according to different input light intensities to complete the conversion of photoelectric signals. The electrical signals are stored after passing through an analog-to-digital converter to form an image.
Specifically, when the detection image is acquired, the underwater robot can be controlled to shoot the underwater pipeline at an angle of 45 degrees so as to acquire the detection image. The 45-degree angle means that a connecting line of the underwater robot and the shooting area forms a 45-degree angle with the underwater pipeline. During shooting, due to the special underwater environment, an auxiliary light source is generally required to be provided for supplementing light so that more pipeline surface characteristic information is collected. It is easy to understand that when collecting the underwater pipeline image, a lens is needed, and preferably, the lens group can be used for collecting the underwater pipeline image. The lens group is composed of a plurality of lenses, and can amplify the surface of an object, so that the generated image is clearer, and the accuracy of the image processing result is greatly improved. Therefore, the CCD image sensor is used to include the corresponding lens by default, and the type, number and specification of the lens are not limited herein. Of course, there may be other ways to obtain the detection image, and the method is not limited herein.
S102: filtering the detection image and generating a digital signal corresponding to the detection image;
the step aims to perform simple filtering processing on signals transmitted by the CCD image sensor and generate digital signals of images by using an analog-to-digital converter technology. It should be noted that the CCD generates signals of different voltages for the image collected by the lens according to the change of the light intensity, so that the filtering of the detected image is actually the filtering of the signals of different voltages, and then the analog-to-digital converter technology is used to generate the digital signals corresponding to the detected image.
S103: performing data detection on the digital signals frame by adopting an interframe difference method to judge whether an image frame containing suspicious leakage points exists in the digital signals; if yes, entering S104;
the interframe difference method is a method for obtaining a target contour by performing a difference operation on two adjacent frames in a video image sequence, and the background of a pipeline is usually relatively stable.
One frame of image is collected as a background image of the interframe difference algorithm, and every several frames of images are collected as a current image, so that the current image and the background image are subjected to interframe difference algorithm processing. And selecting a threshold value according to the histogram of the image after the statistical difference and carrying out binarization processing to obtain the region of interest and related information thereof.
And if the current image frame does not contain the suspicious leakage points, updating the current image frame to the background, and continuously performing data detection on the undetected image frame by using an interframe difference method. If a suspected leak is found, the current background image is retained. When the area of the region of interest obtained by the interframe difference method is larger than a set threshold value, the processor can give a judgment result that the oil and gas leakage occurs at the point.
S104: and determining that the underwater pipeline leaks.
Once suspicious leakage points exist in the image frame, the real-time detection is performed on whether leakage occurs or not in a suspicious and timely manner, communication alarm can be performed when the leakage is confirmed, and loss can be stopped in time.
The method for detecting the leakage point of the underwater pipeline by using the optical imaging image processing has the advantages of high resolution, accurate location detection and the like. Compared with a distributed optical fiber sensing method, the method greatly reduces the misjudgment rate.
Based on the foregoing embodiment, as a preferred embodiment, if there is no image frame containing a suspected leak point in the digital signal, the method further includes:
and determining the moving direction of the underwater robot according to the detection image so as to enable the underwater robot to move along the moving method, and performing the steps of the leakage detection method on the underwater pipeline.
Specifically, the following method may be adopted to determine the moving direction of the underwater robot according to the detection image so that the underwater robot moves along the moving method:
carrying out binarization processing and edge detection on the detected image; the length of the detection image is X pixels, and the width of the detection image is Y pixels;
setting a plurality of sinusoidal curves with different phases and amplitudes according to a plurality of different polar diameters and polar angle values for any coordinate in a detected image; wherein, the intersection point of the sine curve represents that the coordinates corresponding to the sine curve pass through the same straight line;
determining two edge lines of the detection image according to the number of the intersection points on the straight line, and calculating the actual distance between the two edge lines at a first preset position;
when the actual distance is larger than a first preset value, the underwater robot ascends;
when the actual distance is smaller than a second preset value, the underwater robot descends;
when the actual distance is smaller than the first preset value and larger than the second preset value, the underwater robot keeps the current movement height unchanged;
determining a center line of the underwater pipeline according to the two edge lines and the pixel value of the same preset pixel point, and calculating a coordinate value at a second preset position on the center line;
when the coordinate value is larger than a left deviation threshold value, the underwater robot drives to the left side;
when the coordinate value is larger than a right deviation threshold value, the underwater robot drives to the right side;
and when the coordinate value is within the preset threshold value range, the underwater robot keeps the current movement direction unchanged.
The first preset value, the second preset value, the left deviation threshold value, the right deviation threshold value and the preset threshold value are not limited. The first preset position and the second preset position are used for comparison, are not fixed positions, and can be freely set by a person skilled in the art. The following description will be given by taking the Y/2 position as an example.
When a frame image is acquired, the image is first subjected to binarization processing and edge detection by setting the length of the image obtained by the processor as X pixels and the width as Y pixels. Setting the polar diameter and polar angle of a straight line in a polar coordinate system as r and theta respectively according to a straight line formula
r=xcosθ+ysinθ
For an arbitrary coordinate point x0、y0A curve can be formed according to different values of r and theta, and any pair of coordinate points can form a sine curve in the r and theta planes. All the pixel points in the image are operated to obtain a plurality of positive values with different phases and amplitudesAnd the intersection points of the chord curves represent that coordinate points corresponding to the curves pass through the same straight line, and two edge curves of the silk thread in the image, namely two edge lines of the underwater pipeline, can be successfully detected only by setting a threshold value of the number of points on the straight line.
The edge line may be straight or curved, the distance between the lines being equal to the diameter of the underwater pipeline. And taking the distance between two lines at Y/2 as a reference point of the current underwater robot from the underwater pipeline, and comparing the value with a preset pipeline diameter.
If the distance between the two lines exceeds a threshold value which is larger than a preset value, the underwater robot should ascend.
If the two-wire distance exceeds a threshold value less than a predetermined value, the underwater robot should descend.
And if the distance between the two lines is within the set threshold range, the underwater robot keeps the original state and continues to advance.
And averaging pixel points of the two edge curves in the same Y coordinate to obtain a central line of the underwater pipeline, and taking a central point at the Y/2 position as a reference point of the underwater robot deviating from the underwater pipeline.
If the value of the center point exceeds a threshold value deviating to the left, the underwater robot drives to the left.
If the value of the center point exceeds a threshold value deviating to the right, the underwater robot drives to the right.
If the value of the central point is between the set threshold value ranges, the underwater robot keeps the original state and continues to advance.
In the following, a leak detection system for an underwater pipeline provided by an embodiment of the present application is described, and the leak detection system described below and the leak detection method for an underwater pipeline described above may be referred to correspondingly.
The present application further provides a leak detection system for an underwater pipeline, comprising:
an obtaining module 100, configured to obtain a detection image of the underwater pipeline by using a CCD image sensor;
the image processing module 200 is configured to perform filtering processing on the detection image and generate a digital signal corresponding to the detection image;
the detection module 300 is configured to perform data detection on the digital signal frame by using an interframe difference method to determine whether an image frame including a suspected leakage point exists in the digital signal;
a determining module 400, configured to determine that the underwater pipeline leaks if the detecting module determines that the digital signal contains an image frame including a suspected leak point.
Based on the foregoing embodiment, as a preferred embodiment, the obtaining module 100 includes:
and the acquisition unit is used for controlling the underwater robot to shoot the underwater pipeline at an angle of 45 degrees to acquire a detection image.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the updating module is used for updating the current image frame to the background if the current image frame does not contain the suspicious leakage point, and continuously carrying out data detection on the undetected image frame by using an interframe difference method.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed, may implement the steps provided by the above-described embodiments. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The application also provides a leak detection underwater robot for the underwater pipeline, which can comprise a memory and a processor, wherein the memory stores a computer program, and the processor can realize the steps provided by the embodiment when calling the computer program in the memory. Of course, the leak detection terminal of the underwater pipeline can also comprise various network interfaces, power supplies and other components.
Except for underwater robot accidents, the underwater robot can also comprise a light source, a lens group, a CCD (charge coupled device) image sensor, a signal processor, a memory, a processor and a communication alarm module. The CCD (charge coupled device) image sensor sends the signal to the signal processor after obtaining the image, the signal processor generates the image and stores the image in the memory, the processor obtains the image from the memory to process the image, and if the abnormal condition is detected, the communication alarm is immediately carried out. The CCD (charge coupled device) image sensor and the light source shoot the underwater pipeline at an angle of 45 degrees, image information is transmitted to the processor, the processor analyzes the image, judges whether oil and gas leakage points exist or not and gives a proper instruction of the driving system, and cruise and leakage point detection are completed.
The underwater robot is used as a device carrier and consists of a shell and a device for driving the shell to move.
The light source is used for illuminating the surface of the object, so that light can enter the lens group with more object surface characteristic information, and the image generation quality is improved.
The lens group is composed of a plurality of lenses, and can amplify the surface of an object, so that the generated image is clearer, and the accuracy of the image processing result is greatly improved.
The CCD image sensor is used for generating signals of different voltages from light signals received on the photosensitive surface according to the change of the light intensity of the light signals and transmitting the signals.
The signal processor obtains the signal transmitted by the CCD image sensor and then carries out simple filtering processing, and digital signals of the image are generated by using an analog-to-digital converter technology.
The memory stores the digital signals of one picture, so that the processor can read the digital signals conveniently.
The processor processes the image frame by frame from the memory, detects whether leakage occurs in real time, and immediately sends information to the communication alarm module if leakage occurs
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system provided by the embodiment, the description is relatively simple because the system corresponds to the method provided by the embodiment, and the relevant points can be referred to the method part for description.
The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.